help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: `#` in org mode links doesn't open correctly?


From: Tim Visher
Subject: Re: `#` in org mode links doesn't open correctly?
Date: Tue, 8 Apr 2014 09:41:08 -0400

On Tue, Apr 8, 2014 at 9:11 AM, Thorsten Jolitz <tjolitz@gmail.com> wrote:
> Tim Visher <tim.visher@gmail.com> writes:
>
>> On Tue, Apr 8, 2014 at 3:51 AM, Thorsten Jolitz <tjolitz@gmail.com> wrote:
>>> Tim Visher <tim.visher@gmail.com> writes:
>>>
>>>> I'm putting together a reading list file for SICP and I'm linking
>>>> directly to the HTML version of the book.
>>>>
>>>> Many of the links include target data with them (i.e.
>>>> `link#some-target`) and when I call `org-open-at-point` it corrupts
>>>> the link by incorrectly converting `#` to `%23`.
>>>>
>>>> How can I get this to behave properly?
>>>
>>> I just switched to outorg and used C-c C-l to insert this link with
>>> Org-mode:
>>>
>>> [[http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-10.html#%25_sec_1.1.5][SICP-LINK]]
>>>
>>> which looks like this when copied from w3m:
>>>
>>> ,-------------------------------------------------------------------------
>>> |
>>> http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-10.html#%_sec_1.1.5
>>> `-------------------------------------------------------------------------
>>>
>>> but the Org link, besided being modified, works with org-open-at-point
>>> or w3m-browse-url for me, so it does not really seem to be corrupted?
>>
>> What do you mean, 'besides being modified'?
>
> I mean that the link inserted by Org is not exactly the same as the url
> you get from emacs-w3m, as you can see in the examples given above.

Ah! I hadn't spotted the `%` → `%25` the first time. Yes, this would
actually be fine, and I think even expected as % is not a legal
character on its own in a URL (maybe?) given that it's used for escape
sequences. In fact, it works for Chrome. The problem is that `#` is a
special character with special meaning and for org/emacs to url-encode
it is a mistake.

>> I'm on `GNU Emacs 24.3.1 (x86_64-apple-darwin13.0.0)`. Any chance
>> you're on a more recent version and this is a bug that was fixed? I
>> just confirmed that if I drop into fundamental mode and directly use
>> browse-url-at-point, the behavior still happens.
>
> #+begin_src emacs-lisp
> (call-interactively 'org-version)
> #+end_src
>
> #+results:
> : Org-mode version 8.2.5h (release_8.2.5h-883-ga36dde @ 
> /usr/share/emacs/24.3/lisp/org/lisp/)

Ah. I'm on an older org version:

`Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @
/usr/local/Cellar/emacs/24.3/share/e\
macs/24.3/lisp/org/)`.

Perhaps that explains it.

--

In Christ,

Timmy V.

http://blog.twonegatives.com/
http://five.sentenc.es/ -- Spend less time on mail



reply via email to

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