unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Help using the right hook for loading theme on emacs daemon GUI
@ 2019-01-17 15:44 Kaushal Modi
  2019-01-17 15:49 ` Kaushal Modi
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Kaushal Modi @ 2019-01-17 15:44 UTC (permalink / raw)
  To: Emacs developers, martin rudalics

[-- Attachment #1: Type: text/plain, Size: 1345 bytes --]

Hello,

I noticed that the windows hooks have been revamped recently in
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0aece3e1181e66f2a1a067ae876e55bdaa45edd5
.

But that breaks the theme loading in my config, and I'd like to know the
correct way to do the same after this change.

At present, I have this in my config:

=====

;; Load the theme ONLY after the frame has finished loading (needed
especially
;; when running emacs in daemon mode)
;;
https://github.com/Malabarba/smart-mode-line/issues/84#issuecomment-46429893
;; ;; `after-make-frame-functions' hook is not run in no-window mode
;; (add-hook 'after-make-frame-functions (lambda (&rest frame)
;;                                         (funcall default-theme-fn)))
(add-hook 'window-setup-hook (lambda () (funcall default-theme-fn)))
=====

The `default-theme-fn' is just a wrapper function that `load-theme's my
theme.

Earlier, on launching emacsclient, that function would get called after the
frame loading finished.

But with the recent change, that function probably gets called before the
frame loading has finished, and so the function is ineffective.

If I manually load my theme after the frame launches, I get my old theme
back.

So, what should I replace `window-setup-hook' with that runs in both -nw
mode and GUI mode emacsclient?

Thanks!


--
Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 2077 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-01-25  7:20 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-17 15:44 Help using the right hook for loading theme on emacs daemon GUI Kaushal Modi
2019-01-17 15:49 ` Kaushal Modi
2019-01-17 15:55   ` Eli Zaretskii
2019-01-17 16:04     ` Kaushal Modi
2019-01-17 19:28       ` Daniel Colascione
2019-01-17 18:33 ` martin rudalics
2019-01-17 20:02   ` Kaushal Modi
2019-01-17 21:50 ` Eli Zaretskii
2019-01-22 20:25   ` Kaushal Modi
2019-01-18  3:47 ` Phil Sainty
2019-01-22 20:27   ` Kaushal Modi
2019-01-23 22:00     ` Phil Sainty
2019-01-24  3:47     ` Phil Sainty
2019-01-24 14:11       ` Eli Zaretskii
2019-01-24 19:17         ` Phil Sainty
2019-01-24 19:44           ` Eli Zaretskii
2019-01-24 21:16             ` Phil Sainty
2019-01-25  1:42               ` Phil Sainty
2019-01-25  7:20                 ` Eli Zaretskii
2019-01-25  7:13               ` Eli Zaretskii

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).