all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: emacs-devel@gnu.org
Subject: Re: VC registered, but ignored
Date: Fri, 01 Sep 2023 09:29:27 +0300	[thread overview]
Message-ID: <83a5u6csoo.fsf@gnu.org> (raw)
In-Reply-To: <24cfce4b-25ed-b27e-05c3-4f1668ed7b34@gutov.dev> (message from Dmitry Gutov on Fri, 1 Sep 2023 04:03:43 +0300)

> Date: Fri, 1 Sep 2023 04:03:43 +0300
> Cc: emacs-devel@gnu.org
> From: Dmitry Gutov <dmitry@gutov.dev>
> 
> On 31/08/2023 18:24, Eli Zaretskii wrote:
> > 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.
> 
> You added it with 'C-x v v'?

No, from the shell prompt.  Would the result have been different if I
did that with "C-x v v"?

> We have a problem of sorts, or a break in the abstration, where 
> (vc-state buffer-file-name) would return nil instead of 'ignored.

Only if the file is not registered, right?  Most/all ignored files are
not registered, they are generated files that we don't want to see in
VC status displays.  Here I describe a situation that shouldn't
happen, but did.

The value nil is the expected value for a file that is not registered.
In the case I described above, vc-state returns 'ignored, not nil.
And the result was that, instead of seeing no VC information on the
mode line, I saw a revision ID preceded by ':', as if the file was
locally modified.

> So the problem is your annotation won't show up if you just open an 
> ignored file (for Git backend, at least). Is that okay for your purposes?

No, see above.

> As for which character to use, maybe a period? Although that depends on 
> what you want to bring attention to: usually people are happy to keep 
> ignored files ignored.

Again, the file was NOT supposed to be ignored!  I deliberately added
it to the repository, I just forgot that it had an extension of
ignored files.  (The solution, once I relized the cause, was to exempt
that one file from the otherwise ignored *.txt files.)



  reply	other threads:[~2023-09-01  6:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a5u6csoo.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.