dash-docs-el / helm-dash

Browse Dash docsets inside emacs
510 stars 59 forks source link

Invalidly quoted urls in docset #174

Open politza opened 5 years ago

politza commented 5 years ago

I downloaded the GLib docset and if I browse the help for e.g. the function g_hash_table_new, the browser is opened with a URL like

file:///long/boring/path/glib-Hash-Tables.html#//apple_ref/func/g%%5Fhash%%5Ftable%%5Fnew

Note the doubled percent characters. While eww does not seem to have problems with this, firefox just ignores the anchor and displays the page at the top, instead of scrolling to the desired function.

Is the docset broken ?

kidd commented 5 years ago

I couldn't reproduce it as works fine here both using eww and browse-url in linux.

It looks like some double escaping as %%5f is the underscore character... Which OS as you using?

politza commented 5 years ago

Archlinux

The strange thing is, now I can't reproduce the doubled percents anymore. But now I noticed, that letting Emacs open the URL using xdg-open, it still ignores the anchor part of if. So choosing an explicit browse-url-browser-function seems to fix it for me.

I think we can close this for now, thanks.

kidd commented 5 years ago

maybe xdg-open uses a shell inside, and '#' is interpreted as a comment.

...All those things are lots of fun....

politza commented 5 years ago

I never even use that program. I was just testing some packages with emacs -Q.