unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>, Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: window-buffer-change-functions
Date: Thu, 22 Sep 2022 11:44:05 +0200	[thread overview]
Message-ID: <1a6028ed-73bd-7d5f-c206-8061bdc9edd0@gmx.at> (raw)
In-Reply-To: <83fsgkszcv.fsf@gnu.org>

I think that both, this text

 > A list of functions for redisplay to call when the assignment of
 > buffers to windows has changed.  Each function takes a single
 > argument.
 >
 > Redisplay examines the global value of this variable, and calls each
 > function once for each frame, with the frame as argument, if at least
 > one window on that frame has been added, deleted or made to display a
 > different buffer since the last time window change functions were
 > called.
 >
 > Redisplay also checks a buffer-local value of this variable in each
 > buffer that's currenly displayed in a window.  If there is one,
 > redisplay calls each function listed there for each window that
 > displays the buffer in question, with the window as argument,
 > @emph{if} the window has been created, or made to display that buffer,
 > since the last time the window change functions were called.

and this one

 > This hook is conceptually simple: it is called when the correspondence
 > between buffers and their windows changes.  The functions in the local
 > value are called for individual windows only when the corresponding
 > buffer is involved in the change, and the global value is called once
 > for any frame where the correspondence changed for any buffer.  This
 > shouldn't be hard to explain, and any not-100%-clean design shouldn't
 > get in the way of documenting it clearly and in a way that Lisp
 > programs could use, including elimination of passive tense.

both describe well what this is hook is supposed to provide and should
be used to improve the original text.

 > So I don't agree with the need to introduce two separate new
 > variables.  The downsides of such a split aren't justified by the
 > minor conceptual problems you mention.

If we provided two separate new variables, we'd also have to split
'window-size-change-functions', 'window-state-change-functions' and
'window-selection-change-functions' into two.

I'd invite people to read the entire section 29.31 on window change
functions and in particular the part at the end that tries to explain
the common aspects of buffer-local and default/global values for all of
these hooks.

Thanks, martin



  reply	other threads:[~2022-09-22  9:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <SJ0PR10MB54886AFA7B33CF1E43E2E013F39A9@SJ0PR10MB5488.namprd10.prod.outlook.com>
     [not found] ` <83o86hyild.fsf@gnu.org>
     [not found]   ` <877d1ycbom.fsf@gnus.org>
     [not found]     ` <SJ0PR10MB548895C6693206D88C719E60F34C9@SJ0PR10MB5488.namprd10.prod.outlook.com>
     [not found]       ` <835yhivx39.fsf@gnu.org>
     [not found]         ` <SJ0PR10MB5488AA81BBFCC4B4CE2D31B4F34C9@SJ0PR10MB5488.namprd10.prod.outlook.com>
     [not found]           ` <83v8piuh5k.fsf@gnu.org>
     [not found]             ` <SJ0PR10MB54887366A66613D1189EC466F34C9@SJ0PR10MB5488.namprd10.prod.outlook.com>
     [not found]               ` <2f85eda92184de27e10572e6b2320885@webmail.orcon.net.nz>
     [not found]                 ` <83pmfpv4fs.fsf@gnu.org>
     [not found]                   ` <7110e0330e878c144a6364a8e6ad651c@webmail.orcon.net.nz>
2022-09-21 13:59                     ` window-buffer-change-functions Richard Stallman
2022-09-21 16:22                       ` [External] : window-buffer-change-functions Drew Adams
2022-09-22  6:21                       ` window-buffer-change-functions Eli Zaretskii
2022-09-22  9:44                         ` martin rudalics [this message]
2022-09-23  3:19                           ` window-buffer-change-functions Richard Stallman
2022-09-23  6:12                             ` window-buffer-change-functions Eli Zaretskii
2022-09-24  2:43                               ` window-buffer-change-functions Richard Stallman
2022-09-23 11:13                             ` window-buffer-change-functions Phil Sainty
2022-09-24  2:43                               ` window-buffer-change-functions Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a6028ed-73bd-7d5f-c206-8061bdc9edd0@gmx.at \
    --to=rudalics@gmx.at \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).