GNU bug report logs -
#2066
Face `unspecified' inheritance ignores face-remapping-alist
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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.
[pastedGraphic.png (image/png, inline)]
[Message part 3 (text/plain, inline)]
[pastedGraphic.png (image/png, inline)]
[Message part 5 (text/plain, inline)]
[smime.p7s (application/pkcs7-signature, attachment)]
This bug report was last modified 13 years and 64 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.