unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ilya Ostapyshyn <ilya.ostapyshyn@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <m2o8qmisdo.fsf@gmail.com> (raw)
In-Reply-To: 4fccd048-d286-d1ee-1963-c073fa83cf8e@yandex.ru

Dmitry Gutov <dgutov@yandex.ru> 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.



  reply	other threads:[~2020-05-17 13:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-17 11:16 [PATCH] Fix vc-working-revision return nil when default-directory is not inside repo Ilya Ostapyshyn
2020-05-17 13:01 ` Dmitry Gutov
2020-05-17 13:49   ` Ilya Ostapyshyn [this message]
2020-05-17 14:17     ` Ilya Ostapyshyn
2020-05-18  0:05       ` Dmitry Gutov

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=m2o8qmisdo.fsf@gmail.com \
    --to=ilya.ostapyshyn@gmail.com \
    --cc=dgutov@yandex.ru \
    --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).