help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Insertion question


From: Oliver Scholz
Subject: Re: Insertion question
Date: Wed, 02 Apr 2003 11:07:27 +0200
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 (windows-nt)

Urban Gabor <gabaux@freemail.hu> writes:

> Hi,
>
> I have a question, but could not figure it out from the docs...
>
> At the currect cursor position I woudl like to insert a
> fixed string using one (new) hotkey. 

(define-key global-map [f5] "lirum larum ")

Or you could define a keyboard macro.

> It would be even nicer, if I could append the user-name from the
> environment, and the time-stamp.

I think you need a bit of Lisp code for this:

(define-key global-map [f5]
  (lambda ()
    (interactive)
    (insert (concat "lirum larum "
                    (user-full-name)
                    " "
                    (current-time-string)
                    " "))))

> BTW Could you CC the answer  to my address?

This is rather depreciated in this forum for several reasons. It is
better to discuss solutions to problems publicly. If the answer is
trivial, the regulars may decide to send you a private mail, but let
the regulars decide that.

    Oliver
-- 
13 Germinal an 211 de la Révolution
Liberté, Egalité, Fraternité!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]