From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65414: save-some-buffers-functions are unexpectedly called when save-some-buffers pred is non-nil Date: Sat, 02 Sep 2023 10:30:31 +0300 Message-ID: <83v8ct9gmg.fsf@gnu.org> References: <871qfxvvw9.fsf@breatheoutbreathe.in> <83lee4vcac.fsf@gnu.org> <87o7ixe1e2.fsf@breatheoutbreathe.in> <83o7ixqatx.fsf@gnu.org> <87fs46cn6u.fsf@breatheoutbreathe.in> <838r9ymfh5.fsf@gnu.org> <874jkmck9j.fsf@breatheoutbreathe.in> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4593"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jonas@bernoul.li, 65414@debbugs.gnu.org To: Joseph Turner , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 02 09:32:05 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 1qcL6z-0000zy-1Y for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Sep 2023 09:32:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qcL6o-0005tc-8R; Sat, 02 Sep 2023 03:31:54 -0400 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 1qcL6n-0005tL-AP for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2023 03:31:53 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qcL6m-0004kp-N3 for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2023 03:31:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qcL6w-0003h1-33 for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2023 03:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Sep 2023 07:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65414 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65414-submit@debbugs.gnu.org id=B65414.169363986814120 (code B ref 65414); Sat, 02 Sep 2023 07:32:02 +0000 Original-Received: (at 65414) by debbugs.gnu.org; 2 Sep 2023 07:31:08 +0000 Original-Received: from localhost ([127.0.0.1]:35024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcL63-0003ff-VD for submit@debbugs.gnu.org; Sat, 02 Sep 2023 03:31:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcL61-0003fB-KP for 65414@debbugs.gnu.org; Sat, 02 Sep 2023 03:31:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qcL5k-0004WE-9H; Sat, 02 Sep 2023 03:30:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=zslxKGVprw2xM2qPn6jMxNveZo3ToguZXSNrEK4sw0w=; b=FJOtxxTPdMeO gtR9MYxZZ8QMdiUhXh8oJ8+yIOSagTM3TY7sYKfF94ZRnIhfctGzwj+4n/ENCqmbcqW7GrAT7tXEo qsx0AlKPbL5zUtypZ6OvYYtRB32ITAWbS1dP6jGQUC4NPcwIRZI/axLH4KgzTct8YW22egTLdTQXK eOtTxpVOKzfvLgJsQlhRBu5G4wXJjiMElg6UkeuvYt/YlmPQuHLc1MFMh6+gKRJiU802aTo5TJg7f qSayXUWH0rLhUg3hlmZpHT1muBE7lS04rGeA4mmA3akYozJlZ7kGOeQbrtkOe7GvHx1mc3rwUoAgJ UmmzSNl+F068NpMLC0Iaag==; In-Reply-To: <874jkmck9j.fsf@breatheoutbreathe.in> (message from Joseph Turner on Sat, 26 Aug 2023 00:32:23 -0700) 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:268958 Archived-At: > From: Joseph Turner > Cc: 65414@debbugs.gnu.org, jonas@bernoul.li > Date: Sat, 26 Aug 2023 00:32:23 -0700 > > > > In any case, not calling save-some-buffers-functions when PRED is > > non-nil is not something we can do, as that would be an incompatible > > behavior change. We could perhaps add PRED to the arguments with > > which save-some-buffers-functions are called, as an optional argument. > > Would that be satisfactory? > > Yes, that would solve the interference between Magit and hyperdrive.el. > > See patch. Hmm... but how to make this change backward-compatible? I mean, if there's some function out there that is used in save-some-buffers-functions, and it was written to accept only 2 arguments, we cannot safely call it with 3 arguments, can we? Stefan, do we have any way of doing that without causing errors? If not, perhaps the way forward is to bind some variable around the call to these functions, whose value will be PRED?