From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Al Haji-Ali Newsgroups: gmane.emacs.bugs Subject: bug#61102: 28.1; with-selected-window/save-window-excursion calls buffer-list-update-hook only once Date: Fri, 27 Jan 2023 18:29:06 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13069"; mail-complaints-to="usenet@ciao.gmane.io" To: 61102@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 27 19:41:16 2023 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 1pLTf1-0003IM-P4 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Jan 2023 19:41:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pLTer-0005pg-5j; Fri, 27 Jan 2023 13:41:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLTep-0005pS-LW for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2023 13:41:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pLTeo-0001DZ-TY for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2023 13:41:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pLTeo-0003Cl-Da for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2023 13:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Al Haji-Ali Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Jan 2023 18:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61102 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167484481212245 (code B ref -1); Fri, 27 Jan 2023 18:41:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Jan 2023 18:40:12 +0000 Original-Received: from localhost ([127.0.0.1]:38431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLTdz-0003BP-Ry for submit@debbugs.gnu.org; Fri, 27 Jan 2023 13:40:12 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:54670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLTdw-0003BG-QA for submit@debbugs.gnu.org; Fri, 27 Jan 2023 13:40:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLTdu-0005Zb-HE for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2023 13:40:08 -0500 Original-Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pLTds-0000p6-6k for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2023 13:40:05 -0500 Original-Received: by mail-wr1-x42b.google.com with SMTP id h12so5762598wrv.10 for ; Fri, 27 Jan 2023 10:40:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=UFw+RGUvXai28J6il+FPI18YPb5UhM1N/+i8/pmQduQ=; b=ObwAUeC9ovPnL3kLK9r68rj7cSIQUIek0mFSwPfNlEBU1JIfEVdzV/juru4IVt7WtH nY1I1f0El4nQk6RjF4jbwjdMnQvh2uYWIEUgg4J9J9Zent1C8eGTf0/AC6uCqq66d3r2 1zgr311Jop8Lku2YzhIJ0DkHZ1426UJh6NCjMwGwaJZ0PY6PdN0nk1vmpfSO4hqa9fI4 HUhxrZ7fixCRREXEMerAdbUx0NmRc3r4ofEzcHRZXc4hwGgtNle+6KC7NXjVqQc0bqXh MHkJvxvuACFPnkwOrMzNAZ9BkWF0UBZm79Qk7ZjDVeaiq5tNsJaPndlJA/CIDAdyu/Kd /EYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=UFw+RGUvXai28J6il+FPI18YPb5UhM1N/+i8/pmQduQ=; b=DlSuR95o9jl3geSI7Pwatqpp7+3iMs7w609qEDSrEKk/6L+FuxcBM4tov3yPg3wIuG ZMzxYuRgEGH671X7orc/7P2VJ9Gr4aX+BZq0ZK4omuQ9i1aPNaPNE32RIiOb7T0fg9Rb JSpHeXrlgjKeMEmTx2vgBH5tpisqdBUJ5W4mh3wxn8rNJ3yF79PJfLwypiH0sr/vSade h+jMiojUb8PosEthp80bG4zF++mRLxSOtYhGwkkNTp4GabHAwhr4ZRIpC7smMaBjHsJc w9iggyh8kn5CppX9W/LuKbTNyU0ZwUa30tjUDiGtSuTRk8E90cEApSVJBYQ2E1RSgJza q/Zg== X-Gm-Message-State: AFqh2kr4mq0RGXIueWSi5/3Kt7y1jx/sE9k651pI2jr17KJX428/qOqQ gm+EF3fdZACQLQsrrgQGUP1oO71EdEU= X-Google-Smtp-Source: AMrXdXtn04v9d1eCVmBIzGiNIV6lqiEVbAl+JegpcpxJPMBO+Qs42zYU4sNqIih990QQ78Loe7IQmQ== X-Received: by 2002:a05:6000:1b85:b0:2be:f21:6af6 with SMTP id r5-20020a0560001b8500b002be0f216af6mr35033471wru.23.1674844801856; Fri, 27 Jan 2023 10:40:01 -0800 (PST) Original-Received: from localhost ([137.195.26.27]) by smtp.gmail.com with ESMTPSA id t4-20020a05600001c400b002bdcce37d31sm5266581wrx.99.2023.01.27.10.40.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Jan 2023 10:40:01 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=abdo.haji.ali@gmail.com; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:254268 Archived-At: The following code: --8<---------------cut here---------------start------------->8--- (let ((fn (lambda () (message "Buffer changed: %S" (current-buffer))))) (add-hook 'buffer-list-update-hook fn) (with-selected-window (minibuffer-window) (save-window-excursion nil) nil) (remove-hook 'buffer-list-update-hook fn) nil) --8<---------------cut here---------------end--------------->8--- Prints "Buffer changed: #" once, even though the selection should return to the currently selected buffer (which is different from the mini-buffer). I would expect either that the hook 'buffer-list-update-hook is not called at all, or that it is called twice (one time for every change of the selected buffer). Best regards, -- Al