GNU bug report logs - #51215
Add a navigation feature to vc and diff mode: diff-goto-line

Previous Next

Package: emacs;

Reported by: Uwe Brauer <oub <at> mat.ucm.es>

Date: Thu, 14 Oct 2021 20:44:01 UTC

Severity: wishlist

Merged with 36526

Found in version 26.2

To reply to this bug, email your comments to 51215 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#51215; Package emacs. (Thu, 14 Oct 2021 20:44:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Uwe Brauer <oub <at> mat.ucm.es>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 14 Oct 2021 20:44:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: bug-gnu-emacs <at> gnu.org
Cc: Davis Herring <herring <at> lanl.gov>
Subject: Add a navigation feature to vc and diff mode: diff-goto-line
Date: Thu, 14 Oct 2021 22:42:53 +0200
[Message part 1 (text/plain, inline)]
Tags: patch

<#secure method=smime mode=sign>
Hi all


Attached you find a patch, in a git compatible format, (to be installed
with git apply --patch-format=hg) provided by Davis Herring with Davis's
approval of course. Davis has already signed the FSF papers.

I would like to also discuss the whole idea connected to that patch.
Please tell me whether that is appropriate, and if it is not, we might
continue the discussion on the developer list. I will send just in case
a similar message to the developer mailing list. 

A bit of history to put that into context: 5 years ago Davis Herring
send a patch (with respect to vc.el and diff-mode.el) to the devel
list, see the link for further details.

