GNU bug report logs -
#24369
Docu of prefix-numeric-value
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24369 in the body.
You can then email your comments to 24369 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#24369; Package
emacs.
(Mon, 05 Sep 2016 07:47:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andreas Röhler <andreas.roehler <at> easy-emacs.de>:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org.
(Mon, 05 Sep 2016 07:47:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
See recent question at
http://lists.gnu.org/archive/html/help-gnu-emacs/2016-09/msg00018.html
Please add some explanation WRT treatment of the nil-argument.
Also WRT C-u
Thanks!
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#24369; Package
emacs.
(Mon, 05 Sep 2016 15:58:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 24369 <at> debbugs.gnu.org (full text, mbox):
> See recent question at
> http://lists.gnu.org/archive/html/help-gnu-emacs/2016-09/msg00018.html
>
> Please add some explanation WRT treatment of the nil-argument.
> Also WRT C-u
What "treatment" are you asking to be explained?
Just what do you think is missing?
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#24369; Package
emacs.
(Mon, 05 Sep 2016 17:39:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 24369 <at> debbugs.gnu.org (full text, mbox):
On 05.09.2016 17:57, Drew Adams wrote:
>> See recent question at
>> http://lists.gnu.org/archive/html/help-gnu-emacs/2016-09/msg00018.html
>>
>> Please add some explanation WRT treatment of the nil-argument.
>> Also WRT C-u
> What "treatment" are you asking to be explained?
> Just what do you think is missing?
Elisp Info 20.2.2 Code Characters for ‘interactive’
----------------------------------------
p’
The numeric prefix argument
User will expect the argument received by function being consistent with
input, i.e. M-x 2 foo... sends 2, M-x 1 foo ... sends 1. From there
omitting an argument will be expected to send nothing - which isn't the
case.
Likewise with uppecase P.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#24369; Package
emacs.
(Mon, 05 Sep 2016 17:47:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 24369 <at> debbugs.gnu.org (full text, mbox):
> > What "treatment" are you asking to be explained?
> > Just what do you think is missing?
>
> Elisp Info 20.2.2 Code Characters for ‘interactive’
> ----------------------------------------
>
> p The numeric prefix argument
>
> Likewise with uppecase P.
Again, what do you think is missing? `p' is the numeric prefix argument.
`P' is the raw prefix argument.
This is not the Elisp manual node that describes WHAT these things
are. But there is a link here to the node that does that, node
`Prefix Command Arguments'
http://www.gnu.org/software/emacs/manual/html_node/elisp/Prefix-Command-Arguments.html
And that's the case even in the Emacs 20 version of the manual,
which you cited.
> User will expect the argument received by function being consistent with
> input, i.e. M-x 2 foo... sends 2, M-x 1 foo ... sends 1. From there
> omitting an argument will be expected to send nothing - which isn't the
> case.
Why on Earth would the user expect that, simply from reading that
`interactive' code `p' returns the numeric prefix argument and `P'
returns the raw prefix argument?
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#24369; Package
emacs.
(Mon, 05 Sep 2016 17:58:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 24369 <at> debbugs.gnu.org (full text, mbox):
> From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
> Date: Mon, 5 Sep 2016 19:44:28 +0200
>
> >> Please add some explanation WRT treatment of the nil-argument.
> >> Also WRT C-u
> > What "treatment" are you asking to be explained?
> > Just what do you think is missing?
>
> Elisp Info 20.2.2 Code Characters for ‘interactive’
> ----------------------------------------
>
> p’
> The numeric prefix argument
>
> User will expect the argument received by function being consistent with
> input, i.e. M-x 2 foo... sends 2, M-x 1 foo ... sends 1. From there
> omitting an argument will be expected to send nothing - which isn't the
> case.
There's more in the manual than just that one paragraph.
ELisp manual 20.12 Prefix Command Arguments:
-------------------------------------------
There are two representations of the prefix argument: “raw” and
“numeric”. The editor command loop uses the raw representation
internally, and so do the Lisp variables that store the information, but
commands can request either representation.
Here are the possible values of a raw prefix argument:
• ‘nil’, meaning there is no prefix argument. Its numeric value is
1, but numerous commands make a distinction between ‘nil’ and the
integer 1.
...
-- Function: prefix-numeric-value arg
This function returns the numeric meaning of a valid raw prefix
argument value, ARG. The argument may be a symbol, a number, or a
list. If it is ‘nil’, the value 1 is returned; if it is ‘-’, the
value −1 is returned; if it is a number, that number is returned;
if it is a list, the CAR of that list (which should be a number) is
returned.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#24369; Package
emacs.
(Mon, 05 Sep 2016 18:28:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 24369 <at> debbugs.gnu.org (full text, mbox):
On 05.09.2016 19:57, Eli Zaretskii wrote:
>
> Here are the possible values of a raw prefix argument:
>
> • ‘nil’, meaning there is no prefix argument. Its numeric value is
> 1,
That's the point:
Value of nil is 1
Value of 1 is 1
But he value of 2 is 2
Consistency means something different.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#24369; Package
emacs.
(Mon, 05 Sep 2016 18:59:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 24369 <at> debbugs.gnu.org (full text, mbox):
> Cc: drew.adams <at> oracle.com, 24369 <at> debbugs.gnu.org
> From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
> Date: Mon, 5 Sep 2016 20:33:21 +0200
>
> > • ‘nil’, meaning there is no prefix argument. Its numeric value is
> > 1,
>
> That's the point:
>
> Value of nil is 1
No, the _numeric_ value of nil is 1. IOW, nil, when interpreted as a
number, is 1. An entirely different story.
> Consistency means something different.
The numeric value of nil is consistently 1.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#24369; Package
emacs.
(Mon, 05 Sep 2016 21:04:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 24369 <at> debbugs.gnu.org (full text, mbox):
> > > • ‘nil’, meaning there is no prefix argument. Its numeric value
> > > is 1,
> >
> > That's the point: Value of nil is 1
>
> No, the _numeric_ value of nil is 1. IOW, nil, when interpreted
> as a number, is 1. An entirely different story.
Exactly. The value of `(prefix-numeric-value nil)' is 1.
That's what "numeric value of" the prefix argument means.
It is also what the shorter expression "the numeric prefix
argument" means.
The fact that the value of some function applied to nil
is 1 does not mean that the value of nil is 1.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#24369; Package
emacs.
(Mon, 17 Jul 2017 01:36:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 24369 <at> debbugs.gnu.org (full text, mbox):
tags 24369 notabug
close 24369
quit
Drew Adams <drew.adams <at> oracle.com> writes:
>> > > • ‘nil’, meaning there is no prefix argument. Its numeric value
>> > > is 1,
>> >
>> > That's the point: Value of nil is 1
>>
>> No, the _numeric_ value of nil is 1. IOW, nil, when interpreted
>> as a number, is 1. An entirely different story.
>
> Exactly. The value of `(prefix-numeric-value nil)' is 1.
>
> That's what "numeric value of" the prefix argument means.
> It is also what the shorter expression "the numeric prefix
> argument" means.
>
> The fact that the value of some function applied to nil
> is 1 does not mean that the value of nil is 1.
I think there is nothing more to be done here, so I'm closing the bug.
Added tag(s) notabug.
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org.
(Mon, 17 Jul 2017 01:36:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
24369 <at> debbugs.gnu.org and Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org.
(Mon, 17 Jul 2017 01:36:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org.
(Mon, 14 Aug 2017 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 7 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.