From: Oliver Scholz <alkibiades@gmx.de>
Subject: Re: Insertion question
Date: Wed, 02 Apr 2003 11:07:27 +0200 [thread overview]
Message-ID: <uvfxxjmi8.fsf@ID-87814.user.dfncis.de> (raw)
In-Reply-To: mailman.4000.1049269170.21513.help-gnu-emacs@gnu.org
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é!
next parent reply other threads:[~2003-04-02 9:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.4000.1049269170.21513.help-gnu-emacs@gnu.org>
2003-04-02 9:07 ` Oliver Scholz [this message]
2003-04-03 12:14 ` Insertion question Oliver Scholz
2003-04-02 7:37 Urban Gabor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uvfxxjmi8.fsf@ID-87814.user.dfncis.de \
--to=alkibiades@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).