Skip to content

Conversation

@rynffoll
Copy link
Contributor

@rynffoll rynffoll commented Feb 8, 2026

I've made that changes to integrate diff-hl-dired with dired-subtree

Some details how it works before and how it'll work after

context:

We have some changes by paths:

go.mod
go.sum
cmd/service/main.go

before: highlight only first level
image

after: highlight first and nested paths
image

Notes

For better integration with dired-subree we can add this hook:

(add-hook 'dired-subtree-after-insert-hook #'diff-hl-dired-update)

@rynffoll
Copy link
Contributor Author

rynffoll commented Feb 8, 2026

I've tried to add hook:

(add-hook 'dired-subtree-after-insert-hook #'diff-hl-dired-update)

But I got an error:

error in process sentinel: vc-exec-after: Unexpected process state

When dired-subtree expands a subdirectory, diff-hl-dired-update is called while a previous VC process is still running. The existing code calls kill-process, which triggers the VC sentinel (vc-exec-after) with an unexpected process state.

I'm not an elisp expert, but replacing kill-process with delete-process seems to fix this - would that be the correct approach here?

@rynffoll rynffoll marked this pull request as draft February 9, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant