From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Steven Allen Newsgroups: gmane.emacs.bugs Subject: bug#39627: [PATCH] Skip shell prompt on current line even if it's protected Date: Sat, 15 Feb 2020 15:13:59 -0800 Message-ID: <20200215231359.83506-1-steven@stebalien.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="58715"; mail-complaints-to="usenet@ciao.gmane.io" To: 39627@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 16 00:15:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j36eY-000FB0-Ru for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 Feb 2020 00:15:14 +0100 Original-Received: from localhost ([::1]:55504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j36eX-0004aU-Eu for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Feb 2020 18:15:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60360) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j36eN-0004aD-4s for bug-gnu-emacs@gnu.org; Sat, 15 Feb 2020 18:15:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j36eM-0003rP-1L for bug-gnu-emacs@gnu.org; Sat, 15 Feb 2020 18:15:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58836) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j36eL-0003r7-Uo for bug-gnu-emacs@gnu.org; Sat, 15 Feb 2020 18:15:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j36eL-0003jl-Qw for bug-gnu-emacs@gnu.org; Sat, 15 Feb 2020 18:15:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Steven Allen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Feb 2020 23:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39627 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.158180844814284 (code B ref -1); Sat, 15 Feb 2020 23:15:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Feb 2020 23:14:08 +0000 Original-Received: from localhost ([127.0.0.1]:36576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j36dT-0003iJ-NE for submit@debbugs.gnu.org; Sat, 15 Feb 2020 18:14:07 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:55432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j36dS-0003iB-89 for submit@debbugs.gnu.org; Sat, 15 Feb 2020 18:14:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60306) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j36dR-0004Q5-9T for bug-gnu-emacs@gnu.org; Sat, 15 Feb 2020 18:14:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j36dP-00035K-LF for bug-gnu-emacs@gnu.org; Sat, 15 Feb 2020 18:14:04 -0500 Original-Received: from outgoing-stata.csail.mit.edu ([128.30.2.210]:60025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j36dP-00034M-IX for bug-gnu-emacs@gnu.org; Sat, 15 Feb 2020 18:14:03 -0500 Original-Received: from c-98-210-165-46.hsd1.ca.comcast.net ([98.210.165.46] helo=localhost) by outgoing-stata.csail.mit.edu with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j36dO-000Rmf-2O for bug-gnu-emacs@gnu.org; Sat, 15 Feb 2020 18:14:02 -0500 X-Mailer: git-send-email 2.25.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:176098 Archived-At: * 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