bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#68546: 29.1.90; end-of-file has incorrect data when signaled within


From: Dmitry Gutov
Subject: bug#68546: 29.1.90; end-of-file has incorrect data when signaled within a load
Date: Fri, 26 Jan 2024 02:45:28 +0200
User-agent: Mozilla Thunderbird

On 25/01/2024 16:29, Eli Zaretskii wrote:
Cc:68546@debbugs.gnu.org
From: Spencer Baugh<sbaugh@janestreet.com>
Date: Thu, 25 Jan 2024 09:05:19 -0500

  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)

Yes, I think that would be great.  Especially because this allows startup to 
continue.  If it's okay with
you too, I think it's reasonable to push.
I don't object to the change, of course, but perhaps we could make the
error message friendlier?  For example:

    Failed to read the projects list file due to unexpected EOF

Sure, the patch's message was more of a draft.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]