From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dalanicolai Newsgroups: gmane.emacs.bugs Subject: bug#54438: 27.2; inconsistent-behavior-global-vs-local-hook Date: Fri, 18 Mar 2022 18:03:22 +0100 Message-ID: References: <871qz0m6qa.fsf@web.de> <161a1515-187d-18c2-f9f1-86f4ea29614c@gmx.at> <8e029893-2d25-8302-7e30-c75abef3ec3e@gmx.at> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000734d7605da8120cf" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39462"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Heerdegen , 54438@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 18 18:04:43 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1nVG1r-000A2q-C8 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Mar 2022 18:04:43 +0100 Original-Received: from localhost ([::1]:37204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVG1q-0007zF-2A for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Mar 2022 13:04:42 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43070) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVG1C-0007wt-KK for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2022 13:04:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36126) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVG1C-0005pa-8v for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2022 13:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nVG1C-0004y3-2H for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2022 13:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: dalanicolai Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Mar 2022 17:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54438 X-GNU-PR-Package: emacs Original-Received: via spool by 54438-submit@debbugs.gnu.org id=B54438.164762302119062 (code B ref 54438); Fri, 18 Mar 2022 17:04:02 +0000 Original-Received: (at 54438) by debbugs.gnu.org; 18 Mar 2022 17:03:41 +0000 Original-Received: from localhost ([127.0.0.1]:58256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVG0r-0004xO-8n for submit@debbugs.gnu.org; Fri, 18 Mar 2022 13:03:41 -0400 Original-Received: from mail-yb1-f179.google.com ([209.85.219.179]:46777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVG0p-0004x9-Cr for 54438@debbugs.gnu.org; Fri, 18 Mar 2022 13:03:40 -0400 Original-Received: by mail-yb1-f179.google.com with SMTP id v130so16857349ybe.13 for <54438@debbugs.gnu.org>; Fri, 18 Mar 2022 10:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=88te1xulGOCWPLYXoUqG1zj4hd5OsXJUxmHoGtun7AY=; b=byKCzg+900yjsMF11S73BK9OBUzBG8zfV6v51uR/ur+6T6QBBoAvfbjNK8RPtGsbzR 7cOLqi8qT5B+jDqyW1AH7AsUcgPJEZqYbraCwK2NlooVGJx2MJfG3aW5xzBpoIvjaBo6 6IxDT3Ci7WQxqv1b1FPbYLjLVOTHnXtwm+KU/ftcZLSKlYijk9zW2UqPECVO4txSqpNg 76AXjHZydTUtofwiN5Fj9G3Bj4bLgOnmoSiezEKfxuYU4eaA2M5DBnhaziT4ajU3q1LP g4/q/91UvzoRn0NxnxyNXBN/DZm9zbzA6rJknhXWvo/UfqM3CKN4eakgbkpRwEhsE2pg CaHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=88te1xulGOCWPLYXoUqG1zj4hd5OsXJUxmHoGtun7AY=; b=fefhFpRcfgtlMjgm3e0NhKWTJW6q06VluAG4BH+1/2XLlinVV3wf0P97dleaPZt0T1 doaPahFkj8QiXZCVwUl98suOkcFCLuotL5os/GF4c0xZp3sHr+Z15wn8xFF/D2PhjDiN scKlC6fikgUlemUtM9m0Ed3Jf5+W+429A8kvyApARhwog6cZhXX8vjNpYbYHjOrAD/Kd 4KxM69vT5EBEAOeRSUNMMKp1Dy7YPm1IMRuQmuQtmBNp6C4s3Yzut91TK/wcoer46aIt Y2oA9SiqvG+6I7iRFn3FON7C+cjtlCu7IpE282qxYMV4ZjBwNdkFBHsEWV5OszTTaXTm DR9g== X-Gm-Message-State: AOAM5335d+jmIm/XKUQUg0242Y9OoS2wSD8llRPIgOohCtrQNrtEwtkE yceqS51WGTj7E2XYEoYytdH/dO8FNg6wFz0b6bQ= X-Google-Smtp-Source: ABdhPJx0SRjrVDI02Vj/cNwz9Q0Mv2JeRhtjyuWdNavYfWRdkYFzi47A0Oay3O515ILP2su+XVIquukIty1rYjRToIE= X-Received: by 2002:a25:d2c1:0:b0:633:c33e:8df2 with SMTP id j184-20020a25d2c1000000b00633c33e8df2mr2363637ybg.597.1647623013615; Fri, 18 Mar 2022 10:03:33 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:228563 Archived-At: --000000000000734d7605da8120cf Content-Type: text/plain; charset="UTF-8" Thanks for your explanations... (although I will need some time to think about and understand them) On Fri, 18 Mar 2022 at 13:14, Stefan Monnier wrote: > >> Also, I would expect that a hook just calls the hook function, and it > would > >> not 'restore the window > >> selected before the hook'. I would say the restoring is undesired > behavior. > > > > The idea is probably that a function on that hook should be allowed to > > inadvertently select some other window and have the hook runner fix > > that. Maybe Stefan can tell us more. > > No, IIRC it is just a consequence of needing to select windows when > running the local part of the hook (since that part is supposed to be > run for every window (which was modified) displaying that buffer). > > > Stefan > > --000000000000734d7605da8120cf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for your explanations... (although I will need some= time to think about and understand them)

On Fri, 18 Mar 2022 at 13:14, = Stefan Monnier <monnier@iro.= umontreal.ca> wrote:
>> Also, I would expect that a hook just calls the hook f= unction, and it would
>> not 'restore the window
>>=C2=A0 =C2=A0selected before the hook'. I would say the restori= ng is undesired behavior.
>
> The idea is probably that a function on that hook should be allowed to=
> inadvertently select some other window and have the hook runner fix > that.=C2=A0 Maybe Stefan can tell us more.

No, IIRC it is just a consequence of needing to select windows when
running the local part of the hook (since that part is supposed to be
run for every window (which was modified) displaying that buffer).


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--000000000000734d7605da8120cf--