[[https://lists.gnu.org/archive/html/emacs-devel/2016-02/msg01066.html][First short vc-diff patch]]

The idea of that patch can be described best by referring to is the
diff-hg package. The function `diff-hl-diff-goto-hunk' shows the
un-committed changes in a file, and allows to jump to these changes.
Strangely enough vc-diff does not provide a similar  feature. Davis' Harris
patch, however, does introduce it.

I find it especially helpful in collaboration where push and pulling
to/from a repository, using either git or mercurial. I presume most of
the users in this mailing list are acquainted with such a workflow, but
if necessary I could provide more details.

That patch was considered as interesting but certain enhancements were
required. So Davis send a much larger patch 6 month later. That patch
however was rejected as being to large. 
[[https://lists.gnu.org/archive/html/emacs-devel/2016-07/msg00727.html][Second longer patch, cannot be merged]]

I became very interested in that feature and was not able to install
Davis's second patch (most likely to many changes in the last 5 years)

His first patch, however, I could still apply and I tested it (using
mercurial) almost for a year and it worked flawlessly for me. 

That is why I strongly recommend to apply the patch, then 

    1. Either errors are found and these will be corrected or the patch removed
    2. Or even better the feature will enhanced

But I think to reject the patch, again, would not be a bit of a shame.

regards

Uwe Brauer 




In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.14.6, Xaw3d scroll bars)
 of 2021-07-31 built on Utnapischtim
Repository revision: 83a915d3dfafd5f3d737afe1e13b75e4dd3aef96
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description: Ubuntu 16.04.7 LTS

Configured using:
 'configure --prefix=/opt/emacs28 --with-x-toolkit=athena --without-pop
 --with-mailutils'

[diff-goto-line.patch (text/patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51215; Package emacs. (Mon, 18 Oct 2021 01:57:01 GMT) Full text and rfc822 format available.

Message #8 received at 51215 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Uwe Brauer <oub <at> mat.ucm.es>, 51215 <at> debbugs.gnu.org
Cc: Davis Herring <herring <at> lanl.gov>
Subject: Re: bug#51215: Add a navigation feature to vc and diff mode:
 diff-goto-line
Date: Mon, 18 Oct 2021 04:56:31 +0300
Hi Uwe,

On 14.10.2021 23:42, Uwe Brauer wrote:
> I became very interested in that feature and was not able to install
> Davis's second patch (most likely to many changes in the last 5 years)
> 
> His first patch, however, I could still apply and I tested it (using
> mercurial) almost for a year and it worked flawlessly for me.
> 
> That is why I strongly recommend to apply the patch, then
> 
>      1. Either errors are found and these will be corrected or the patch removed
>      2. Or even better the feature will enhanced
> 
> But I think to reject the patch, again, would not be a bit of a shame.

The most recent discussion regarding it can be found in bug#36526.

To sum up: the patch(es) have merit, and they're waiting for someone to 
champion their inclusion: test them for bugs, compare the different 
available implementations of the "skip to" functionality, and generally 
examine how the new functionality affects the existing workflows (e.g. 
whether it should be enabled on root diffs).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51215; Package emacs. (Mon, 18 Oct 2021 07:17:01 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#51215: Add a navigation feature to vc and diff mode:
 diff-goto-line
Date: Mon, 18 Oct 2021 09:16:08 +0200
[Message part 1 (text/plain, inline)]
>>> "DG" == Dmitry Gutov <dgutov <at> yandex.ru> writes:
Hi Dmitry


Thanks for answering and clarify some points
> Hi Uwe,
> On 14.10.2021 23:42, Uwe Brauer wrote:
>> I became very interested in that feature and was not able to install
>> Davis's second patch (most likely to many changes in the last 5 years)
>> His first patch, however, I could still apply and I tested it (using
>> mercurial) almost for a year and it worked flawlessly for me.
>> That is why I strongly recommend to apply the patch, then
>> 1. Either errors are found and these will be corrected or the
>> patch removed
>> 2. Or even better the feature will enhanced
>> But I think to reject the patch, again, would not be a bit of a
>> shame.

> The most recent discussion regarding it can be found in bug#36526.

I am not that used to that interface I jumped to 
https://lists.gnu.org/archive/html/emacs-bug-tracker/2020-08/msg00633.html

But that seems to be an automatic generated message. How can I see its
history and see that it is really Davis' original patch? The first or
the second. As I said I only tested the first one, for a year now.

> To sum up: the patch(es) have merit, and they're waiting for someone
> to champion their inclusion: test them for bugs, compare the different
> available implementations of the "skip to" functionality, and
> generally examine how the new functionality affects the existing
> workflows (e.g. whether it should be enabled on root diffs).

Forgive me my ignorance (maybe because I am  a mercurial user 😇)
the documentation vc-root-diff talks about tree revision

So if I understand that correctly this is for the case I want really
consider the diff of the repository? 

That is the same effect as if:  I change 3 files in the repository and would run 
git diff
or 
hg diff 
from the command line?

If that is the case I would say, disable the feature for that sort of
diffs  for the moment. The patch is more useful for
one-file-basis.
At least that is how  I used it for a year.

So what is the best strategy? How can I test the patch concerning 
bug#36526?

The message talks about emacs 26, I am running a 2 month old
git master emacs (still 28).
So can that patch be tested in version I use?

Regards

Uwe 


[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51215; Package emacs. (Mon, 18 Oct 2021 07:25:01 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#51215: Add a navigation feature to vc and diff mode:
 diff-goto-line
Date: Mon, 18 Oct 2021 09:24:12 +0200
[Message part 1 (text/plain, inline)]
> Hi Dmitry


> Thanks for answering and clarify some points


> I am not that used to that interface I jumped to 
> https://lists.gnu.org/archive/html/emacs-bug-tracker/2020-08/msg00633.html

To answer my own question:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=%2336526

Is a different patch than the one I committed. Mine (=Davis) does not
touch the vc-root-diff command it is on a strict one-file base and
therefore simpler.

Why not apply «mine» and if there is sufficient interest switch to
2336526? 
[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51215; Package emacs. (Tue, 19 Oct 2021 00:50:01 GMT) Full text and rfc822 format available.

Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#51215: Add a navigation feature to vc and diff mode:
 diff-goto-line
Date: Tue, 19 Oct 2021 03:49:13 +0300
On 18.10.2021 10:24, Uwe Brauer wrote:
>> Hi Dmitry
> 
>> Thanks for answering and clarify some points
> 
>> I am not that used to that interface I jumped to
>> https://lists.gnu.org/archive/html/emacs-bug-tracker/2020-08/msg00633.html
> To answer my own question:
> 
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=%2336526
> 
> Is a different patch than the one I committed. Mine (=Davis) does not
> touch the vc-root-diff command it is on a strict one-file base and
> therefore simpler.
> 
> Why not apply «mine» and if there is sufficient interest switch to
> 2336526?

Read further down, we've discussed (unfortunately briefly) Davis's patch 
closer to the end: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36526#53

I don't object to applying it, but like I said, it needs someone to 
champion it, do a proper review. I don't have the time or interest at 
the moment.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51215; Package emacs. (Tue, 19 Oct 2021 00:55:01 GMT) Full text and rfc822 format available.

Message #20 received at 51215 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: 51215 <at> debbugs.gnu.org
Subject: Re: bug#51215: Add a navigation feature to vc and diff mode:
 diff-goto-line
Date: Tue, 19 Oct 2021 03:54:42 +0300
Hi Uwe,

On 18.10.2021 10:16, Uwe Brauer wrote:

>> The most recent discussion regarding it can be found in bug#36526.
>
> I am not that used to that interface I jumped to
> 
https://lists.gnu.org/archive/html/emacs-bug-tracker/2020-08/msg00633.html

You can read the discussion starting from 
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36526#53.

>> To sum up: the patch(es) have merit, and they're waiting for someone
>> to champion their inclusion: test them for bugs, compare the different
>> available implementations of the "skip to" functionality, and
>> generally examine how the new functionality affects the existing
>> workflows (e.g. whether it should be enabled on root diffs).
>
> Forgive me my ignorance (maybe because I am  a mercurial user 😇)
> the documentation vc-root-diff talks about tree revision
>
> So if I understand that correctly this is for the case I want really
> consider the diff of the repository?
>
> That is the same effect as if:  I change 3 files in the repository 
and would run
> git diff
> or
> hg diff
> from the command line?

vc-root-diff, yes. 'C-x v D'.

> If that is the case I would say, disable the feature for that sort of
> diffs  for the moment. The patch is more useful for
> one-file-basis.
> At least that is how  I used it for a year.

OK, thanks for the feedback. But we should consider both changes in the 
proposal, ideally. Not just the one you happened to have been using for 
a period of time.

Would somebody else like to chime in?

> So what is the best strategy? How can I test the patch concerning
> bug#36526?
>
> The message talks about emacs 26, I am running a 2 month old
> git master emacs (still 28).
> So can that patch be tested in version I use?
That's a part of championing the change: try to see whether the patch 
still applies. If not, maybe try updating it yourself.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51215; Package emacs. (Tue, 19 Oct 2021 07:14:03 GMT) Full text and rfc822 format available.

Message #23 received at 51215 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 51215 <at> debbugs.gnu.org
Subject: Re: bug#51215: Add a navigation feature to vc and diff mode:
 diff-goto-line
Date: Tue, 19 Oct 2021 09:53:44 +0300
>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36526
>> Is a different patch than the one I committed. Mine (=Davis) does not
>> touch the vc-root-diff command it is on a strict one-file base and
>> therefore simpler.
>> Why not apply «mine» and if there is sufficient interest switch to 36526?
>
> Read further down, we've discussed (unfortunately briefly) Davis's patch
> closer to the end: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36526#53
>
> I don't object to applying it, but like I said, it needs someone to
> champion it, do a proper review. I don't have the time or interest at the
> moment.

I have been using Davis's patch for a long time
and collected a long list of its problems below.
Later I could try to help fixing all these issues:

1. diff-goto-line doesn't work with 'C-x v D'

2. 'C-c C-d' (log-edit-show-diff) leaves point at end, should leave at beginning

3. It should be customizable

4. This feature is unusable with 'C-c C-d' (log-edit-show-diff):

5. Often when committing a change 'C-c C-d' (log-edit-show-diff)
   displays only the end of the diff buffer, so some parts of the diff
   might be committed unnoticed.  This is because 'diff-goto-line'
   moves point to some random place in the diff output.  It's difficult
   to understand its logic, why it decides to move to the middle of the
   multi-file diff.
   Sometimes displaying the end of the diff buffer makes an impression
   that it's a complete diff buffer, thus a danger to miss the
   beginning of the partially hidden diff buffer.

6. 'C-c C-d' (log-edit-show-diff)
   read-file-name("Use file /dev/null: " "/dev/" "/dev/null" t "null")
   diff-find-file-name()
   diff-goto-line("Makefile" 33 0)

7. on the last hunk it signals the error: "user-error: No next hunk"

8. compilation warnings:
   vc/diff-mode.el:706:1: Warning: Unused lexical variable `i'
   vc/diff-mode.el:733:30: Warning: reference to free variable

9. signals an error:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-to-number(nil)
  (let ((start (string-to-number (match-string 3))) (len (string-to-number (match-string 4))))
  (cond ((eobp) nil) ((looking-at diff-hunk-header-re-unified
  (progn (condition-case nil (diff-hunk-next)
  (while (progn (condition-case nil (diff-hunk-next)
  (if (eobp) (goto-char (point-min)) (forward-line -1) (while
  diff-goto-line("manifest.js" 1 0)
  apply(diff-goto-line ("manifest.js" 1 0))
  vc-diff-finish




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51215; Package emacs. (Tue, 19 Oct 2021 23:19:02 GMT) Full text and rfc822 format available.

Message #26 received at 51215 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juri Linkov <juri <at> linkov.net>
Cc: "Herring, Davis" <herring <at> lanl.gov>, 51215 <at> debbugs.gnu.org
Subject: Re: bug#51215: Add a navigation feature to vc and diff mode:
 diff-goto-line
Date: Wed, 20 Oct 2021 02:18:07 +0300
On 19.10.2021 09:53, Juri Linkov wrote:
>>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36526
>>> Is a different patch than the one I committed. Mine (=Davis) does not
>>> touch the vc-root-diff command it is on a strict one-file base and
>>> therefore simpler.
>>> Why not apply «mine» and if there is sufficient interest switch to 36526?
>>
>> Read further down, we've discussed (unfortunately briefly) Davis's patch
>> closer to the end: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36526#53
>>
>> I don't object to applying it, but like I said, it needs someone to
>> champion it, do a proper review. I don't have the time or interest at the
>> moment.
> 
> I have been using Davis's patch for a long time
> and collected a long list of its problems below.
> Later I could try to help fixing all these issues:

Thank you for testing and cataloguing the problems. So it needs more 
work. I'll Cc Davis, perhaps he would like to continue the effort 
himself, too. Or to at least be aware of the progress.

> 1. diff-goto-line doesn't work with 'C-x v D'
> 
> 2. 'C-c C-d' (log-edit-show-diff) leaves point at end, should leave at beginning
> 
> 3. It should be customizable
> 
> 4. This feature is unusable with 'C-c C-d' (log-edit-show-diff):
> 
> 5. Often when committing a change 'C-c C-d' (log-edit-show-diff)
>     displays only the end of the diff buffer, so some parts of the diff
>     might be committed unnoticed.  This is because 'diff-goto-line'
>     moves point to some random place in the diff output.  It's difficult
>     to understand its logic, why it decides to move to the middle of the
>     multi-file diff.
>     Sometimes displaying the end of the diff buffer makes an impression
>     that it's a complete diff buffer, thus a danger to miss the
>     beginning of the partially hidden diff buffer.
> 
> 6. 'C-c C-d' (log-edit-show-diff)
>     read-file-name("Use file /dev/null: " "/dev/" "/dev/null" t "null")
>     diff-find-file-name()
>     diff-goto-line("Makefile" 33 0)
> 
> 7. on the last hunk it signals the error: "user-error: No next hunk"
> 
> 8. compilation warnings:
>     vc/diff-mode.el:706:1: Warning: Unused lexical variable `i'
>     vc/diff-mode.el:733:30: Warning: reference to free variable
> 
> 9. signals an error:
> 
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>    string-to-number(nil)
>    (let ((start (string-to-number (match-string 3))) (len (string-to-number (match-string 4))))
>    (cond ((eobp) nil) ((looking-at diff-hunk-header-re-unified
>    (progn (condition-case nil (diff-hunk-next)
>    (while (progn (condition-case nil (diff-hunk-next)
>    (if (eobp) (goto-char (point-min)) (forward-line -1) (while
>    diff-goto-line("manifest.js" 1 0)
>    apply(diff-goto-line ("manifest.js" 1 0))
>    vc-diff-finish
> 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51215; Package emacs. (Mon, 01 Nov 2021 07:25:01 GMT) Full text and rfc822 format available.

Message #29 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#51215: Add a navigation feature to vc and diff mode:
 diff-goto-line
Date: Mon, 01 Nov 2021 08:24:04 +0100
[Message part 1 (text/plain, inline)]
>>> "JL" == Juri Linkov <juri <at> linkov.net> writes:

Hi Juri

I did not see your message, thanks very much for this detailed
information


>>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36526
>>> Is a different patch than the one I committed. Mine (=Davis) does not
>>> touch the vc-root-diff command it is on a strict one-file base and
>>> therefore simpler.
>>> Why not apply «mine» and if there is sufficient interest switch to 36526?
>> 
>> Read further down, we've discussed (unfortunately briefly) Davis's patch
>> closer to the end: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36526#53
>> 
>> I don't object to applying it, but like I said, it needs someone to
>> champion it, do a proper review. I don't have the time or interest at the
>> moment.

> I have been using Davis's patch for a long time
> and collected a long list of its problems below.
> Later I could try to help fixing all these issues:


Great.
> 1. diff-goto-line doesn't work with 'C-x v D'

Right, that is the vc-root-diff command. As I said before in my
understanding Davis patch is just suited for a one-file-analysis. So
that could later be added

> 2. 'C-c C-d' (log-edit-show-diff) leaves point at end, should leave at beginning

Oh, I admit it is the first time I come across that command (or I have used it in the past and forgot it).

When I try it out I obtain 
,----
| Debugger entered--Lisp error: (error "Diff functionality has not been setup")
|   signal(error ("Diff functionality has not been setup"))
|   error("Diff functionality has not been setup")
|   #f(compiled-function () #<bytecode 0x9abeb64133bec99>)()
|   log-edit-show-diff()
|   funcall-interactively(log-edit-show-diff)
|   apply(funcall-interactively log-edit-show-diff nil)
|   repeat-complex-command(1)
|   funcall-interactively(repeat-complex-command 1)
|   call-interactively(repeat-complex-command nil nil)
|   command-execute(repeat-complex-command)
`----

The documentation of that function is sparse to say the least.
Could that be a git only thing?
That is getting a bit off topic but any advice would be appreciated.


> 3. It should be customizable

> 4. This feature is unusable with 'C-c C-d' (log-edit-show-diff):

> 5. Often when committing a change 'C-c C-d' (log-edit-show-diff)
>    displays only the end of the diff buffer, so some parts of the diff
>    might be committed unnoticed.  This is because 'diff-goto-line'
>    moves point to some random place in the diff output.  It's difficult
>    to understand its logic, why it decides to move to the middle of the
>    multi-file diff.
>    Sometimes displaying the end of the diff buffer makes an impression
>    that it's a complete diff buffer, thus a danger to miss the
>    beginning of the partially hidden diff buffer.

> 6. 'C-c C-d' (log-edit-show-diff)
>    read-file-name("Use file /dev/null: " "/dev/" "/dev/null" t "null")
>    diff-find-file-name()
>    diff-goto-line("Makefile" 33 0)

I need to set this up to reproduce it

> 7. on the last hunk it signals the error: "user-error: No next hunk"

> 8. compilation warnings:
>    vc/diff-mode.el:706:1: Warning: Unused lexical variable `i'
>    vc/diff-mode.el:733:30: Warning: reference to free variable

Well that was written in 2016 without lexical binding I suppose

> 9. signals an error:

> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   string-to-number(nil)
>   (let ((start (string-to-number (match-string 3))) (len (string-to-number (match-string 4))))
>   (cond ((eobp) nil) ((looking-at diff-hunk-header-re-unified
>   (progn (condition-case nil (diff-hunk-next)
>   (while (progn (condition-case nil (diff-hunk-next)
>   (if (eobp) (goto-char (point-min)) (forward-line -1) (while
>   diff-goto-line("manifest.js" 1 0)
>   apply(diff-goto-line ("manifest.js" 1 0))
>   vc-diff-finish

I can reproduce this. Can you give me a recipe


Uwe 
[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51215; Package emacs. (Mon, 01 Nov 2021 08:43:01 GMT) Full text and rfc822 format available.

Message #32 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#51215: Add a navigation feature to vc and diff mode:
 diff-goto-line
Date: Mon, 01 Nov 2021 09:41:43 +0100
[Message part 1 (text/plain, inline)]
>>> "JL" == Juri Linkov <juri <at> linkov.net> writes:

>>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36526
>>> Is a different patch than the one I committed. Mine (=Davis) does not
>>> touch the vc-root-diff command it is on a strict one-file base and
>>> therefore simpler.
>>> Why not apply «mine» and if there is sufficient interest switch to 36526?
>> 
>> Read further down, we've discussed (unfortunately briefly) Davis's patch
>> closer to the end: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36526#53
>> 
>> I don't object to applying it, but like I said, it needs someone to
>> champion it, do a proper review. I don't have the time or interest at the
>> moment.

> I have been using Davis's patch for a long time
> and collected a long list of its problems below.
> Later I could try to help fixing all these issues:

> 1. diff-goto-line doesn't work with 'C-x v D'

> 2. 'C-c C-d' (log-edit-show-diff) leaves point at end, should leave at beginning


Ok I figured that function out, now. It is in the vc-log buffer. I find 
(diff-hl-diff-goto-hunk much more useful but that is a question of
taste).

I cannot reproduce the behavior you describe in my workflow.

The pointer is neither at the end nor at the beginning but on some hunk (I
did not figured out, why to this particular hunk). Are you saying the
default behavior is that is should jump to the beginning of the diff
buffer? Hm seems odd to me.

There is another issue: Dmitry's very nice diff-hl pkg seems to have
implemented lately a very similar feature that the one provided by Davis patch.

However, I am struggling currently with this new functionality in some
circumstances and I am in contact with him to resolve it.

In case diff-hg finally works as expected, the question is then: should
Davis patch or an improved version of it still be  included in GNU emacs vanilla?

Uwe  
[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51215; Package emacs. (Mon, 01 Nov 2021 19:39:02 GMT) Full text and rfc822 format available.

Message #35 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#51215: Add a navigation feature to vc and diff mode:
 diff-goto-line
Date: Mon, 01 Nov 2021 21:32:07 +0200
Hi Uwe,

> I did not see your message, thanks very much for this detailed information

My messages sent to the maillist get lost, so I will try to send again, sorry.




Removed tag(s) patch. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 10 Sep 2022 05:13:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51215; Package emacs. (Sat, 10 Sep 2022 05:14:01 GMT) Full text and rfc822 format available.

Message #40 received at 51215 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 51215 <at> debbugs.gnu.org
Subject: Re: bug#51215: Add a navigation feature to vc and diff mode:
 diff-goto-line
Date: Sat, 10 Sep 2022 07:13:20 +0200
Uwe Brauer <oub <at> mat.ucm.es> writes:

> There is another issue: Dmitry's very nice diff-hl pkg seems to have
> implemented lately a very similar feature that the one provided by Davis patch.
>
> However, I am struggling currently with this new functionality in some
> circumstances and I am in contact with him to resolve it.
>
> In case diff-hg finally works as expected, the question is then: should
> Davis patch or an improved version of it still be included in GNU
> emacs vanilla?

Reading this bug report, it seems like the proposed patch is
problematic, so it can't be applied as is, at least.

Was any further work done here?  Or is this no longer relevant now that
the diff-hl implements something similar?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51215; Package emacs. (Sat, 10 Sep 2022 05:16:02 GMT) Full text and rfc822 format available.

Message #43 received at 51215 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Davis Herring <herring <at> lanl.gov>, Uwe Brauer <oub <at> mat.ucm.es>,
 51215 <at> debbugs.gnu.org
Subject: Re: bug#51215: Add a navigation feature to vc and diff mode:
 diff-goto-line
Date: Sat, 10 Sep 2022 07:14:56 +0200
Uwe Brauer <oub <at> mat.ucm.es> writes:

> There is another issue: Dmitry's very nice diff-hl pkg seems to have
> implemented lately a very similar feature that the one provided by Davis patch.
>
> However, I am struggling currently with this new functionality in some
> circumstances and I am in contact with him to resolve it.
>
> In case diff-hg finally works as expected, the question is then: should
> Davis patch or an improved version of it still be included in GNU
> emacs vanilla?

Reading this bug report, it seems like the proposed patch is
problematic, so it can't be applied as is, at least.

Was any further work done here?  Or is this no longer relevant now that
the diff-hl implements something similar?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51215; Package emacs. (Sat, 10 Sep 2022 07:16:01 GMT) Full text and rfc822 format available.

Message #46 received at 51215 <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Davis Herring <herring <at> lanl.gov>, Uwe Brauer <oub <at> mat.ucm.es>,
 51215 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#51215: Add a navigation feature to vc and diff mode:
 diff-goto-line
Date: Sat, 10 Sep 2022 09:15:31 +0200
[Message part 1 (text/plain, inline)]
> Uwe Brauer <oub <at> mat.ucm.es> writes:

> Reading this bug report, it seems like the proposed patch is
> problematic, so it can't be applied as is, at least.

> Was any further work done here?  Or is this no longer relevant now that
> the diff-hl implements something similar?

I think Dmitry is more qualified to answer this. In my experience the
implementation in diff-hl covers most of (my) use cases.



-- 
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51215; Package emacs. (Sat, 10 Sep 2022 23:22:02 GMT) Full text and rfc822 format available.

Message #49 received at 51215 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Uwe Brauer <oub <at> mat.ucm.es>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Davis Herring <herring <at> lanl.gov>, 51215 <at> debbugs.gnu.org
Subject: Re: bug#51215: Add a navigation feature to vc and diff mode:
 diff-goto-line
Date: Sun, 11 Sep 2022 02:21:44 +0300
On 10.09.2022 10:15, Uwe Brauer wrote:
>> Uwe Brauer<oub <at> mat.ucm.es>  writes:
>> Reading this bug report, it seems like the proposed patch is
>> problematic, so it can't be applied as is, at least.
>> Was any further work done here?  Or is this no longer relevant now that
>> the diff-hl implements something similar?
> I think Dmitry is more qualified to answer this. In my experience the
> implementation in diff-hl covers most of (my) use cases.

I can't really answer that.

IMHO diff-hl (with its full feature set) might as well be in the default 
Emacs configuration, but I've seen few requests on emacs-devel for that 
to happen.

When the ELPA bundling feature arrives, though, it should be easy enough 
to do, if the consensus is in favor.

Until then, I'd say this feature can be worthwhile to have separately, 
but someone(tm) should really work on the patch and iron out the kinks.




Severity set to 'wishlist' from 'normal' Request was from Sean Whitton <spwhitton <at> spwhitton.name> to control <at> debbugs.gnu.org. (Sat, 08 Mar 2025 03:44:04 GMT) Full text and rfc822 format available.

Merged 36526 51215. Request was from Sean Whitton <spwhitton <at> spwhitton.name> to control <at> debbugs.gnu.org. (Sat, 08 Mar 2025 03:44:04 GMT) Full text and rfc822 format available.

This bug report was last modified 101 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.