From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "João Távora" <joaotavora@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
67480@debbugs.gnu.org, Mou Tong <mou.tong@outlook.com>
Subject: bug#67480: 30.0.50; Cannot start eglot
Date: Tue, 28 Nov 2023 09:42:28 -0500 [thread overview]
Message-ID: <jwv7cm2ueqg.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83y1ej8hr6.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 27 Nov 2023 15:09:49 +0200")
> Some of these files are preloaded, so I don't understand why you see
> these messages. I suspect some problem with your build.
[ Note: This is unrelated to bug#67480. ]
No, it's a problem in `eglot.el`:
;; These dependencies are also GNU ELPA core packages. Because of
;; bug#62576, since there is a risk that M-x package-install, despite
;; having installed them, didn't correctly re-load them over the
;; built-in versions.
(eval-and-compile
(load "project")
(load "eldoc")
(load "seq")
(load "flymake")
(load "xref")
(load "jsonrpc")
(load "external-completion"))
I suspect this should be fixed the same way I proposed to fix these
kinds of problems in Org, i.e. with something like:
(defun require-with-check (feature &optional filename noerror)
"If FEATURE is not already loaded, load it from FILENAME.
This is like `require' except if FEATURE is already a member of the list
`features’, then we check if this was provided by a different file than the
one that we would load now (presumably because `load-path' has been
changed since the file was loaded)."
(let ((lh load-history)
(res (require feature filename noerror)))
;; If the `feature' was not yet provided, `require' just loaded the right
;; file, so we're done.
(if (not (eq lh load-history)) res
;; If `require' did nothing, we need to make sure that was warranted.
(let ((fn (locate-file (or filename (symbol-name feature))
load-path (get-load-suffixes))))
;; If the right file was indeed loaded already, we're done.
(if (assoc fn load-history) res
(funcall (if noerror #'warn #'error)
"Feature provided by other file: %S" feature)
res)))))
This sample code doesn't try to handle preloaded packages, so it
would/will need some tweak for that.
Stefan
next prev parent reply other threads:[~2023-11-28 14:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 8:12 bug#67480: 30.0.50; Cannot start eglot Mou Tong
2023-11-27 13:09 ` Eli Zaretskii
2023-11-28 6:06 ` Mou Tong
2023-11-28 14:24 ` Eli Zaretskii
2023-11-28 14:42 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-12-02 18:54 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-28 14:52 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-28 15:10 ` João Távora
2023-11-28 15:48 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-28 17:27 ` João Távora
2023-11-29 0:40 ` João Távora
2023-12-01 16:04 ` João Távora
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=jwv7cm2ueqg.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=67480@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=joaotavora@gmail.com \
--cc=monnier@iro.umontreal.ca \
--cc=mou.tong@outlook.com \
/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.