emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bastien.guerry@wikimedia.fr>
To: Memnon Anon <gegendosenfleisch@googlemail.com>
Cc: Markus Heller <hellerm2@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Docstrings: Use of `C-u'
Date: Mon, 16 Aug 2010 21:01:53 +0200	[thread overview]
Message-ID: <87ocd24c0u.fsf@gnu.org> (raw)
In-Reply-To: <87tymwreu6.fsf@mean.albasani.net> (Memnon Anon's message of "Sun, 15 Aug 2010 01:41:21 +0200")

Hi Memnon,

Memnon Anon <gegendosenfleisch@googlemail.com> 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

  parent reply	other threads:[~2010-08-16 19:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-12 23:13 Bind C-u C-c C-x C-i to a key Markus Heller
2010-08-12 23:37 ` Andreas Burtzlaff
2010-08-13  3:12   ` [OT] Passing universal argument to a function (was: Bind C-u C-c C-x C-i to a key) Memnon Anon
2010-08-13 16:49     ` Markus Heller
2010-08-14 23:41     ` Docstrings: Use of `C-u' (was: [OT] Passing universal argument to a function) Memnon Anon
2010-08-16 18:54       ` Docstrings: Use of `C-u' Bastien
2010-08-16 19:01       ` Bastien [this message]
2010-08-13  7:09   ` Re: Bind C-u C-c C-x C-i to a key Bastien
2010-08-13  7:12     ` Bastien

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.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ocd24c0u.fsf@gnu.org \
    --to=bastien.guerry@wikimedia.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=gegendosenfleisch@googlemail.com \
    --cc=hellerm2@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).