GNU bug report logs - #38143
27.0.50; Say that before-make-frame-hook & after-make-frame-functions are not invoked for the initial frame

Previous Next

Package: emacs;

Reported by: Óscar Fuentes <ofv <at> wanadoo.es>

Date: Sat, 9 Nov 2019 03:19:01 UTC

Severity: normal

Found in version 27.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Óscar Fuentes <ofv <at> wanadoo.es>, 38143 <at> debbugs.gnu.org
Subject: bug#38143: 27.0.50; Say that before-make-frame-hook & after-make-frame-functions are not invoked for the initial frame
Date: Sat, 9 Nov 2019 10:01:34 +0100
> Currently de docstrings of those variables do not mention that they are
> not invoked for the initial frame. Adding that detail is trivial, except
> that when the initial frame belongs to a daemon they are invoked.
>
> I'm not sure how to word that information.

The reason is that the initial frame is not made by 'make-frame'.  The
Elisp manual says

     Note that any functions added to these hooks by your initial file are
  usually not run for the initial frame, since Emacs reads the initial
  file only after creating that frame.  However, if the initial frame is
  specified to use a separate minibuffer frame (*note Minibuffers and
  Frames::), the functions will be run for both, the minibuffer-less and
  the minibuffer frame.

This explanation is slightly misleading: Since the initial frame is
not created by 'make-frame', Emacs would not run these hooks even if
it did read the initial file earlier.  Hints for improving the
documentation are welcome.

martin




This bug report was last modified 3 years and 160 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.