* bug#69066: [PATCH] Fix compilation filtration if carriage is moved
@ 2024-02-12 0:30 Evgeny Gagauz
2024-02-19 5:58 ` Stefan Kangas
0 siblings, 1 reply; 3+ messages in thread
From: Evgeny Gagauz @ 2024-02-12 0:30 UTC (permalink / raw)
To: 69066; +Cc: Evgeny Gagauz
* 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)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#69066: [PATCH] Fix compilation filtration if carriage is moved
2024-02-12 0:30 bug#69066: [PATCH] Fix compilation filtration if carriage is moved Evgeny Gagauz
@ 2024-02-19 5:58 ` Stefan Kangas
2024-02-22 8:33 ` Gagauz Evgenij Vladimirovich
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Kangas @ 2024-02-19 5:58 UTC (permalink / raw)
To: Evgeny Gagauz, 69066
Evgeny Gagauz <evgenij.gagauz@gmail.com> writes:
> * 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.
Thanks for the patch.
Could you provide more details about the issue you see?
Perhaps even a way to reproduce it?
> ---
> 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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#69066: [PATCH] Fix compilation filtration if carriage is moved
2024-02-19 5:58 ` Stefan Kangas
@ 2024-02-22 8:33 ` Gagauz Evgenij Vladimirovich
0 siblings, 0 replies; 3+ messages in thread
From: Gagauz Evgenij Vladimirovich @ 2024-02-22 8:33 UTC (permalink / raw)
To: 69066
[-- Attachment #1: Type: text/plain, Size: 388 bytes --]
I could reproduce it with the following simple bash script:
printf '\r\e[K0'
sleep 1
printf '\r\e[K1'
sleep 1
printf '\r\e[K2'
sleep 1
printf '\r\e[K3'
sleep 1
printf '\r\e[K4'
The result is:
./test.sh
^[[K4
Compilation finished at Thu Feb 22 01:10:34
Interesting enough that the issue is not reproduced without sleeps. It
seems that the stream must be flushed to reproduce the issue.
[-- Attachment #2: Type: text/html, Size: 592 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-22 8:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-12 0:30 bug#69066: [PATCH] Fix compilation filtration if carriage is moved Evgeny Gagauz
2024-02-19 5:58 ` Stefan Kangas
2024-02-22 8:33 ` Gagauz Evgenij Vladimirovich
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.