GNU bug report logs - #39627
[PATCH] Skip shell prompt on current line even if it's protected

Previous Next

Package: emacs;

Reported by: Steven Allen <steven <at> stebalien.com>

Date: Sat, 15 Feb 2020 23:15:01 UTC

Severity: normal

Tags: patch

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 39627 in the body.
You can then email your comments to 39627 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#39627; Package emacs. (Sat, 15 Feb 2020 23:15:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steven Allen <steven <at> stebalien.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 15 Feb 2020 23:15:01 GMT) Full text and rfc822 format available.

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

From: Steven Allen <steven <at> stebalien.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Skip shell prompt on current line even if it's protected
Date: Sat, 15 Feb 2020 15:13:59 -0800
* lisp/eshell/em-prompt.el (eshell-previous-prompt): Really go to the
beginning of the line, even if it's protected.

When the eshell prompt is protected (e.g., with rear non-sticky,
inhibited movements, etc.), `beginning-of-line' won't move to the
actual beginning of the line and therefore won't skip over the
prompt.  This change simply switches to (forward-line 0).
---
 lisp/eshell/em-prompt.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el
index 25b8ccaba17..9ae5ae12816 100644
--- a/lisp/eshell/em-prompt.el
+++ b/lisp/eshell/em-prompt.el
@@ -187,7 +187,7 @@ See `eshell-prompt-regexp'."
   "Move to end of Nth previous prompt in the buffer.
 See `eshell-prompt-regexp'."
   (interactive "p")
-  (beginning-of-line)            ; Don't count prompt on current line.
+  (forward-line 0)            ; Don't count prompt on current line.
   (eshell-next-prompt (- n)))
 
 (defun eshell-skip-prompt ()
-- 
2.25.0





Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 21 Feb 2020 08:57:02 GMT) Full text and rfc822 format available.

Notification sent to Steven Allen <steven <at> stebalien.com>:
bug acknowledged by developer. (Fri, 21 Feb 2020 08:57:02 GMT) Full text and rfc822 format available.

Message #10 received at 39627-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Steven Allen <steven <at> stebalien.com>
Cc: 39627-done <at> debbugs.gnu.org
Subject: Re: bug#39627: [PATCH] Skip shell prompt on current line even if it's
 protected
Date: Fri, 21 Feb 2020 10:56:11 +0200
> From: Steven Allen <steven <at> stebalien.com>
> Date: Sat, 15 Feb 2020 15:13:59 -0800
> 
> * lisp/eshell/em-prompt.el (eshell-previous-prompt): Really go to the
> beginning of the line, even if it's protected.
> 
> When the eshell prompt is protected (e.g., with rear non-sticky,
> inhibited movements, etc.), `beginning-of-line' won't move to the
> actual beginning of the line and therefore won't skip over the
> prompt.  This change simply switches to (forward-line 0).

Thanks, pushed to the emacs-27 branch.

Please note that I needed to massage your log message a little, to
make it more according to our conventions (described in CONTRIBUTE).
Please study the changes I made and try to follow this style in the
future.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 20 Mar 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 36 days ago.

Previous Next


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