From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Understanding after-make-frame-functions Date: Tue, 17 May 2016 23:18:11 +0300 Message-ID: <837fes4ews.fsf@gnu.org> References: <83futh4ad0.fsf@gnu.org> <83a8jo4p5v.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1463536732 23064 80.91.229.3 (18 May 2016 01:58:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 May 2016 01:58:52 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 18 03:58:45 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b2ql3-0003mu-EY for geh-help-gnu-emacs@m.gmane.org; Wed, 18 May 2016 03:58:45 +0200 Original-Received: from localhost ([::1]:42130 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2ql2-0002Ip-8H for geh-help-gnu-emacs@m.gmane.org; Tue, 17 May 2016 21:58:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2qSI-0004nl-FP for help-gnu-emacs@gnu.org; Tue, 17 May 2016 21:39:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2lRb-0002dy-4b for help-gnu-emacs@gnu.org; Tue, 17 May 2016 16:18:22 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2lRb-0002ci-0z for help-gnu-emacs@gnu.org; Tue, 17 May 2016 16:18:19 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4263 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b2lRX-0003RV-TI for help-gnu-emacs@gnu.org; Tue, 17 May 2016 16:18:17 -0400 In-reply-to: (message from Kaushal Modi on Tue, 17 May 2016 18:08:43 +0000) 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:110029 Archived-At: > From: Kaushal Modi > Date: Tue, 17 May 2016 18:08:43 +0000 > > What Emacs does during startup is documented in the ELisp manual, see > the node "Startup Summary". If you have specific suggestions for > amendments there, please file a bug report with those suggestions. > > I had already gone through that but it does not talk about the nuance that in daemon mode case, the frame is > created after the window-setup-hook is run; whereas it is created before evaluating the init in the case of > non-daemon mode. The side effect of that on after-make-frame-functions hook being useful only for daemon > cases is also not mentioned anywhere. When Emacs starts in daemon mode, it doesn't create any frames at all, so I don't think I understand what you are saying here. > I do not know what's the correct terminology to be used for "user emacs config", "daemon mode" and > "non-daemon mode" in documentation, but the idea for after-make-frame-functions documentation is as > below: > > ===== > Functions to run after a frame is created. > The functions are run with one arg, the newly created frame. > > In daemon mode (emacs --daemon or emacsclient), the frame is created at some point after the > `window-setup-hook' is run (after the user emacs config is evaluated). So this hook is called _after_ the user > config evaluation. > > But in the non-daemon mode, the frame is created before the user emacs config is evaluated. So this hook is > run before that, and so any user customization done to this hook would be ineffective in the non-daemon > case. I think it would be clearer just to say that this hook cannot be used for the initial frame.