all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#19339: 25.0.50; Buffer-local value of face-remapping-alist leaks to other buffers
@ 2014-12-10 18:24 Óscar Fuentes
  2014-12-10 20:13 ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Óscar Fuentes @ 2014-12-10 18:24 UTC (permalink / raw)
  To: 19339


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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#19339: 25.0.50; Buffer-local value of face-remapping-alist leaks to other buffers
  2014-12-10 18:24 bug#19339: 25.0.50; Buffer-local value of face-remapping-alist leaks to other buffers Óscar Fuentes
@ 2014-12-10 20:13 ` Stefan Monnier
  2014-12-10 20:23   ` Óscar Fuentes
  2014-12-10 20:25   ` bug#19339: 25.0.50; Buffer-local value of face-remapping-alist leaks to other buffers Óscar Fuentes
  0 siblings, 2 replies; 12+ messages in thread
From: Stefan Monnier @ 2014-12-10 20:13 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: 19339

> (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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#19339: 25.0.50; Buffer-local value of face-remapping-alist leaks to other buffers
  2014-12-10 20:13 ` Stefan Monnier
@ 2014-12-10 20:23   ` Óscar Fuentes
  2021-12-02 12:05     ` bug#19339: face-remapping-alist ignored in echo-area Lars Ingebrigtsen
  2014-12-10 20:25   ` bug#19339: 25.0.50; Buffer-local value of face-remapping-alist leaks to other buffers Óscar Fuentes
  1 sibling, 1 reply; 12+ messages in thread
From: Óscar Fuentes @ 2014-12-10 20:23 UTC (permalink / raw)
  To: 19339

Stefan Monnier <monnier@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'.






^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#19339: 25.0.50; Buffer-local value of face-remapping-alist leaks to other buffers
  2014-12-10 20:13 ` Stefan Monnier
  2014-12-10 20:23   ` Óscar Fuentes
@ 2014-12-10 20:25   ` Óscar Fuentes
  2014-12-10 21:55     ` bug#19339: 25.0.50; face-remapping-alist ignored in echo-area Stefan Monnier
  1 sibling, 1 reply; 12+ messages in thread
From: Óscar Fuentes @ 2014-12-10 20:25 UTC (permalink / raw)
  To: 19339

Stefan Monnier <monnier@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'.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#19339: 25.0.50; face-remapping-alist ignored in echo-area
  2014-12-10 20:25   ` bug#19339: 25.0.50; Buffer-local value of face-remapping-alist leaks to other buffers Óscar Fuentes
@ 2014-12-10 21:55     ` Stefan Monnier
  2014-12-10 22:12       ` Óscar Fuentes
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2014-12-10 21:55 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: 19339

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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#19339: 25.0.50; face-remapping-alist ignored in echo-area
  2014-12-10 21:55     ` bug#19339: 25.0.50; face-remapping-alist ignored in echo-area Stefan Monnier
@ 2014-12-10 22:12       ` Óscar Fuentes
  0 siblings, 0 replies; 12+ messages in thread
From: Óscar Fuentes @ 2014-12-10 22:12 UTC (permalink / raw)
  To: 19339

Stefan Monnier <monnier@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.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#19339: face-remapping-alist ignored in echo-area
  2014-12-10 20:23   ` Óscar Fuentes
@ 2021-12-02 12:05     ` Lars Ingebrigtsen
  2021-12-02 13:17       ` martin rudalics
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2021-12-02 12:05 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: 19339

Óscar Fuentes <ofv@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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#19339: face-remapping-alist ignored in echo-area
  2021-12-02 12:05     ` bug#19339: face-remapping-alist ignored in echo-area Lars Ingebrigtsen
@ 2021-12-02 13:17       ` martin rudalics
  2021-12-02 15:30         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: martin rudalics @ 2021-12-02 13:17 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Óscar Fuentes; +Cc: 19339

 > Or...  something else?  Does anybody know?

Because a minibuffer is shown instead?

martin





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#19339: face-remapping-alist ignored in echo-area
  2021-12-02 13:17       ` martin rudalics
@ 2021-12-02 15:30         ` Lars Ingebrigtsen
  2021-12-02 16:43           ` martin rudalics
  2021-12-02 17:22           ` Michael Heerdegen
  0 siblings, 2 replies; 12+ messages in thread
From: Lars Ingebrigtsen @ 2021-12-02 15:30 UTC (permalink / raw)
  To: martin rudalics; +Cc: Óscar Fuentes, 19339

martin rudalics <rudalics@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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#19339: face-remapping-alist ignored in echo-area
  2021-12-02 15:30         ` Lars Ingebrigtsen
@ 2021-12-02 16:43           ` martin rudalics
  2021-12-02 16:49             ` Lars Ingebrigtsen
  2021-12-02 17:22           ` Michael Heerdegen
  1 sibling, 1 reply; 12+ messages in thread
From: martin rudalics @ 2021-12-02 16:43 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Óscar Fuentes, 19339

 > 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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#19339: face-remapping-alist ignored in echo-area
  2021-12-02 16:43           ` martin rudalics
@ 2021-12-02 16:49             ` Lars Ingebrigtsen
  0 siblings, 0 replies; 12+ messages in thread
From: Lars Ingebrigtsen @ 2021-12-02 16:49 UTC (permalink / raw)
  To: martin rudalics; +Cc: Óscar Fuentes, 19339

martin rudalics <rudalics@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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#19339: face-remapping-alist ignored in echo-area
  2021-12-02 15:30         ` Lars Ingebrigtsen
  2021-12-02 16:43           ` martin rudalics
@ 2021-12-02 17:22           ` Michael Heerdegen
  1 sibling, 0 replies; 12+ messages in thread
From: Michael Heerdegen @ 2021-12-02 17:22 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Óscar Fuentes, 19339

Lars Ingebrigtsen <larsi@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.





^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-12-02 17:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-10 18:24 bug#19339: 25.0.50; Buffer-local value of face-remapping-alist leaks to other buffers Óscar Fuentes
2014-12-10 20:13 ` Stefan Monnier
2014-12-10 20:23   ` Óscar Fuentes
2021-12-02 12:05     ` bug#19339: face-remapping-alist ignored in echo-area Lars Ingebrigtsen
2021-12-02 13:17       ` martin rudalics
2021-12-02 15:30         ` Lars Ingebrigtsen
2021-12-02 16:43           ` martin rudalics
2021-12-02 16:49             ` Lars Ingebrigtsen
2021-12-02 17:22           ` Michael Heerdegen
2014-12-10 20:25   ` bug#19339: 25.0.50; Buffer-local value of face-remapping-alist leaks to other buffers Óscar Fuentes
2014-12-10 21:55     ` bug#19339: 25.0.50; face-remapping-alist ignored in echo-area Stefan Monnier
2014-12-10 22:12       ` Óscar Fuentes

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.