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

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

bug#38143: 27.0.50; Say that before-make-frame-hook & after-make-frame-f


From: Óscar Fuentes
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, 09 Nov 2019 18:21:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>>       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.
>
> But without an init file, where would the hooks come from?
>
> And anyway, the issue is probably only meaningful for users who define
> these hooks in init files.  So I think the only missing piece in the
> above is to mention the daemon case.

Please note that Martin is referring to the manual, not to the
docstrings. Although mentioning the daemon case on the manual would be
nice too.

IMO the missing information on the docstrings is:

1. The hooks are not run for the initial frame because it is not created
   with `make-frame'.

2. Except when Emacs runs as daemon, in that case make-frame is always
   used and therefore the hooks are executed.

The added text would be something like this:

  When Emacs is not executed as a daemon, `make-frame` is not used for
  creating the initial frame, therefore the hooks are not invoked on
  that case.

Or this:

  `make-frame` is not used for the frame that is automatically created
  before the init file is processed, therefore the hooks are not invoked
  for that frame. Please note that when Emacs is executed as a daemon
  there is no such frame.





reply via email to

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