all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Filipe Silva <filipe.silva@gmail.com>
To: help-gnu-emacs@gnu.org, "Óscar Fuentes" <ofv@wanadoo.es>
Subject: Re: properly setting up ~/.emacs.d for daemon usage
Date: Mon, 12 Dec 2016 12:10:11 -0200	[thread overview]
Message-ID: <CAEwkUWPizZCq3Bzn9cc3CyVzeqg9Z9CRH-9CfJAKUhyPdZq3OA@mail.gmail.com> (raw)
In-Reply-To: <87eg1ew32r.fsf@wanadoo.es>

​Óscar, sure. Here are some specifics:

1) The gui theme I use, zerodark (By Nicolas Petton, who is redesign
elpa.gnu.org), queries display-graphic-p everytime it goes about defining a
palete element:

https://github.com/NicolasPetton/zerodark-theme/blob/master/zerodark-theme.el#L158-L162

So If I load my emacs with emacs --daemon, in the configuration section
that calls (load-theme), (display-graphic-p) will not work because emacs
does not know if I'll go tty or gui. That type of code is prevalent in
various other popular themes. Here's spacemacs using display-graphic-p:
https://github.com/nashamri/spacemacs-theme/blob/master/spacemacs-common.el#L69-L72

2) I would be glad if I could define two separate themes for gui and for
tty. I'd even be willing to have two separate daemons: one for gui, and one
for tty. I've already did that with success using (setq server-use-tcp t).
and then:

emacs --daemon=gui
emacs --daemon=tty
emacsclient --server-file=
​gui
 -c -n
emacsclient --server-file=
​tty
 -c -n

​But this does not solve issue 1).

3) there are some packages, like
https://github.com/7696122/evil-terminal-cursor-changer,
that only make sense in a tty frame. Since emacs --daemon does not know
what I'm going to use, (unless I use approach 2. which does not solve issue
1.)  I can't really setup a condition that loads or not the package
accordingly.


​I think that sums it up,

Thoughts?

Thanks in advance

Ninrod.​


On Mon, 12 Dec 2016 at 00:10 Óscar Fuentes <ofv@wanadoo.es> wrote:

> Filipe Silva <filipe.silva@gmail.com> writes:
>
>
>
> [snip]
>
>
>
> > Make sense? How would an emacs user properly setup his ~/.emacs.d/ so
> that
>
> > it plays well with the daemon feature?
>
>
>
> What's your specific problem? Themes should work fine regardless of you
>
> using --daemon. Just call load-theme as usual.
>
>
>
> If you want different settings for graphical frames than from text
>
> frames, use after-make-frame-functions. There, put a function that
>
> checks if the current frame is graphical/textual and apply the
>
> corresponding settings.
>
>
>
> FWIW, I use --daemon all the time and so far had no need for such
>
> function. If the above still does not resolve your problem, please show
>
> one of those snippets which depend on display-graphic-p.
>
>
>
>
>
>


  reply	other threads:[~2016-12-12 14:10 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 [this message]
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
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=CAEwkUWPizZCq3Bzn9cc3CyVzeqg9Z9CRH-9CfJAKUhyPdZq3OA@mail.gmail.com \
    --to=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.