all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
Cc: 63949@debbugs.gnu.org, manuel@ledu-giraud.fr
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, 10 Jun 2023 20:23:06 +0300	[thread overview]
Message-ID: <83ilbvz0xx.fsf@gnu.org> (raw)
In-Reply-To: <ea31a54d-c18f-143f-42f1-6920f5e0009e@vodafonemail.de> (message from Jens Schmidt on Sat, 10 Jun 2023 17:44:26 +0200)

> Date: Sat, 10 Jun 2023 17:44:26 +0200
> Cc: manuel@ledu-giraud.fr, 63949@debbugs.gnu.org
> From: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
> 
> On 2023-06-10  08:01, Eli Zaretskii wrote:
> 
> > Why do you think it's a problem?  I can justify this behavior, at 
> > least in some use cases.
> 
> Let's distinguish "VC-controlled buffers" like the buffer of a
> VC-controlled file or a *vc-dir* buffer or a dired buffer of
> VC-controlled directory.  And "VC working buffers", like
> *vc-change-log*, *vc-log*, *vc-diff*.

First, let me clarify what I alluded to as "a problem": I meant the
fact that "C-x v l" in a *vc-change-log* buffer shows the log for the
entire repository.  How this is accomplished by setting
vc-parent-buffer is an implementation detail.

> It is my understanding that `vc-parent-buffer' in a VC working buffer
> points to the VC-controlled buffer from which it originates.  The
> rationale of that variable is to allow VC operations from a VC working
> buffer as if executed on the original VC-controlled buffer.  So I can do
> C-x v l, pick a commit, do a C-x v ~ on that commit, then a C-x v =, and
> all these operations would automagically relate to the original
> VC-controlled buffer.  At least I use that concept frequently.

If the backend is a VCS that records changes per-file, what you want
will happen automatically, since "C-x v l" and other operations must
in general refer to a file with those VCSes.  For backends that record
changes per-repository, why does it make sense that typing "C-x v l"
from a buffer that already shows a log should produce the same log
again?

> The documentation on `vc-parent-buffer', unfortunately, is out of date 
> and does not necessarily support my understanding:
> 
>    ;; In a log entry buffer, this is a local variable
>    ;; that points to the buffer for which it was made
>    ;; (either a file, or a directory buffer).

We need to define what we want vc-parent-buffer to mean, and then we
should adjust the documentation and keep our promises about that
variable in the future.

> However, this has been working as described by me up to and including
> Emacs 27.  So at least we can say that the fix fur bug#40967 has changed
> established behavior.

Probably because no one realized that this must be the established
behavior.

> That logic used to work as intended (by me) up to Nathan's commit, which
> put a `with-current-buffer' around the whole function and rendered the
> `set-buffer' side effect pointless.
> 
> Let's put it that way: The pre-28 logic of handling the VC parent buffer
> was not necessarily clean, as also pointed out by Stefan.  But I think
> the concept of having a stable VC parent buffer across multiple VC
> operations is nice, and changing it midway according to rather unclear
> rules undesirable.
> 
> Ideally, we would have a fix that handled indirect buffers and VC parent
> buffers (which are somewhat similar by concept) all consistently and
> nicely and in a stable way, at the same time fixing both issues that I 
> have.  I'll mediate about that...

If you can suggest changes to make the treatment of vc-parent-buffer
more consistent, that would be good, I think.

I'd also like to hear Dmitry's views on these issues.  He was until
now silent in this discussion, AFAICT.





  parent reply	other threads:[~2023-06-10 17:23 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 [this message]
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
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83ilbvz0xx.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=63949@debbugs.gnu.org \
    --cc=jschmidt4gnu@vodafonemail.de \
    --cc=manuel@ledu-giraud.fr \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.