emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] Only set org-hide foreground if one is available


From: Nikolai Weibull
Subject: Re: [O] [PATCH] Only set org-hide foreground if one is available
Date: Tue, 18 Mar 2014 19:12:15 +0100

On Tue, Mar 18, 2014 at 4:27 PM, Bastien <address@hidden> wrote:

> Nikolai Weibull <address@hidden> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]