emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Docstrings: Use of `C-u'


From: Bastien
Subject: Re: [Orgmode] Docstrings: Use of `C-u'
Date: Mon, 16 Aug 2010 21:01:53 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)

Hi Memnon,

Memnon Anon <address@hidden> writes:

> I found only one other example so far, which is different:
> ,----[ org-agenda.el ]
> | (defun org-agenda-set-restriction-lock (&optional type)
> |   "Set restriction lock for agenda, to current subtree or file.
> | Restriction will be the file if TYPE is `file', or if type is the
> * universal prefix '(4), or if the cursor is before the first headline
> | in the file.  Otherwise, restriction will be to the current subtree."
> `----
>
> Adding that the prefix argument will be interpretated as a *list of one*
> integer like this -> '(4) seems great. This clarifies that the test
> against the prefix argument is something like "(when (equal arg '(4))"
> without looking at the code of the function itself.

I agree beginners won't easily guess the prefix argument is of the form
'(4).  But as a beginner, I'd look for "prefix argument" in the Emacs
manual and find this:

  
http://www.gnu.org/s/emacs/manual/html_node/elisp/Prefix-Command-Arguments.html

Or I'll ask this list :)

In any case, I'm not sure clarification about this belongs to Org's
code.

Maybe we can just add a footnote in the Org's manual referring to the
Emacs manual for the first important occurrence of "prefix argument"
(one regarding a function that is very likely to be used in another
function, or called in a lambda expression).  

Any suggestion?

-- 
 Bastien



reply via email to

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