GNU bug report logs - #45116
26.3; refill-mode doesn't allow me to add text at the end of a paragraph

Previous Next

Package: emacs;

Reported by: David Klein <dklein0 <at> gmail.com>

Date: Tue, 8 Dec 2020 08:25:02 UTC

Severity: normal

Tags: moreinfo

Found in version 26.3

Done: Lars Ingebrigtsen <larsi <at> gnus.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 45116 in the body.
You can then email your comments to 45116 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#45116; Package emacs. (Tue, 08 Dec 2020 08:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Klein <dklein0 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 08 Dec 2020 08:25:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: David Klein <dklein0 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3;
 refill-mode doesn't allow me to add text at the end of a paragraph
Date: Tue, 8 Dec 2020 10:16:40 +0200
[Message part 1 (text/plain, inline)]
--text follows this line--

runemacs.exe -Q
(setq auto-mode-alist
      (cons '("\\.latex$" . latex-mode) auto-mode-alist))^X^E
(add-hook 'latex-mode-hook 'refill-mode)^X^E
^X^F junk.latex
Type in a few random lines interspersed with empty lines
Go back to the end of a line that is followed by an empty line and type
a space (or several). No space gets inserted. Non whitespace inserts
correctly.



In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29 built on CIRROCUMULUS
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor 'Microsoft Corp.', version 10.0.19041
Recent messages:
Checking 34 files in c:/emacs-26.3-x86_64/share/emacs/26.3/lisp/emulation...
Checking 176 files in
c:/emacs-26.3-x86_64/share/emacs/26.3/lisp/emacs-lisp...
Checking 24 files in c:/emacs-26.3-x86_64/share/emacs/26.3/lisp/cedet...
Checking 57 files in c:/emacs-26.3-x86_64/share/emacs/26.3/lisp/calendar...
Checking 87 files in c:/emacs-26.3-x86_64/share/emacs/26.3/lisp/calc...
Checking 105 files in c:/emacs-26.3-x86_64/share/emacs/26.3/lisp/obsolete...
Checking for load-path shadows...done
Mark set
Saved text from "From: david <at> DAVID-PC10.i-did-not-set--ma"
Making completion list...

Configured using:
 'configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS THREADS LCMS2

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1252

Major mode: LaTeX

Minor modes in effect:
  refill-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(help-mode pp shadow sort mail-extr emacsbug message rmc puny seq
byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired
dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache
epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils refill
easy-mmode tex-mode compile shell pcomplete comint ansi-color ring
elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win
w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads w32notify w32 lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 111645 12010)
 (symbols 48 21266 1)
 (miscs 40 65 262)
 (strings 32 33582 1324)
 (string-bytes 1 893823)
 (vectors 16 16065)
 (vector-slots 8 514669 13810)
 (floats 8 61 267)
 (intervals 56 379 30)
 (buffers 992 14))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45116; Package emacs. (Tue, 08 Dec 2020 15:22:02 GMT) Full text and rfc822 format available.

Message #8 received at 45116 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: David Klein <dklein0 <at> gmail.com>
Cc: 45116 <at> debbugs.gnu.org
Subject: Re: bug#45116: 26.3;
 refill-mode doesn't allow me to add text at the end of a paragraph
Date: Tue, 08 Dec 2020 17:21:37 +0200
> From: David Klein <dklein0 <at> gmail.com>
> Date: Tue, 8 Dec 2020 10:16:40 +0200
> 
> runemacs.exe -Q
> (setq auto-mode-alist
>       (cons '("\\.latex$" . latex-mode) auto-mode-alist))^X^E
> (add-hook 'latex-mode-hook 'refill-mode)^X^E
> ^X^F junk.latex
> Type in a few random lines interspersed with empty lines
> Go back to the end of a line that is followed by an empty line and type
> a space (or several). No space gets inserted. Non whitespace inserts correctly.

Isn't that expected,, given that the doc string of this mode says:

                                             When enabled, the
  current paragraph is refilled as you edit.  Self-inserting
  characters only cause refilling if they would cause
  auto-filling.

"Refilled as you edit means excess whitespace is removed, no?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45116; Package emacs. (Tue, 08 Dec 2020 17:26:02 GMT) Full text and rfc822 format available.

Message #11 received at 45116 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: David Klein <dklein0 <at> gmail.com>
Cc: 45116 <at> debbugs.gnu.org
Subject: Re: bug#45116: 26.3; refill-mode doesn't allow me to add text at the
 end of a paragraph
Date: Tue, 08 Dec 2020 19:25:34 +0200
> From: David Klein <dklein0 <at> gmail.com>
> Date: Tue, 8 Dec 2020 19:13:33 +0200
> Cc: 45116 <at> debbugs.gnu.org
> 
> If I typed in the text
> 
> "The quick brown
> 
> jumped
> 
> over
> "
> 
> and then went up to the end of the first line and type the characters
> '[space]' 'H' 'e' 'l' 'l' 'o'
> 
> I get
> 
> "The quick brownHello"
> 
> instead of
> 
> "The quick brown Hello"
> 
> i.e. zero spaces instead of one. Only excess whitespace should be removed
> and the first space isn't excess.

What logic would you suggest to implement to decide that this space is
it not excess?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45116; Package emacs. (Tue, 08 Dec 2020 17:35:02 GMT) Full text and rfc822 format available.

Message #14 received at 45116 <at> debbugs.gnu.org (full text, mbox):

From: David Klein <dklein0 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 45116 <at> debbugs.gnu.org
Subject: Re: bug#45116: 26.3; refill-mode doesn't allow me to add text at the
 end of a paragraph
Date: Tue, 8 Dec 2020 19:13:33 +0200
[Message part 1 (text/plain, inline)]
Apologies. I didn't make myself sufficiently clear.

If I typed in the text

"The quick brown

jumped

over
"

and then went up to the end of the first line and type the characters
'[space]' 'H' 'e' 'l' 'l' 'o'

I get

"The quick brownHello"

instead of

"The quick brown Hello"

i.e. zero spaces instead of one. Only excess whitespace should be removed
and the first space isn't excess.



On Tue, Dec 8, 2020 at 5:21 PM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: David Klein <dklein0 <at> gmail.com>
> > Date: Tue, 8 Dec 2020 10:16:40 +0200
> >
> > runemacs.exe -Q
> > (setq auto-mode-alist
> >       (cons '("\\.latex$" . latex-mode) auto-mode-alist))^X^E
> > (add-hook 'latex-mode-hook 'refill-mode)^X^E
> > ^X^F junk.latex
> > Type in a few random lines interspersed with empty lines
> > Go back to the end of a line that is followed by an empty line and type
> > a space (or several). No space gets inserted. Non whitespace inserts
> correctly.
>
> Isn't that expected,, given that the doc string of this mode says:
>
>                                              When enabled, the
>   current paragraph is refilled as you edit.  Self-inserting
>   characters only cause refilling if they would cause
>   auto-filling.
>
> "Refilled as you edit means excess whitespace is removed, no?
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45116; Package emacs. (Tue, 08 Dec 2020 17:38:01 GMT) Full text and rfc822 format available.

Message #17 received at 45116 <at> debbugs.gnu.org (full text, mbox):

From: David Klein <dklein0 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 45116 <at> debbugs.gnu.org
Subject: Re: bug#45116: 26.3; refill-mode doesn't allow me to add text at the
 end of a paragraph
Date: Tue, 8 Dec 2020 19:36:43 +0200
[Message part 1 (text/plain, inline)]
For example, set a flag when user inserts a space character after a
non-space character. If he subsequently inserts a non space character,
insert a single space into the buffer.

Did you try it out in an emacs buffer? Really, give it a shot. The current
behavior is so counterintuitive as to make it useless.

On Tue, 8 Dec 2020, 19:25 Eli Zaretskii, <eliz <at> gnu.org> wrote:

> > From: David Klein <dklein0 <at> gmail.com>
> > Date: Tue, 8 Dec 2020 19:13:33 +0200
> > Cc: 45116 <at> debbugs.gnu.org
> >
> > If I typed in the text
> >
> > "The quick brown
> >
> > jumped
> >
> > over
> > "
> >
> > and then went up to the end of the first line and type the characters
> > '[space]' 'H' 'e' 'l' 'l' 'o'
> >
> > I get
> >
> > "The quick brownHello"
> >
> > instead of
> >
> > "The quick brown Hello"
> >
> > i.e. zero spaces instead of one. Only excess whitespace should be removed
> > and the first space isn't excess.
>
> What logic would you suggest to implement to decide that this space is
> it not excess?
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45116; Package emacs. (Wed, 09 Dec 2020 08:17:02 GMT) Full text and rfc822 format available.

Message #20 received at 45116 <at> debbugs.gnu.org (full text, mbox):

From: David Klein <dklein0 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 45116 <at> debbugs.gnu.org
Subject: Re: bug#45116: 26.3; refill-mode doesn't allow me to add text at the
 end of a paragraph
Date: Wed, 9 Dec 2020 10:16:11 +0200
[Message part 1 (text/plain, inline)]
Actually, an even better behaviour would be that when user inserts a
whitespace character at the end of the line and the whitespace is preceded
by non-whitespace, refill *does* insert the whitespace immediately into the
buffer.

On Tue, Dec 8, 2020 at 7:36 PM David Klein <dklein0 <at> gmail.com> wrote:

> For example, set a flag when user inserts a space character after a
> non-space character. If he subsequently inserts a non space character,
> insert a single space into the buffer.
>
> Did you try it out in an emacs buffer? Really, give it a shot. The current
> behavior is so counterintuitive as to make it useless.
>
> On Tue, 8 Dec 2020, 19:25 Eli Zaretskii, <eliz <at> gnu.org> wrote:
>
>> > From: David Klein <dklein0 <at> gmail.com>
>> > Date: Tue, 8 Dec 2020 19:13:33 +0200
>> > Cc: 45116 <at> debbugs.gnu.org
>> >
>> > If I typed in the text
>> >
>> > "The quick brown
>> >
>> > jumped
>> >
>> > over
>> > "
>> >
>> > and then went up to the end of the first line and type the characters
>> > '[space]' 'H' 'e' 'l' 'l' 'o'
>> >
>> > I get
>> >
>> > "The quick brownHello"
>> >
>> > instead of
>> >
>> > "The quick brown Hello"
>> >
>> > i.e. zero spaces instead of one. Only excess whitespace should be
>> removed
>> > and the first space isn't excess.
>>
>> What logic would you suggest to implement to decide that this space is
>> it not excess?
>>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45116; Package emacs. (Wed, 08 Sep 2021 09:40:02 GMT) Full text and rfc822 format available.

Message #23 received at 45116 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: David Klein <dklein0 <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 45116 <at> debbugs.gnu.org
Subject: Re: bug#45116: 26.3; refill-mode doesn't allow me to add text at
 the end of a paragraph
Date: Wed, 08 Sep 2021 11:39:24 +0200
David Klein <dklein0 <at> gmail.com> writes:

> If I typed in the text 
>
> "The quick brown
>
> jumped 
>
> over
> "
>
> and then went up to the end of the first line and type the characters '
> [space]' 'H' 'e' 'l' 'l' 'o'
>
> I get
>
> "The quick brownHello"
>
> instead of 
>
> "The quick brown Hello"
>
> i.e. zero spaces instead of one. Only excess whitespace should be removed
> and the first space isn't excess.

I tried reproducing this in various Emacs versions, but I was unable
to -- the space isn't removed (with refill-mode on) when I test this.

Do you have a complete recipe, starting from "emacs -Q"?

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




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 08 Sep 2021 09:40:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45116; Package emacs. (Thu, 09 Sep 2021 10:38:01 GMT) Full text and rfc822 format available.

Message #28 received at 45116 <at> debbugs.gnu.org (full text, mbox):

From: David Klein <dklein0 <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 45116 <at> debbugs.gnu.org
Subject: Re: bug#45116: 26.3; refill-mode doesn't allow me to add text at the
 end of a paragraph
Date: Thu, 9 Sep 2021 13:37:04 +0300
[Message part 1 (text/plain, inline)]
I no longer have the setup I had when I posted the question. In my current
setups I can't reproduce either.


On Wed, Sep 8, 2021 at 12:39 PM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> David Klein <dklein0 <at> gmail.com> writes:
>
> > If I typed in the text
> >
> > "The quick brown
> >
> > jumped
> >
> > over
> > "
> >
> > and then went up to the end of the first line and type the characters '
> > [space]' 'H' 'e' 'l' 'l' 'o'
> >
> > I get
> >
> > "The quick brownHello"
> >
> > instead of
> >
> > "The quick brown Hello"
> >
> > i.e. zero spaces instead of one. Only excess whitespace should be removed
> > and the first space isn't excess.
>
> I tried reproducing this in various Emacs versions, but I was unable
> to -- the space isn't removed (with refill-mode on) when I test this.
>
> Do you have a complete recipe, starting from "emacs -Q"?
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45116; Package emacs. (Thu, 09 Sep 2021 13:12:01 GMT) Full text and rfc822 format available.

Message #31 received at 45116 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: David Klein <dklein0 <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 45116 <at> debbugs.gnu.org
Subject: Re: bug#45116: 26.3; refill-mode doesn't allow me to add text at
 the end of a paragraph
Date: Thu, 09 Sep 2021 15:11:01 +0200
David Klein <dklein0 <at> gmail.com> writes:

> I no longer have the setup I had when I posted the question. In my current
> setups I can't reproduce either.

OK; I'm closing this bug report, then.  If you re-experience the bug,
please respond to the debbugs address, and we'll reopen.

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




bug closed, send any further explanations to 45116 <at> debbugs.gnu.org and David Klein <dklein0 <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 09 Sep 2021 13:12: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. (Fri, 08 Oct 2021 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 172 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.