GNU bug report logs - #19339
face-remapping-alist ignored in echo-area

Previous Next

Package: emacs;

Reported by: oscarfv <at> telefonica.net (Óscar Fuentes)

Date: Wed, 10 Dec 2014 18:25:01 UTC

Severity: normal

Tags: moreinfo

Found in version 25.0.50

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 19339 in the body.
You can then email your comments to 19339 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#19339; Package emacs. (Wed, 10 Dec 2014 18:25:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to oscarfv <at> telefonica.net (Óscar Fuentes):
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 10 Dec 2014 18:25:02 GMT) Full text and rfc822 format available.

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

From: oscarfv <at> telefonica.net (Óscar Fuentes)
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50;
 Buffer-local value of face-remapping-alist leaks to other buffers
Date: Wed, 10 Dec 2014 19:24:19 +0100
emacs -Q

Eval this in *scratch* :

(dolist (b (buffer-list))
  (when (or (string= (buffer-name b) " *Echo Area 0*")
	    (string= (buffer-name b) " *Echo Area 1*"))
    (with-current-buffer b
      (make-local-variable 'face-remapping-alist)))
      (add-to-list 'face-remapping-alist
		   '(default (:background "green"))))

The minibuffer window now has a green background, as expected. Now do
`C-x b' to switch to another buffer. Now the *scratch* buffer also has
the green background.

If, instead of `C-x b', you press `C-j', part of the buffer remains with
the original background and the rest is painted green. Also, a "nil"
string is inserted in *scratch* everytime you press `C-j'. And the
minibuffer window reverts to its original background.



In GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, X toolkit)
 of 2014-11-18 on qcore
Repository revision: 07556b0299b33b52cf352581bfdd6554819eea30
Windowing system distributor `The X.Org Foundation', version 11.0.11600000
System Description:	Ubuntu 14.10

Configured using:
 `configure --without-toolkit-scroll-bars --with-x-toolkit=lucid'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY LIBXML2 FREETYPE XFT
ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19339; Package emacs. (Wed, 10 Dec 2014 20:14:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: oscarfv <at> telefonica.net (Óscar Fuentes)
Cc: 19339 <at> debbugs.gnu.org
Subject: Re: bug#19339: 25.0.50;
 Buffer-local value of face-remapping-alist leaks to other buffers
Date: Wed, 10 Dec 2014 15:13:23 -0500
> (dolist (b (buffer-list))
>   (when (or (string= (buffer-name b) " *Echo Area 0*")
> 	    (string= (buffer-name b) " *Echo Area 1*"))
>     (with-current-buffer b
>       (make-local-variable 'face-remapping-alist)))
                                                   ^^

Too many parentheses,


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19339; Package emacs. (Wed, 10 Dec 2014 20:25:01 GMT) Full text and rfc822 format available.

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

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#19339: 25.0.50;
 Buffer-local value of face-remapping-alist leaks to other buffers
Date: Wed, 10 Dec 2014 21:23:59 +0100
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

> Too many parentheses,

Thanks. Here the revised version:

(dolist (b (buffer-list))
  (when (or (string= (buffer-name b) " *Echo Area 0*")
	    (string= (buffer-name b) " *Echo Area 1*"))
    (with-current-buffer b
      (make-local-variable 'face-remapping-alist)
      (add-to-list 'face-remapping-alist
		   '(default (:background "green"))))))

Still, the background of the minibuffer goes away as soon as you move the
cursor around and the funny "nil" strings are inserted on *scratch* when
you press `C-j'.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19339; Package emacs. (Wed, 10 Dec 2014 20:26:01 GMT) Full text and rfc822 format available.

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

From: oscarfv <at> telefonica.net (Óscar Fuentes)
To: 19339 <at> debbugs.gnu.org
Subject: Re: bug#19339: 25.0.50;
 Buffer-local value of face-remapping-alist leaks to other buffers
Date: Wed, 10 Dec 2014 21:25:01 +0100
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

> Too many parentheses,

Thanks. Here the revised version:

(dolist (b (buffer-list))
  (when (or (string= (buffer-name b) " *Echo Area 0*")
	    (string= (buffer-name b) " *Echo Area 1*"))
    (with-current-buffer b
      (make-local-variable 'face-remapping-alist)
      (add-to-list 'face-remapping-alist
		   '(default (:background "green"))))))

Still, the background of the minibuffer goes away as soon as you move the
cursor around and the funny "nil" strings are inserted on *scratch* when
you press `C-j'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19339; Package emacs. (Wed, 10 Dec 2014 21:56:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: oscarfv <at> telefonica.net (Óscar Fuentes)
Cc: 19339 <at> debbugs.gnu.org
Subject: Re: bug#19339: 25.0.50; face-remapping-alist ignored in echo-area
Date: Wed, 10 Dec 2014 16:55:07 -0500
retitle 19339 face-remapping-alist ignored in echo-area
thanks

> Still, the background of the minibuffer goes away as soon as you move the
> cursor around

Hmm... it comes back when a message is output, tho.  And I can't quite
characterize when the green background disappears and when it doesn't.

Maybe the C code that "clears" the each area fails to take
face-remapping-alist into account, or something like that.

> and the funny "nil" strings are inserted on *scratch* when
> you press `C-j'.

Oh, that's the documented behavior of C-j in lisp-interaction-mode
(think of it as a kind of ielm-mode, which outputs the return value of
the code you just executed via C-j).


        Stefan




Changed bug title to 'face-remapping-alist ignored in echo-area' from '25.0.50; Buffer-local value of face-remapping-alist leaks to other buffers' Request was from Stefan Monnier <monnier <at> IRO.UMontreal.CA> to control <at> debbugs.gnu.org. (Wed, 10 Dec 2014 21:56:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19339; Package emacs. (Wed, 10 Dec 2014 22:13:02 GMT) Full text and rfc822 format available.

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

From: oscarfv <at> telefonica.net (Óscar Fuentes)
To: 19339 <at> debbugs.gnu.org
Subject: Re: bug#19339: 25.0.50; face-remapping-alist ignored in echo-area
Date: Wed, 10 Dec 2014 23:12:03 +0100
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

>> and the funny "nil" strings are inserted on *scratch* when
>> you press `C-j'.
>
> Oh, that's the documented behavior of C-j in lisp-interaction-mode
> (think of it as a kind of ielm-mode, which outputs the return value of
> the code you just executed via C-j).

Bfff... I'm only using Emacs since 13 years ago, please be patient with
this n00b.

So the only issue is the disappearance of the remapped background. I see
that you changed the bug title. Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19339; Package emacs. (Thu, 02 Dec 2021 12:07:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Óscar Fuentes <ofv <at> wanadoo.es>
Cc: 19339 <at> debbugs.gnu.org
Subject: Re: bug#19339: face-remapping-alist ignored in echo-area
Date: Thu, 02 Dec 2021 13:05:55 +0100
Óscar Fuentes <ofv <at> wanadoo.es> writes:

> (dolist (b (buffer-list))
>   (when (or (string= (buffer-name b) " *Echo Area 0*")
> 	    (string= (buffer-name b) " *Echo Area 1*"))
>     (with-current-buffer b
>       (make-local-variable 'face-remapping-alist)
>       (add-to-list 'face-remapping-alist
> 		   '(default (:background "green"))))))
>
> Still, the background of the minibuffer goes away as soon as you move the
> cursor

When the echo area becomes empty, then the background goes away; yes.
Probably because Emacs doesn't apply any faces there when there's no
characters there?

Or...  something else?  Does anybody know?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 02 Dec 2021 12:07:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19339; Package emacs. (Thu, 02 Dec 2021 13:18:01 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Óscar Fuentes
 <ofv <at> wanadoo.es>
Cc: 19339 <at> debbugs.gnu.org
Subject: Re: bug#19339: face-remapping-alist ignored in echo-area
Date: Thu, 2 Dec 2021 14:17:26 +0100
> Or...  something else?  Does anybody know?

Because a minibuffer is shown instead?

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19339; Package emacs. (Thu, 02 Dec 2021 15:31:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Óscar Fuentes <ofv <at> wanadoo.es>, 19339 <at> debbugs.gnu.org
Subject: Re: bug#19339: face-remapping-alist ignored in echo-area
Date: Thu, 02 Dec 2021 16:30:45 +0100
martin rudalics <rudalics <at> gmx.at> writes:

>> Or...  something else?  Does anybody know?
>
> Because a minibuffer is shown instead?

Right...  but this doesn't work, either:

(dolist (b (buffer-list))
  (when (string-match " *Echo Area\\|Minibuf" (buffer-name b))
    (with-current-buffer b
      (make-local-variable 'face-remapping-alist)
      (add-to-list 'face-remapping-alist
		   '(default (:background "green"))))))

But I guess you have to do something with the minibuffer hook to get
that to work, or something?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19339; Package emacs. (Thu, 02 Dec 2021 16:44:01 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Óscar Fuentes <ofv <at> wanadoo.es>, 19339 <at> debbugs.gnu.org
Subject: Re: bug#19339: face-remapping-alist ignored in echo-area
Date: Thu, 2 Dec 2021 17:43:35 +0100
> Right...  but this doesn't work, either:
>
> (dolist (b (buffer-list))
>    (when (string-match " *Echo Area\\|Minibuf" (buffer-name b))
>      (with-current-buffer b
>        (make-local-variable 'face-remapping-alist)
>        (add-to-list 'face-remapping-alist
> 		   '(default (:background "green"))))))

IIRC you once found a recipe how to make it work for specific windows
only.

> But I guess you have to do something with the minibuffer hook to get
> that to work, or something?

'minibuffer-setup-hook' probably.  Here I'm using a separate window slot
for keeping a window-specific remapping alist.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19339; Package emacs. (Thu, 02 Dec 2021 16:50:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Óscar Fuentes <ofv <at> wanadoo.es>, 19339 <at> debbugs.gnu.org
Subject: Re: bug#19339: face-remapping-alist ignored in echo-area
Date: Thu, 02 Dec 2021 17:49:10 +0100
martin rudalics <rudalics <at> gmx.at> writes:

> IIRC you once found a recipe how to make it work for specific windows
> only.

Probably...

In any case, I don't think there's actually anything to do here in this
bug report, then -- the face remapping works as advertised, so I'm
closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 19339 <at> debbugs.gnu.org and oscarfv <at> telefonica.net (Óscar Fuentes) Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 02 Dec 2021 16:50:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19339; Package emacs. (Thu, 02 Dec 2021 17:23:01 GMT) Full text and rfc822 format available.

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

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Óscar Fuentes <ofv <at> wanadoo.es>,
 martin rudalics <rudalics <at> gmx.at>, 19339 <at> debbugs.gnu.org
Subject: Re: bug#19339: face-remapping-alist ignored in echo-area
Date: Thu, 02 Dec 2021 18:22:08 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> But I guess you have to do something with the minibuffer hook to get
> that to work, or something?

AFAIR each selection of a minibuffer kills all local variables (see
set_minibuffer_mode), so changes to `face-remapping-alist' will not
persist.

Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 31 Dec 2021 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 78 days ago.

Previous Next


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