From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: emacsclient question: tty-setup-hook and X specific config Date: Fri, 23 Nov 2018 10:53:13 +0200 Message-ID: <8336rsgop2.fsf@gnu.org> References: <20181122220050.nj75ntfw245x5zu5@gentoo-zen2700x> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1542963092 19356 195.159.176.226 (23 Nov 2018 08:51:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 23 Nov 2018 08:51:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 23 09:51:28 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQ7BP-0004rq-Dc for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Nov 2018 09:51:27 +0100 Original-Received: from localhost ([::1]:51044 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQ7DV-0004dC-Ng for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Nov 2018 03:53:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQ7Cw-0004VS-Rz for help-gnu-emacs@gnu.org; Fri, 23 Nov 2018 03:53:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gQ7Cs-0008Oa-V0 for help-gnu-emacs@gnu.org; Fri, 23 Nov 2018 03:53:02 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40753) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQ7Cs-0008OO-S9 for help-gnu-emacs@gnu.org; Fri, 23 Nov 2018 03:52:58 -0500 Original-Received: from [176.228.60.248] (port=1645 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gQ7Cs-0007Un-ED for help-gnu-emacs@gnu.org; Fri, 23 Nov 2018 03:52:58 -0500 In-reply-to: <20181122220050.nj75ntfw245x5zu5@gentoo-zen2700x> (message from Hadrien Lacour on Thu, 22 Nov 2018 23:00:50 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118734 Archived-At: > Date: Thu, 22 Nov 2018 23:00:50 +0100 > From: Hadrien Lacour > > * The tty-hook-setup hook is run as it should (on `emacs -nw` and > `emacsclient -nw` invocations) but doesn't load my terminal specific file > after the first `emacsclient -nw` call. > $ emacs -nw myfile > $ emacs --daemon > $ emacsclient -nw -c myfile > $ emacsclient -nw -c myfile > The last line doesn't load st.el (attached). 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? > * I want to apply theming only for graphical frames, but If I do: > $ emacs --daemon > $ emacsclient -nw -c myfile > $ emacsclient -c myfile > $ emacsclient -nw -c myfile > > The theme is applied for the last two lines, even when using the -c option each > time. 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?