Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: browse-url drops fragment identifier from file urls on Windows?

11 views
Skip to first unread message

Glenn Morris

unread,
Oct 29, 2012, 6:23:41 PM10/29/12
to Tom, help-gn...@gnu.org
Tom wrote:

> Try this call with a local html file with a fragment appended
> to the url (e.g. #top):
>
> (browse-url "file://localhost/stuff/a.html#top")
>
> For me the #top part is not there when the URL is opened in the
> browser.

Read these:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2543

http://www.emacswiki.org/emacs/BrowseUrl
"The problem is not one of quoting..."

> Does it happen only on Windows?

Yes.

> Is there a workaround for this?

Use a proper OS? :)

Or the wiki page has a suggestion.

Tom

unread,
Oct 30, 2012, 2:36:19 AM10/30/12
to help-gn...@gnu.org
Glenn Morris <rgm <at> gnu.org> writes:

>
> Tom wrote:
>
> > Try this call with a local html file with a fragment appended
> > to the url (e.g. #top):
> >
> > (browse-url "file://localhost/stuff/a.html#top")
> >
> > For me the #top part is not there when the URL is opened in the
> > browser.
>
> Read these:
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2543
>
> http://www.emacswiki.org/emacs/BrowseUrl
> "The problem is not one of quoting..."
>

Thanks. It's a pity it doesn't work by default. For example
one could write a function which opens documentation for
symbols under the cursor using anchors in the url, so the
browser jumps to the specific part of the doc describing
the symbol. It won't work for Windows out of the box.

Maybe a warning message should be added to browse-url,
so the user knows he has to change browse-url configuration,
otherwise URLs won't be opened at the proper place.

browse-url could print this message in the echo area
if # is used in the URL and the default browser is
invoked on Windows.


0 new messages