From: Reiner Steib <4uce.02.r.steib@gmx.net>
Subject: Re: inserting date and time at the cursor location
Date: Thu, 03 Oct 2002 12:44:55 +0200 [thread overview]
Message-ID: <v9lm5frec8.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: 65wkkzdz.fsf@ID-23066.news.dfncis.de
On Thu, Oct 03 2002, Clemens Fischer wrote:
> David Kastrup <David.Kastrup@t-online.de> writes:
>
>> You could also use
>> C-u M-! date RET
>
> ok, how do i bind this to a key?
(1) Find out the function called by `M-!' using `C-h k' ...
,----[ C-h k M-! ]
| M-! runs the command shell-command
| which is an interactive compiled Lisp function in `simple'.
| (shell-command COMMAND &optional OUTPUT-BUFFER ERROR-BUFFER)
|
| Execute string COMMAND in inferior shell; display output, if any.
| With prefix argument, insert the COMMAND's output at point.
`----
(2) Read the doc-string, especially about the prefix argument in this
case (C-u).
(3) Bind it to a key (e.g. `C-c i d'), with the arguments you like.
Remember that you need an interactive function for key bindings:
(global-set-key [(control c) (i) (d)]
'(lambda ()
(interactive)
(shell-command "date" t t)))
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
next prev parent reply other threads:[~2002-10-03 10:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-02 13:03 inserting date and time at the cursor location Guy-Armand Kamendje
2002-10-02 15:30 ` Jesper Harder
2002-10-02 15:37 ` David Kastrup
2002-10-03 2:52 ` Clemens Fischer
2002-10-03 4:13 ` ftrw
2002-10-03 10:44 ` Reiner Steib [this message]
2002-10-11 12:14 ` Mario Lang
2002-10-13 14:25 ` A. Tsakiris
2002-10-02 15:45 ` kgold
2002-10-04 4:46 ` ken
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=v9lm5frec8.fsf@marauder.physik.uni-ulm.de \
--to=4uce.02.r.steib@gmx.net \
--cc=reiner.steib@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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.