GNU bug report logs - #69066
[PATCH] Fix compilation filtration if carriage is moved

Previous Next

Package: emacs;

Reported by: Evgeny Gagauz <evgenij.gagauz <at> gmail.com>

Date: Mon, 12 Feb 2024 05:35:13 UTC

Severity: normal

Tags: patch

Merged with 69067

Full log


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

From: Evgeny Gagauz <evgenij.gagauz <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Evgeny Gagauz <evgenij.gagauz <at> gmail.com>
Subject: [PATCH] Fix compilation filtration if carriage is moved
Date: Mon, 12 Feb 2024 01:30:41 +0100
* lisp/progmodes/compile.el (compilation-filter): If a process produces
carriage cotrol characters then `compilation-filter-start' could point
to a wrong place after applying `comint-carriage-motion'
function. So its value is recalculated.
---
 lisp/progmodes/compile.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 11d400e145a..90ff414ad41 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2600,7 +2600,10 @@ and runs `compilation-filter-hook'."
               (when compilation-hidden-output
                 (compilation--hide-output compilation-filter-start))
               (unless comint-inhibit-carriage-motion
-                (comint-carriage-motion (process-mark proc) (point)))
+                (comint-carriage-motion (process-mark proc) (point))
+                ;; `compilation-filter-start' could be moved after
+                ;; interpreting carriage control characters
+                (setq compilation-filter-start (marker-position (process-mark proc))))
               (set-marker (process-mark proc) (point))
               ;; Update the number of errors in compilation-mode-line-errors
               (compilation--ensure-parse (point))
-- 
2.39.3 (Apple Git-145)





This bug report was last modified 1 year and 120 days ago.

Previous Next


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