From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: emacs-devel@gnu.org
Subject: VC registered, but ignored
Date: Thu, 31 Aug 2023 18:24:40 +0300 [thread overview]
Message-ID: <83pm33ck07.fsf@gnu.org> (raw)
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
next reply other threads:[~2023-08-31 15:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 15:24 Eli Zaretskii [this message]
2023-08-31 16:23 ` VC registered, but ignored 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83pm33ck07.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dmitry@gutov.dev \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).