unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45582: 28: auto-fill final line of indented paragraph
@ 2020-12-31 23:23 Boruch Baum
  2021-01-01  7:12 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Boruch Baum @ 2020-12-31 23:23 UTC (permalink / raw)
  To: 45582

Using the emacs-snapshot from ganneff.de (it's a few months old, but
there isn't a more recent. sigh. A more recent debian package for
stable/testing would be helpful for items on my todo list).

1) Start emacs -Q -nw
2) In the scratch buffer
3) M-x set-fill-column 10
4) Enable auto-fill-mode
5) Type two spaces
6) Type about twenty single character words

   At this point everything looks good; we have several indented lines of a
   paragraph.

7) Type return to end the paragraph

   I'm now getting the final line, that had prior been properly indented,
   now re-aligned / out-dented to column 1.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#45582: 28: auto-fill final line of indented paragraph
  2020-12-31 23:23 bug#45582: 28: auto-fill final line of indented paragraph Boruch Baum
@ 2021-01-01  7:12 ` Eli Zaretskii
  2021-01-01 12:25   ` Boruch Baum
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2021-01-01  7:12 UTC (permalink / raw)
  To: Boruch Baum; +Cc: 45582

> Date: Thu, 31 Dec 2020 18:23:25 -0500
> From: Boruch Baum <boruch_baum@gmx.com>
> 
> 1) Start emacs -Q -nw
> 2) In the scratch buffer
> 3) M-x set-fill-column 10
> 4) Enable auto-fill-mode
> 5) Type two spaces
> 6) Type about twenty single character words
> 
>    At this point everything looks good; we have several indented lines of a
>    paragraph.
> 
> 7) Type return to end the paragraph
> 
>    I'm now getting the final line, that had prior been properly indented,
>    now re-aligned / out-dented to column 1.

You are in Lisp Interaction mode, which has its own indentation
rules.  Try this in Fundamental mode, and you will see the behavior
you expect, I think.

IOW, I don't think there's a bug here.  But if there is a bug, please
tell what behavior you expected and why.

To investigate this further, note that electric-indent-mode is ON, and
see the doc string shown by "C-h k RET".





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#45582: 28: auto-fill final line of indented paragraph
  2021-01-01  7:12 ` Eli Zaretskii
@ 2021-01-01 12:25   ` Boruch Baum
  2021-01-11 15:48     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Boruch Baum @ 2021-01-01 12:25 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 45582

n 2021-01-01 09:12, Eli Zaretskii wrote:
> > Date: Thu, 31 Dec 2020 18:23:25 -0500
> > From: Boruch Baum <boruch_baum@gmx.com>
>
> You are in Lisp Interaction mode, which has its own indentation rules.
> Try this in Fundamental mode, and you will see the behavior you
> expect, I think.
>
> IOW, I don't think there's a bug here. But if there is a bug, please
> tell what behavior you expected and why.

The default contents of the scratch buffer read: "This buffer is for
text that is not saved ..." so any newcomer to emacs gets the indication
that _text_ typed here will be treated as text (and yes lisp typed here
will be treated as lisp), and people expect text paragraphs not to have
their final line be out-dented *after* completion. Any newcomer to emacs
will clearly consider this a bug. I also do consider it a bug.

> To investigate this further, note that electric-indent-mode is ON

That speaks to the choice of how to classify the bug, not whether it is
a bug. Maybe you'll consider it a bug in that mode, or in auto-fill
mode, or in lisp-interaction-mode, or in the setup of the scratch
buffer, or in the relationship between those three modes, or in the
default comment of that buffer, or in something else. I don't have a
suggestion either way, only the observation that the behavior is
unexpected, counter-intuitive, and annoying.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#45582: 28: auto-fill final line of indented paragraph
  2021-01-01 12:25   ` Boruch Baum
@ 2021-01-11 15:48     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-01-11 15:48 UTC (permalink / raw)
  To: Boruch Baum; +Cc: 45582

Boruch Baum <boruch_baum@gmx.com> writes:

>> IOW, I don't think there's a bug here. But if there is a bug, please
>> tell what behavior you expected and why.
>
> The default contents of the scratch buffer read: "This buffer is for
> text that is not saved ..." so any newcomer to emacs gets the indication
> that _text_ typed here will be treated as text (and yes lisp typed here
> will be treated as lisp), and people expect text paragraphs not to have
> their final line be out-dented *after* completion. Any newcomer to emacs
> will clearly consider this a bug. I also do consider it a bug.

It says

;; This buffer is for text that is not saved, and for Lisp evaluation.

so the user should be expecting this to be a non-normal (i.e., not a
text-mode) buffer.

So I agree with Eli -- this isn't a bug, and I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-11 15:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-31 23:23 bug#45582: 28: auto-fill final line of indented paragraph Boruch Baum
2021-01-01  7:12 ` Eli Zaretskii
2021-01-01 12:25   ` Boruch Baum
2021-01-11 15:48     ` Lars Ingebrigtsen

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).