From: Juri Linkov <juri@linkov.net>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 41974@debbugs.gnu.org
Subject: bug#41974: 28.0.50; Some vc commands refuse to work when called on non-file buffer
Date: Tue, 23 Jun 2020 02:38:39 +0300 [thread overview]
Message-ID: <87eeq67k9k.fsf@mail.linkov.net> (raw)
In-Reply-To: <b61857bb-b91f-fc26-aaf3-668553d9af17@yandex.ru> (Dmitry Gutov's message of "Mon, 22 Jun 2020 03:59:38 +0300")
> How about this:
>
> diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
> index 9b12d44978..6bb72d8976 100644
> --- a/lisp/vc/vc.el
> +++ b/lisp/vc/vc.el
> @@ -1074,11 +1074,11 @@ vc-deduce-fileset
> (progn ;FIXME: Why not
> `with-current-buffer'? --Stef.
> (set-buffer vc-parent-buffer)
> (vc-deduce-fileset not-state-changing allow-unregistered
> state-model-only-files)))
> - ((and (derived-mode-p 'log-view-mode)
> + ((and (not buffer-file-name)
> (setq backend (vc-responsible-backend default-directory)))
> (list backend nil))
Thanks for finding the right place to fix, and it should also fix all
other vc commands that failed on non-file buffers.
> ((not buffer-file-name)
> - (error "Buffer %s is not associated with a file" (buffer-name)))
> + (error "Buffer %s is not recognized by any VC backend"
It seems this code is not necessary anymore because before this code
gets executed, vc-responsible-backend already signals its error
"No VC backend is responsible for file".
next prev parent reply other threads:[~2020-06-22 23:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-20 23:55 bug#41974: 28.0.50; Some vc commands refuse to work when called on non-file buffer Juri Linkov
2020-06-21 0:07 ` Dmitry Gutov
2020-06-21 22:51 ` Juri Linkov
2020-06-22 0:59 ` Dmitry Gutov
2020-06-22 23:38 ` Juri Linkov [this message]
2020-06-23 0:34 ` Dmitry Gutov
2020-06-23 23:54 ` Juri Linkov
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=87eeq67k9k.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=41974@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/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.