From: Leo <sdl.web@gmail.com>
To: 6691@debbugs.gnu.org
Cc: John Wiegley <jwiegley@gmail.com>
Subject: bug#6691: 23.2; Eshell and ^M (PATCH attached)
Date: Thu, 22 Jul 2010 16:30:04 +0100 [thread overview]
Message-ID: <m17hkn356r.fsf@cam.ac.uk> (raw)
In-Reply-To: <m1oce03m9c.fsf@cam.ac.uk>
The problem is eshell-last-output-block-begin can point to a wrong
position in the eshell buffer after truncating buffer. I tried to trace
the reason of introducing eshell-last-output-block-begin but the
revision history only goes back to 2000.
It looks like cruft to me. So I propose the following fix.
Leo
commit 1f263a7a7d9d978b68006619a0d2a0d6dcbf39c1
Date: Thu Jul 22 16:21:30 2010 +0100
Remove cruft eshell-last-output-block-begin and fix #6691
Modified lisp/eshell/esh-mode.el
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index cc7f0df..ee9b299 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -213,7 +213,6 @@ This is used by `eshell-watch-for-password-prompt'."
(defvar eshell-last-input-start nil)
(defvar eshell-last-input-end nil)
(defvar eshell-last-output-start nil)
-(defvar eshell-last-output-block-begin nil)
(defvar eshell-last-output-end nil)
(defvar eshell-currently-handling-window nil)
@@ -381,7 +380,6 @@ This is used by `eshell-watch-for-password-prompt'."
(set (make-local-variable 'eshell-last-input-end) (point-marker))
(set (make-local-variable 'eshell-last-output-start) (point-marker))
(set (make-local-variable 'eshell-last-output-end) (point-marker))
- (set (make-local-variable 'eshell-last-output-block-begin) (point))
(let ((modules-list (copy-sequence eshell-modules-list)))
(make-local-variable 'eshell-modules-list)
@@ -611,7 +609,6 @@ If NO-HOOKS is non-nil, then `eshell-post-command-hook' won't be run."
(setq eshell-last-input-start (point-marker)
eshell-last-input-end (point-marker)
eshell-last-output-start (point-marker)
- eshell-last-output-block-begin (point)
eshell-last-output-end (point-marker))
(eshell-begin-on-new-line)
(unless no-hooks
@@ -808,9 +805,7 @@ This is done after all necessary filtering has been done."
(defun eshell-run-output-filters ()
"Run the `eshell-output-filter-functions' on the current output."
(save-current-buffer
- (run-hooks 'eshell-output-filter-functions))
- (setq eshell-last-output-block-begin
- (marker-position eshell-last-output-end)))
+ (run-hooks 'eshell-output-filter-functions)))
;;; jww (1999-10-23): this needs testing
(defun eshell-preinput-scroll-to-bottom ()
@@ -1031,7 +1026,7 @@ buffer's process if STRING contains a password prompt defined by
This function could be in the list `eshell-output-filter-functions'."
(when (eshell-interactive-process)
(save-excursion
- (goto-char eshell-last-output-block-begin)
+ (goto-char eshell-last-input-end)
(beginning-of-line)
(if (re-search-forward eshell-password-prompt-regexp
eshell-last-output-end t)
@@ -1044,7 +1039,7 @@ This function could be in the list `eshell-output-filter-functions'."
"Act properly when certain control codes are seen."
(save-excursion
(let ((orig (point)))
- (goto-char eshell-last-output-block-begin)
+ (goto-char eshell-last-input-end)
(unless (eolp)
(beginning-of-line))
(while (< (point) eshell-last-output-end)
next prev parent reply other threads:[~2010-07-22 15:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-21 15:09 bug#6691: 23.2; Eshell and ^M Leo
2010-07-22 15:30 ` Leo [this message]
2012-04-11 11:16 ` bug#6691: 23.2; Eshell and ^M (PATCH attached) Lars Magne Ingebrigtsen
2012-04-12 0:40 ` John Wiegley
2012-04-12 12:27 ` Lars Magne Ingebrigtsen
2012-04-12 13:35 ` John Wiegley
2012-04-12 1:23 ` bug#6691: 23.2; Eshell and ^M Glenn Morris
2012-04-14 7:48 ` Leo
2012-04-14 8:22 ` Andreas Schwab
2012-04-14 8:58 ` Eli Zaretskii
2012-04-14 9:16 ` Andreas Schwab
2012-04-14 8:27 ` Andreas Schwab
2012-04-14 8:33 ` Leo
2012-04-14 8:53 ` Andreas Schwab
2012-04-16 12:19 ` Leo
2012-04-16 13:45 ` Andreas Schwab
2012-04-16 13:59 ` Leo
2013-06-13 6:50 ` Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m17hkn356r.fsf@cam.ac.uk \
--to=sdl.web@gmail.com \
--cc=6691@debbugs.gnu.org \
--cc=jwiegley@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).