GNU bug report logs -
#37056
26.1; file-name-absolute-p does not recognize "man:" urls
Previous Next
Reported by: Matthew Bauer <mjbauer95 <at> gmail.com>
Date: Fri, 16 Aug 2019 16:57:01 UTC
Severity: minor
Tags: fixed
Found in version 26.1
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> mouse.gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Matthew Bauer <mjbauer95 <at> gmail.com> writes:
> file-name-absolute-p does not recognize URLs like
> "man:systemd-timesyncd.service(8)" as absolute. For instance, try this:
>
>> (file-name-absolute-p "man:systemd-timesyncd.service(8)")
> nil
>
> This should be considered an absolute URL, and not be relativized. This
> interferes with browse-url where this is done:
>
>> (when (and url-handler-mode (not (file-name-absolute-p url)))
>> (setq url (expand-file-name url)))
>
> so "man:systemd-timesyncd.service(8)" becomes:
>
>> (expand-file-name "man:systemd-timesyncd.service(8)")
> "/home/USER/man:systemd-timesyncd.service(8)"
>
> Below is diff to update browse-url function to handle this.
[...]
> - (when (and url-handler-mode (not (file-name-absolute-p url)))
> + (when (and url-handler-mode
> + (not (file-name-absolute-p url))
> + (not (string-match "\\`[a-z]+:" url)))
Makes sense. The patch was mangled by Gmail during transport (as
usual), so I had to apply it manually. In the future, attaching patches
as attachments is probably the best thing if Gmail can't be avoided.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 5 years and 357 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.