unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: 55357-done@debbugs.gnu.org
Subject: bug#55357: 29.0.50; [PATCH] Fix browse-url-emacs on file:// urls
Date: Wed, 11 May 2022 11:35:58 -0700	[thread overview]
Message-ID: <A89D0147-7E7D-432B-AE56-85A35F4EBE49@gmail.com> (raw)
In-Reply-To: <107F905D-8D3C-4572-8C08-17B64DFB31C1@gmail.com>



> On May 11, 2022, at 11:35 AM, Yuan Fu <casouri@gmail.com> wrote:
> 
> 
> 
>> On May 11, 2022, at 4:37 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> 
>>> Resent-From: Yuan Fu <casouri@gmail.com>
>>> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
>>> Resent-CC: bug-gnu-emacs@gnu.org
>>> Resent-Sender: help-debbugs@gnu.org
>>> From: Yuan Fu <casouri@gmail.com>
>>> Date: Wed, 11 May 2022 00:05:50 -0700
>>> 
>>> 
>>> [1:text/plain Hide]
>>> 
>>> 
>>> If you call browse-url-emacs with a file:// url, Emacs does not open the correct file:
>>> 
>>> (browse-url-emacs "file://~/a/b") opens /a/b
>>> (browse-url-emacs "file://a/b") opens /b
>>> 
>>> Basically unless the path is an absolute path, the first level is chopped because url parses it as host and throws it away. This patch concats the host back. If the path is absolute, host is empty string so it’s ok.
>> 
>> I think your URLs lack one or two more slashes. See
>> 
>> https://en.wikipedia.org/wiki/File_URI_scheme#How_many_slashes?
> 
> Ah! My bad. Closing.
> 
> Yuan
> 






      reply	other threads:[~2022-05-11 18:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11  7:05 bug#55357: 29.0.50; [PATCH] Fix browse-url-emacs on file:// urls Yuan Fu
2022-05-11  7:53 ` Andreas Schwab
2022-05-11 11:37 ` Eli Zaretskii
2022-05-11 18:35   ` Yuan Fu
2022-05-11 18:35     ` Yuan Fu [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=A89D0147-7E7D-432B-AE56-85A35F4EBE49@gmail.com \
    --to=casouri@gmail.com \
    --cc=55357-done@debbugs.gnu.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).