From unknown Tue Jun 24 03:24:16 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#20084 <20084@debbugs.gnu.org> To: bug#20084 <20084@debbugs.gnu.org> Subject: Status: comint-highlight-prompt overrides ANSI colors in 24.4 Reply-To: bug#20084 <20084@debbugs.gnu.org> Date: Tue, 24 Jun 2025 10:24:16 +0000 retitle 20084 comint-highlight-prompt overrides ANSI colors in 24.4 reassign 20084 emacs submitter 20084 Charles Tam severity 20084 normal tag 20084 confirmed patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 11 12:13:53 2015 Received: (at submit) by debbugs.gnu.org; 11 Mar 2015 16:13:53 +0000 Received: from localhost ([127.0.0.1]:42985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YVjGa-0002pl-T9 for submit@debbugs.gnu.org; Wed, 11 Mar 2015 12:13:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35169) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YVj5d-0002Wa-3D for submit@debbugs.gnu.org; Wed, 11 Mar 2015 12:02:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVj5X-0004Wf-15 for submit@debbugs.gnu.org; Wed, 11 Mar 2015 12:02:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:56331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVj5W-0004Wb-Ut for submit@debbugs.gnu.org; Wed, 11 Mar 2015 12:02:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVj5S-0008IT-BW for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2015 12:02:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVj5R-0004Ub-GA for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2015 12:02:22 -0400 Received: from mail-wg0-x232.google.com ([2a00:1450:400c:c00::232]:46982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVj5R-0004UJ-A3 for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2015 12:02:21 -0400 Received: by wggx12 with SMTP id x12so10238456wgg.13 for ; Wed, 11 Mar 2015 09:02:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=2weP3hGSyroVmpbxXHOXug2grwCghHRnsJ+9AdjKBIM=; b=yynCsKorSEOj/2Jnlyl8zYsKpnLSd8QsFAcFk7vpHWUdGFWL3UTHjL7PoRRbimCn+3 gHRJ0R9Ub1wfGtZ39hCJ5IPaPJrduUjDGfuM0Ofqt5qOr6xgQWY4SjIRFZvvR6f0T7VT HHFwYG+uafxx/ZTPnEWk/EpFljLJ5KH9Wy6T0CIYynxdLME3WNnb248W6zH5mp+XiHjY 9day32M0AGjk+6ZYiTR9Qui838SP9S1EVbv5Go5DeV/Ld9zxOw2Sj5KX4AvO5c3XXO6O yRgk5l7njxX+LX9AzoCB6Za1Z5RLz3NU5eUOMMzLPxljbX951WKjN1wiTInLaiLPiqbW l/uA== X-Received: by 10.194.200.229 with SMTP id jv5mr80101889wjc.59.1426089739838; Wed, 11 Mar 2015 09:02:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.101.33 with HTTP; Wed, 11 Mar 2015 09:01:38 -0700 (PDT) From: Charles Tam Date: Wed, 11 Mar 2015 12:01:38 -0400 X-Google-Sender-Auth: XKt0I4smL0f7q2TUDqxoGT_YCp4 Message-ID: Subject: comint-highlight-prompt overrides ANSI colors in 24.4 To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=047d7bb70b685c69cf051105641e X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 11 Mar 2015 12:13:51 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --047d7bb70b685c69cf051105641e Content-Type: text/plain; charset=UTF-8 In Emacs 24.3, comint-highlight-prompt allows ANSI colors to show through if it does not specify any colors itself. In Emacs 24.4, it does not, even if comint-highlight-prompt is the "empty face". To reproduce, set PS1 to something containing ANSI color codes. M-x shell (and M-x ansi-color-for-comint-mode-on if necessary). Then use ls --color. In my case the color in the prompt is ignored, but the output of ls --color has the expected hues. --047d7bb70b685c69cf051105641e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
In Emacs 24.3, comint-highlight-prompt allows ANSI colors = to show through if it does not specify any colors itself. In Emacs 24.4, it= does not, even if comint-highlight-prompt is the "empty face".
To reproduce, set PS1 to something containing ANSI color = codes. M-x shell (and M-x ansi-color-for-comint-mode-on if necessary). Then= use ls --color. In my case the color in the prompt is ignored, but the out= put of ls --color has the expected hues.
--047d7bb70b685c69cf051105641e-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 11 14:54:08 2015 Received: (at control) by debbugs.gnu.org; 11 Mar 2015 18:54:08 +0000 Received: from localhost ([127.0.0.1]:43128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YVllg-0000F1-EB for submit@debbugs.gnu.org; Wed, 11 Mar 2015 14:54:08 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:32772 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YVlle-0000Eq-Sn for control@debbugs.gnu.org; Wed, 11 Mar 2015 14:54:07 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YVlle-0007Dh-8q for control@debbugs.gnu.org; Wed, 11 Mar 2015 14:54:06 -0400 Date: Wed, 11 Mar 2015 14:54:06 -0400 Message-Id: Subject: control message for bug 20084 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) tag 20084 confirmed From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 11 15:00:59 2015 Received: (at 20084) by debbugs.gnu.org; 11 Mar 2015 19:00:59 +0000 Received: from localhost ([127.0.0.1]:43137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YVlsJ-00012v-6t for submit@debbugs.gnu.org; Wed, 11 Mar 2015 15:00:59 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:33105 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YVlsH-00010k-CQ for 20084@debbugs.gnu.org; Wed, 11 Mar 2015 15:00:57 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YVlsG-0007r9-Tf; Wed, 11 Mar 2015 15:00:56 -0400 From: Glenn Morris To: Charles Tam Subject: Re: bug#20084: comint-highlight-prompt overrides ANSI colors in 24.4 References: X-Spook: COSCO RSA oil George W. Bush TWA Iran domestic X-Ran: 2C-gleV41MpA^N)qcYRm@6N):/t_CS~f[SaMuw/$WS`!COy&Vdy:v44NI96.myr?Ya8D.4 X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 11 Mar 2015 15:00:56 -0400 In-Reply-To: (Charles Tam's message of "Wed, 11 Mar 2015 12:01:38 -0400") Message-ID: <1vy4n3gxzr.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 20084 Cc: 20084@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Confirmed. Perhaps related to http://debbugs.gnu.org/14744, which I see was applied 2013-08-08, without any comment being made to the associated bug report, sigh. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 11 22:46:09 2015 Received: (at 20084) by debbugs.gnu.org; 12 Mar 2015 02:46:09 +0000 Received: from localhost ([127.0.0.1]:43296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YVt8S-0005ey-T4 for submit@debbugs.gnu.org; Wed, 11 Mar 2015 22:46:09 -0400 Received: from b2bfep12.mx.upcmail.net ([62.179.121.57]:46071) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YVt8Q-0005eL-H3 for 20084@debbugs.gnu.org; Wed, 11 Mar 2015 22:46:07 -0400 Received: from edge11.upcmail.net ([192.168.13.81]) by b2bfep12.mx.upcmail.net (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20150312024559.RXGT14748.b2bfep12-int.chello.at@edge11.upcmail.net> for <20084@debbugs.gnu.org>; Thu, 12 Mar 2015 03:45:59 +0100 Received: from iznogoud.viz ([91.119.225.147]) by edge11.upcmail.net with edge id 2Sly1q00Q3BSE8T0BSlyZx; Thu, 12 Mar 2015 03:45:59 +0100 X-SourceIP: 91.119.225.147 Received: from wolfgang by iznogoud.viz with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YVt8I-0001Za-OO; Thu, 12 Mar 2015 03:45:58 +0100 From: Wolfgang Jenkner To: Glenn Morris Subject: Re: bug#20084: comint-highlight-prompt overrides ANSI colors in 24.4 Date: Thu, 12 Mar 2015 03:00:13 +0100 References: <1vy4n3gxzr.fsf@fencepost.gnu.org> Message-ID: <85k2ynexw9.fsf@iznogoud.viz> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20084 Cc: 20084@debbugs.gnu.org, Charles Tam X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Wed, Mar 11 2015, Glenn Morris wrote: > Perhaps related to http://debbugs.gnu.org/14744, which I see was applied > 2013-08-08, without any comment being made to the associated bug report, sigh. Another symptom of the same bug introduced there is that copious colourful output, as produced by, say, `ls /usr/bin', will have "white spots". I've been using something like the following patch for some time: -- >8 -- Subject: [PATCH] Preserve face text properties in comint prompt. * lisp/comint.el (comint-snapshot-last-prompt): Use font-lock-prepend-text-property for comint-highlight-prompt. (comint-output-filter): Remove only comint-highlight-prompt. Thus, the original face text property of a prompt "candidate" (the last line of an output chunk not ending with a newline) is preserved. This amends the fixing of bug#14744. (Bug#20084) --- lisp/comint.el | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/lisp/comint.el b/lisp/comint.el index b52d7fd..65b9c3c 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1926,10 +1926,10 @@ the start, the cdr to the end of the last prompt recognized.") Freezes the `font-lock-face' text property in place." (when comint-last-prompt (with-silent-modifications - (add-text-properties + (font-lock-prepend-text-property (car comint-last-prompt) (cdr comint-last-prompt) - '(font-lock-face comint-highlight-prompt))) + 'font-lock-face 'comint-highlight-prompt)) ;; Reset comint-last-prompt so later on comint-output-filter does ;; not remove the font-lock-face text property of the previous ;; (this) prompt. @@ -2081,14 +2081,36 @@ Make backspaces delete the previous character." (add-text-properties prompt-start (point) '(read-only t front-sticky (read-only))))) (when comint-last-prompt - (remove-text-properties (car comint-last-prompt) - (cdr comint-last-prompt) - '(font-lock-face))) + (let ((start (car comint-last-prompt)) + (limit (cdr comint-last-prompt)) + face end) + (with-silent-modifications + (while + (progn + (setq end + (next-single-property-change start + 'font-lock-face + nil + limit)) + (setq face (get-text-property start 'font-lock-face)) + (put-text-property + start end 'font-lock-face + (if (and (consp face) + (not (or + (eq (car face) 'foreground-color) + (eq (car face) 'background-color) + (keywordp (car face))))) + (remove 'comint-highlight-prompt face) + (unless (eq face 'comint-highlight-prompt) + face))) + (< (setq start end) limit)))))) (setq comint-last-prompt (cons (copy-marker prompt-start) (point-marker))) - (add-text-properties prompt-start (point) - '(rear-nonsticky t - font-lock-face comint-highlight-prompt))) + (with-silent-modifications + (font-lock-prepend-text-property prompt-start (point) + 'font-lock-face + 'comint-highlight-prompt) + (add-text-properties prompt-start (point) '(rear-nonsticky t)))) (goto-char saved-point))))))) (defun comint-preinput-scroll-to-bottom () -- 2.3.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 12 12:56:58 2015 Received: (at control) by debbugs.gnu.org; 12 Mar 2015 16:56:58 +0000 Received: from localhost ([127.0.0.1]:44168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YW6Pp-0003Ew-I8 for submit@debbugs.gnu.org; Thu, 12 Mar 2015 12:56:57 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:39414 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YW6Pn-0003En-Sp for control@debbugs.gnu.org; Thu, 12 Mar 2015 12:56:56 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YW6Pn-0004Rp-DJ for control@debbugs.gnu.org; Thu, 12 Mar 2015 12:56:55 -0400 Date: Thu, 12 Mar 2015 12:56:55 -0400 Message-Id: Subject: control message for bug 19758 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) block 19758 by 20084 From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 12 12:57:10 2015 Received: (at control) by debbugs.gnu.org; 12 Mar 2015 16:57:10 +0000 Received: from localhost ([127.0.0.1]:44172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YW6Q2-0003G0-4a for submit@debbugs.gnu.org; Thu, 12 Mar 2015 12:57:10 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:39420 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YW6Q0-0003Fr-27 for control@debbugs.gnu.org; Thu, 12 Mar 2015 12:57:08 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YW6Pz-0004Tt-So for control@debbugs.gnu.org; Thu, 12 Mar 2015 12:57:07 -0400 Date: Thu, 12 Mar 2015 12:57:07 -0400 Message-Id: Subject: control message for bug 20084 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) tag 20084 patch From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 19 22:31:45 2015 Received: (at 20084) by debbugs.gnu.org; 20 Mar 2015 02:31:45 +0000 Received: from localhost ([127.0.0.1]:58674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYmiu-0004Hy-Rp for submit@debbugs.gnu.org; Thu, 19 Mar 2015 22:31:45 -0400 Received: from b2bfep14.mx.upcmail.net ([62.179.121.59]:34284) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYmis-0004Hi-Hq for 20084@debbugs.gnu.org; Thu, 19 Mar 2015 22:31:43 -0400 Received: from edge12.upcmail.net ([192.168.13.82]) by b2bfep14.mx.upcmail.net (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20150320023135.OCUG11972.b2bfep14-int.chello.at@edge12.upcmail.net> for <20084@debbugs.gnu.org>; Fri, 20 Mar 2015 03:31:35 +0100 Received: from iznogoud.viz ([91.119.142.84]) by edge12.upcmail.net with edge id 5eXb1q0041pThtX0CeXbsv; Fri, 20 Mar 2015 03:31:35 +0100 X-SourceIP: 91.119.142.84 Received: from wolfgang by iznogoud.viz with local (Exim 4.85 (FreeBSD)) (envelope-from ) id 1YYmil-0003T0-1H; Fri, 20 Mar 2015 03:31:35 +0100 From: Wolfgang Jenkner To: Glenn Morris Subject: Re: bug#20084: comint-highlight-prompt overrides ANSI colors in 24.4 References: <1vy4n3gxzr.fsf@fencepost.gnu.org> <85k2ynexw9.fsf@iznogoud.viz> Date: Fri, 20 Mar 2015 03:31:34 +0100 In-Reply-To: <85k2ynexw9.fsf@iznogoud.viz> (Wolfgang Jenkner's message of "Thu, 12 Mar 2015 03:00:13 +0100") Message-ID: <85iodwtn5k.fsf@iznogoud.viz> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20084 Cc: 20084@debbugs.gnu.org, Charles Tam X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) I note that a different patch has also been proposed in this context, see the thread here: http://comments.gmane.org/gmane.emacs.devel/183801 From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 19 22:35:43 2015 Received: (at 20084) by debbugs.gnu.org; 20 Mar 2015 02:35:43 +0000 Received: from localhost ([127.0.0.1]:58678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYmmk-0004O2-ES for submit@debbugs.gnu.org; Thu, 19 Mar 2015 22:35:43 -0400 Received: from b2bfep16.mx.upcmail.net ([62.179.121.61]:37869) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYmmg-0004Nm-1n for 20084@debbugs.gnu.org; Thu, 19 Mar 2015 22:35:39 -0400 Received: from edge11.upcmail.net ([192.168.13.81]) by b2bfep16.mx.upcmail.net (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20150320023521.IMSP22713.b2bfep16-int.chello.at@edge11.upcmail.net> for <20084@debbugs.gnu.org>; Fri, 20 Mar 2015 03:35:21 +0100 Received: from iznogoud.viz ([91.119.142.84]) by edge11.upcmail.net with edge id 5ebM1q0041pThtX0BebMD5; Fri, 20 Mar 2015 03:35:21 +0100 X-SourceIP: 91.119.142.84 Received: from wolfgang by iznogoud.viz with local (Exim 4.85 (FreeBSD)) (envelope-from ) id 1YYmmO-0003TJ-VG; Fri, 20 Mar 2015 03:35:20 +0100 From: Wolfgang Jenkner To: Glenn Morris Subject: Re: bug#20084: comint-highlight-prompt overrides ANSI colors in 24.4 Date: Fri, 20 Mar 2015 03:22:37 +0100 References: <1vy4n3gxzr.fsf@fencepost.gnu.org> <85k2ynexw9.fsf@iznogoud.viz> Message-ID: <85d244tmzb.fsf@iznogoud.viz> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20084 Cc: 20084@debbugs.gnu.org, Charles Tam X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Thu, Mar 12 2015, Wolfgang Jenkner wrote: > I've been using something like the following patch for some time: I've refactored it a bit and added an ert test. It would be nice if you (the OP or someone else) could test it (since font-lock.el is pre-loaded it is necessary to manually load the (compiled) patched file, even after restarting emacs). If there are no objections I'd like to push it in, say, a week. -- >8 -- Subject: [PATCH] Preserve face text properties in comint prompt. * lisp/font-lock.el (remove-single-text-property): Uncomment. Hack it a bit. * lisp/comint.el (comint-output-filter): Use it to remove comint-highlight-prompt. (comint-snapshot-last-prompt, comint-output-filter): Use font-lock-prepend-text-property for comint-highlight-prompt. * test/automated/textprop-tests.el: New file. (textprop-tests-remove-single-text-property): New test. Thus, the original face text property of a prompt "candidate" (the last line of an output chunk not ending with a newline) is preserved. This amends the fixing of bug#14744. (Bug#20084) --- lisp/comint.el | 20 +++++++++------ lisp/font-lock.el | 47 +++++++++++++++++++--------------- test/automated/textprop-tests.el | 55 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 28 deletions(-) create mode 100644 test/automated/textprop-tests.el diff --git a/lisp/comint.el b/lisp/comint.el index aaa7d59..1d7f81e 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1930,10 +1930,10 @@ the start, the cdr to the end of the last prompt recognized.") Freezes the `font-lock-face' text property in place." (when comint-last-prompt (with-silent-modifications - (add-text-properties + (font-lock-prepend-text-property (car comint-last-prompt) (cdr comint-last-prompt) - '(font-lock-face comint-highlight-prompt))) + 'font-lock-face 'comint-highlight-prompt)) ;; Reset comint-last-prompt so later on comint-output-filter does ;; not remove the font-lock-face text property of the previous ;; (this) prompt. @@ -2085,14 +2085,18 @@ Make backspaces delete the previous character." (add-text-properties prompt-start (point) '(read-only t front-sticky (read-only))))) (when comint-last-prompt - (remove-text-properties (car comint-last-prompt) - (cdr comint-last-prompt) - '(font-lock-face))) + (with-silent-modifications + (remove-single-text-property (car comint-last-prompt) + (cdr comint-last-prompt) + 'font-lock-face + 'comint-highlight-prompt))) (setq comint-last-prompt (cons (copy-marker prompt-start) (point-marker))) - (add-text-properties prompt-start (point) - '(rear-nonsticky t - font-lock-face comint-highlight-prompt))) + (with-silent-modifications + (font-lock-prepend-text-property prompt-start (point) + 'font-lock-face + 'comint-highlight-prompt) + (add-text-properties prompt-start (point) '(rear-nonsticky t)))) (goto-char saved-point))))))) (defun comint-preinput-scroll-to-bottom () diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 6ec6c9f..0c6642c 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1427,26 +1427,33 @@ Optional argument OBJECT is the string or buffer containing the text." ;; For consistency: maybe this should be called `remove-single-property' like ;; `next-single-property-change' (not `next-single-text-property-change'), etc. -;;(defun remove-single-text-property (start end prop value &optional object) -;; "Remove a specific property value from text from START to END. -;;Arguments PROP and VALUE specify the property and value to remove. The -;;resulting property values are not equal to VALUE nor lists containing VALUE. -;;Optional argument OBJECT is the string or buffer containing the text." -;; (let ((start (text-property-not-all start end prop nil object)) next prev) -;; (while start -;; (setq next (next-single-property-change start prop object end) -;; prev (get-text-property start prop object)) -;; (cond ((and (symbolp prev) (eq value prev)) -;; (remove-text-property start next prop object)) -;; ((and (listp prev) (memq value prev)) -;; (let ((new (delq value prev))) -;; (cond ((null new) -;; (remove-text-property start next prop object)) -;; ((= (length new) 1) -;; (put-text-property start next prop (car new) object)) -;; (t -;; (put-text-property start next prop new object)))))) -;; (setq start (text-property-not-all next end prop nil object))))) +(defun remove-single-text-property (start end prop value &optional object) + "Remove a specific property value from text from START to END. +Arguments PROP and VALUE specify the property and value to remove. The +resulting property values are not `eq' to VALUE nor lists containing VALUE. +Optional argument OBJECT is the string or buffer containing the text." + (let ((start (text-property-not-all start end prop nil object)) next prev) + (while start + (setq next (next-single-property-change start prop object end) + prev (get-text-property start prop object)) + (cond ((or (symbolp prev) + (and (consp prev) + (or (keywordp (car prev)) + (eq (car prev) 'foreground-color) + (eq (car prev) 'background-color)))) + (when (eq value prev) + (remove-list-of-text-properties start next (list prop) object))) + ((and (listp prev) + (memq value prev)) + (let ((new (remq value prev))) + (cond ((null new) + (remove-list-of-text-properties start next (list prop) + object)) + ((= (length new) 1) + (put-text-property start next prop (car new) object)) + (t + (put-text-property start next prop new object)))))) + (setq start (text-property-not-all next end prop nil object))))) ;;; End of Additional text property functions. diff --git a/test/automated/textprop-tests.el b/test/automated/textprop-tests.el new file mode 100644 index 0000000..6fda65d --- /dev/null +++ b/test/automated/textprop-tests.el @@ -0,0 +1,55 @@ +;;; textprop-tests.el --- Test suite for text properties. + +;; Copyright (C) 2015 Free Software Foundation, Inc. + +;; Author: Wolfgang Jenkner +;; Keywords: internal + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: + +(require 'ert) + +(ert-deftest textprop-tests-remove-single-text-property () + "Test `remove-single-text-property'." + (let* ((string "foobar") + (stack (list string)) + (faces '(bold (:foreground "red") underline))) + ;; Build each string in `stack' by adding a face to the previous + ;; string. + (let ((faces (reverse faces))) + (push (copy-sequence (car stack)) stack) + (put-text-property 0 3 'font-lock-face (pop faces) (car stack)) + (push (copy-sequence (car stack)) stack) + (put-text-property 3 6 'font-lock-face (pop faces) (car stack)) + (push (copy-sequence (car stack)) stack) + (font-lock-prepend-text-property 2 5 + 'font-lock-face (pop faces) (car stack))) + ;; Check that removing the corresponding face from each string + ;; yields the previous string in `stack'. + (while faces + ;; (message "%S" (car stack)) + (should (equal-including-properties + (progn + (remove-single-text-property 0 6 'font-lock-face (pop faces) + (car stack)) + (pop stack)) + (car stack)))) + ;; Sanity check. + ;; (message "%S" (car stack)) + (should (and (equal-including-properties (pop stack) string) + (null stack))))) -- 2.3.3 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 20 10:24:27 2015 Received: (at 20084) by debbugs.gnu.org; 20 Mar 2015 14:24:27 +0000 Received: from localhost ([127.0.0.1]:59206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYxqd-0007Eu-9z for submit@debbugs.gnu.org; Fri, 20 Mar 2015 10:24:27 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:41865) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYxqc-0007En-9J for 20084@debbugs.gnu.org; Fri, 20 Mar 2015 10:24:26 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t2KEOJhO030265; Fri, 20 Mar 2015 10:24:19 -0400 Received: by pastel.home (Postfix, from userid 20848) id 6FD88F63; Fri, 20 Mar 2015 10:24:19 -0400 (EDT) From: Stefan Monnier To: Wolfgang Jenkner Subject: Re: bug#20084: comint-highlight-prompt overrides ANSI colors in 24.4 Message-ID: References: <1vy4n3gxzr.fsf@fencepost.gnu.org> <85k2ynexw9.fsf@iznogoud.viz> <85d244tmzb.fsf@iznogoud.viz> Date: Fri, 20 Mar 2015 10:24:19 -0400 In-Reply-To: <85d244tmzb.fsf@iznogoud.viz> (Wolfgang Jenkner's message of "Fri, 20 Mar 2015 03:22:37 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5251=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5251> : inlines <2452> : streams <1408628> : uri <1885571> X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 20084 Cc: Glenn Morris , Charles Tam , 20084@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) > * lisp/font-lock.el (remove-single-text-property): Uncomment. > Hack it a bit. Please add a "font-lock--" prefix to it, or move it to comint.el and add a "comint--" prefix to it. We could also move it to something more generic but its name should include "-face-" since its behavior is specific to the way `face' properties are merged. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 22 12:30:49 2015 Received: (at 20084) by debbugs.gnu.org; 22 Mar 2015 16:30:49 +0000 Received: from localhost ([127.0.0.1]:60814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZim1-0003cE-4j for submit@debbugs.gnu.org; Sun, 22 Mar 2015 12:30:49 -0400 Received: from b2bfep12.mx.upcmail.net ([62.179.121.57]:35257) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZily-0003bx-CZ for 20084@debbugs.gnu.org; Sun, 22 Mar 2015 12:30:47 -0400 Received: from edge12.upcmail.net ([192.168.13.82]) by b2bfep12.mx.upcmail.net (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20150322163039.JMPR4373.b2bfep12-int.chello.at@edge12.upcmail.net> for <20084@debbugs.gnu.org>; Sun, 22 Mar 2015 17:30:39 +0100 Received: from iznogoud.viz ([91.119.116.94]) by edge12.upcmail.net with edge id 6gWe1q00N22GXxF0CgWeev; Sun, 22 Mar 2015 17:30:39 +0100 X-SourceIP: 91.119.116.94 Received: from wolfgang by iznogoud.viz with local (Exim 4.85 (FreeBSD)) (envelope-from ) id 1YZilq-0000Tp-7T; Sun, 22 Mar 2015 17:30:38 +0100 From: Wolfgang Jenkner To: Stefan Monnier Subject: Re: bug#20084: comint-highlight-prompt overrides ANSI colors in 24.4 Date: Sun, 22 Mar 2015 17:29:15 +0100 References: <1vy4n3gxzr.fsf@fencepost.gnu.org> <85k2ynexw9.fsf@iznogoud.viz> <85d244tmzb.fsf@iznogoud.viz> Message-ID: <85zj75gfki.fsf@iznogoud.viz> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20084 Cc: 20084@debbugs.gnu.org, Charles Tam X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Fri, Mar 20 2015, Stefan Monnier wrote: >> * lisp/font-lock.el (remove-single-text-property): Uncomment. >> Hack it a bit. > > Please add a "font-lock--" prefix to it, or move it to comint.el and add > a "comint--" prefix to it. We could also move it to something more > generic but its name should include "-face-" since its behavior is > specific to the way `face' properties are merged. I think it is a companion of font-lock-append-text-property and friends and should be allowed to stay in font-lock.el as well. All those functions do something reasonable (though perhaps not particularly useful) for arbitrary properties - and are documented to do so - the only `face' or `font-lock-face' specific quirk being that `anonymous faces' have to be treated like atoms. Also, am I wrong that foo-- is used for symbols which are private to the `foo' library whereas `private to emacs' is achieved by not documenting things in the manual? So, I would choose a name like `font-lock-remove-from-text-property' and leave it undocumented. (I'm talking about pushing it to the master branch only, since it's not a regression against 24.4, as the OP noted). From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 22 12:36:41 2015 Received: (at 20084) by debbugs.gnu.org; 22 Mar 2015 16:36:41 +0000 Received: from localhost ([127.0.0.1]:60829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZirh-0003lG-4U for submit@debbugs.gnu.org; Sun, 22 Mar 2015 12:36:41 -0400 Received: from b2bfep14.mx.upcmail.net ([62.179.121.59]:56050) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZire-0003kw-BU for 20084@debbugs.gnu.org; Sun, 22 Mar 2015 12:36:39 -0400 Received: from edge11.upcmail.net ([192.168.13.81]) by b2bfep14.mx.upcmail.net (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20150322163631.LDOG11972.b2bfep14-int.chello.at@edge11.upcmail.net> for <20084@debbugs.gnu.org>; Sun, 22 Mar 2015 17:36:31 +0100 Received: from iznogoud.viz ([91.119.116.94]) by edge11.upcmail.net with edge id 6gcV1q00C22GXxF0BgcVZg; Sun, 22 Mar 2015 17:36:31 +0100 X-SourceIP: 91.119.116.94 Received: from wolfgang by iznogoud.viz with local (Exim 4.85 (FreeBSD)) (envelope-from ) id 1YZirV-0000U8-BW; Sun, 22 Mar 2015 17:36:29 +0100 From: Wolfgang Jenkner To: Stefan Monnier Subject: Re: bug#20084: comint-highlight-prompt overrides ANSI colors in 24.4 References: <1vy4n3gxzr.fsf@fencepost.gnu.org> <85k2ynexw9.fsf@iznogoud.viz> <85d244tmzb.fsf@iznogoud.viz> <85zj75gfki.fsf@iznogoud.viz> Date: Sun, 22 Mar 2015 17:36:29 +0100 In-Reply-To: <85zj75gfki.fsf@iznogoud.viz> (Wolfgang Jenkner's message of "Sun, 22 Mar 2015 17:29:15 +0100") Message-ID: <85vbhtgfaq.fsf@iznogoud.viz> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20084 Cc: 20084@debbugs.gnu.org, Charles Tam X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Sun, Mar 22 2015, Wolfgang Jenkner wrote: > - and are documented to do so in the docstring From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 22 22:10:51 2015 Received: (at 20084) by debbugs.gnu.org; 23 Mar 2015 02:10:51 +0000 Received: from localhost ([127.0.0.1]:32915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZrpL-0006Zp-6K for submit@debbugs.gnu.org; Sun, 22 Mar 2015 22:10:51 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:27146) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZrpJ-0006ZZ-S6 for 20084@debbugs.gnu.org; Sun, 22 Mar 2015 22:10:50 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgUFAGvvdVRFpZgf/2dsb2JhbAA3gVOhb4EIgXUBAQQBViMFCwsOJhIUGA0kiBOiEYt1DSFBCQMBAoM+Ax2DUwSjY4RY X-IPAS-Result: AgUFAGvvdVRFpZgf/2dsb2JhbAA3gVOhb4EIgXUBAQQBViMFCwsOJhIUGA0kiBOiEYt1DSFBCQMBAoM+Ax2DUwSjY4RY X-IronPort-AV: E=Sophos;i="5.01,1,1400040000"; d="scan'208";a="114233620" Received: from 69-165-152-31.dsl.teksavvy.com (HELO pastel.home) ([69.165.152.31]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 22 Mar 2015 22:10:44 -0400 Received: by pastel.home (Postfix, from userid 20848) id 558971A7E; Sun, 22 Mar 2015 22:10:44 -0400 (EDT) From: Stefan Monnier To: Wolfgang Jenkner Subject: Re: bug#20084: comint-highlight-prompt overrides ANSI colors in 24.4 Message-ID: References: <1vy4n3gxzr.fsf@fencepost.gnu.org> <85k2ynexw9.fsf@iznogoud.viz> <85d244tmzb.fsf@iznogoud.viz> <85zj75gfki.fsf@iznogoud.viz> Date: Sun, 22 Mar 2015 22:10:44 -0400 In-Reply-To: <85zj75gfki.fsf@iznogoud.viz> (Wolfgang Jenkner's message of "Sun, 22 Mar 2015 17:29:15 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 20084 Cc: 20084@debbugs.gnu.org, Charles Tam X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > only `face' or `font-lock-face' specific quirk being that `anonymous > faces' have to be treated like atoms. The fact that you can combine values by using a list is not true of all properties (far from that). > Also, am I wrong that foo-- is used for symbols which are private to > the `foo' library whereas `private to emacs' is achieved by not > documenting things in the manual? There's no such distinction. The "--" is just mean to say it's "internal/private" for some largely unspecified definition of "internal/private". > (I'm talking about pushing it to the master branch only, since it's not > a regression against 24.4, as the OP noted). Yes, of course. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 23 15:13:21 2015 Received: (at 20084) by debbugs.gnu.org; 23 Mar 2015 19:13:21 +0000 Received: from localhost ([127.0.0.1]:34138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ya7mq-0007fI-Lp for submit@debbugs.gnu.org; Mon, 23 Mar 2015 15:13:21 -0400 Received: from b2bfep12.mx.upcmail.net ([62.179.121.57]:58977) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ya7mo-0007f3-Af for 20084@debbugs.gnu.org; Mon, 23 Mar 2015 15:13:19 -0400 Received: from edge11.upcmail.net ([192.168.13.81]) by b2bfep12.mx.upcmail.net (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20150323191311.ZBVS4373.b2bfep12-int.chello.at@edge11.upcmail.net> for <20084@debbugs.gnu.org>; Mon, 23 Mar 2015 20:13:11 +0100 Received: from iznogoud.viz ([85.127.82.165]) by edge11.upcmail.net with edge id 77DA1q00y3a0xZ90B7DAQm; Mon, 23 Mar 2015 20:13:11 +0100 X-SourceIP: 85.127.82.165 Received: from wolfgang by iznogoud.viz with local (Exim 4.85 (FreeBSD)) (envelope-from ) id 1Ya7mg-0000an-M5; Mon, 23 Mar 2015 20:13:10 +0100 From: Wolfgang Jenkner To: Stefan Monnier Subject: Re: bug#20084: comint-highlight-prompt overrides ANSI colors in 24.4 Date: Mon, 23 Mar 2015 20:06:57 +0100 References: <1vy4n3gxzr.fsf@fencepost.gnu.org> <85k2ynexw9.fsf@iznogoud.viz> <85d244tmzb.fsf@iznogoud.viz> <85zj75gfki.fsf@iznogoud.viz> Message-ID: <857fu75xyx.fsf@iznogoud.viz> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20084 Cc: 20084@debbugs.gnu.org, Charles Tam X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Sun, Mar 22 2015, Stefan Monnier wrote: >> only `face' or `font-lock-face' specific quirk being that `anonymous >> faces' have to be treated like atoms. > > The fact that you can combine values by using a list is not true of > all properties (far from that). Well, I can, though it won't make sense in most cases, that's why I said "(though perhaps not particularly useful)". >> Also, am I wrong that foo-- is used for symbols which are private to >> the `foo' library whereas `private to emacs' is achieved by not >> documenting things in the manual? > > There's no such distinction. The "--" is just mean to say it's > "internal/private" for some largely unspecified definition of > "internal/private". I stand corrected. Indeed, a quick test indicates that more than half of the symbols of the shape `foo--' are defined outside of foo.el. (progn (require 'cl-lib) (require 'subr-x) (let ((all 0) (bad 0)) (mapatoms (lambda (sym) (let ((name (symbol-name sym))) (when (string-match "\\`\\(.*?\\)--" name) (when-let ((file (symbol-file sym))) (cl-incf all) (unless (string= (match-string 1 name) (file-name-base file)) (cl-incf bad))))))) (list bad all))) => (665 1040) in the emacs instance where I'm writing this. While I'd prefer consistency with font-lock-append-text-property and friends (in particular because it's just an old function, dusted off a bit), it seems that you deem it more important to adhere to current conventions for naming slightly obscure functions. So, font-lock--remove-face-from-text-property, perhaps. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 23 16:51:00 2015 Received: (at 20084) by debbugs.gnu.org; 23 Mar 2015 20:51:00 +0000 Received: from localhost ([127.0.0.1]:34200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ya9JL-0001aT-Lh for submit@debbugs.gnu.org; Mon, 23 Mar 2015 16:50:59 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:13245) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ya9JJ-0001aF-6a for 20084@debbugs.gnu.org; Mon, 23 Mar 2015 16:50:58 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgUFAGvvdVRFxLqJ/2dsb2JhbAA3gVOhb4EIgXUBAQQBViMFCwsOJhIUGA0kiBOiEYxkBwEBAQIBAoM+Ax2DUwSjY4RY X-IPAS-Result: AgUFAGvvdVRFxLqJ/2dsb2JhbAA3gVOhb4EIgXUBAQQBViMFCwsOJhIUGA0kiBOiEYxkBwEBAQIBAoM+Ax2DUwSjY4RY X-IronPort-AV: E=Sophos;i="5.01,1,1400040000"; d="scan'208";a="114337806" Received: from 69-196-186-137.dsl.teksavvy.com (HELO pastel.home) ([69.196.186.137]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 23 Mar 2015 16:50:50 -0400 Received: by pastel.home (Postfix, from userid 20848) id 7233510FE; Mon, 23 Mar 2015 16:50:49 -0400 (EDT) From: Stefan Monnier To: Wolfgang Jenkner Subject: Re: bug#20084: comint-highlight-prompt overrides ANSI colors in 24.4 Message-ID: References: <1vy4n3gxzr.fsf@fencepost.gnu.org> <85k2ynexw9.fsf@iznogoud.viz> <85d244tmzb.fsf@iznogoud.viz> <85zj75gfki.fsf@iznogoud.viz> <857fu75xyx.fsf@iznogoud.viz> Date: Mon, 23 Mar 2015 16:50:49 -0400 In-Reply-To: <857fu75xyx.fsf@iznogoud.viz> (Wolfgang Jenkner's message of "Mon, 23 Mar 2015 20:06:57 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 20084 Cc: 20084@debbugs.gnu.org, Charles Tam X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > So, font-lock--remove-face-from-text-property, perhaps. Sounds good, Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 24 20:53:26 2015 Received: (at 20084) by debbugs.gnu.org; 25 Mar 2015 00:53:26 +0000 Received: from localhost ([127.0.0.1]:35401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaZZV-0006PF-TQ for submit@debbugs.gnu.org; Tue, 24 Mar 2015 20:53:26 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:55510 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaZZU-0006P8-Gg for 20084@debbugs.gnu.org; Tue, 24 Mar 2015 20:53:24 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YaZZS-0002gD-N9; Tue, 24 Mar 2015 20:53:22 -0400 From: Glenn Morris To: 20084@debbugs.gnu.org Subject: Re: bug#20084: comint-highlight-prompt overrides ANSI colors in 24.4 References: <1vy4n3gxzr.fsf@fencepost.gnu.org> <85k2ynexw9.fsf@iznogoud.viz> <85iodwtn5k.fsf@iznogoud.viz> X-Spook: interception KGB Zachawi Audiotel IDEA MD5 Ruby Ridge X-Ran: w3AOr2GL&{?I?jA:Rrt1b6KIJR/(pioLQ7a0iN(e><5{79kJ%d*+;*Rt)>TC"rA,},d{oD X-Hue: red X-Attribution: GM Date: Tue, 24 Mar 2015 20:53:22 -0400 In-Reply-To: <85iodwtn5k.fsf@iznogoud.viz> (Wolfgang Jenkner's message of "Fri, 20 Mar 2015 03:31:34 +0100") Message-ID: <1wiodpzym5.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 20084 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) IMO: 1) It's too late to fix this "properly" for 24.5. 2) The problem from 14744 (sometimes flickering on output) is less of an issue than this issue (prompt not coloured) so I suggest reverting the changes from 14744 in emacs-24, and fixing it "properly" in master. BUT personally I haven't even bothered to check whether the changes from 14744 do actually cause this issue, so someone else will have to do the work. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 26 23:28:10 2015 Received: (at 20084) by debbugs.gnu.org; 27 Mar 2015 03:28:10 +0000 Received: from localhost ([127.0.0.1]:37742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YbKwM-0006UT-HZ for submit@debbugs.gnu.org; Thu, 26 Mar 2015 23:28:10 -0400 Received: from b2bfep14.mx.upcmail.net ([62.179.121.59]:49411) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YbKwJ-0006Tt-JS for 20084@debbugs.gnu.org; Thu, 26 Mar 2015 23:28:08 -0400 Received: from edge11.upcmail.net ([192.168.13.81]) by b2bfep14.mx.upcmail.net (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20150327032800.XEMZ11972.b2bfep14-int.chello.at@edge11.upcmail.net> for <20084@debbugs.gnu.org>; Fri, 27 Mar 2015 04:28:00 +0100 Received: from iznogoud.viz ([91.119.83.18]) by edge11.upcmail.net with edge id 8TU01q0040PjRYB0BTU0p1; Fri, 27 Mar 2015 04:28:00 +0100 X-SourceIP: 91.119.83.18 Received: from wolfgang by iznogoud.viz with local (Exim 4.85 (FreeBSD)) (envelope-from ) id 1YbKwB-0004O1-T2; Fri, 27 Mar 2015 04:27:59 +0100 From: Wolfgang Jenkner To: Glenn Morris Subject: Re: bug#20084: comint-highlight-prompt overrides ANSI colors in 24.4 References: <1vy4n3gxzr.fsf@fencepost.gnu.org> <85k2ynexw9.fsf@iznogoud.viz> <85iodwtn5k.fsf@iznogoud.viz> <1wiodpzym5.fsf@fencepost.gnu.org> Date: Fri, 27 Mar 2015 04:27:59 +0100 In-Reply-To: <1wiodpzym5.fsf@fencepost.gnu.org> (Glenn Morris's message of "Tue, 24 Mar 2015 20:53:22 -0400") Message-ID: <85h9t73yrk.fsf@iznogoud.viz> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20084 Cc: 20084@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Tue, Mar 24 2015, Glenn Morris wrote: > 1) It's too late to fix this "properly" for 24.5. > 2) The problem from 14744 (sometimes flickering on output) > is less of an issue than this issue (prompt not coloured) > > so I suggest reverting the changes from 14744 in emacs-24, and > fixing it "properly" in master. I've now pushed my patch (which, I hope, is a proper fix) to master. > BUT personally I haven't even bothered to check whether the changes from > 14744 do actually cause this issue, so someone else will have to do the > work. FWIW, I had independently come to the same conclusion (but since then, I haven't looked again at bug#14744 or the corresponding commit). From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 30 12:02:35 2015 Received: (at 20084) by debbugs.gnu.org; 30 Mar 2015 16:02:35 +0000 Received: from localhost ([127.0.0.1]:40620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ycc95-0003qn-6P for submit@debbugs.gnu.org; Mon, 30 Mar 2015 12:02:35 -0400 Received: from b2bfep16.mx.upcmail.net ([62.179.121.61]:41957) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ycc92-0003qV-Oj for 20084@debbugs.gnu.org; Mon, 30 Mar 2015 12:02:33 -0400 Received: from edge11.upcmail.net ([192.168.13.81]) by b2bfep16.mx.upcmail.net (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20150330160216.ELDJ18523.b2bfep16-int.chello.at@edge11.upcmail.net> for <20084@debbugs.gnu.org>; Mon, 30 Mar 2015 18:02:16 +0200 Received: from iznogoud.viz ([91.119.229.34]) by edge11.upcmail.net with edge id 9s2F1q0070lAUnP0Bs2Fp2; Mon, 30 Mar 2015 18:02:16 +0200 X-SourceIP: 91.119.229.34 Received: from wolfgang by iznogoud.viz with local (Exim 4.85 (FreeBSD)) (envelope-from ) id 1Ycc8k-0000bw-Va; Mon, 30 Mar 2015 18:02:14 +0200 From: Wolfgang Jenkner To: Glenn Morris Subject: Re: bug#20084: comint-highlight-prompt overrides ANSI colors in 24.4 Date: Mon, 30 Mar 2015 17:54:39 +0200 References: <1vy4n3gxzr.fsf@fencepost.gnu.org> <85k2ynexw9.fsf@iznogoud.viz> <85iodwtn5k.fsf@iznogoud.viz> <1wiodpzym5.fsf@fencepost.gnu.org> Message-ID: <85y4mea2yh.fsf@iznogoud.viz> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20084 Cc: 20084@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Tue, Mar 24 2015, Glenn Morris wrote: > 1) It's too late to fix this "properly" for 24.5. > 2) The problem from 14744 (sometimes flickering on output) > is less of an issue than this issue (prompt not coloured) This (or rather, its root cause) is still a comparatively small bug, IMHO. > so I suggest reverting the changes from 14744 in emacs-24, Even if this were a more recent change and it could be safely reverted, that would mean that someone has to maintain the old code during the lifetime of 24.5. Also, it seems that 24.5 is frozen now, so I think there's really nothing more left to do than to close the bug and unblock #19758 by it. I'll do this soon if nobody objects. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 31 11:53:03 2015 Received: (at 20084-done) by debbugs.gnu.org; 31 Mar 2015 15:53:03 +0000 Received: from localhost ([127.0.0.1]:41340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcyTO-0004Q9-TX for submit@debbugs.gnu.org; Tue, 31 Mar 2015 11:53:03 -0400 Received: from b2bfep14.mx.upcmail.net ([62.179.121.59]:56683) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcyTL-0004ON-LZ for 20084-done@debbugs.gnu.org; Tue, 31 Mar 2015 11:53:00 -0400 Received: from edge12.upcmail.net ([192.168.13.82]) by b2bfep14.mx.upcmail.net (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20150331155253.USSG11972.b2bfep14-int.chello.at@edge12.upcmail.net> for <20084-done@debbugs.gnu.org>; Tue, 31 Mar 2015 17:52:53 +0200 Received: from iznogoud.viz ([91.119.129.43]) by edge12.upcmail.net with edge id AFss1q00p0wKBP70CFsski; Tue, 31 Mar 2015 17:52:53 +0200 X-SourceIP: 91.119.129.43 Received: from wolfgang by iznogoud.viz with local (Exim 4.85 (FreeBSD)) (envelope-from ) id 1YcyTE-0000kP-Dv for 20084-done@debbugs.gnu.org; Tue, 31 Mar 2015 17:52:52 +0200 From: Wolfgang Jenkner Subject: Re: bug#20084: comint-highlight-prompt overrides ANSI colors in 24.4 Date: Tue, 31 Mar 2015 17:01:22 +0200 References: <1vy4n3gxzr.fsf@fencepost.gnu.org> <85k2ynexw9.fsf@iznogoud.viz> <85iodwtn5k.fsf@iznogoud.viz> <1wiodpzym5.fsf@fencepost.gnu.org> <85y4mea2yh.fsf@iznogoud.viz> Message-ID: <85twx1rwob.fsf@iznogoud.viz> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: After 792d44b, things should work as described by the OP. If this is not the case, please re-open. This change is only in the master branch and has not been back-ported to emacs-24. So, presumably, 25.1 will be the first release where this works. [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [62.179.121.59 listed in list.dnswl.org] 1.2 MISSING_HEADERS Missing To: header X-Debbugs-Envelope-To: 20084-done Cc: 20084-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: After 792d44b, things should work as described by the OP. If this is not the case, please re-open. This change is only in the master branch and has not been back-ported to emacs-24. So, presumably, 25.1 will be the first release where this works. [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [62.179.121.59 listed in list.dnswl.org] 1.2 MISSING_HEADERS Missing To: header After 792d44b, things should work as described by the OP. If this is not the case, please re-open. This change is only in the master branch and has not been back-ported to emacs-24. So, presumably, 25.1 will be the first release where this works. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 31 12:03:42 2015 Received: (at control) by debbugs.gnu.org; 31 Mar 2015 16:03:43 +0000 Received: from localhost ([127.0.0.1]:41349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ycydi-00061G-GU for submit@debbugs.gnu.org; Tue, 31 Mar 2015 12:03:42 -0400 Received: from b2bfep12.mx.upcmail.net ([62.179.121.57]:39937) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ycydg-000605-PU for control@debbugs.gnu.org; Tue, 31 Mar 2015 12:03:41 -0400 Received: from edge12.upcmail.net ([192.168.13.82]) by b2bfep12.mx.upcmail.net (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20150331160334.WCYJ4373.b2bfep12-int.chello.at@edge12.upcmail.net> for ; Tue, 31 Mar 2015 18:03:34 +0200 Received: from iznogoud.viz ([91.119.129.43]) by edge12.upcmail.net with edge id AG3Z1q00t0wKBP70CG3Zl4; Tue, 31 Mar 2015 18:03:34 +0200 X-SourceIP: 91.119.129.43 Received: from wolfgang by iznogoud.viz with local (Exim 4.85 (FreeBSD)) (envelope-from ) id 1YcydZ-0000lB-LY for control@debbugs.gnu.org; Tue, 31 Mar 2015 18:03:33 +0200 From: Wolfgang Jenkner To: control@debbugs.gnu.org Subject: control message for bug 19758 Date: Tue, 31 Mar 2015 18:03:33 +0200 Message-ID: <85oan9rw6i.fsf@iznogoud.viz> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) unblock 19758 by 20084 From unknown Tue Jun 24 03:24:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 29 Apr 2015 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Tue May 26 01:32:46 2015 Received: (at control) by debbugs.gnu.org; 26 May 2015 05:32:46 +0000 Received: from localhost ([127.0.0.1]:56152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yx7Tp-0001Am-Lu for submit@debbugs.gnu.org; Tue, 26 May 2015 01:32:45 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:40688 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yx7Tn-00019b-W0 for control@debbugs.gnu.org; Tue, 26 May 2015 01:32:44 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Yx7Tn-0005Ed-AF for control@debbugs.gnu.org; Tue, 26 May 2015 01:32:43 -0400 Date: Tue, 26 May 2015 01:32:43 -0400 Message-Id: Subject: control message for bug 20658 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) unarchive 20084 fixed 20658 25.1 forcemerge 20084 20658 From unknown Tue Jun 24 03:24:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 23 Jun 2015 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator