From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Help using the right hook for loading theme on emacs daemon GUI Date: Thu, 17 Jan 2019 19:33:14 +0100 Message-ID: <5C40CA6A.30000@gmx.at> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1547749935 9788 195.159.176.226 (17 Jan 2019 18:32:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 17 Jan 2019 18:32:15 +0000 (UTC) To: Kaushal Modi , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 17 19:32:11 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gkCSY-0002Os-VL for ged-emacs-devel@m.gmane.org; Thu, 17 Jan 2019 19:32:11 +0100 Original-Received: from localhost ([127.0.0.1]:51119 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkCUf-00064F-W6 for ged-emacs-devel@m.gmane.org; Thu, 17 Jan 2019 13:34:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkCTy-0005YK-HB for emacs-devel@gnu.org; Thu, 17 Jan 2019 13:33:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gkCTw-0006eH-NF for emacs-devel@gnu.org; Thu, 17 Jan 2019 13:33:38 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:51069) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gkCTu-0006AI-OA for emacs-devel@gnu.org; Thu, 17 Jan 2019 13:33:36 -0500 Original-Received: from [192.168.1.100] ([212.95.5.214]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MgoiC-1gWwug3gJc-00M3rS; Thu, 17 Jan 2019 19:33:22 +0100 In-Reply-To: X-Provags-ID: V03:K1:nQmmQ+H7En3ZJpOMmlTm1d581/XRZyTMbS553KuyuKxFdCs/Os8 aCYZLN63eoJ+9Ifxp6pkI65F4s5rL/9lasd22ONaHb0HInq9GbxFQPCNiTqaPPk7FAwcqVz G+HF3rWq25gnkkQ3uHJVnAMtXZdEzqVLBaekSQf/Mw24V0MQe6kyXCKl0MUaISThMo7E6cv lJFwqhPpZHE8JmfR/OspA== X-UI-Out-Filterresults: notjunk:1;V03:K0:9WB3TraLpys=:FBb5dfbukxgaceI/gRSv/o o5BGxJXEcMdj0m620vAkUucC0du0ayDIxPBRgwmlbywud88kTOmRQgMydi2xMUmTMnQujwsM7 rGmEt6Em8GW+he9LX3O0xeHjlHk9J6xg67JvDERQaT52heGlU3vFdod2si8he0wQ+z3DE6CYz gdud4YgaE5AR5KVoDFXbAo3+XS/HgkvVyW++Go5WPb9UT9E6Urbb2IErWx8KGerPth7FAIF7R SDjb8ONzmKqYVWSNPNrzPv80r9lI5n/Anjghgf4IFKcrjqsEkybLNZrw4K/yCBt750K2n/ly9 Fpkpwo2U5kDzaBhWV4XCcsJuryNaZRqEC4QsIwjO5YcVTYJwbgWcIz5Rw7sw2wNm2UMqF8t9h qhoUWa2YNIKDUMTyaRrGKIIhnegpp/08ZLD1PnIOyAmeZ1shkKpjy9MRRHtF/7Kxf76kcpMN5 nxuoabjjRDossYWLzeJl4PhaN3ZCtuJ1EpOdHYQAy1/yHRu6oP/WOIgMuCC8ZFR/ZWCrrTD4u 3CRxW8IzoFBARdFXiFpmEAm2MnvUug8czuX+BcCWETsyiBC+mm104Yxt+Upnsxzxd6Us9YCUE V1pJ704+0b/bN34OjjUdhR4DFN0A4sDNDcwwUrMY9K+dCIPjSaOKerlElDEpNLfAnADHNrJFC wIkU8yS1bBk3ct/0Wbgv4XGleCDoI6Rl1+nhEdWb/jHFqVYM7YgHKsi5lE2dDw0S02RyP/5J3 yFRPQbcHXZtIvt25TVoFTvqbWvxldfL52YfmpjF4D3jpPPwb/Eu60eMlBsTIl/OLGc/1rdEf X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.21 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232436 Archived-At: > 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? Window change functions are neither related to 'window-setup-hook' nor to 'after-make-frame-functions'. Historically, window change functions can be run for a frame only "after that frame has been made" and nothing has changed in this regard (hopefully). I suppose that what you see is Bug#34114. martin