Hi, thanks for this great package!
I am using diff-hl in org buffers, and when heading is collapsed / folded, and there is a diff hunk in it, the following is true:
- There is no visual mark of diff on the left fringe/margin, if there is a diff under the heading, in its content / subtree.
- If I jump to it with
diff-hl-next-hunk, I will end up at the end of the folded heading: heading won't unfold. If I want to get to hunk, I need to unfold the heading, do diff-hl-next-hunk again, and repeat that as many times needed to get to the correct depth.
I am guessing these are not bugs, just behaviour that was never implemented? Would it be interesting to implement it?
For (1), I guess we would have to aggregate changes below and show blue if it is a mix of them. I don't know difficult is this with the current implementation?
And for (2), I would assume we need to check if we are in a foldable thing, and unfold it if we are? Ideal if there is a general concept of this in emacs that org follows with its implemetnation, if not, I still think it might be worth implementing org-specific logic where we check if we are in org buffer and then unfold if needed, due to how prevalent org is in emacs.
Although, I do guess this one could be implement also by users as advice on diff-hl-next-hunk and also prev, where we expand the whoel subtree to the place where they jumped -> still sounds nicer to have it working out of the box.
Thanks a lot, curious what you think!
EDIT: I just realized that behaviour (2) is not diff-hl specific -> it is default behaviour in org mode when you jump to a char inside of a folded heading! So nothing to do here. As for solution for it, it seems reveal-mode is the best clean solution. Still curious about (1) though!
Hi, thanks for this great package!
I am using diff-hl in org buffers, and when heading is collapsed / folded, and there is a diff hunk in it, the following is true:
diff-hl-next-hunk, I will end up at the end of the folded heading: heading won't unfold. If I want to get to hunk, I need to unfold the heading, dodiff-hl-next-hunkagain, and repeat that as many times needed to get to the correct depth.I am guessing these are not bugs, just behaviour that was never implemented? Would it be interesting to implement it?
For (1), I guess we would have to aggregate changes below and show blue if it is a mix of them. I don't know difficult is this with the current implementation?
And for (2), I would assume we need to check if we are in a foldable thing, and unfold it if we are? Ideal if there is a general concept of this in emacs that org follows with its implemetnation, if not, I still think it might be worth implementing org-specific logic where we check if we are in org buffer and then unfold if needed, due to how prevalent org is in emacs.
Although, I do guess this one could be implement also by users as advice on diff-hl-next-hunk and also prev, where we expand the whoel subtree to the place where they jumped -> still sounds nicer to have it working out of the box.
Thanks a lot, curious what you think!
EDIT: I just realized that behaviour (2) is not diff-hl specific -> it is default behaviour in org mode when you jump to a char inside of a folded heading! So nothing to do here. As for solution for it, it seems
reveal-modeis the best clean solution. Still curious about (1) though!