Guys,
I have been using kwrite as the editor for my fortran programming, however it is too slow when using it remotely. Also it doesnt have the time-stamp function as emacs. Now when i started using emacs n expecting to have the time-stamp function, its not working. I had added necessary script in .emacs file found on net (as below) and of course i had included
Time-stamp: <> in the file. Are there any other things that I should include/do to get this function available in emacs. Oh ..another thing, I also tried M-x time-stamp, its loaded, but nothing happened after that. So please could anyone advice me regarding this??
Thanks
Quote:
;; Set up the keyboard so the delete key on both the regular keyboard
;; and the keypad delete the character under the cursor and to the right
;; under X, instead of the default, backspace behavior.
(global-set-key [delete] 'delete-char)
(global-set-key [kp-delete] 'delete-char)
;; turn on font-lock mode
(global-font-lock-mode t)
;; enable visual feedback on selections
(setq-default transient-mark-mode t)
;; always end a file with a newline
(setq require-final-newline t)
; Update string in the first 8 lines looking like Timestamp: <> or " "
(setq time-stamp-format "%:y-%02m-%02d %02H:%02M:%02S %u %f")
(add-hook 'write-file-hooks 'time-stamp)
;; A function to insert the time stamp at point.
(defun stamp ()
"Insert at point the dummy time stamp string to activate the time stamp facility."
(interactive "*")
(insert "Time-stamp: <>")
(time-stamp)
)
;; stop at the end of the file, not just add lines
(setq next-line-add-newlines nil)
;;to display time
(display-time)
;;to set the cursor color
(set-cursor-color "white")
;;to set the font
(set-frame-font "-sony-*-*-*-*-*-16-*-*-*-*-*-*-*")
;;to set foreground color to white
(set-foreground-color "white")
;;to set background color to black
(set-background-color "black")
;;to manage the geometric size of initial window.
(setq initial-frame-alist '((width . 87) (height . 42)))
;;set the keybinding so that you can use f4 for goto line
(global-set-key [f4] 'goto-line)
;;set the keybinding so that f3 will start the shell
(global-set-key [f3] 'shell)
;;set the keybinding so that f5 will start query replace
(global-set-key [f5] 'query-replace)
(global-set-key [f6] 'switch-to-buffer)
(global-set-key [f7] 'hippie-expand)
(global-set-key [f8] 'ispell)
;;(setq load-path (cons "/home/hemant/elisp" load-path))
(when window-system
;; enable wheelmouse support by default
(mwheel-install)
;; use extended compound-text coding for X clipboard
(set-selection-coding-system 'compound-text-with-extensions))
(autoload 'mpg123 "mpg123" "A Front-end to mpg123" t)
(custom-set-variables
;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
'(auto-save-default nil)
;;'(backup-directory-alist (quote (("." . "/home/hemant/backup"))))
'(default-frame-alist (quote ((tool-bar-lines . 1) (menu-bar-lines . 1) (width . 87) (height . 42)))))
(custom-set-faces
;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
'(font-lock-comment-face ((((class color) (background dark)) (:foreground "moccasin" ))))
'(fringe ((((class color) (background dark)) (:background "grey10" :width ultra-condensed))))
'(scroll-bar ((t (:background "Dark slate gray")))))
|