On Sep 21, 2005, at 14:42: 53, J. David Boyd wrote:
Charlie Martin <[EMAIL PROTECTED]> writes:
... or really, mostly, abbrev mode.
I keep wanting to have abbrevs that expand out to, say, date-time
stamps. I can do this on my mac with the rather brilliant Texpander,
where for example I have it set up so that typing 'ttime' inserts
12:13:25 ... and then 12:13:35 ... and then 12:13:42 ... and so on.
So here's my question: is there a way to get abbrev mode, or hooks in
emacs-wiki or muse-mode or some such, to act like an abbrev but
execute a fragment of lisp code instead of just replacing one string
with another?
Not what you are asking for, but you could just assign a lisp
function to
insert a date-time stamp to a keystroke that planner/emacs-wiki
doesn't use...
yeah ...
I bind it to C-X-t
;;; -*-emacs-lisp-*-
;;; Charles R Martin, freely reusable without permission
;;; Insert time stamps
;;; Add a new function for inserting a time stamp at point
(defun insert-time-stamp (arg)
"Insert a time stamp at point using the format of `time-stamp-
format'."
(interactive "p")
(require 'time-stamp)
(insert (time-stamp-string)))
(defun insert-time-label (arg)
"Insert a time stamp in a special format for use as an `emacs-wiki'
anchor."
(interactive "p")
(require 'time-stamp)
(insert (time-stamp-string "%:y%02m%02d%02H%02M")))
(provide 'insert-time-stamp)
;;; end
_______________________________________________
emacs-wiki-discuss mailing list
emacs-wiki-discuss@nongnu.org
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss