emacs-devel
[Top][All Lists]
Advanced

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

Re: browse-url and URL handlers (MS-Windows)


From: Augusto Stoffel
Subject: Re: browse-url and URL handlers (MS-Windows)
Date: Tue, 11 Oct 2022 19:45:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

On Tue, 11 Oct 2022 at 19:36, Eli Zaretskii wrote:

> Is the below the right fix?
>
> diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
> index 91f47d0..cc3e236 100644
> --- a/lisp/url/url-parse.el
> +++ b/lisp/url/url-parse.el
> @@ -201,6 +201,9 @@ url-generic-parse-url
>           (when (looking-at "\\?")
>             (skip-chars-forward "^#"))
>           (setq file (buffer-substring save-pos (point)))
> +            (if (and (eq system-type 'windows-nt)
> +                     (string-match-p "/[A-Z]:/" file))
> +                (setq file (substring file 1)))
>           ;; 3.5 Fragment
>           (when (looking-at "#")
>             (let ((opoint (point)))

I would additionally check that the URL in question is a file:// URL.
But I'm not sure these generic URL functions are the right place to “fix”
this particular Windows weirdness.



reply via email to

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