From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: window-buffer-change-functions Date: Thu, 22 Sep 2022 11:44:05 +0200 Message-ID: <1a6028ed-73bd-7d5f-c206-8061bdc9edd0@gmx.at> References: <83o86hyild.fsf@gnu.org> <877d1ycbom.fsf@gnus.org> <835yhivx39.fsf@gnu.org> <83v8piuh5k.fsf@gnu.org> <2f85eda92184de27e10572e6b2320885@webmail.orcon.net.nz> <83pmfpv4fs.fsf@gnu.org> <7110e0330e878c144a6364a8e6ad651c@webmail.orcon.net.nz> <83fsgkszcv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25620"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii , Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 22 11:56:43 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1obIwl-0006VP-L4 for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Sep 2022 11:56:43 +0200 Original-Received: from localhost ([::1]:55702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIwk-000098-FQ for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Sep 2022 05:56:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obIkn-00085k-6o for emacs-devel@gnu.org; Thu, 22 Sep 2022 05:44:26 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:33983) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obIkl-0002iB-7t; Thu, 22 Sep 2022 05:44:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663839849; bh=Agg6f9a7i8ilr4ISmVhFdvOF3izN4mSL+srYemamsMQ=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=dcvKXugZveRWOtT4tGL3Vr4UsVT1yLpgNM8//I6/L0pP0Jl04gmYUHhK8uB9+0PMq ZAKJLWW89cpDwTqEwesmr3BWOfc1SWZ1qUMDHh6CRvi4Bg18GFJwsn9VjFNXZM509N G7++z79aSbg4j4L2RfaT2EvXyNIQJMTeKEHJrXPE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([213.142.96.205]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mi2Nv-1pFKXI2Uk5-00e5z9; Thu, 22 Sep 2022 11:44:09 +0200 Content-Language: en-US In-Reply-To: <83fsgkszcv.fsf@gnu.org> X-Provags-ID: V03:K1:YlJaaTn9Pw0+m/u5aWGQjXZ7GMzz9G1Chaap80FJg41sQgS0Vvd GK0oKsCW0fwBWv1R5yu+z25DTmEZ7sEP0sLsPOffLm/nqUziL3c/7J6s2RoIEsxM8koescf NB/q2o+YTc7aQQGUuyqmxRbTGnz2W3cm2ceChyoVzseAQzrwtSMEMDP12IEBgnM7wNwOorL ylapX/K7X1A91ssCpVFfQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:YLEu3QZgWE8=:0mVhrAyY1X3fQ3AxbbC+m/ cjHpD6phNVvcpLxAyXA0+7pOM/jzcYwXgnzSImb+5MGtA7Wd40apDaFbJR8hSbNt49b3UYd5C cmWykprE1yLcVEzoElPRbDwv0IK+mviNLlHV4OqIkPl9wmag6wagRiFe8frrRYl9Ow2h26d8e IHf7vvO8OPdZt9HIcpLLzHp7VNdWJbDTPZhk6Hz/aO4pn2V/5a8OqoxPb5SYv+M/svH6RQvw5 QIri+z+qur8iNkZsh9Q87PuP/rrlMbpnSyMZtLkUvZP3rDyRZirOjKRX4VAKHfPR+wKQvRLCd lH6uDVOV51HkfESoSIYJukt5uPhc9bNdfzGIm+FJ56S0/i39dDhnzojyRb95BLafRXFUb2+TO cwSJC9+G06Cx3D6CurkdfG/5l4gL3apAGok8RkrHvJX2NG0UNVyydYJyoShUGKzi8RSOg2KOI aEjyChJNfrK+Tm92ghQWGnxekGxIBzmTOKggYTWnDaJ6RESq4bIZ+kAkezBmjIbM2QXGz0rhq GIw5y6+T50V7sc4tGJzhhRxRr81Rt/e9R/izIRmTHscZ/fL5uztiBx394CTcV5cSCZ6Ldo5TU dj7HYSQJVjtoLiTfo55ve9M08ygP0f9MaEunKgw/eYnxAuZsmYwcR2mBF8PeDv9nZ/GtD7NFq e2EuVoktHzLzFQzclX6++7T0D5HgXfefhiOSzNA2kZjBUv+Xzod4zcT+ikb09AIS2AIvO2DoZ KqpsTcZosFFmH9vWs9Ys+vXvlSBfymRhE03lCBdKp2aJLEq3FIz8eZXPt8aKQ8cIiS8DE+5C Received-SPF: pass client-ip=212.227.15.18; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:295963 Archived-At: 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