diff-hl-dired: Handle nested file paths#270
Conversation
|
I've tried to add hook: (add-hook 'dired-subtree-after-insert-hook #'diff-hl-dired-update)But I got an error: When I'm not an elisp expert, but replacing |
fc8eb63 to
0a3df52
Compare
Resolved by introducing a Also moved |
0a3df52 to
40ea903
Compare
|
Hi! Thank you for the submission. Regarding your initial solution of using Economically, deleting the process right away to launch it with correct parameters should finish sooner. But perhaps you were still seeing errors. Try it with Emacs 31 if you can. |
Last week I've tried Emacs 31 and |
|
I see. Does adding |
Mb I can do something wrong, but I cannot see any difference, I've tried to set |
I've made some investigations around |
- Support multi-level nested paths in VC status (e.g. a/b/c.txt) - Debounce concurrent VC process calls with state machine (nil/running/pending) - Move diff-hl-dired-clear to diff-hl-dired-highlight-items to avoid flicker - Pass basename and full path to dired-goto-file-1 for nested entries
40ea903 to
73e0e62
Compare
I see. And maybe the first of the commands (which is Hmm, but looking at where the hook are called, maybe there is a simpler way. IIUC the conflict comes from diff --git a/diff-hl-dired.el b/diff-hl-dired.el
index 4a643af..aa566c7 100644
--- a/diff-hl-dired.el
+++ b/diff-hl-dired.el
@@ -86,7 +98,7 @@ status indicators."
(progn
(diff-hl-maybe-define-bitmaps)
(set (make-local-variable 'diff-hl-dired-process-buffer) nil)
- (add-hook 'dired-after-readin-hook 'diff-hl-dired-update nil t))
+ (add-hook 'dired-after-readin-hook 'diff-hl-dired-update 10 t))
(remove-hook 'dired-after-readin-hook 'diff-hl-dired-update t)
(diff-hl-dired-clear)))Although it doesn't seem necessary in my testing, but probably because of the way the hooks got settled because of the loading order. But you'll want the update happen when This config seems to work in my testing, without tracking the state of the update, or re-launching it. That should help simplify the patch. |
|
That said, and speaking of the contribution as a whole, for accumulated patches of roughly >15 lines the FSF has a process to collect copyright assignments. And diff-hl is a part of Emacs in this regard. So please LMK if you will be willing to sign such a paper (it's been done by a lot of people, and for citizens of some countries such as US and Germany, the process can be done electronically and quickly). If no - we'll need to reduce the size of the change to under 15 lines, preferably under 10 (just additions, not deletions). But with my suggestion above it might still be doable. |
- remove status state machine - add dired-after-readin-hook with priority to triggers after other hooks (e.g. dired-subtree)
It looks nice, thanks.
I've tried to reduce my patch as much as possible, but it's still more than 15 lines because of the changes to handle nested paths. Anyway, I'm willing to sign the needed paper. Could you explain how the process works in my case? I'm a citizen of Russia. |
|
Great! Thanks for testing.
I suppose that depends on how to count the changes (some lines are only different in whitespace). Still, if we go by strict definition, it's over the limit, and signing the papers will invite you to contribute to more and different parts of Emacs! ✨ ✨ ✨
Sure. You take the form linked below and send the result to the instructed email. Then you wait for the response and the subsequent instructions in the coming email (it might take a few weeks). Some countries' citizens can sign electronically, but that was not the case for Russians last I checked. So it will probably require physical mail, to send the final signed document. In any case, we won't have to wait for all of it to complete before merging the change - announcing the intention and starting the process is considered enough for the initial contributions. Savannah's CGit seems down today, so the link will be this: https://raw.githubusercontent.com/emacs-mirror/emacs/refs/heads/master/etc/copyright-assign.txt Please keep the answer to the first question unchanged (the program is "Emacs" as a whole). Thanks. |
I've sent the request to assign@gnu.org, thanks for your help. |
I've made that changes to integrate
diff-hl-diredwithdired-subtreeSome details how it works before and how it'll work after
context:
We have some changes by paths:
before: highlight only first level

after: highlight first and nested paths

Notes
For better integration with
dired-subreewe can add this hook: