From: Nikolai Weibull <now@disu.se>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Only set org-hide foreground if one is available
Date: Tue, 18 Mar 2014 19:12:15 +0100 [thread overview]
Message-ID: <CADdV=MvtOFa6CcY1XKBH7rb0nmWaNEzHKYzfmLO2xrXOTsaoJg@mail.gmail.com> (raw)
In-Reply-To: <87txavfrww.fsf@bzg.ath.cx>
On Tue, Mar 18, 2014 at 4:27 PM, Bastien <bzg@gnu.org> wrote:
> Nikolai Weibull <now@disu.se> writes:
>
>> (org-mode): When loading Org buffers through desktop
>
> I'm not sure what the above means, can you explain it?
> Also, what is exactly the bug this fixes (beyond setting
> something that does not need setting)?
Sorry, I realize that I was way too terse.
When loading Org buffers from a desktop file (see (desktop-save-mode))
when Emacs starts as a daemon (through, for example, emacsclient
--alternate-editor '' -t), org-hide (and I’m guessing other faces as
well – I’m not well versed with Emacs’ faces) will apparently not
contain any information. My guess is that until a frame has been
created (or perhaps displayed), which won’t happen until after the Org
buffers have been created and thus Org mode has been initialized and
this code called, faces won’t be initialized, perhaps to account for
things such as rules relating to background/foreground (such as those
defined in (defface org-hide)). Thus it’s not safe to simply assume
that (face-foreground 'org-hide) will return a non-nil value, which
means that (org-find-invisible-foreground) /can/ return nil. If we
set (face-foreground 'org-hide nil) during initialization, for some
other reason that I’m similarly unfamiliar with, my themed setting of
org-hide (via (load-theme)) won’t be applied (and the default value
specified in the defface of org-hide will similarly not be used).
As should be painfully obvious from that description, I’m not sure why
(face-foreground 'org-hide) is returning nil and I’m not sure why
(set-face-foreground 'org-hide nil) prevents the themed setting to be
applied. I am, however, sure that this solved the issue of org-hide
having an unspecified foreground.
next prev parent reply other threads:[~2014-03-18 18:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 21:50 [PATCH] Only set org-hide foreground if one is available Nikolai Weibull
2014-03-18 15:27 ` Bastien
2014-03-18 18:12 ` Nikolai Weibull [this message]
2014-03-19 8:31 ` Bastien
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.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADdV=MvtOFa6CcY1XKBH7rb0nmWaNEzHKYzfmLO2xrXOTsaoJg@mail.gmail.com' \
--to=now@disu.se \
--cc=bzg@gnu.org \
--cc=emacs-orgmode@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/org-mode.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).