From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65414: save-some-buffers-functions are unexpectedly called when save-some-buffers pred is non-nil Date: Wed, 23 Aug 2023 16:57:06 -0700 Message-ID: <87o7ixe1e2.fsf@breatheoutbreathe.in> References: <871qfxvvw9.fsf@breatheoutbreathe.in> <83lee4vcac.fsf@gnu.org> Reply-To: Joseph Turner Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1064"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jonas@bernoul.li, 65414@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 24 02:22:19 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 1qYy77-000Aat-K9 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Aug 2023 02:22:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYy6r-0003Qu-RR; Wed, 23 Aug 2023 20:22:01 -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 1qYy6p-0003QX-Mr for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 20:21:59 -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 1qYy6o-0001pX-QJ for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 20:21:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYy6s-00041p-Ef for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 20:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joseph Turner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Aug 2023 00:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65414 X-GNU-PR-Package: emacs Original-Received: via spool by 65414-submit@debbugs.gnu.org id=B65414.169283648415439 (code B ref 65414); Thu, 24 Aug 2023 00:22:02 +0000 Original-Received: (at 65414) by debbugs.gnu.org; 24 Aug 2023 00:21:24 +0000 Original-Received: from localhost ([127.0.0.1]:35649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYy6F-00040v-0b for submit@debbugs.gnu.org; Wed, 23 Aug 2023 20:21:24 -0400 Original-Received: from out-43.mta1.migadu.com ([95.215.58.43]:18230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYy69-00040j-7P for 65414@debbugs.gnu.org; Wed, 23 Aug 2023 20:21:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1692836472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GlC3DpZajWYEbgHiqpqDaMLyvdkI+f+eB7UASiPE5zI=; b=H/kQeFwu+ulGpBIswywDzdvt3pkI1SOlc7JPlqZdA7zOoNUvjyArRANMQGkncwRFAJzAlE PpkCmW+kYpJM6/WATIrIVsdnv3ZyoDZOlRCcZT/qVQFQbwIGXKdHRWf3MTVpWAkFbWpBch SWlCu0i40AhYNYQZsN2C+60+QQn8JOU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <83lee4vcac.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT 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:268287 Archived-At: Eli Zaretskii writes: > Why is asking whether to save the abbrevs a problem in the case of > magit-save-repository-buffers? magit-save-repository-buffers docstring reads "Save file-visiting buffers belonging to the current repository." IIUC, prompting to save abbrevs here is an undesirable implementation side-effect. Another example: hyperdrive.el adds to save-some-buffers-functions for saving hyperdrive file buffers: https://git.sr.ht/~ushin/hyperdrive.el/tree/d7dc7a08ba47761108cf98e21ffa2d8dad28f34a/item/hyperdrive.el#L99 After this change, magit-save-repository-buffers now prompts to save irrelevant hyperdrive file buffers. I would like some way to tell hyperdrive--save-some-buffers not to prompt the user to save hyperdrive buffers from inside magit-save-repository-buffers. > And are you saying that before the change which added > save-some-buffers-functions, Emacs was not saving the abbrevs when > save-some-buffers was called? If so, in what Emacs version was this > so? The behavior of saving abbrevs when a PRED function is passed to save-some-buffers has not changed in Emacs 29. I just think that there may be room for improvement now that save-some-buffers-functions allows any package to add to save-some-buffers-functions. > We need a better understanding of the situation before we can discuss > solutions, so please fill-in the blanks outlined above. I hope the explanation above is clear. Sorry for starting off on the wrong foot with an XY problem! Thank you! Joseph