GNU bug report logs - #40323
28.0.50; error in process filter: Invalid search bound (wrong side of point)

Previous Next

Package: emacs;

Reported by: Jacob Lagares Pozo <jlagarespo <at> iebesalu.cat>

Date: Mon, 30 Mar 2020 11:11:02 UTC

Severity: normal

Tags: moreinfo

Found in version 28.0.50

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> gmail.com>
To: Jacob Lagares Pozo <jlagarespo <at> iebesalu.cat>
Cc: 40323 <at> debbugs.gnu.org
Subject: bug#40323: 28.0.50; error in process filter: Invalid search bound (wrong side of point)
Date: Mon, 30 Mar 2020 10:50:55 -0400
Jacob Lagares Pozo <jlagarespo <at> iebesalu.cat> writes:

> Debugger entered--Lisp error: (error "Invalid search bound (wrong side of point)")
>   re-search-forward("\33\\[[0-?]*[ -/]*[@-~]" #<marker at 1 in *Async Shell Command*> t)
>   ansi-color-apply-on-region(#<marker at 152 in *Async Shell Command*> #<marker at 1 in *Async Shell Command*>)
>   ansi-color-process-output("[03/29/20, 16:21:53:387] info: [FOCUS-EVENT] Clien...")
>   run-hook-with-args(ansi-color-process-output "[03/29/20, 16:21:53:387] info: [FOCUS-EVENT] Clien...")
>   comint-output-filter(#<process Shell> "[03/29/20, 16:21:53:387] info: [FOCUS-EVENT] Clien...")

It looks like the start and end markers are the wrong way around.  Does
the patch below help?  If yes, the next question would be how they got
that way.  Perhaps that indicates a problem in comint.el?

--- i/lisp/ansi-color.el
+++ w/lisp/ansi-color.el
@@ -222,6 +222,10 @@ ansi-color-process-output
 			  comint-last-output-start
 			(point-min-marker)))
 	(end-marker (process-mark (get-buffer-process (current-buffer)))))
+    (when (> start-marker end-marker)
+      (let ((s start-marker))
+        (setq start-marker end-marker
+              end-marker s)))
     (cond ((eq ansi-color-for-comint-mode nil))
 	  ((eq ansi-color-for-comint-mode 'filter)
 	   (ansi-color-filter-region start-marker end-marker))





This bug report was last modified 2 years and 362 days ago.

Previous Next


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