From: Dmitry Gutov <dmitry@gutov.dev>
To: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
Cc: 63949@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#63949: 30.0.50; `vc-print-log´ does not erase buffer when called from *vc-change-log* buffer, at least for CVS logs
Date: Sat, 24 Jun 2023 06:08:22 +0300 [thread overview]
Message-ID: <72a22541-ba77-11b5-5bb6-3a5cd85586c6@gutov.dev> (raw)
In-Reply-To: <83ilbg4yuw.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 745 bytes --]
On 21/06/2023 18:30, Eli Zaretskii wrote:
>> Date: Wed, 21 Jun 2023 17:37:55 +0300
>> Cc:63949@debbugs.gnu.org, Jens Schmidt<jschmidt4gnu@vodafonemail.de>
>> From: Dmitry Gutov<dmitry@gutov.dev>
>>
>> On 21/06/2023 16:03, Jens Schmidt wrote:
>>> Tested on emacs-29.
>> Excellent, thank you.
>>
>> Eli, I suggest we push it to emacs-29 now.
> Fine by me, thanks.
And done.
>> There could be ways to make it prettier, but probably not by much -- at
>> least I don't see any obvious ones if we're keeping the indirect
>> buffer-related functionality. Anyway, we can look into that later in
>> Emacs 30.
> Right.
I'm attaching a patch which should work fine, though could be a tad
risky for 29.
Jens (and possibly others), could you try it out?
[-- Attachment #2: vc-deduce-fileset.diff --]
[-- Type: text/x-patch, Size: 1369 bytes --]
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 410fe5c01e1..24e786eb218 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1121,19 +1121,8 @@ vc-deduce-fileset
the returned list.
BEWARE: this function may change the current buffer."
- (let (new-buf res)
- (with-current-buffer (or (buffer-base-buffer) (current-buffer))
- (setq res
- (vc-deduce-fileset-1 not-state-changing
- allow-unregistered
- state-model-only-files))
- (setq new-buf (current-buffer)))
- (set-buffer new-buf)
- res))
-
-(defun vc-deduce-fileset-1 (not-state-changing
- allow-unregistered
- state-model-only-files)
+ (when (buffer-base-buffer)
+ (set-buffer (buffer-base-buffer)))
(let (backend)
(cond
((derived-mode-p 'vc-dir-mode)
@@ -1158,7 +1147,7 @@ vc-deduce-fileset-1
(derived-mode-p 'diff-mode)))))
(progn ;FIXME: Why not `with-current-buffer'? --Stef.
(set-buffer vc-parent-buffer)
- (vc-deduce-fileset-1 not-state-changing allow-unregistered state-model-only-files)))
+ (vc-deduce-fileset not-state-changing allow-unregistered state-model-only-files)))
((and (not buffer-file-name)
(setq backend (vc-responsible-backend default-directory)))
(list backend nil))
next prev parent reply other threads:[~2023-06-24 3:08 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 21:04 bug#63949: 30.0.50; `vc-print-log´ does not erase buffer when called from *vc-change-log* buffer, at least for CVS logs Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-08 13:12 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-08 20:21 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-08 21:33 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-08 22:10 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-09 6:09 ` Eli Zaretskii
2023-06-09 20:27 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-10 6:01 ` Eli Zaretskii
2023-06-10 15:44 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-10 15:55 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-10 17:23 ` Eli Zaretskii
2023-06-10 21:18 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-11 5:06 ` Eli Zaretskii
2023-06-16 19:33 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-17 3:15 ` Dmitry Gutov
2023-06-18 2:42 ` Dmitry Gutov
2023-06-18 5:35 ` Eli Zaretskii
2023-06-18 9:11 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-18 12:00 ` Dmitry Gutov
[not found] ` <e695eaa4-2f39-1b20-1cd4-fe7fdaeb3d61@vodafonemail.de>
2023-06-20 2:41 ` Dmitry Gutov
2023-06-21 13:03 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-21 14:37 ` Dmitry Gutov
2023-06-21 15:30 ` Eli Zaretskii
2023-06-24 3:08 ` Dmitry Gutov [this message]
2023-06-26 19:54 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-29 21:37 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-30 5:57 ` Eli Zaretskii
2023-07-17 19:53 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-18 0:55 ` Dmitry Gutov
2023-07-18 11:08 ` Eli Zaretskii
2023-06-08 22:44 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-09 6:41 ` Eli Zaretskii
2023-06-09 18:44 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-08 23:09 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=72a22541-ba77-11b5-5bb6-3a5cd85586c6@gutov.dev \
--to=dmitry@gutov.dev \
--cc=63949@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jschmidt4gnu@vodafonemail.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).