help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: emacsclient question: tty-setup-hook and X specific config


From: Eli Zaretskii
Subject: Re: emacsclient question: tty-setup-hook and X specific config
Date: Sat, 24 Nov 2018 09:37:17 +0200

> Date: Fri, 23 Nov 2018 11:31:51 +0100
> From: Hadrien Lacour <hadrien.lacour@posteo.net>
> 
> On Fri, Nov 23, 2018 at 10:53:13AM +0200, Eli Zaretskii wrote:
> > Terminal initialization file is loaded only once into a given session.
> > Why is it a problem in your case?  The st.el file you show just
> > performs key bindings, why do you need to do that more than once?
> 
> Well, for some reason, the keybinds are forgotten when this file isn't loaded.

If you can provide a recipe for reproducing this, please submit a bug
report with that recipe.

> > Not sure I understand why you thought -c had anything to do with theme
> > application.  Anyway, if you want a theme to be applied only to GUI
> > frames, how about turning on the theme in the
> > after-make-frame-functions hook?
> 
> I wasn't very accurate. The problem is that:
>       $ emacs --daemon
>       $ emacsclient -nw -c myfile (no theme)
>       $ emacsclient -c myfile (theme)
>       $ emacsclient -nw -c myfile (theme)
> 
> When I don't want the last line to have theming (because it is a tty session).
> I thought that -c meant "new frame", and that the theme only applied to the
> current frame, which is obviously wrong.

A theme is global.  I don't think we have facilities for frame-local
themes.

> So, is there way to do this? Do I need to reset the theme with
> tty-setup-hook?

Not necessarily that hook, but some hook that is called when a frame
is created.  I'd suggest after-make-frame-functions.

> I wouldn't need all this if I could just make emacs work with st-256color,
> though (it acts as if I only have 16).

You need to teach Emacs to recognize that, see xterm.el for how it is
done for xterm.



reply via email to

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