all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 2723@emacsbugs.donarmstrong.com
Subject: bug#2723: Emacs 23: `interactive': prefix argument "P" and region "r" are mutually exclusive.
Date: Thu, 19 Mar 2009 21:49:04 +0000	[thread overview]
Message-ID: <20090319214904.GA1310@muc.de> (raw)
In-Reply-To: <jwv8wn11c4c.fsf-monnier+emacsbugreports@gnu.org>

Hi, Stefan!

On Thu, Mar 19, 2009 at 04:40:11PM -0400, Stefan Monnier wrote:
> > It seems that `(interactive "rP")' is only supplying the defun with two
> > parameters.

> Read C-h f interactive RET, and if you read carefully enough you'll see
> you need (interactive "r\nP")

No.  I've read closely and it doesn't say this, neither in the doc
string or the Elisp manual.  The pertinent bit of the Elisp manual reads
thusly:

   * It may be a string; then its contents should consist of a code
     character followed by a prompt (which some code characters use and
     some ignore).  The prompt ends either with the end of the string
     or with a newline.  Here is a simple example:

, i.e. the \n terminates the prompt rather than separating it from the
next thing.  This bit of the manual is oblivious to the existence of
descriptors lacking prompts ("p", "P", "r", "d", "i", "m"), and looks
like it could have been written early in Emacs's development, before "p"
and friends existed (if there was such a time).

The only bit of the doc string which is relevant is

    To prompt for multiple arguments, give a code letter, its prompt, a
    newline, and another code letter, etc.

, which implies that the \n is required only where there's prompting
going on, which clearly isn't the case for "P", "r", etc.

Is there any reason why there needs to be a \n separating "P" and "r"?
After all, in a shell, we can write

    tar -xf emacs.tar.gz

, rather than having to do

    tar -x -f emacs.tar.gz

, which is somewhat analagous.  Aternatively, why does the interactive
call function not give an error message?

OK, I'll write the patches for the Elisp manual and `interactive''s doc
string.  Just not tonight.  Should I reopen this bug, submit a new bug,
or just submit the patch?

>         Stefan
> 

-- 
Alan Mackenzie (Nuremberg, Germany).






  parent reply	other threads:[~2009-03-19 21:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <jwv8wn11c4c.fsf-monnier+emacsbugreports@gnu.org>
2009-03-19 19:15 ` bug#2723: Emacs 23: `interactive': prefix argument "P" and region "r" are mutually exclusive Alan Mackenzie
2009-03-19 20:16   ` Leo
2009-03-19 20:45   ` bug#2723: marked as done (Emacs 23: `interactive': prefix argument "P" and region "r" are mutually exclusive.) Emacs bug Tracking System
2009-03-19 21:49 ` Alan Mackenzie [this message]
2009-03-20 13:19   ` bug#2723: Emacs 23: `interactive': prefix argument "P" and region "r" are mutually exclusive Stefan Monnier
2009-03-20 14:39     ` Juanma Barranquero
2009-03-21 15:25     ` Alan Mackenzie
2009-03-21 19:07       ` Stefan Monnier
     [not found] ` <mailman.3605.1237500234.31690.bug-gnu-emacs@gnu.org>
2009-03-20  7:59   ` Miles Bader

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=20090319214904.GA1310@muc.de \
    --to=acm@muc.de \
    --cc=2723@emacsbugs.donarmstrong.com \
    --cc=monnier@iro.umontreal.ca \
    /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.