From: John SJ Anderson <john@genehack.org>
To: 41341@debbugs.gnu.org
Subject: bug#41341: 27.0.91; project.el 0.1.2 project-try-vc() fails in Git subdirectories; patch attached
Date: Sat, 16 May 2020 18:51:05 -0700 [thread overview]
Message-ID: <C9CEE44F-794E-49F3-A123-64CDF86CD953@genehack.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 3176 bytes --]
I upgraded packages on 16 May 2020, which resulted in project.el upgrading to v0.1.2.
I restarted Emacs and got the following stack trace:
Debugger entered--Lisp error: (file-missing "Opening input file" "No such file or directory" "/Users/genehack/proj/apollo/models/.git")
insert-file-contents("/Users/genehack/proj/apollo/models/.git")
project-try-vc("/Users/genehack/proj/apollo/models/")
run-hook-with-args-until-success(project-try-vc "/Users/genehack/proj/apollo/models/")
project--find-in-directory("/Users/genehack/proj/apollo/models/")
project-current()
eglot--maybe-activate-editing-mode()
run-hooks(change-major-mode-after-body-hook after-change-major-mode-hook)
normal-mode(t)
after-find-file(nil nil)
find-file-noselect-1(#<buffer index.js> "~/proj/apollo/models/index.js" :nowarn nil "~/proj/apollo/models/index.js" (8667578097 16777222))
find-file-noselect("/Users/genehack/proj/apollo/models/index.js" :nowarn)
desktop-restore-file-buffer("/Users/genehack/proj/apollo/models/index.js" "index.js" nil)
desktop-create-buffer(208 "/Users/genehack/proj/apollo/models/index.js" "index.js" js2-mode (eldoc-mode override-global-mode gcmh-mode global-auto-revert-mode company-mode flymake-mode projectile-mode aggressive-indent-mode flycheck-mode smartparens-mode prettier-js-mode) 1 (nil nil) nil nil ((buffer-display-time 24256 19314 922097 0) (buffer-file-coding-system . undecided-unix)) ((mark-ring nil)))
eval-buffer(#<buffer *load*> nil "/Users/genehack/.emacs.d/.emacs.desktop" nil t) ; Reading at buffer position 9385
load-with-code-conversion("/Users/genehack/.emacs.d/.emacs.desktop" "/Users/genehack/.emacs.d/.emacs.desktop" t t)
load("/Users/genehack/.emacs.d/.emacs.desktop" t t t)
desktop-read()
#f(compiled-function () #<bytecode 0x1fe27544cc95>)()
run-hooks(after-init-hook delayed-warnings-hook)
command-line()
normal-top-level()
I verified that falling back to project-0.1.el fixed the issue. Looking at the diff between 0.1 and 0.1.2, I was able to concoct the following patch, which seems to resolve the issue:
--- ./upstream-project-0.1.2.el 2020-05-16 13:51:19.000000000 -0700
+++ elpa/project-0.1.2/project.el 2020-05-16 13:50:15.000000000 -0700
@@ -275,7 +275,7 @@
;; Don't stop at submodule boundary.
(or (vc-file-getprop dir 'project-git-root)
(let* ((default-directory dir)
- (root (vc-root-dir))
+ (root (vc-find-root dir ".git/"))
(gitfile (expand-file-name ".git" root)))
(vc-file-setprop
dir 'project-git-root
Information generated by `report-emacs-bug` is below:
In GNU Emacs 27.0.91 (build 1, x86_64-apple-darwin19.3.0, NS appkit-1894.30 Version 10.15.3 (Build 19D76))
of 2020-04-25 built on phineas.home.genehack.org
Windowing system distributor 'Apple', version 10.3.1894
System Description: Mac OS X 10.15.4
Configured using:
'configure --with-gnutls=yes --without-makeinfo --with-ns CPPFLAGS=-I/usr/local/opt/libxml2/include/libxml2 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig'
[-- Attachment #2: Type: text/html, Size: 8227 bytes --]
next reply other threads:[~2020-05-17 1:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-17 1:51 John SJ Anderson [this message]
2020-05-17 12:18 ` bug#41341: 27.0.91; project.el 0.1.2 project-try-vc() fails in Git subdirectories; patch attached Dmitry Gutov
2020-05-17 12:19 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C9CEE44F-794E-49F3-A123-64CDF86CD953@genehack.org \
--to=john@genehack.org \
--cc=41341@debbugs.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.