all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Yates <john@yates-sheets.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: Philip Kaludercic <philipk@posteo.net>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	 Stefan Kangas <stefankangas@gmail.com>,
	schwab@linux-m68k.org,  Juri Linkov <juri@linkov.net>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: vc-find-revision-no-save?
Date: Mon, 27 Mar 2023 16:50:25 -0400	[thread overview]
Message-ID: <CAJnXXohX20A2BRypFBPSBKS+C0+TCkRWMdyBiXFEWN6PUpeKHA@mail.gmail.com> (raw)
In-Reply-To: <4423f660-933d-bbcb-1432-76548dfbf08c@yandex.ru>

On Fri, Feb 10, 2023 at 6:47 PM Dmitry Gutov <dgutov@yandex.ru> wrote:
>
> Now, to go back to the original thread you referred to, I mentioned
> vc-annotate, and you agreed that it has similar features but misses some
> stuff. Such as syntax highlighting. And editing support (is that
> necessary?).

Actually, what I wrote was:
|  That said, vc-annotate is a jarring presentation.  As I browse through
|  different revisions I want the major mode to remain that of the original
|  (non-annotated) file.  I want syntax-based highlighting, lsp support, etc.

I do not wantdestructive editing.  A revision buffer presents a view
of an immutable revision.  I should never be allowed to alter history
(unless, of course, I do choose to rewrite history, but then, as we all
know, I am actually creating new revisions with new revision IDs).
What I would like is to be able to operate within a revision buffer using
all non-destructive commands and modes.

> Overall, I think it might be better to add features to vc-annotate than
> add a very similar but different feature. Especially since it has unique
> features of its own, such as showing and being able to jump to a
> revision that last modified a given line. Or the one before it, etc.
> IME, that's usually more useful than going through a file history
> linearly. But that's my opinion.

I agree that stepping linearly through the revisions on a branch often
is not the interface one would want.  But that is beside the point.
vc-annotate is a gussied-up presentation of the output of a backend
database join.  To me it shoves in my face how smart it is because
it can tell me, for every line, the revision, the author and the date when
that line was last modified.  Further, to present a color coded sense
of time, it presents my source in a jarring, and utterly unfamiliar style.

I view the vc-timemachine framework as one that simply knows, given
a file, how to display arbitrary revisions on its branch.  How the next
revision to display is chosen is orthogonal.  Today, vc-timemachine
supports the analogs of vc-annotate's 'n' and 'p', plus "search the
revision subject lines" and "jump to the n'th revision on the branch".
I am working on date based navigation.  There is no fundamental
reason why, over time, other vc-annotate -like navigation functions
cannot be added.

> Finally, some nits about the first patch:
> - It moves from the cache-by-default behavior to dont-cache-by-default.

Correct.  Stefan endorsed that change.

> - It removes an existing user option without a deprecation period.

The option did not go away.  Originally, I changed its name to reflect
the new default.  Stefan had much the same objection that you did.
I have since restored the original name and changed only the default.

> - It adds a timemachine-related variable to vc.el (vc-tm--revision ?).
> Timemachine will be a separate package, right?

No.  vc-timemachine is a properly integrated vc concept.  (RMS explicity
requested that it be so.)  Any VCS backend can support vc-timemachine
functionality by implementing one (optionally two) methods.

> The overall idea seems sound. But if we choose the route of improving
> vc-annotate, a revision cache will probably not help because we would be
> caching the 'git annotate' output instead. Thus making it specific to
> that feature only.

That would be a different cache.  This cache addresses cases where the
cost simply to retrieve a revision is high, independent of whether or not
that revision is then annotated.



  parent reply	other threads:[~2023-03-27 20:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 11:57 vc-find-revision-no-save? John Yates
2023-02-10 23:46 ` vc-find-revision-no-save? Dmitry Gutov
2023-03-27 19:38   ` vc-find-revision-no-save? John Yates
2023-03-27 20:50   ` John Yates [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-10-24  0:27 vc-find-revision-no-save? John Yates
2022-10-24  9:42 ` vc-find-revision-no-save? Dmitry Gutov
2022-10-24 16:02   ` vc-find-revision-no-save? Philip Kaludercic
2022-10-24 17:14     ` vc-find-revision-no-save? Dmitry Gutov
2022-10-24 21:10     ` vc-find-revision-no-save? Stefan Monnier
2022-10-25  2:22       ` vc-find-revision-no-save? Eli Zaretskii
2022-10-28 21:57       ` vc-find-revision-no-save? Richard Stallman
2022-10-29  6:46         ` vc-find-revision-no-save? Philip Kaludercic
2022-10-29  7:07           ` vc-find-revision-no-save? Stefan Kangas
2022-10-29  9:18             ` vc-find-revision-no-save? Philip Kaludercic
2022-10-29  9:24           ` vc-find-revision-no-save? Andreas Schwab
2022-10-29  9:26             ` vc-find-revision-no-save? Philip Kaludercic
2022-10-29 15:14           ` vc-find-revision-no-save? Stefan Monnier
2022-10-29 15:40             ` vc-find-revision-no-save? Philip Kaludercic
2022-10-24 19:37 ` vc-find-revision-no-save? Juri Linkov
2022-10-24 20:00   ` vc-find-revision-no-save? John Yates

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=CAJnXXohX20A2BRypFBPSBKS+C0+TCkRWMdyBiXFEWN6PUpeKHA@mail.gmail.com \
    --to=john@yates-sheets.org \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --cc=monnier@iro.umontreal.ca \
    --cc=philipk@posteo.net \
    --cc=schwab@linux-m68k.org \
    --cc=stefankangas@gmail.com \
    /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.