unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#71728: previous-line-or-history-element should put cursor at end, like comint-previous-input
@ 2024-06-22 23:16 Dan Jacobson
  2024-06-23  5:37 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Jacobson @ 2024-06-22 23:16 UTC (permalink / raw)
  To: 71728

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.





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

* bug#71728: previous-line-or-history-element should put cursor at end, like comint-previous-input
  2024-06-22 23:16 bug#71728: previous-line-or-history-element should put cursor at end, like comint-previous-input Dan Jacobson
@ 2024-06-23  5:37 ` Eli Zaretskii
  2024-06-23 13:38   ` Dan Jacobson
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2024-06-23  5:37 UTC (permalink / raw)
  To: Dan Jacobson; +Cc: 71728

tags 71728 notabug wontfix
close 71728
thanks

> From: Dan Jacobson <jidanni@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.





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

* bug#71728: previous-line-or-history-element should put cursor at end, like comint-previous-input
  2024-06-23  5:37 ` Eli Zaretskii
@ 2024-06-23 13:38   ` Dan Jacobson
  2024-06-23 13:50     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Jacobson @ 2024-06-23 13:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 71728

>>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
>> From: Dan Jacobson <jidanni@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>.





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

* bug#71728: previous-line-or-history-element should put cursor at end, like comint-previous-input
  2024-06-23 13:38   ` Dan Jacobson
@ 2024-06-23 13:50     ` Eli Zaretskii
  2024-06-23 14:05       ` Dan Jacobson
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2024-06-23 13:50 UTC (permalink / raw)
  To: Dan Jacobson; +Cc: 71728

> From: Dan Jacobson <jidanni@jidanni.org>
> Cc: 71728@debbugs.gnu.org
> Date: Sun, 23 Jun 2024 21:38:23 +0800
> 
> >>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
> >> From: Dan Jacobson <jidanni@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?





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

* bug#71728: previous-line-or-history-element should put cursor at end, like comint-previous-input
  2024-06-23 13:50     ` Eli Zaretskii
@ 2024-06-23 14:05       ` Dan Jacobson
  2024-06-23 14:09         ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Jacobson @ 2024-06-23 14:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 71728

>>>>> "EZ" == Eli Zaretskii <eliz@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





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

* bug#71728: previous-line-or-history-element should put cursor at end, like comint-previous-input
  2024-06-23 14:05       ` Dan Jacobson
@ 2024-06-23 14:09         ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2024-06-23 14:09 UTC (permalink / raw)
  To: Dan Jacobson; +Cc: 71728

> From: Dan Jacobson <jidanni@jidanni.org>
> Cc: 71728@debbugs.gnu.org
> Date: Sun, 23 Jun 2024 22:05:07 +0800
> 
> >>>>> "EZ" == Eli Zaretskii <eliz@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.





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

end of thread, other threads:[~2024-06-23 14:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-22 23:16 bug#71728: previous-line-or-history-element should put cursor at end, like comint-previous-input Dan Jacobson
2024-06-23  5:37 ` Eli Zaretskii
2024-06-23 13:38   ` Dan Jacobson
2024-06-23 13:50     ` Eli Zaretskii
2024-06-23 14:05       ` Dan Jacobson
2024-06-23 14:09         ` Eli Zaretskii

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