From: Lars Ingebrigtsen <larsi@gnus.org>
To: Kevin Brubeck Unhammer <unhammer@fsfe.org>
Cc: 39235@debbugs.gnu.org
Subject: bug#39235: 26.3; SHR: base handling errors on "."
Date: Thu, 20 Feb 2020 15:15:25 +0100 [thread overview]
Message-ID: <87eeup4a6a.fsf@gnus.org> (raw)
In-Reply-To: <87wo9j7h0h.fsf@trigram.no> (Kevin Brubeck Unhammer's message of "Wed, 22 Jan 2020 14:33:18 +0100")
Kevin Brubeck Unhammer <unhammer@fsfe.org> writes:
> (require 'shr)
> (let ((shr-base (shr-parse-base ".")))
> (shr-expand-url "www.example.com"))
>
> errors with
>
> Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
> url-scheme-get-property(nil expand-file-name)
> url-expand-file-name("www.example.com" "./")
> shr-expand-url("www.example.com")
The bug here doesn't seem to be with "." per se, but when both the base
and the URL to be expanded have no protocol.
(let ((shr-base (shr-parse-base "/tmp")))
(shr-expand-url "foo"))
=> error
(let ((shr-base (shr-parse-base "foo:/tmp")))
(shr-expand-url "foo"))
=> "foo:foo"
(let ((shr-base (shr-parse-base "/tmp")))
(shr-expand-url "foo:foo"))
=> "foo:foo"
I've now fixed this in the url.el library in Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
prev parent reply other threads:[~2020-02-20 14:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-22 13:33 bug#39235: 26.3; SHR: base handling errors on "." Kevin Brubeck Unhammer
2020-02-20 14:15 ` Lars Ingebrigtsen [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eeup4a6a.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=39235@debbugs.gnu.org \
--cc=unhammer@fsfe.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).