all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 33319@debbugs.gnu.org
Subject: bug#33319: Support revisions in diff-goto-source
Date: Fri, 09 Nov 2018 09:52:22 +0200	[thread overview]
Message-ID: <83pnvebscp.fsf@gnu.org> (raw)
In-Reply-To: <87lg63p9fd.fsf@mail.linkov.net> (message from Juri Linkov on Thu, 08 Nov 2018 23:05:10 +0200)

> From: Juri Linkov <juri@linkov.net>
> Date: Thu, 08 Nov 2018 23:05:10 +0200
> 
> So the proposed feature is backward-compatible: in the diff buffer
> created by a version control system, with a prefix arg it will jump
> to an old revision of the file.
> 
> It is very useful to look at the context of changed lines 
> of the file as it was at the time of that old revision.

Thanks.

> diff --git a/etc/NEWS b/etc/NEWS
> index 1020a2a0ea..36ad3d82df 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -353,6 +353,11 @@ To disable it, set the new defcustom 'diff-font-lock-refine' to nil.
>  *** File headers can be shortened, mimicking Magit's diff format.
>  To enable it, set the new defcustom 'diff-font-lock-prettify to t.
>  
> +*** In the diff buffer created by a version control system, the prefix
> +arg of diff-goto-source means it jumps to the old revision of the file
                           ^^^^^^^^^^^^^^^^^
"... means jump to ..." is a better wording, I think.

Also, it is best to provide a header for the description of the
change, so that it could be meaningfully folded by Outline mode.

And I think we want to update the manual as well.

> +(defvar diff-vc-revisions nil
> +  "The VC revisions compared in the current Diff buffer, if any.")
> +
>  (defvar diff-outline-regexp
>    "\\([*+][*+][*+] [^0-9]\\|@@ ...\\|\\*\\*\\* [0-9].\\|--- [0-9]..\\)")

Which VCSes does this support?  I'm not sure all of them produce such
markers.  If this supports only some, we should document that and make
sure the code does something reasonable when the revision is not
found.





  reply	other threads:[~2018-11-09  7:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08 21:05 bug#33319: Support revisions in diff-goto-source Juri Linkov
2018-11-09  7:52 ` Eli Zaretskii [this message]
2018-11-10 21:12   ` Juri Linkov
2018-11-11 15:40     ` Eli Zaretskii
2018-11-14  0:24       ` Juri Linkov

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=83pnvebscp.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=33319@debbugs.gnu.org \
    --cc=juri@linkov.net \
    /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.