unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* VC registered, but ignored
@ 2023-08-31 15:24 Eli Zaretskii
  2023-08-31 16:23 ` Dr. Arne Babenhauserheide
  2023-09-01  1:03 ` Dmitry Gutov
  0 siblings, 2 replies; 7+ messages in thread
From: Eli Zaretskii @ 2023-08-31 15:24 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: emacs-devel

In a repository where *.txt files are ignored, I added to VC a file
with the .txt extension, and was surprised to see the ':' indicator on
the mode line although the file was up-to-date.  Moreover, the tooltip
said the file was "locally modified".  That had me puzzled for a few
minutes, until I saw the code in vc-hooks.el.

So WDYT about the change below?

diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index e75165e..a4de0a6 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -87,6 +87,11 @@ vc-edited-state
   "Face for VC modeline state when the file is edited."
   :version "25.1")
 
+(defface vc-ignored-state
+  '((default :inherit vc-state-base))
+  "Face for VC modeline state when the file is registered, but ignored."
+  :version "30.1")
+
 ;; Customization Variables (the rest is in vc.el)
 
 (defcustom vc-ignore-dir-regexp
@@ -743,6 +748,10 @@ vc-default-mode-line-string
             (setq state-echo "File tracked by the VC system, but missing from the file system")
 	    (setq face 'vc-missing-state)
             (concat backend-name "?" rev))
+           ((eq state 'ignored)
+            (setq state-echo "File tracked by the VC system, but ignored")
+            (setq face 'vc-ignored-state)
+            (concat backend-name "!" rev))
 	   (t
 	    ;; Not just for the 'edited state, but also a fallback
 	    ;; for all other states.  Think about different symbols



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-09-01 11:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-31 15:24 VC registered, but ignored Eli Zaretskii
2023-08-31 16:23 ` Dr. Arne Babenhauserheide
2023-08-31 16:49   ` Eli Zaretskii
2023-09-01  1:03 ` Dmitry Gutov
2023-09-01  6:29   ` Eli Zaretskii
2023-09-01  9:16     ` Dmitry Gutov
2023-09-01 11:33       ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).