GNU bug report logs - #71728
previous-line-or-history-element should put cursor at end, like comint-previous-input

Previous Next

Package: emacs;

Reported by: Dan Jacobson <jidanni <at> jidanni.org>

Date: Sun, 23 Jun 2024 00:37:01 UTC

Severity: normal

Tags: notabug, wontfix

Done: Eli Zaretskii <eliz <at> gnu.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 71728 in the body.
You can then email your comments to 71728 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#71728; Package emacs. (Sun, 23 Jun 2024 00:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 23 Jun 2024 00:37:02 GMT) Full text and rfc822 format available.

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

From: Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <at> gnu.org
Subject: previous-line-or-history-element should put cursor at end, like
 comint-previous-input
Date: Sun, 23 Jun 2024 07:16:49 +0800
Here none of the "C-e ;; move-end-of-line" should be necessary,
as the position of the previous cursor should be remembered along
with the previous command.
Or the default position of the cursor should be the end of line,
not beginning. Just like comint-previous-input.

 !	  ;; dired-do-shell-command
 l	  ;; self-insert-command
 s	  ;; self-insert-command
 <return> ;; exit-minibuffer
 !	  ;; dired-do-shell-command
 <up>	  ;; previous-line-or-history-element
 C-e	  ;; move-end-of-line
 SPC	  ;; self-insert-command
 -	  ;; self-insert-command
 a	  ;; self-insert-command
 <return> ;; exit-minibuffer
 !	  ;; dired-do-shell-command
 <up>	  ;; previous-line-or-history-element
 C-e	  ;; move-end-of-line
 l	  ;; self-insert-command
 <return> ;; exit-minibuffer

