bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61449: 30.0.50; diff-hl-dired: Consider adding a cookie to diff-hl-d


From: Dmitry Gutov
Subject: bug#61449: 30.0.50; diff-hl-dired: Consider adding a cookie to diff-hl-dired overlay
Date: Sun, 19 Feb 2023 01:25:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

Hi again!

On 13/02/2023 13:19, Ramesh Nedunchezian wrote:
- `diff-hl-dired-cookie` :: This is added by me, and contains the vc
   state.
- `diff-hl` :: This is added by `diff-hl-dired`, and `t` isn't much
   useful for the task I have hand.
- `before-string` :: This is added by `diff-hl-dired`, and the vc
   state is avaiable as a face property.

   If I have to get to that property, this is the kind of manoeuvre I
   need to do

     (->> x
          (memq 'before-string)
          cadr
          (get-text-property 0 'display)
          car
          (-filter 'facep)
          car)

If you add a cookie, I can do whatever with it.

Mind you ... I am not saying the relevant information is /not/ there;
I am only saying that it is buried too deep, and not readily accessible.

Thank you for the extra clarification.

I've added a new overlay property 'diff-hl-dired-type' in https://github.com/dgutov/diff-hl/commit/d20f16bf5eadd66e775f215e800f25caddae8cb5.

It the same as you asked, I think, except with a different name.

Due to the version bump, it should be out soon in diff-hl 1.9.2.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]