unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Spencer Baugh via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Sean Whitton <spwhitton@spwhitton.name>
Cc: Dmitry Gutov <dmitry@gutov.dev>, Eli Zaretskii <eliz@gnu.org>,
	73604@debbugs.gnu.org
Subject: bug#73604: [PATCH] Properly operate on current fileset revision in vc-hg-print-log
Date: Thu, 03 Oct 2024 11:18:37 -0400	[thread overview]
Message-ID: <iera5fl1agi.fsf@janestreet.com> (raw)
In-Reply-To: <87o741zmy4.fsf@melete.silentflame.com> (Sean Whitton's message of "Thu, 03 Oct 2024 15:04:51 +0800")

Sean Whitton <spwhitton@spwhitton.name> writes:
> Hello,
>
> On Thu 03 Oct 2024 at 09:50am +03, Eli Zaretskii wrote:
>
>>> From: Sean Whitton <spwhitton@spwhitton.name>
>>> Cc: Spencer Baugh <sbaugh@janestreet.com>, 73604@debbugs.gnu.org
>>> Date: Thu, 03 Oct 2024 10:16:33 +0800
>>>
>>> Eli, can this go on emacs-30?
>>
>> Why is it important enough to install on emacs-30?  The situation
>> sounds quite rare to me.
>
> Yeah, it's relatively rare, but I was thinking that it would be
> appropriate because of the simplicity of the fix.  Anyway, master is
> fine, I just wanted to ask.

I'm in no rush to put this on emacs-30 (I've already backported it for
my users anyway)

>> Moreover, I'm not sure the change is correct in general.  If you
>> invoke "C-x v l" with an argument, the prompt says "...(default: last
>> revision)".  It says "last", and doesn't say anything about the
>> working revision.  So I don't understand why you say the current
>> operation of the command is incorrect even when the tip and the
>> current working revision are different.  I think this is precisely a
>> use case where the user should invoke the command with a prefix arg
>> and specify the revision from which to start.
>
> Well, the description of C-x v l is
>
>     Show in another window the VC change history of the current fileset.
>
> If the current fileset doesn't exist in tip, then we'd better not just
> log tip.
>
> Possibly the prompt should also change.  Let's see what Spencer thinks.

I think you both may be misinterpreting this prompt - the typed-in
revision doesn't actually specify where the log starts.  It doesn't
affect what goes in the buffer at all; the value typed in doesn't get
passed to 'print-log at all.

The prompt is just about where point goes in the buffer - "last
revision" just means that point starts at point-min.  Typing a revision
at the prompt just moves point to that revision.

(This is of course extremely confusing; I have definitely typed
revisions in the vc-print-log prompt and expected them to change the log
output.  Maybe this prompt and command should be changed in other ways,
but let's defer that for other bugs.  Also note that this is very
different behavior from M-1 C-x v L (vc-print-root-log), where typing a
revision at the prompt *does* change what's logged.)

So, anyway, that prompt says nothing about what actual logs should print
with vc-print-log.  And (potentially) including commits which don't even
contain the current fileset seems very wrong.

Note also that the print-log docs also say:

;;   If START-REVISION is given, then show the log starting from that
;;   revision ("starting" in the sense of it being the _newest_
;;   revision shown, rather than the working revision, which is normally
;;   the case).

vc-print-log always passes nil for START-REVISION, so it seems we expect
to start from the working revision.





  reply	other threads:[~2024-10-03 15:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02 19:21 bug#73604: [PATCH] Properly operate on current fileset revision in vc-hg-print-log Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-03  2:16 ` Sean Whitton
2024-10-03  6:50   ` Eli Zaretskii
2024-10-03  7:04     ` Sean Whitton
2024-10-03 15:18       ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-10-11  4:43         ` Sean Whitton
2024-10-11 20:53           ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-12  7:36             ` Eli Zaretskii
2024-10-12  8:58               ` Sean Whitton
2024-10-12  8:56             ` Sean Whitton

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=iera5fl1agi.fsf@janestreet.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=73604@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --cc=eliz@gnu.org \
    --cc=sbaugh@janestreet.com \
    --cc=spwhitton@spwhitton.name \
    /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).