[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix vc-working-revision return nil when default-directory is
From: |
Ilya Ostapyshyn |
Subject: |
Re: [PATCH] Fix vc-working-revision return nil when default-directory is not inside repo |
Date: |
Sun, 17 May 2020 16:49:07 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (darwin) |
Dmitry Gutov <address@hidden> writes:
> Hi Ilya,
>
> On 17.05.2020 14:16, Ilya Ostapyshyn wrote:
>> "vc-git-mode-line-string" (which is called automatically) failed
>> occasionally with an error message (wrong-type-argument arrayp nil) when
>> the default-directory is outside the repository.
>
> Could you describe a full scenario when this can happen?
My initial-buffer-choice is "~/somedir/startup-file.org", and
emacs-startup-hook sets the default-directory to $HOME, so that it's not
"~/somedir/" after starting up emacs.
~/somedir/ is also a git repository, containing the gnus configuration
(.newsrc in particular).
I usually start gnus just after loading up emacs (to remind,
default-directory: "~", current buffer: "~/somedir/startup-file.org")
and that's the only situation when this error has happened to me. Not
every time, but often enough to be annoying. When this happens I am
unable to reach gnus until I explicitly cd into ~/somedir/ directory.
The buffer in which the error has been occuring is .newsrc-dribble
I am unsure why this does not show up consistently, but it's clear that
the cause is the mismatch of the directories. The patch has fixed the
issue for me.
I am running GNU Emacs 27.0.91 (build 2, x86_64-apple-darwin17.7.0, NS
appkit-1561.61 Version 10.13.6 (Build 17G11023)).
The issue has also appeared on Emacs 26.3.