all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Filipe Silva <filipe.silva@gmail.com>
Cc: "Óscar Fuentes" <ofv@wanadoo.es>,
	"Help Gnu Emacs mailing list" <help-gnu-emacs@gnu.org>
Subject: Re: properly setting up ~/.emacs.d for daemon usage
Date: Tue, 13 Dec 2016 23:49:30 +0000	[thread overview]
Message-ID: <CAFyQvY0zb2sj7nckAH-60AmJg5zBJo8MwDni4qZTXocKtk0U9g@mail.gmail.com> (raw)
In-Reply-To: <87k2b3v6pc.fsf@wanadoo.es>

Hi Filipe,

I have stumbled across this in the past. Here's the solution that works for
me to get a config that works when daemonp is nil/non-nil and
display-graphic-p is nil/non-nil:

https://github.com/kaushalmodi/.emacs.d/blob/master/init.el

Search for focus-in-hook in there and look at that code and the comment
explanation above that.

I am traveling, else I would have typed clean directly reusable code
snippets over here.

Another way to deal with setup that works regardless of the session being
daemonp is to load the setup after some delay. I do that for loading
desktop sessions:


;; Delay desktop setup by a second.
;; - This speeds up emacs init, and
;; - Also (n)linum and other packages would already be loaded which the
files
;; being loaded from the saved desktop might need.
(use-package setup-desktop :defer 1)

So there are no daemonp startup issues like "linum font face not defined",
etc.

About loading themes, I do that in window-setup-hook, because that always
runs whether or not daemonp is non-nil.  Search for window-setup-hook in
https://github.com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-visual.el

Hope this helps.
-- 

Kaushal Modi


  reply	other threads:[~2016-12-13 23:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-11 13:10 properly setting up ~/.emacs.d for daemon usage Filipe Silva
2016-12-11 21:47 ` Óscar Fuentes
2016-12-12 14:10   ` Filipe Silva
2016-12-12 15:34     ` Óscar Fuentes
2016-12-12 18:47       ` Filipe Silva
2016-12-12 19:48         ` Óscar Fuentes
2016-12-13 11:07         ` Yuri Khan
2016-12-13 21:31           ` Filipe Silva
2016-12-13 21:51             ` Óscar Fuentes
2016-12-13 23:49               ` Kaushal Modi [this message]
2016-12-14 11:26                 ` Filipe Silva
2016-12-13 22:53             ` Filipe Silva
2016-12-13 23:14               ` Óscar Fuentes
2016-12-12 16:46     ` Yuri Khan
2016-12-12 19:29       ` Eli Zaretskii
2016-12-11 23:17 ` Stefan Monnier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFyQvY0zb2sj7nckAH-60AmJg5zBJo8MwDni4qZTXocKtk0U9g@mail.gmail.com \
    --to=kaushal.modi@gmail.com \
    --cc=filipe.silva@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=ofv@wanadoo.es \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.