On 13/11/2022 13:06, Samuel Wales wrote:
On 11/12/22, Ihor Radchenko wrote:
I have the following in my ~/.gitconfig:

[diff "org"]
   xfuncname = "^(\\*+ +.*)$"

Thank you for sharing this. I was sure it should be possible, but I was not motivated enough to configure hunk headers for elisp and org. It seems even a shorter regexp works well
        xfuncname = "^\\*+ .*"

[core]
        attributesfile = /home/yantar92/.gitattributes

Git may find ~/.config/git/attributes without explicit configuration

this looks interesting.  i thought this stuff was just for configuring
the helper text on the hunk headers that tell you what function the
hunk is in, kind of thing.

I am unsure that it affects diff as well. Once I have experienced noisy diff on attempt to refile a subtree. Finally I did it by moving headings by small portions. It allowed to confirm changes during each steps.

Source: https://protesilaos.com/codelog/2021-01-26-git-diff-hunk-elisp-org/

idk why but this page is blank for me.  then if i try to disable
noscript restrictions, noscript says "This is a privileged page, whose
permissions cannot be configured".

Perhaps you were unlucky to fetch the page during server maintenance. Firefox-106 renders the page with active NoScript.

The approach is documented in the "Defining a custom hunk-header" section of gitattributes(5).

The value of the page is that it has a recipe for elisp (indented `cl-defstruct' is not handled though).


Reply via email to