emacs-devel
[Top][All Lists]
Advanced

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

Re: Two feature ideas for diffs


From: Michael Heerdegen
Subject: Re: Two feature ideas for diffs
Date: Fri, 08 Nov 2013 23:58:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Hi all,

> Check out https://github.com/dgutov/diff-hl

That's nice.

In addition, I would like to see the vc state in the mode-line.  I see
"Git-master" in the mode-line and a mouse echo telling the state ("Up to
date"; "Locally modified" etc.).  But I want to see the state from the
indicator - preferably by using faces.  I tried to use this in
`mode-line-format' (using my own faces):

(vc-mode (:eval (propertize vc-mode 'face
                  (pcase (vc-state buffer-file-truename)
                    (`up-to-date 'mode-line-important)
                    (`edited                      nil)
                    (_             'mode-line-warning)))))

But that doesn't work.  The state is never refreshed, I need to restart
Emacs.  (vc-state buffer-file-truename) seems to return the same value
for the entire Emacs session.  I'm not familiar with the VC code - how
can it be done?  And shouldn't vc-state return an up-to-date value (bug)?


Thanks,

Michael.

 




reply via email to

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