From: David Reitter <david.reitter@gmail.com>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: 2066@emacsbugs.donarmstrong.com
Subject: bug#2066: Face `unspecified' inheritance ignores face-remapping-alist
Date: Tue, 27 Jan 2009 15:46:44 -0500 [thread overview]
Message-ID: <04C65FC9-24BD-404B-852C-5B685CA03608@gmail.com> (raw)
In-Reply-To: <87ocxs4l0n.fsf@cyd.mit.edu>
[-- Attachment #1.1: Type: text/plain, Size: 2002 bytes --]
On 27 Jan 2009, at 14:16, Chong Yidong wrote:
>
> I don't see any bug here. The "test" string inserted into the buffer
> has a background different from `highlight', but that's because its
> background is not unspecified:
You are right, mea culpa. My test case wasn't correct.
To reproduce, we also need overlays with before/after-string properties.
To demonstrate:
(require 'csv-mode)
(csv-mode)
(set (make-local-variable 'face-remapping-alist) '((default .
highlight)))
Enter something like this:
8,1,4,5
9912919,112312,543453,444
Mark all, then C-c C-a (csv-align-fields)
The result, for me at least, is shown in the first screenshot.
CSV-Mode uses overlays for the separators. From my brief analysis of
the code (`csv-align-fields'), it seems to use overlays with `before-
string' and `after-string' properties to mark spaces to the left and
to the right of each field. (In the code, right after "Display spaces
before field:" and ";; Display spaces after field:")
This `before-string' is not rendered using the correct face, i.e. it
does not respect face-remapping-alist. This can be seen in the
screenshots.
I suspect that the `before-string' overlays are rendered using the
adjacent face for the comma, which is, per font-locking, set to `csv-
separator-face'. And that is where the inheritance issue plays a
role. If you M-x customize-face csv-separator-face, and set the
`inherit' attribute to default, then you should see things change
(screenshot 1 to 2). Setting the inheritance to `default' should
never result in any visible change.
I'm sure I could provide a minimal example if I had more time, but I
hope that the analysis was enough to let you reproduce this issue with
`before-string' and `after-string'.
PS: The practical problem for the user was not a matter of background
colors, but to choose a fixed-width font for `csv-mode' buffers when
the `default' face is variable-width, in order to get the numbers to
align properly.
[-- Attachment #1.2: pastedGraphic.png --]
[-- Type: image/png, Size: 3271 bytes --]
[-- Attachment #1.3: Type: text/plain, Size: 3 bytes --]
[-- Attachment #1.4: pastedGraphic.png --]
[-- Type: image/png, Size: 3311 bytes --]
[-- Attachment #1.5: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2193 bytes --]
next prev parent reply other threads:[~2009-01-27 20:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-27 19:16 bug#2066: Face `unspecified' inheritance ignores face-remapping-alist Chong Yidong
2009-01-27 20:46 ` David Reitter [this message]
2009-01-27 20:57 ` David Reitter
2012-06-09 9:38 ` Chong Yidong
-- strict thread matches above, loose matches on Subject: below --
2009-01-26 14:46 David Reitter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=04C65FC9-24BD-404B-852C-5B685CA03608@gmail.com \
--to=david.reitter@gmail.com \
--cc=2066@emacsbugs.donarmstrong.com \
--cc=cyd@stupidchicken.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).