[Top][All Lists]

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

bug#37056: 26.1; file-name-absolute-p does not recognize "man:" urls

From: Lars Ingebrigtsen
Subject: bug#37056: 26.1; file-name-absolute-p does not recognize "man:" urls
Date: Fri, 23 Aug 2019 06:02:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Matthew Bauer <address@hidden> 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

reply via email to

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