From: Jambunathan K <kjambunathan@gmail.com>
To: Chong Yidong <cyd@gnu.org>
Cc: 11213@debbugs.gnu.org
Subject: bug#11213: 24.0.95; (Maybe/Wish): Should color-themes be buffer local?
Date: Thu, 26 Apr 2012 00:37:24 +0530 [thread overview]
Message-ID: <81wr53fx5f.fsf@gmail.com> (raw)
In-Reply-To: <871unhzji2.fsf@gnu.org> (Chong Yidong's message of "Sat, 21 Apr 2012 14:28:21 +0800")
[-- Attachment #1: Type: text/plain, Size: 1926 bytes --]
Chong Yidong <cyd@gnu.org> writes:
> Jambunathan K <kjambunathan@gmail.com> writes:
>
>>> Probably the best way to do that is to set up face remappings in the
>>> to-be-exported buffer. See the Face Remapping node in the Lisp manual
>>> for details.
>>
>> Given a(ny) theme, let's say "adwaita-theme.el", can someone give me a
>> recipe which runs through all the face definitions defined in that theme
>> file and hand it off to `face-remapping-alist'.
>
> Do
>
> (get 'adwaita 'theme-settings)
>
> and collect all the face settings in the resulting list. Each list
> element should have the form
>
> (theme-face FACE adwaita SPEC)
>
> where FACE is a face which is customized by the theme, and SPEC is the
> face spec specified. Once you know FACE, you probably want to
>
> (face-spec-choose (face-default-spec FACE)
>
> to get the face attributes for the face's default (uncustomized,
> unthemed) face spec, on the selected frame. Then you can put that
> attribute in face-remapping-alist.
Based on your suggestion this is what I have cooked up. I am recording
what I see as problems and invite your comments.
1. Copy the attached form to color-theme.el
2. emacs -q, C-x C-f color-theme.el
3. M-x load-theme-buffer-local RET tango-dark RET
4. Look at the attached png image for a screenshot of the image.
5. Place your cursor on `load-theme-buffer-local' and C-u C-x =. Follow
the link to `font-lock-function-name-face'.
6. You will see that foreground color is reported as "Blue1" while /in
fact/ the face is yellowish.
7. Now M-x htmlfontify-buffer. I am attaching the .html file created
by this command. You will see that the buffer is colorized based on
uncustomized face settings.
I believe the problems in 5-7 are related.
I think C-u C-x = and whatever the underlying APIs that htmlfontify uses
for retrieving face properties should act on effective value and not
global values.
[-- Attachment #2: color-theme.el --]
[-- Type: application/emacs-lisp, Size: 923 bytes --]
[-- Attachment #3: load-theme-buffer-local.png --]
[-- Type: image/png, Size: 47269 bytes --]
[-- Attachment #4: color-theme.el.html --]
[-- Type: text/html, Size: 8204 bytes --]
next prev parent reply other threads:[~2012-04-25 19:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 20:07 bug#11213: 24.0.95; (Maybe/Wish): Should color-themes be buffer local? Jambunathan K
2012-04-10 20:24 ` Drew Adams
2012-04-10 20:32 ` Jambunathan K
2012-04-11 6:58 ` Chong Yidong
2012-04-11 10:32 ` Jambunathan K
2012-04-21 6:28 ` Chong Yidong
2012-04-25 19:07 ` Jambunathan K [this message]
2012-04-21 16:01 ` Victor Borja
2013-11-15 5:05 ` Jambunathan K
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=81wr53fx5f.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=11213@debbugs.gnu.org \
--cc=cyd@gnu.org \
/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).