From: Philip Kaludercic <philipk@posteo.net>
To: James Thomas <jimjoe@gmx.net>
Cc: help-gnu-emacs@gnu.org
Subject: Re: package-vc-install bug?
Date: Sun, 11 Feb 2024 09:28:41 +0000 [thread overview]
Message-ID: <87mss7z6wm.fsf@posteo.net> (raw)
In-Reply-To: <87cyt49e3x.fsf@gmx.net> (James Thomas's message of "Sun, 11 Feb 2024 03:27:38 +0530")
James Thomas <jimjoe@gmx.net> writes:
> 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).
In that case this should be reported as a bug.
>> 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 understood that, the point is that the cdr of the return value in both
cases points to the end of the string, so the second `read-from-string'
call in the `condition-case' will in both cases raise the same
`end-of-file', as is the case here:
(read-from-string "")
(read-from-string "x" 1)
> (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'.
Can you confirm this by using edebug?
> Regards,
> James
--
Philip Kaludercic
next prev parent reply other threads:[~2024-02-11 9:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 9:13 package-vc-install bug? James Thomas
2024-02-10 15:41 ` Philip Kaludercic
2024-02-10 21:57 ` James Thomas
2024-02-11 9:28 ` Philip Kaludercic [this message]
2024-02-11 12:01 ` James Thomas
[not found] <B398B849-3B09-44C7-B453-A6C3F1FB624F@hotmail.com>
2024-09-25 3:45 ` James Thomas
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=87mss7z6wm.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=help-gnu-emacs@gnu.org \
--cc=jimjoe@gmx.net \
/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.