GNU bug report logs - #65980
30.0.50; C-e behaves surprisingly in minibuffer

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Thu, 14 Sep 2023 16:52:02 UTC

Severity: minor

Found in version 30.0.50

Done: Stephen Berman <stephen.berman <at> gmx.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#65980: closed (30.0.50; C-e behaves surprisingly in minibuffer)
Date: Sat, 16 Sep 2023 12:03:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 16 Sep 2023 14:02:35 +0200
with message-id <878r96iaw4.fsf <at> gmx.net>
and subject line Re: bug#65980: 30.0.50; C-e behaves surprisingly in minibuffer
has caused the debbugs.gnu.org bug report #65980,
regarding 30.0.50; C-e behaves surprisingly in minibuffer
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
65980: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65980
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stephen Berman <stephen.berman <at> gmx.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; C-e behaves surprisingly in minibuffer
Date: Thu, 14 Sep 2023 18:51:36 +0200
[Message part 3 (text/plain, inline)]
0. emacs -Q
Sanity checks:
1. Type a command that prompts in the minibuffer and includes text that
   ends before window-width, resulting e.g. in this in the minibuffer:
   Find file: ~/src/emacs/emacs-master/INSTALL
2. Typing C-a moves point to the beginning of the file name and then
   typing C-e moves point to the end of the file name.
3. Typing M-< moves point to the beginning of the prompt and then typing
   C-e moves point to the end of the file name.
Change the input:
4. Now type a command that includes text that extends beyond
   window-width, resulting e.g. in this in the minibuffer:
   Find file: ~/src/emacs/emacs-master/java/org/gnu/emacs/EmacsLauncherPreferencesActivity.java
5. Typing C-a moves point to the beginning of the file name and then
   typing C-e moves point to the end of the file name (same as step 2).
Here's the surprising behavior:
6. Typing M-< moves point to the beginning of the prompt but now typing
   C-e fails to move point.  And if you move point to any position
   within the prompt, e.g. M-f to put point after "Find", then typing
   C-e moves point to the beginning of the prompt.

It certainly seems like a bug that C-e, i.e. move-end-of-line, fails to
move to the end of the line in step 6, and the inconsistency between the
results in step 3 and step 6 also seems like a bug.  The attached patch
ensures that C-e in step 6 moves to the end of the file name, as in step
2, and should only affect the use of C-e in the minibuffer.


In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.17.6) of 2023-09-13 built on strobelfs2
Repository revision: 9838f786ded35fe49bbe84dd78af84df1337adbf
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: Linux From Scratch r12.0-19

Configured using:
 'configure -C 'CFLAGS=-Og -g3' PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig'
[Message part 4 (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 65980-done <at> debbugs.gnu.org
Subject: Re: bug#65980: 30.0.50; C-e behaves surprisingly in minibuffer
Date: Sat, 16 Sep 2023 14:02:35 +0200
On Sat, 16 Sep 2023 10:56:27 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: Stephen Berman <stephen.berman <at> gmx.net>
>> Cc: 65980 <at> debbugs.gnu.org
>> Date: Fri, 15 Sep 2023 14:35:50 +0200
>>
>> > Your patch changes one of the subroutines of next-line and
>> > previous-line. Those by now became very complex creatures, and handle
>> > many different cases of vertical cursor motion (with and without
>> > visual-line-mode, with and without line truncation, with and without
>> > R2L text, etc.)  So I hesitate to even consider it for this obscure use
>> > case.  I'd be much happier if the change was in move-beginning-of-line
>> > and move-end-of-line instead, so that it wouldn't have any chance of
>> > affecting other commands.  Could you try to come up with such a change
>> > instead?
>>
>> Sure.  I think the easiest way is simply to take your observation about
>> inhibit-field-text-motion and confine it to the minibuffer:
>
> Thanks, please install your first patch on the emacs-29 branch.

Done in commit 33ff4fed03d and closing the bug.  Thanks.

Steve Berman


This bug report was last modified 1 year and 245 days ago.

Previous Next


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