GNU bug report logs - #39705
28.0.50; mode-line-process in comint-redirect-setup

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Fri, 21 Feb 2020 00:11:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

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 39705 in the body.
You can then email your comments to 39705 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#39705; Package emacs. (Fri, 21 Feb 2020 00:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 21 Feb 2020 00:11:03 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; mode-line-process in comint-redirect-setup
Date: Fri, 21 Feb 2020 01:45:36 +0200
Tags: patch

I customized mode-line-process to highlight its status with a color

(add-hook 'comint-mode-hook
          (lambda ()
            (require 'compile)
            (setq mode-line-process
                  '(:propertize ":%s" face compilation-mode-line-fail))))

as was recommended in http://thread.gmane.org/gmane.emacs.devel/153647/focus=153682

But comint.el signals an error because it expects mode-line-process to be
in its default value.  I don't know how to make mode-line customization
to be less brittle, but at least this case can be fixed by:

diff --git a/lisp/comint.el b/lisp/comint.el
index 5c521ff0fd..ea06f8af87 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -3641,7 +3641,7 @@ comint-redirect-setup
     (setq-local comint-redirect-previous-input-string "")
 
     (setq mode-line-process
-	  (if mode-line-process
+	  (if (and mode-line-process (stringp (elt mode-line-process 0)))
 	      (list (concat (elt mode-line-process 0) " Redirection"))
 	    (list ":%s Redirection")))))
 




Added tag(s) fixed. Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Tue, 25 Feb 2020 00:42:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.0.50, send any further explanations to 39705 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Tue, 25 Feb 2020 00:42:03 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, 24 Mar 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 172 days ago.

Previous Next


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