From: Dmitry Gutov <dmitry@gutov.dev>
To: Spencer Baugh <sbaugh@janestreet.com>, 68546@debbugs.gnu.org
Subject: bug#68546: 29.1.90; end-of-file has incorrect data when signaled within a load
Date: Wed, 17 Jan 2024 22:55:41 +0200 [thread overview]
Message-ID: <797f3211-068f-4b7f-bb34-f3c9ee12241b@gutov.dev> (raw)
In-Reply-To: <ierle8nye6u.fsf@igm-qws-u22796a.mail-host-address-is-not-set>
On 17/01/2024 21:04, Spencer Baugh wrote:
> As one particular example of the confusing current behavior, a user had
> corrupted their ~/.emacs.d/projects so that reading it failed. Also,
> they had a call to (project-forget-zombie-projects) in their init.el.
> In combination, this meant Emacs startup errored with:
>
> End of file during parsing:/home/user/.emacs.d/init.el
>
> even though there was no syntax error in init.el at all.
Would something like this help with this particular sub-problem?
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index a6f14a0865c..196a82757b2 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1694,7 +1694,9 @@ project--read-project-list
(let ((name (car elem)))
(list (if (file-remote-p name) name
(abbreviate-file-name name)))))
- (read (current-buffer))))))
+ (condition-case nil
+ (read (current-buffer))
+ (end-of-file (warn "Failed to read the projects list
file")))))))
(unless (seq-every-p
(lambda (elt) (stringp (car-safe elt)))
project--list)
next prev parent reply other threads:[~2024-01-17 20:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 19:04 bug#68546: 29.1.90; end-of-file has incorrect data when signaled within a load Spencer Baugh
2024-01-17 20:55 ` Dmitry Gutov [this message]
2024-01-25 14:05 ` Spencer Baugh
2024-01-25 14:12 ` Spencer Baugh
2024-01-26 0:55 ` Dmitry Gutov
2024-01-25 14:29 ` Eli Zaretskii
2024-01-26 0:45 ` Dmitry Gutov
2024-01-26 0:54 ` Dmitry Gutov
2024-02-16 21:56 ` Spencer Baugh
2024-02-17 7:14 ` Eli Zaretskii
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=797f3211-068f-4b7f-bb34-f3c9ee12241b@gutov.dev \
--to=dmitry@gutov.dev \
--cc=68546@debbugs.gnu.org \
--cc=sbaugh@janestreet.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.