From: Ship Mints <shipmints@gmail.com>
To: 72701@debbugs.gnu.org
Subject: bug#72701: eglot crash when project-files-relative-names t
Date: Sun, 18 Aug 2024 11:43:01 -0400 [thread overview]
Message-ID: <CAN+1HbrswP1WVBWsKPvXxcFwmV-VE0y3270CG_N2ScViTHWcBw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]
project-files-relative-names was introduced a few months ago, so it's no
surprise that there are some side effects when set.
This affects the handler for workspace/didChangeWatchedFiles. The result is
that dirs-to-watch...
(dirs-to-watch
(delete-dups (mapcar #'file-name-directory
(project-files
(eglot--project server))))))
...is nil when project-files-relative-names is t, due to
file-name-directory failing to parse the directories it was expecting. This
results in file-readable-p failing with a nil dir:
(watch-dir (dir)
(when-let ((probe
(and (file-readable-p dir)
One solution which I've tested is simply the defensive:
(project-files-relative-names nil) ; add this
(dirs-to-watch
(delete-dups (mapcar #'file-name-directory
(project-files
(eglot--project server))))))
-Stephane
[-- Attachment #2: Type: text/html, Size: 2132 bytes --]
next reply other threads:[~2024-08-18 15:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-18 15:43 Ship Mints [this message]
2024-08-22 17:04 ` bug#72701: eglot crash when project-files-relative-names t Ship Mints
2024-08-22 17:52 ` Eli Zaretskii
2024-08-22 17:53 ` Ship Mints
2024-08-22 20:38 ` João Távora
2024-08-23 15:07 ` Ship Mints
2024-08-23 22:49 ` João Távora
2024-08-22 23:22 ` Dmitry Gutov
2024-08-23 14:56 ` Ship Mints
2024-08-23 15:08 ` João Távora
2024-08-23 15:10 ` Ship Mints
2024-08-23 23:51 ` Dmitry Gutov
2024-09-07 7:20 ` Eli Zaretskii
2024-09-08 2:24 ` Dmitry Gutov
2024-09-08 10:56 ` João Távora
2024-09-08 20:51 ` 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=CAN+1HbrswP1WVBWsKPvXxcFwmV-VE0y3270CG_N2ScViTHWcBw@mail.gmail.com \
--to=shipmints@gmail.com \
--cc=72701@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.