[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: package-vc-install bug?
From: |
James Thomas |
Subject: |
Re: package-vc-install bug? |
Date: |
Sun, 11 Feb 2024 03:27:38 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Philip Kaludercic wrote:
> James Thomas <jimjoe@gmx.net> writes:
>
>> M-x package-vc-install RET <package> RET fails with the following on my
>> system:
>
> Does this issue occur for every package?
Yes, for every one I've tried (in my system).
> What I don't get, is what adding a newline to the end of a string should
> change?
>
> (read-from-string "((emacs \"29.1\"))") ;=> (((emacs "29.1")) . 16)
> (read-from-string "((emacs \"29.1\"\n))") ;=> (((emacs "29.1")) . 17)
The problem occurs in `package-read-from-string', not `read-from-string'
(I add the newline at the very end: "((emacs \"29.1\"))\n"):
(defun package-read-from-string (str)
"Read a Lisp expression from STR.
Signal an error if the entire string was not used."
(pcase-let ((`(,expr . ,offset) (read-from-string str)))
(condition-case ()
;; The call to `ignore' suppresses a compiler warning.
(progn (ignore (read-from-string str offset))
(error "Can't read whole string"))
(end-of-file expr))))
Because of the last line (`end-of-file') in the `condition-case'.
Regards,
James