GNU bug report logs - #16151
margin does not respect face-remapping-alist. no margin face.

Previous Next

Package: emacs;

Reported by: David Reitter <david.reitter <at> gmail.com>

Date: Sat, 14 Dec 2013 22:31:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.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 16151 in the body.
You can then email your comments to 16151 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#16151; Package emacs. (Sat, 14 Dec 2013 22:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Reitter <david.reitter <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 14 Dec 2013 22:31:02 GMT) Full text and rfc822 format available.

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

From: David Reitter <david.reitter <at> gmail.com>
To: Bug-Gnu-Emacs <bug-gnu-emacs <at> gnu.org>
Subject: margin does not respect face-remapping-alist.  no margin face.
Date: Sat, 14 Dec 2013 17:30:17 -0500
[Message part 1 (text/plain, inline)]
Emacs -Q

Then:

(linum-mode 1)
(setq face-remapping-alist '((default . custom-invalid)))

Observe that the empty space in the left margin is white, rather than red.  See attached screenshot.

The left (and presumably right) margins seem to use the default face, but fail to take `face-remapping-alist' into account.

It would not hurt to have a `margins' face,  but even then, remapping should be observed.


This is an up to date build.



In GNU Emacs 24.3.50.4 (x86_64-apple-darwin13.0.0, NS apple-appkit-1265.00)
 of 2013-12-14 on momo
Windowing system distributor `Apple', version 10.3.1265
Configured using:
 `configure --with-ns'
[Message part 2 (text/html, inline)]
[Screen Shot 2013-12-14 at 5.09.07 PM.png (image/png, inline)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 15 Dec 2013 17:05:02 GMT) Full text and rfc822 format available.

Notification sent to David Reitter <david.reitter <at> gmail.com>:
bug acknowledged by developer. (Sun, 15 Dec 2013 17:05:04 GMT) Full text and rfc822 format available.

Message #10 received at 16151-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: David Reitter <david.reitter <at> gmail.com>
Cc: 16151-done <at> debbugs.gnu.org
Subject: Re: bug#16151: margin does not respect face-remapping-alist. no
 margin	face.
Date: Sun, 15 Dec 2013 19:03:39 +0200
> From: David Reitter <david.reitter <at> gmail.com>
> Date: Sat, 14 Dec 2013 17:30:17 -0500
> 
> Emacs -Q
> 
> Then:
> 
> (linum-mode 1)
> (setq face-remapping-alist '((default . custom-invalid)))

(I'm guessing this wasn't exactly "emacs -Q", because custom-invalid
face is not known in 'emacs -Q", at least on my system.)

> Observe that the empty space in the left margin is white, rather than red.  See attached screenshot.
> 
> The left (and presumably right) margins seem to use the default face, but fail to take `face-remapping-alist' into account.

No, they do take the face remapping into account.  Otherwise, how
could you have the correct face where the line numbers _are_ written
in the margin, as clearly seen in your screenshots?

The problem was that the empty margin area was not filled with the
background of the default face, whether remapped or not, like we do
with the text area.  This was never supported in Emacs, the code to do
that was simply never written.

Now this works, starting from trunk revision 115535.

> It would not hurt to have a `margins' face

??? What is shown in the margins is display strings which have to be
hand-crafted anyway, so you can have any face you want there, just
propertize the string accordingly.  Why do we need another face?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16151; Package emacs. (Sun, 15 Dec 2013 19:42:02 GMT) Full text and rfc822 format available.

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

From: David Reitter <david.reitter <at> gmail.com>
To: 16151 <at> debbugs.gnu.org
Subject: Re: bug#16151: closed (Re: bug#16151: margin does not respect
 face-remapping-alist. no margin	face.)
Date: Sun, 15 Dec 2013 14:41:26 -0500
On Dec 15, 2013, at 12:05 PM, GNU bug Tracking System <help-debbugs <at> gnu.org> wrote:
> 
> (I'm guessing this wasn't exactly "emacs -Q", because custom-invalid
> face is not known in 'emacs -Q", at least on my system.)

Yes, sorry, it seems that custom-invalid got loaded when I ran customize-face to work out the test case.
> 
> No, they do take the face remapping into account.  Otherwise, how
> could you have the correct face where the line numbers _are_ written
> in the margin, as clearly seen in your screenshots?

`linum' is a face that inherits from default, so that's where I expected this came from.

Anyway, thanks for fixing this so quickly.

> ??? What is shown in the margins is display strings which have to be
> hand-crafted anyway, so you can have any face you want there, just
> propertize the string accordingly.  Why do we need another face?

Is there another way to set the color of the background now?  We have the margin, then the fringe and then the regular window contents.  Normally, I would use the same background for fringe and margin.  

The `linum' face I mentioned just customizes actual line numbers, but not areas where there are no line numbers (e.g., wrapped lines, or beyond the end of the buffer, as in this example).

Pretty much everything else is customizable, so it would having a margin face would just be consistent.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 13 Jan 2014 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 118 days ago.

Previous Next


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