On Tue, Mar 18, 2014 at 4:27 PM, Bastien <b...@gnu.org> wrote: > Nikolai Weibull <n...@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.