emacs 29.3.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71728; Package emacs. (Sun, 23 Jun 2024 05:38:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dan Jacobson <jidanni <at> jidanni.org>
Cc: 71728 <at> debbugs.gnu.org
Subject: Re: bug#71728: previous-line-or-history-element should put cursor at
 end, like comint-previous-input
Date: Sun, 23 Jun 2024 08:37:47 +0300
tags 71728 notabug wontfix
close 71728
thanks

> From: Dan Jacobson <jidanni <at> jidanni.org>
> Date: Sun, 23 Jun 2024 07:16:49 +0800
> 
> Here none of the "C-e ;; move-end-of-line" should be necessary,
> as the position of the previous cursor should be remembered along
> with the previous command.
> Or the default position of the cursor should be the end of line,
> not beginning. Just like comint-previous-input.
> 
>  !	  ;; dired-do-shell-command
>  l	  ;; self-insert-command
>  s	  ;; self-insert-command
>  <return> ;; exit-minibuffer
>  !	  ;; dired-do-shell-command
>  <up>	  ;; previous-line-or-history-element
>  C-e	  ;; move-end-of-line
>  SPC	  ;; self-insert-command
>  -	  ;; self-insert-command
>  a	  ;; self-insert-command
>  <return> ;; exit-minibuffer
>  !	  ;; dired-do-shell-command
>  <up>	  ;; previous-line-or-history-element
>  C-e	  ;; move-end-of-line
>  l	  ;; self-insert-command
>  <return> ;; exit-minibuffer

There's a possible conflict between moving the cursor vertically and
showing the previous command here.  If you don't like the current
heuristics, use M-p instead of the <UP> arrow.

I'm closing this bug because Emacs behaves here exactly as intended,
and changing that will reopen a large can of worms we had when the
current behavior was implemented.




Added tag(s) notabug and wontfix. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 23 Jun 2024 05:38:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 71728 <at> debbugs.gnu.org and Dan Jacobson <jidanni <at> jidanni.org> Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 23 Jun 2024 05:38:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71728; Package emacs. (Sun, 23 Jun 2024 13:39:02 GMT) Full text and rfc822 format available.

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

From: Dan Jacobson <jidanni <at> jidanni.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 71728 <at> debbugs.gnu.org
Subject: Re: bug#71728: previous-line-or-history-element should put cursor
 at end, like comint-previous-input
Date: Sun, 23 Jun 2024 21:38:23 +0800
>>>>> "EZ" == Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Dan Jacobson <jidanni <at> jidanni.org>
>> !	  ;; dired-do-shell-command
>> l	  ;; self-insert-command
>> s	  ;; self-insert-command
>> <return> ;; exit-minibuffer
>> !	  ;; dired-do-shell-command
>> <up>	  ;; previous-line-or-history-element
>> C-e	  ;; move-end-of-line
>> SPC	  ;; self-insert-command
>> -	  ;; self-insert-command
>> a	  ;; self-insert-command
>> <return> ;; exit-minibuffer
>> !	  ;; dired-do-shell-command
>> <up>	  ;; previous-line-or-history-element
>> C-e	  ;; move-end-of-line
>> l	  ;; self-insert-command
>> <return> ;; exit-minibuffer

EZ> If you don't like the current heuristics, use M-p instead of the <UP> arrow.

Alas, in my above example, M-p behaves exactly the same as <up>.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71728; Package emacs. (Sun, 23 Jun 2024 13:51:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dan Jacobson <jidanni <at> jidanni.org>
Cc: 71728 <at> debbugs.gnu.org
Subject: Re: bug#71728: previous-line-or-history-element should put cursor
 at end, like comint-previous-input
Date: Sun, 23 Jun 2024 16:50:04 +0300
> From: Dan Jacobson <jidanni <at> jidanni.org>
> Cc: 71728 <at> debbugs.gnu.org
> Date: Sun, 23 Jun 2024 21:38:23 +0800
> 
> >>>>> "EZ" == Eli Zaretskii <eliz <at> gnu.org> writes:
> >> From: Dan Jacobson <jidanni <at> jidanni.org>
> >> !	  ;; dired-do-shell-command
> >> l	  ;; self-insert-command
> >> s	  ;; self-insert-command
> >> <return> ;; exit-minibuffer
> >> !	  ;; dired-do-shell-command
> >> <up>	  ;; previous-line-or-history-element
> >> C-e	  ;; move-end-of-line
> >> SPC	  ;; self-insert-command
> >> -	  ;; self-insert-command
> >> a	  ;; self-insert-command
> >> <return> ;; exit-minibuffer
> >> !	  ;; dired-do-shell-command
> >> <up>	  ;; previous-line-or-history-element
> >> C-e	  ;; move-end-of-line
> >> l	  ;; self-insert-command
> >> <return> ;; exit-minibuffer
> 
> EZ> If you don't like the current heuristics, use M-p instead of the <UP> arrow.
> 
> Alas, in my above example, M-p behaves exactly the same as <up>.

So you are complaining about the usual Emacs behavior of vertical
motion, which keeps the column?  Why should Emacs go to EOL in this
particular case when it doesn't do that in any other buffer/window?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71728; Package emacs. (Sun, 23 Jun 2024 14:06:02 GMT) Full text and rfc822 format available.

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

From: Dan Jacobson <jidanni <at> jidanni.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 71728 <at> debbugs.gnu.org
Subject: Re: bug#71728: previous-line-or-history-element should put cursor
 at end, like comint-previous-input
Date: Sun, 23 Jun 2024 22:05:07 +0800
>>>>> "EZ" == Eli Zaretskii <eliz <at> gnu.org> writes:
EZ> Why should Emacs go to EOL in this particular case when it doesn't
EZ> do that in any other buffer/window?

Works great here:
$ emacs -f shell
 l	    ;; self-insert-command
 s	    ;; self-insert-command
 <return>   ;; comint-send-input
 <escape> p ;; comint-previous-input




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71728; Package emacs. (Sun, 23 Jun 2024 14:10:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dan Jacobson <jidanni <at> jidanni.org>
Cc: 71728 <at> debbugs.gnu.org
Subject: Re: bug#71728: previous-line-or-history-element should put cursor
 at end, like comint-previous-input
Date: Sun, 23 Jun 2024 17:09:47 +0300
> From: Dan Jacobson <jidanni <at> jidanni.org>
> Cc: 71728 <at> debbugs.gnu.org
> Date: Sun, 23 Jun 2024 22:05:07 +0800
> 
> >>>>> "EZ" == Eli Zaretskii <eliz <at> gnu.org> writes:
> EZ> Why should Emacs go to EOL in this particular case when it doesn't
> EZ> do that in any other buffer/window?
> 
> Works great here:
> $ emacs -f shell
>  l	    ;; self-insert-command
>  s	    ;; self-insert-command
>  <return>   ;; comint-send-input
>  <escape> p ;; comint-previous-input

Not relevant to the issue at hand.  Minibuffer is not a comint buffer.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 22 Jul 2024 11:24:11 GMT) Full text and rfc822 format available.

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

Previous Next


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