From unknown Mon Jun 23 18:27:31 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#5773 <5773@debbugs.gnu.org> To: bug#5773 <5773@debbugs.gnu.org> Subject: Status: 23.1; vc-diff save buffer when re-diffing (or save whole fileset) Reply-To: bug#5773 <5773@debbugs.gnu.org> Date: Tue, 24 Jun 2025 01:27:31 +0000 retitle 5773 23.1; vc-diff save buffer when re-diffing (or save whole files= et) reassign 5773 emacs submitter 5773 Kevin Ryde severity 5773 normal tag 5773 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 25 18:46:29 2010 Received: (at submit) by debbugs.gnu.org; 25 Mar 2010 22:46:29 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nuvoq-0006rw-Jl for submit@debbugs.gnu.org; Thu, 25 Mar 2010 18:46:29 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nuvoo-0006rr-3a for submit@debbugs.gnu.org; Thu, 25 Mar 2010 18:46:27 -0400 Received: from lists.gnu.org ([199.232.76.165]:55513) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Nuvoj-0002xF-U1 for submit@debbugs.gnu.org; Thu, 25 Mar 2010 18:46:21 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nuvoj-00031S-By for bug-gnu-emacs@gnu.org; Thu, 25 Mar 2010 18:46:21 -0400 Received: from [140.186.70.92] (port=38265 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nuvmi-0001tN-6G for bug-gnu-emacs@gnu.org; Thu, 25 Mar 2010 18:46:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, T_TVD_MIME_NO_HEADERS autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nuvlv-00049p-T6 for bug-gnu-emacs@gnu.org; Thu, 25 Mar 2010 18:43:29 -0400 Received: from mailout2-3.pacific.net.au ([61.8.2.226]:40962 helo=mailout2.pacific.net.au) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nuvlv-00049b-9n for bug-gnu-emacs@gnu.org; Thu, 25 Mar 2010 18:43:27 -0400 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 846CD1B2661 for ; Fri, 26 Mar 2010 09:42:38 +1100 (EST) Received: from blah.blah (ppp2F42.dyn.pacific.net.au [61.8.47.66]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id AA29E8C13 for ; Fri, 26 Mar 2010 09:42:37 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.71) (envelope-from ) id 1Nuvl9-0001Ri-Ts for bug-gnu-emacs@gnu.org; Fri, 26 Mar 2010 09:42:40 +1100 From: Kevin Ryde To: bug-gnu-emacs@gnu.org Subject: 23.1; vc-diff save buffer when re-diffing (or save whole fileset) Date: Fri, 26 Mar 2010 09:42:39 +1100 Message-ID: <87pr2sja5c.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.6 (-----) --=-=-= If you re-run M-x vc-diff from a *vc-diff* buffer, it doesn't ask you to save the buffer being diffed the way that it does when operating from that buffer itself C-x C-f /some/file/under/vc/control C-x v = C-x o # edit the file's buffer a bit C-x o # back to the *vc-diff* C-x v = => doesn't ask about saving the edits I wonder also if vc-diff might offer to save the whole of its "fileset", something like below. Not that I'm not smart enough to diff more than one file at a time :-) Maybe `vc-update' could share this `vc-buffer-sync-fileset' too. I thought to use find-buffer-visiting instead of the way vc-update has `member' in its save-some-buffers, just in case there's symlinks making names look different. 2010-03-25 Kevin Ryde * vc.el (vc-buffer-sync-fileset): New function. (vc-diff): Use it to save all relevant file buffers no matter where run (not just the current buffer). --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=vc.el.diff-save.diff --- vc.el.~1.746.~ 2009-12-17 08:25:35.000000000 +1100 +++ vc.el 2010-03-24 10:43:14.000000000 +1100 @@ -1593,9 +1593,17 @@ (interactive (list current-prefix-arg t)) (if historic (call-interactively 'vc-version-diff) - (when buffer-file-name (vc-buffer-sync not-urgent)) - (vc-diff-internal t (vc-deduce-fileset t) nil nil - (called-interactively-p 'interactive)))) + (let ((fileset (vc-deduce-fileset t))) + (vc-buffer-sync-fileset fileset not-urgent) + (vc-diff-internal t fileset nil nil + (called-interactively-p 'interactive))))) + +(defun vc-buffer-sync-fileset (fileset not-urgent) + (dolist (filename (cadr fileset)) + (let ((buffer (find-buffer-visiting filename))) + (if buffer + (with-current-buffer buffer + (vc-buffer-sync not-urgent)))))) ;;;###autoload (defun vc-root-diff (historic &optional not-urgent) --=-=-= In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) of 2009-09-14 on raven, modified by Debian configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default-enable-multibyte-characters: t --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 28 15:43:33 2010 Received: (at 5773) by debbugs.gnu.org; 28 Mar 2010 19:43:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NvyOT-0007A7-L4 for submit@debbugs.gnu.org; Sun, 28 Mar 2010 15:43:33 -0400 Received: from pantheon-po33.its.yale.edu ([130.132.50.94]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NvyOR-0007A0-JL for 5773@debbugs.gnu.org; Sun, 28 Mar 2010 15:43:32 -0400 Received: from furry (173-14-147-246-NewEngland.hfc.comcastbusiness.net [173.14.147.246]) (authenticated bits=0) by pantheon-po33.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o2SJhQCf020949 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 28 Mar 2010 15:43:26 -0400 Received: by furry (Postfix, from userid 1000) id 60EB7C05D; Sun, 28 Mar 2010 15:43:26 -0400 (EDT) From: Chong Yidong To: Kevin Ryde Subject: Re: 23.1; vc-diff save buffer when re-diffing (or save whole fileset) Date: Sun, 28 Mar 2010 15:43:26 -0400 Message-ID: <87pr2o6xlt.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 5773 Cc: 5773@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) > If you re-run M-x vc-diff from a *vc-diff* buffer, it doesn't ask you > to save the buffer being diffed the way that it does when operating > from that buffer itself > > 2010-03-25 Kevin Ryde zip.com.au> > > * vc.el (vc-buffer-sync-fileset): New function. > (vc-diff): Use it to save all relevant file buffers no matter > where run (not just the current buffer). Thanks, but I think your patch may need to go further. There are several other places in VC where vc-buffer-sync is called; could you check whether they need to use your `vc-buffer-sync-fileset' (which ought to be in vc-dispatcher.el)? From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 30 20:36:29 2010 Received: (at 5773) by debbugs.gnu.org; 31 Mar 2010 00:36:29 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nwlv2-0001Dc-Tf for submit@debbugs.gnu.org; Tue, 30 Mar 2010 20:36:29 -0400 Received: from mailout2-3.pacific.net.au ([61.8.2.226] helo=mailout2.pacific.net.au) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nwluz-0001DX-W8 for 5773@debbugs.gnu.org; Tue, 30 Mar 2010 20:36:27 -0400 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 091BC1B0AEC; Wed, 31 Mar 2010 11:36:20 +1100 (EST) Received: from blah.blah (ppp2AAA.dyn.pacific.net.au [61.8.42.170]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 543868C55; Wed, 31 Mar 2010 11:36:16 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.71) (envelope-from ) id 1Nwluv-0003bC-US; Wed, 31 Mar 2010 11:36:21 +1100 From: Kevin Ryde To: 5773@debbugs.gnu.org Subject: Re: 23.1; vc-diff save buffer when re-diffing (or save whole fileset) References: <87pr2o6xlt.fsf@stupidchicken.com> Date: Wed, 31 Mar 2010 11:36:21 +1100 In-Reply-To: <87pr2o6xlt.fsf@stupidchicken.com> (Chong Yidong's message of "Sun, 28 Mar 2010 15:43:26 -0400") Message-ID: <87eij1cooq.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 5773 Cc: Chong Yidong X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) Chong Yidong writes: > > There are > several other places in VC where vc-buffer-sync is called; could you > check whether they need to use your `vc-buffer-sync-fileset' Apart from vc-update which I mentioned, I can spot vc-register vc-revert vc-rollback vc-revert and vc-rollback look like they could go straight to vc-buffer-sync-fileset, but vc-register has extra trickery. I have to confess I've never used anything more than vc-diff and vc-next-action :-), so I'd be afraid to touch the rest. Would you like to start with vc-diff doing the right thing and take the rest on notice? From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 09:43:32 2020 Received: (at 5773) by debbugs.gnu.org; 14 Sep 2020 13:43:32 +0000 Received: from localhost ([127.0.0.1]:53307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHolU-0007qD-HL for submit@debbugs.gnu.org; Mon, 14 Sep 2020 09:43:32 -0400 Received: from quimby.gnus.org ([95.216.78.240]:59466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHolO-0007pp-Jh for 5773@debbugs.gnu.org; Mon, 14 Sep 2020 09:43:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=2goQtCzui4sy31a+pv77cY2cmrcbqVyfkyD0O5y7/W0=; b=YChN8xQm6wCOYGgSmojM+FjdBu Qb/Es7j61EtXnC5FdxcjyWGUYNe5tXYVvBG+MJtyo2XThtgkR2WRpJ0dK5wL0GFPB9BeL9lnRntrX bT7k8dVFxnWrPQ01Cu7zwDdsMFa6XGmS4L1DvJhTrszQego7MLmAlcbyMS8QkhQJyWks=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHokp-0002A1-Jo; Mon, 14 Sep 2020 15:42:53 +0200 From: Lars Ingebrigtsen To: Kevin Ryde Subject: Re: bug#5773: 23.1; vc-diff save buffer when re-diffing (or save whole fileset) References: <87pr2sja5c.fsf@blah.blah> X-Now-Playing: Jay Glass Dubs's _Epitaph_: "Animal Estate" Date: Mon, 14 Sep 2020 15:42:46 +0200 In-Reply-To: <87pr2sja5c.fsf@blah.blah> (Kevin Ryde's message of "Fri, 26 Mar 2010 09:42:39 +1100") Message-ID: <878sdca2zt.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Kevin Ryde writes: > If you re-run M-x vc-diff from a *vc-diff* buffer, it doesn't ask you to > save the buffer being diffed the way that it does when operating from > that buffer itself > > C-x C-f /some/file/under/vc/ [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 5773 Cc: 5773@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Kevin Ryde writes: > If you re-run M-x vc-diff from a *vc-diff* buffer, it doesn't ask you to > save the buffer being diffed the way that it does when operating from > that buffer itself > > C-x C-f /some/file/under/vc/control > C-x v = > C-x o > # edit the file's buffer a bit > C-x o # back to the *vc-diff* > C-x v = > > => doesn't ask about saving the edits This bug is still present in Emacs 28, and the ten year old patch amazingly still applies, and fixes the issue, so I've applied it to the trunk (with minor stylistic changes). There was then some discussion about whether other functions could also do with a similar change, which is true, but that shouldn't preclude us from fixing this bug. If somebody sees similar issues in other buffers that they think should be changed, then they can open new bug reports. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 09:43:09 2020 Received: (at control) by debbugs.gnu.org; 14 Sep 2020 13:43:09 +0000 Received: from localhost ([127.0.0.1]:53302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHolB-0007pa-Ad for submit@debbugs.gnu.org; Mon, 14 Sep 2020 09:43:09 -0400 Received: from quimby.gnus.org ([95.216.78.240]:59462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHol8-0007oz-M6 for control@debbugs.gnu.org; Mon, 14 Sep 2020 09:43:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=hmMVZZ0Cht1cnenoIZ+Dg+IZSdxZFTxSphx3xwhGJyg=; b=MchWMpMafZBzbRktBnS3WiYMiK 89tzSE0myWPc+5ZdK8Ohqq7yRiLZOHg79rPsd9wtc09nzNhS2ypTaLi/xLdSCZjLMrAuO2KyqmfCW QYC+921oxRIonIsiLfwI/RPne+soSI62KIuv91iFEf6jrlMmknA+1XTAvzyY0DmvoSgo=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHol0-0002A9-7k for control@debbugs.gnu.org; Mon, 14 Sep 2020 15:43:00 +0200 Date: Mon, 14 Sep 2020 15:42:57 +0200 Message-Id: <877dswa2zi.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #5773 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 5773 fixed close 5773 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 5773 fixed close 5773 28.1 quit From unknown Mon Jun 23 18:27:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 13 Oct 2020 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator