Subject: bug#50307: 28.0.50; project-find-file fails if VC backend doesn't implement ignore-completion-table

From: Philip Kaludercic <[email-masked]>
Date: Tue, 31 Aug 2021 20:30:25 +0000

If a VC backend doesn't implement ignore-completion-table (for example
vc-fossil), a lot of project.el commands cannot be used. This patch
catches the vc-not-supported signal that vc throws in that case, fixing
the issue:

>From 33e23d5646d130c8145e54807259941865208524 Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <[email-masked]>
Date: Tue, 31 Aug 2021 22:24:02 +0200
Subject: [PATCH] Avoid failing if vc backend doesn't implement
 ignore-completion-table

* project.el (project-ignores): Handle vc-not-supported signals
---
 lisp/progmodes/project.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 76644cc934..c1a97b1d0f 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -604,7 +604,9 @@ project-ignores
                  (replace-match "./" t t entry 1)
                (concat "./" entry)))
             (t entry)))
-         (vc-call-backend backend 'ignore-completion-table root))))
+         (condition-case nil
+             (vc-call-backend backend 'ignore-completion-table root)
+           (vc-not-supported () nil)))))
      (project--value-in-dir 'project-vc-ignores root)
      (mapcar
       (lambda (dir)
-- 
2.30.2

In GNU Emacs 28.0.50 (build 7, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars)
 of 2021-08-26 built on icterid
Repository revision: b74afe63d02f126127d9211c0d1c1dc2cf5dd5bb
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure LDFLAGS=-flto 'CFLAGS=-O2 -march=native -mtune=native -pipe'
 --with-native-compiler'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11
XDBE XIM XPM LUCID ZLIB

Important settings:
  value of $EMACSLOADPATH: 
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Git-Log-View

Minor modes in effect:
  icomplete-mode: t
  fido-mode: t
  vc-parent-buffer: project.el
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  rcirc-track-minor-mode: t
  display-time-mode: t
  winner-mode: t
  windmove-mode: t
  electric-pair-mode: t
  recentf-mode: t
  save-place-mode: t
  savehist-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  temp-buffer-resize-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/philip/.config/emacs/elpa/transient-0.3.6/transient hides /home/philip/Code/src/emacs/lisp/transient
~/.config/emacs/site-lisp/autoload hides /home/philip/Code/src/emacs/lisp/emacs-lisp/autoload

Features:
(shadow emacsbug avy icomplete python tramp-sh tramp tramp-loaddefs
trampver tramp-integration files-x tramp-compat ls-lisp find-dired
apropos grep reposition eglot array jsonrpc modula2 smie edebug pulse
go-mode find-file etags fileloop xref help-at-pt 0x0 cl-print dictionary
dictionary-connection org-duration diary-lib diary-loaddefs cal-iso
quail org-agenda whitespace org-capture org-refile cal-move shortdoc
vc-annotate vc-filewise markdown-mode color shell-command+ flow-fill
mailalias bbdb-pgp bbdb-message autocrypt-message smiley gnus-cite
mail-extr gnus-async gnus-bcklg sort gnus-ml autocrypt-gnus autocrypt qp
nndraft nnmh epa-file nnmaildir nnfolder bbdb-gnus bbdb-mua bbdb-com
nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp
gnus-cache macrostep ert debug backtrace diff-hl-dired diff-hl vc-dir
ewoc tar-mode arc-mode archive-mode cus-edit cus-start mm-archive
mule-util gnutls network-stream url-http url-gw nsm url-cache url-auth
finder-inf bug-reference magit-extras face-remap magit-submodule
magit-obsolete magit-blame magit-stash magit-reflog magit-bisect
magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff
git-commit log-edit magit-core magit-autorevert autorevert filenotify
magit-margin magit-transient magit-process with-editor term disp-table
ehelp eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module
esh-groups esh-util shell server magit-mode transient magit-git
magit-section magit-utils crm dash smerge-mode org-element avl-tree
generator ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info
ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe gnus-art
mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr kinsoku svg dom
gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap
nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range message
rmc puny rfc822 mml mml-sec epa mm-decode mm-bodies mm-encode mailabbrev
gmm-utils mailheader gnus-win ol-docview doc-view jka-compr image-mode
exif ol-bibtex bibtex ol-bbdb ol-w3m org ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete
pcomplete org-list org-faces org-entities org-version ob-emacs-lisp
ob-core ob-eval org-table ol org-keys org-compat advice org-macs
org-loaddefs format-spec find-func time-stamp ffap char-fold misearch
multi-isearch add-log dired-aux pp vc-fossil vc-backup log-view
pcvs-util diff vc-mtn vc-hg vc-git diff-mode vc-bzr vc-src vc-sccs
vc-svn vc-cvs vc-rcs vc vc-dispatcher project paredit checkdoc
flymake-proc flymake warnings thingatpt flyspell ispell noutline outline
easy-mmode gnus-dired dired-x dired dired-loaddefs rcirc parse-time
iso8601 rx time bbdb bbdb-site timezone sendmail gnus nnheader gnus-util
rmail rmail-loaddefs time-date mail-utils hippie-exp winner windmove
elec-pair recentf tree-widget wid-edit saveplace savehist paren
modus-operandi-theme modus-themes holidays hol-loaddefs cal-menu
calendar cal-loaddefs cus-load setup load compile text-property-search
comint ansi-color autoload lisp-mnt mail-parse rfc2231 rfc2047 rfc2045
mm-util ietf-drums mail-prsvr tex-site geiser-impl help-fns radix-tree
geiser-custom geiser-base ring slime-autoloads info package let-alist
derived edmacro kmacro pcase cl-extra help-mode browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq
byte-opt gv bytecomp byte-compile cconv epg epg-config subr-x
cl-loaddefs cl-lib iso-transl tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar
mouse jit-lock font-lock syntax font-core term/tty-colors frame
minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite charscript charprop case-table epa-hook jka-cmpr-hook help
simple abbrev obarray cl-preloaded nadvice button loaddefs faces
cus-face macroexp files window text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo x-toolkit x multi-tty make-network-process
emacs)

Memory information:
((conses 16 961696 806349)
 (symbols 48 47137 477)
 (strings 32 189111 82914)
 (string-bytes 1 6073525)
 (vectors 16 92310)
 (vector-slots 8 1793191 806360)
 (floats 8 654 2670)
 (intervals 56 33002 13099)
 (buffers 992 86))

-- 
	Philip K.