GNU bug report logs -
#45095
[PATCH] lisp/progmodes/compile.el: only use comint-term-environment under comint
Previous Next
Reported by: Alyssa Ross <hi <at> alyssa.is>
Date: Mon, 7 Dec 2020 09:06:02 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45095 in the body.
You can then email your comments to 45095 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#45095
; Package
emacs
.
(Mon, 07 Dec 2020 09:06:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Alyssa Ross <hi <at> alyssa.is>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 07 Dec 2020 09:06:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
comint-term-environment is used for configuring the environment for
terminal output under comint. If compile is being used with a
different major mode, that mode probably can't handle the fancy
terminfo output that comint can, so comint-term-environment should
only be used under comint or a derived mode.
; Tested with emacs -Q as follows:
;
; (1) Set comint-terminfo-terminal to "dumb-emacs-ansi", provided by
; recent ncurses:
;
; (setq comint-terminfo-terminal "dumb-emacs-ansi") C-x C-e
;
; (2) Verify that no uninterpreted control characters are displayed by
; (compile "grep --color=auto Emacs README") C-x C-e
;
; (3) Verify that grep knows it can output color when using comint:
; (compile "grep --color=auto Emacs README" t) C-x C-e
;
; Prior to this change, grep in (2) would output control characters,
; which would be displayed uninterpreted in the buffer.
---
I haven't got my copyright papers sorted yet, so hopefully this change
is also small enough that that doesn't matter.
lisp/progmodes/compile.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 787f5d5ef3..b4bcc3f2d2 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1868,7 +1868,8 @@ compilation-start
(let ((process-environment
(append
compilation-environment
- (comint-term-environment)
+ (when (derived-mode-p 'comint-mode)
+ (comint-term-environment))
(list (format "INSIDE_EMACS=%s,compile" emacs-version))
(copy-sequence process-environment))))
(set (make-local-variable 'compilation-arguments)
--
2.27.0
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#45095
; Package
emacs
.
(Mon, 07 Dec 2020 15:59:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 45095 <at> debbugs.gnu.org (full text, mbox):
Alyssa Ross <hi <at> alyssa.is> writes:
> comint-term-environment is used for configuring the environment for
> terminal output under comint. If compile is being used with a
> different major mode, that mode probably can't handle the fancy
> terminfo output that comint can, so comint-term-environment should
> only be used under comint or a derived mode.
Makes sense -- applied to Emacs 28.
[...]
> I haven't got my copyright papers sorted yet, so hopefully this change
> is also small enough that that doesn't matter.
Yup.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 07 Dec 2020 15:59:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
45095 <at> debbugs.gnu.org and Alyssa Ross <hi <at> alyssa.is>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 07 Dec 2020 15:59:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 05 Jan 2021 12:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 225 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.