GNU bug report logs - #51009
29.0.50; [PATCH] Fix small error in comint-send-input

Previous Next

Package: emacs;

Reported by: miha <at> kamnitnik.top

Date: Mon, 4 Oct 2021 14:18:01 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: miha <at> kamnitnik.top
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; [PATCH] Fix small error in comint-send-input
Date: Mon, 04 Oct 2021 16:21:08 +0200
[Message part 1 (text/plain, inline)]
To reproduce this error, emacs -q:

1) M-x shell
2) Press RET a few times to make some shell prompts
3) Press C-p to go to the end of a non-last prompt
4) M-x comint-set-process-mark
5) type "echo foo" RET

An error is then signaled:
ansi-color-apply-on-region: Invalid search bound (wrong side of point).
[0001-Fix-small-error-in-comint-send-input.patch (text/x-patch, inline)]
From 0a445ba23f18a902f807b36489695648b2e20b9a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miha=20Rihtar=C5=A1i=C4=8D?= <miha <at> kamnitnik.top>
Date: Mon, 4 Oct 2021 13:49:43 +0200
Subject: [PATCH] Fix small error in comint-send-input

* lisp/comint.el (comint-send-input): Run
comint-output-filter-functions with comint-last-output-start set
correctly.
---
 lisp/comint.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/comint.el b/lisp/comint.el
index 1e5b990c77..a0873c0b6a 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1990,6 +1990,7 @@ comint-send-input
 
         ;; This used to call comint-output-filter-functions,
         ;; but that scrolled the buffer in undesirable ways.
+        (set-marker comint-last-output-start pmark)
         (run-hook-with-args 'comint-output-filter-functions "")))))
 
 (defvar comint-preoutput-filter-functions nil
-- 
2.33.0

[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 290 days ago.

Previous Next


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