[Top][All Lists]

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

Re: Prefix-Arg (non-interactive!) in Info

From: Memnon Anon
Subject: Re: Prefix-Arg (non-interactive!) in Info
Date: Fri, 13 Aug 2010 17:50:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Eli Zaretskii <> writes:

> This information is usually in the doc string of the function you want
> to invoke.  For example:

Sorry, my description was not clear enough.
I knew that `C-u' produces a prefix arg, 4 by default, or any other
number if you specify it, as does M-4; and the manual states this in
several places. I also knew that each function uses prefixes
differently - as flag, as a repeater etc. -, and I knew where to look
for it, which is in the docstring.

What I did not find, was, how to pass this argument non interactively -
i.e. without `C-u' or M-4 - to a function.

I found this sentence in an old version of the emacs lisp intro:
| (C-u produces an unprocessed prefix argument of (4), which is a list of
| one element.) 

Exactly the "list of one element" part I was not aware of.

So, `C-u C-c C-x C-i' calls org-clock-in with an argument of (4).
(global-set-key (kbd "<f12>") (lambda () (interactive) (org-clock-in '(4))))

Well, I guess I should stop patching up my elisp knowledge bit by bit
and finally read and digest the whole emacs lisp intro and not just
browse it.


reply via email to

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