From: Juri Linkov <juri@linkov.net>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 51215@debbugs.gnu.org
Subject: bug#51215: Add a navigation feature to vc and diff mode: diff-goto-line
Date: Tue, 19 Oct 2021 09:53:44 +0300 [thread overview]
Message-ID: <87lf2ple0n.fsf@mail.linkov.net> (raw)
In-Reply-To: <d2140f38-05cd-fc40-c009-4430086df235@yandex.ru> (Dmitry Gutov's message of "Tue, 19 Oct 2021 03:49:13 +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
next prev parent reply other threads:[~2021-10-19 6:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 20:42 bug#51215: Add a navigation feature to vc and diff mode: diff-goto-line Uwe Brauer
2021-10-18 1:56 ` Dmitry Gutov
2021-10-18 7:16 ` Uwe Brauer
2021-10-18 7:24 ` Uwe Brauer
2021-10-19 0:49 ` Dmitry Gutov
2021-10-19 6:53 ` Juri Linkov [this message]
2021-10-19 23:18 ` Dmitry Gutov
2021-11-01 7:24 ` Uwe Brauer
2021-11-01 19:32 ` Juri Linkov
2021-11-01 8:41 ` Uwe Brauer
2022-09-10 5:13 ` Lars Ingebrigtsen
2022-09-10 5:14 ` Lars Ingebrigtsen
2022-09-10 7:15 ` Uwe Brauer
2022-09-10 23:21 ` Dmitry Gutov
2021-10-19 0:54 ` Dmitry Gutov
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=87lf2ple0n.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=51215@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/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.