* Inconsistent margin background color in minibuffer
@ 2024-07-30 14:55 Nicolas P. Rougier (inria)
2024-08-02 6:54 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas P. Rougier (inria) @ 2024-07-30 14:55 UTC (permalink / raw)
To: emacs-devel
I'm experimenting with the minibuffer and I get some problem setting the
margin (not fringe) background color. Here is a simple example:
(defun setup-minibuffer ()
(setq-local truncate-lines t)
(set-window-margins nil 10 10)
(set-window-fringes nil 0 0)
(goto-char (point-min))
(face-remap-set-base 'default '(:background "#cccccc")))
(add-hook 'minibuffer-setup-hook #'setup-minibuffer)
(completing-read "Very long prompt: "
nil nil nil
"Very long line that should trigger truncation (hopefully), else, reduce window width.")
When the point is at the start of the prompt, margin background color is
white (default bg color I guess) but when the point is at the end of the
entry, margin background color is "#cccccc".
Is that the expected behavior? If yes, how can I force the margin
background color to use the remapped default face ?
Nicolas
--
Nicolas P. Rougier —— www.labri.fr/perso/nrougier
Institute of Neurodegenerative Diseases, Bordeaux
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Inconsistent margin background color in minibuffer
2024-07-30 14:55 Inconsistent margin background color in minibuffer Nicolas P. Rougier (inria)
@ 2024-08-02 6:54 ` Eli Zaretskii
2024-08-02 7:24 ` Nicolas P. Rougier (inria)
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2024-08-02 6:54 UTC (permalink / raw)
To: Nicolas P. Rougier (inria); +Cc: emacs-devel
> From: "Nicolas P. Rougier (inria)" <nicolas.rougier@inria.fr>
> Date: Tue, 30 Jul 2024 16:55:17 +0200
>
>
> I'm experimenting with the minibuffer and I get some problem setting the
> margin (not fringe) background color. Here is a simple example:
>
> (defun setup-minibuffer ()
> (setq-local truncate-lines t)
> (set-window-margins nil 10 10)
> (set-window-fringes nil 0 0)
> (goto-char (point-min))
> (face-remap-set-base 'default '(:background "#cccccc")))
>
> (add-hook 'minibuffer-setup-hook #'setup-minibuffer)
>
> (completing-read "Very long prompt: "
> nil nil nil
> "Very long line that should trigger truncation (hopefully), else, reduce window width.")
>
> When the point is at the start of the prompt, margin background color is
> white (default bg color I guess) but when the point is at the end of the
> entry, margin background color is "#cccccc".
>
> Is that the expected behavior? If yes, how can I force the margin
> background color to use the remapped default face ?
It's a bug, and a very old one. When the feature of showing
truncation/continuation glyphs on GUI frames was added to Emacs, we
failed to consider the case where there are display margins with
nothing in them (i.e., the margin area is empty) and the default face
is remapped.
I have now fixed that on the master branch. While at that, I also
fixed a minor related inconsistency: the truncation/continuation
glyphs should use the remapped default face for their background (in
your case, the truncation glyphs should have the same background color
of "#cccccc"), not the default frame background.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Inconsistent margin background color in minibuffer
2024-08-02 6:54 ` Eli Zaretskii
@ 2024-08-02 7:24 ` Nicolas P. Rougier (inria)
0 siblings, 0 replies; 3+ messages in thread
From: Nicolas P. Rougier (inria) @ 2024-08-02 7:24 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
On Fri 02 Aug 2024 at 09:54, Eli Zaretskii <eliz@gnu.org> wrote:
> It's a bug, and a very old one. When the feature of showing
> truncation/continuation glyphs on GUI frames was added to Emacs, we
> failed to consider the case where there are display margins with
> nothing in them (i.e., the margin area is empty) and the default face
> is remapped.
>
> I have now fixed that on the master branch. While at that, I also
> fixed a minor related inconsistency: the truncation/continuation
> glyphs should use the remapped default face for their background (in
> your case, the truncation glyphs should have the same background color
> of "#cccccc"), not the default frame background.
I observed the truncation/continuation glyphs inconsistency and fixed it
by modifying the local display table but your fix now solves everything.
Many thanks.
Nicolas
--
Nicolas P. Rougier —— www.labri.fr/perso/nrougier
Institute of Neurodegenerative Diseases, Bordeaux
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-02 7:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-30 14:55 Inconsistent margin background color in minibuffer Nicolas P. Rougier (inria)
2024-08-02 6:54 ` Eli Zaretskii
2024-08-02 7:24 ` Nicolas P. Rougier (inria)
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.