GNU bug report logs -
#21315
25.0.50; doc of `kill-ring-save', `copy-region-as-kill' - bad
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Fri, 21 Aug 2015 17:19:02 UTC
Severity: minor
Found in version 25.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21315 in the body.
You can then email your comments to 21315 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#21315
; Package
emacs
.
(Fri, 21 Aug 2015 17:19:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Drew Adams <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 21 Aug 2015 17:19:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In Emacs 24.4 you changed not only the signature of these commands but
also their interactive behavior, by adding optional arg REGION and
giving users control over it with the prefix arg.
Unfortunately, the doc for this new behavior is horribly inadequate.
1. The Emacs manual says nothing about the new behavior. It should
cover it.
2. The doc strings are awful in this regard. They say only "The
optional argument REGION if non-nil, indicates that we're not just
copying some text between BEG and END, but we're copying the region."
That's worse than saying nothing - a complete cop-out. If the doc is
going to say something like "we're copying the region" and if that
phrase is expected to mean anything then the doc needs to say what it
means by that. Describe the user-observable behavior difference
between using a prefix arg and not using it.
Currently, the use of a prefix arg is not even mentioned. As bad as
the description of parameter REGION is, it is not even connected with
the use of a prefix arg.
3. The command is not documented at all in the Elisp manual. It need
not be, but the current state is that a user has no real information
about this at all, and that is not good.
4. I find nothing in NEW for Emacs 24.4 (when this was released) about
this. User-observable behavior changes like this should be
documented there.
<rant>Developers should not be allowed to commit program changes like
this without updating the doc appropriately. Yes, leader resources are
scarce, and people are overworked. But it's too bad, as it fosters bad
habits, unless the person who committed the code change happens to be
the one who fixes this doc bug, and can thus learn from the
mistake.</rant>
In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
of 2015-07-31 on LEG570
Bzr revision: 8d332aeccab2208e6c6bd434738565e6abf12043
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --host=i686-pc-mingw32 --enable-checking=yes,glyphs'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21315
; Package
emacs
.
(Fri, 04 Dec 2015 18:07:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 21315 <at> debbugs.gnu.org (full text, mbox):
ping
At least make clear that what is said about REGION is only
for calls from Lisp. REGION is always non-nil when used
interactively.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21315
; Package
emacs
.
(Sat, 05 Dec 2015 23:23:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 21315 <at> debbugs.gnu.org (full text, mbox):
> ping
>
> At least make clear that what is said about REGION is only
> for calls from Lisp. REGION is always non-nil when used
> interactively.
Maybe REGION should be non-nil only when used on a non-contiguous
(rectangular) region?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21315
; Package
emacs
.
(Sun, 06 Dec 2015 02:14:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 21315 <at> debbugs.gnu.org (full text, mbox):
> > At least make clear that what is said about REGION is only
> > for calls from Lisp. REGION is always non-nil when used
> > interactively.
>
> Maybe REGION should be non-nil only when used on a non-contiguous
> (rectangular) region?
Maybe; dunno. The doc is not clear; that's all I can tell.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21315
; Package
emacs
.
(Sun, 06 Dec 2015 16:16:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 21315 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 5 Dec 2015 18:13:37 -0800 (PST)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 21315 <at> debbugs.gnu.org
>
> > > At least make clear that what is said about REGION is only
> > > for calls from Lisp. REGION is always non-nil when used
> > > interactively.
> >
> > Maybe REGION should be non-nil only when used on a non-contiguous
> > (rectangular) region?
>
> Maybe; dunno. The doc is not clear; that's all I can tell.
Would it become clear if instead of this:
The optional argument REGION if non-nil, indicates that we're not
just copying some text between BEG and END, but we're copying the
region.
it would say this:
The optional argument REGION non-nil means to ignore BEG and END and
copy the region instead.
Also, we should tell that this distinction is only relevant to
invoking these functions from Lisp programs, not interactively.
As for the argument, AFAICT it makes no difference in interactive
usage. kill-region make it very clear:
(interactive (list (mark) (point) 'region))
Does documenting the above clarify the issue?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21315
; Package
emacs
.
(Sun, 06 Dec 2015 16:17:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 21315 <at> debbugs.gnu.org (full text, mbox):
> From: Juri Linkov <juri <at> linkov.net>
> Date: Sun, 06 Dec 2015 01:12:32 +0200
> Cc: 21315 <at> debbugs.gnu.org
>
> > ping
> >
> > At least make clear that what is said about REGION is only
> > for calls from Lisp. REGION is always non-nil when used
> > interactively.
>
> Maybe REGION should be non-nil only when used on a non-contiguous
> (rectangular) region?
How do you see that?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21315
; Package
emacs
.
(Sun, 06 Dec 2015 16:56:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 21315 <at> debbugs.gnu.org (full text, mbox):
> say this:
> The optional argument REGION non-nil means to ignore BEG and END and
> copy the region instead.
Yes.
(But I think we usually phrase that as: "Non-nil optional argument
REGION means...".)
> Also, we should tell that this distinction is only relevant to
> invoking these functions from Lisp programs, not interactively.
Yes.
From Lisp, non-nil optional argument REGION means...
> As for the argument, AFAICT it makes no difference in interactive
> usage.
Yes, it is always non-nil interactively: `prefix-numeric-value'
never returns nil.
> Does documenting the above clarify the issue?
Yes, I think so. Thx.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Mon, 07 Dec 2015 16:24:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Drew Adams <drew.adams <at> oracle.com>
:
bug acknowledged by developer.
(Mon, 07 Dec 2015 16:24:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 21315-done <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 6 Dec 2015 08:54:44 -0800 (PST)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: juri <at> linkov.net, 21315 <at> debbugs.gnu.org
>
> > say this:
> > The optional argument REGION non-nil means to ignore BEG and END and
> > copy the region instead.
>
> Yes.
>
> (But I think we usually phrase that as: "Non-nil optional argument
> REGION means...".)
>
> > Also, we should tell that this distinction is only relevant to
> > invoking these functions from Lisp programs, not interactively.
>
> Yes.
>
> From Lisp, non-nil optional argument REGION means...
>
> > As for the argument, AFAICT it makes no difference in interactive
> > usage.
>
> Yes, it is always non-nil interactively: `prefix-numeric-value'
> never returns nil.
>
> > Does documenting the above clarify the issue?
>
> Yes, I think so. Thx.
Thanks, I made all the changes. I also added a reference to
filter-buffer-substring in these doc strings, something that should
have been done almost 11 years ago. The ELisp manual is also updated.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21315
; Package
emacs
.
(Tue, 08 Dec 2015 00:52:03 GMT)
Full text and
rfc822 format available.
Message #31 received at 21315 <at> debbugs.gnu.org (full text, mbox):
>> > At least make clear that what is said about REGION is only
>> > for calls from Lisp. REGION is always non-nil when used
>> > interactively.
>>
>> Maybe REGION should be non-nil only when used on a non-contiguous
>> (rectangular) region?
>
> How do you see that?
I thought this arg should have the same meaning as in other rectangular
commands, but let's discuss this on the corresponding subject in emacs-devel.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 05 Jan 2016 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 171 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.