* bug#29949: 26.0.90; doc of `picture-mode-exit' and `picture-mode' @ 2018-01-02 17:34 Drew Adams 2018-01-02 19:38 ` Eli Zaretskii 0 siblings, 1 reply; 5+ messages in thread From: Drew Adams @ 2018-01-02 17:34 UTC (permalink / raw) To: 29949 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#29949: 26.0.90; doc of `picture-mode-exit' and `picture-mode' 2018-01-02 17:34 bug#29949: 26.0.90; doc of `picture-mode-exit' and `picture-mode' Drew Adams @ 2018-01-02 19:38 ` Eli Zaretskii 0 siblings, 0 replies; 5+ messages in thread From: Eli Zaretskii @ 2018-01-02 19:38 UTC (permalink / raw) To: Drew Adams; +Cc: 29949 > Date: Tue, 2 Jan 2018 09:34:57 -0800 (PST) > From: Drew Adams <drew.adams@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. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <<706e6966-d849-420a-be4c-a3b70d204cd7@default>]
[parent not found: <<831sj8caqs.fsf@gnu.org>]
* bug#29949: 26.0.90; doc of `picture-mode-exit' and `picture-mode' [not found] ` <<831sj8caqs.fsf@gnu.org> @ 2018-01-02 19:59 ` Drew Adams 2018-01-02 20:10 ` Eli Zaretskii 0 siblings, 1 reply; 5+ messages in thread From: Drew Adams @ 2018-01-02 19:59 UTC (permalink / raw) To: Eli Zaretskii, Drew Adams; +Cc: 29949 > > 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#29949: 26.0.90; doc of `picture-mode-exit' and `picture-mode' 2018-01-02 19:59 ` Drew Adams @ 2018-01-02 20:10 ` Eli Zaretskii 0 siblings, 0 replies; 5+ messages in thread From: Eli Zaretskii @ 2018-01-02 20:10 UTC (permalink / raw) To: Drew Adams; +Cc: 29949 > Date: Tue, 2 Jan 2018 11:59:35 -0800 (PST) > From: Drew Adams <drew.adams@oracle.com> > Cc: 29949@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. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <<<706e6966-d849-420a-be4c-a3b70d204cd7@default>]
[parent not found: <<<831sj8caqs.fsf@gnu.org>]
[parent not found: <<d4f7e369-cf82-4fd1-96b0-77dc97a56456@default>]
[parent not found: <<83y3lgaunl.fsf@gnu.org>]
* bug#29949: 26.0.90; doc of `picture-mode-exit' and `picture-mode' [not found] ` <<83y3lgaunl.fsf@gnu.org> @ 2018-01-03 0:39 ` Drew Adams 0 siblings, 0 replies; 5+ messages in thread From: Drew Adams @ 2018-01-03 0:39 UTC (permalink / raw) To: Eli Zaretskii, Drew Adams; +Cc: 29949 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-01-03 0:39 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-01-02 17:34 bug#29949: 26.0.90; doc of `picture-mode-exit' and `picture-mode' Drew Adams 2018-01-02 19:38 ` Eli Zaretskii [not found] <<706e6966-d849-420a-be4c-a3b70d204cd7@default> [not found] ` <<831sj8caqs.fsf@gnu.org> 2018-01-02 19:59 ` Drew Adams 2018-01-02 20:10 ` Eli Zaretskii [not found] <<<706e6966-d849-420a-be4c-a3b70d204cd7@default> [not found] ` <<<831sj8caqs.fsf@gnu.org> [not found] ` <<d4f7e369-cf82-4fd1-96b0-77dc97a56456@default> [not found] ` <<83y3lgaunl.fsf@gnu.org> 2018-01-03 0:39 ` Drew Adams
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.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).