GNU bug report logs -
#29949
26.0.90; doc of `picture-mode-exit' and `picture-mode'
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Tue, 2 Jan 2018 18:16:02 UTC
Severity: minor
Found in version 26.0.90
Done: Drew Adams <drew.adams <at> oracle.com>
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 29949 in the body.
You can then email your comments to 29949 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#29949
; Package
emacs
.
(Tue, 02 Jan 2018 18:16: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
.
(Tue, 02 Jan 2018 18:16:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
1. The doc string of `picture-mode-exit' should mention the prefix arg
(not just arg).
2. Both doc strings incorrectly give the impression that a line that has
only whitespace (e.g. space chars) is NOT stripped of its whitespace
chars if you provide an argument.
The command functions correctly, which is to strip all such lines except
the one with point. The whitespace preceding point on its line is not
stripped when you use a prefix arg. This is the only whitespace that is
not stripped when you use a prefix arg.
In GNU Emacs 26.0.90 (build 3, x86_64-w64-mingw32)
of 2017-10-13 built on LAPHROAIG
Repository revision: 906224eba147bdfc0514090064e8e8f53160f1d4
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29949
; Package
emacs
.
(Tue, 02 Jan 2018 19:39:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 29949 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 2 Jan 2018 09:34:57 -0800 (PST)
> From: Drew Adams <drew.adams <at> oracle.com>
>
> 1. The doc string of `picture-mode-exit' should mention the prefix arg
> (not just arg).
Fixed, thanks.
> 2. Both doc strings incorrectly give the impression that a line that has
> only whitespace (e.g. space chars) is NOT stripped of its whitespace
> chars if you provide an argument.
>
> The command functions correctly, which is to strip all such lines except
> the one with point. The whitespace preceding point on its line is not
> stripped when you use a prefix arg. This is the only whitespace that is
> not stripped when you use a prefix arg.
I see nothing like what you describe. The behavior I see is exactly
what the doc strings say: trailing whitespace is removed, unless the
exit command is invoked with C-u. Empty lines are treated as any
other trailing whitespace, i.e. removed in their entirety.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29949
; Package
emacs
.
(Tue, 02 Jan 2018 20:00:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 29949 <at> debbugs.gnu.org (full text, mbox):
> > 2. Both doc strings incorrectly give the impression that a line that
> > has only whitespace (e.g. space chars) is NOT stripped of its whitespace
> > chars if you provide an argument.
> >
> > The command functions correctly, which is to strip all such lines
> > except the one with point. The whitespace preceding point on its
> > line is not stripped when you use a prefix arg. This is the only
> > whitespace that is not stripped when you use a prefix arg.
>
> I see nothing like what you describe. The behavior I see is exactly
> what the doc strings say: trailing whitespace is removed, unless the
> exit command is invoked with C-u. Empty lines are treated as any
> other trailing whitespace, i.e. removed in their entirety.
emacs -Q
(defun foo (&optional n)
(interactive "*p")
(picture-mode)
(picture-open-line n)
(picture-move-down n)
(picture-mode-exit 'keep))
In *scratch*, put point on some text near the middle of the
first line.
M-3 M-x foo
The inserted blank lines are all empty, except the last one.
I believe this is the correct behavior. Even though a prefix
arg is used, whitespace-only lines other than the one point
is on have all of their whitespace removed.
You can choose to describe this behavior differently than
I did. But I think you will admit that the current
description is inaccurate, here.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29949
; Package
emacs
.
(Tue, 02 Jan 2018 20:12:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 29949 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 2 Jan 2018 11:59:35 -0800 (PST)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 29949 <at> debbugs.gnu.org
>
> emacs -Q
>
> (defun foo (&optional n)
> (interactive "*p")
> (picture-mode)
> (picture-open-line n)
> (picture-move-down n)
> (picture-mode-exit 'keep))
>
> In *scratch*, put point on some text near the middle of the
> first line.
>
> M-3 M-x foo
>
> The inserted blank lines are all empty, except the last one.
> I believe this is the correct behavior. Even though a prefix
> arg is used, whitespace-only lines other than the one point
> is on have all of their whitespace removed.
emacs -Q
C-x b pic RET
M-x picture-mode RET
Press <right> several times
Press <down> several times
M-x picture-mode-exit RET
You get a buffer with a single line, all the rest are gone
emacs -Q
C-x b pic RET
M-x picture-mode RET
Press <right> several times
Press <down> several times
C-u M-x picture-mode-exit RET
You get a buffer with all the empty and whitespace characters you
inserted, none are removed.
> You can choose to describe this behavior differently than
> I did. But I think you will admit that the current
> description is inaccurate, here.
Sorry, I cannot agree, given the behavior I get with the above recipe.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29949
; Package
emacs
.
(Wed, 03 Jan 2018 00:40:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 29949 <at> debbugs.gnu.org (full text, mbox):
Ah, I see. The recipe I gave does what it does
because of the behavior of `picture-move-down'.
(picture-move-down 3) acts differently than
three successive (picture-move-down 1). The
former does not insert whitespace padding to
the column, whereas the latter does.
I agree that there is no bug here. Closing.
bug closed, send any further explanations to
29949 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com>
Request was from
Drew Adams <drew.adams <at> oracle.com>
to
control <at> debbugs.gnu.org
.
(Wed, 03 Jan 2018 01:01:01 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
.
(Wed, 31 Jan 2018 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 145 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.