all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim Visher <tim.visher@gmail.com>
To: Thorsten Jolitz <tjolitz@gmail.com>
Cc: emacs <help-gnu-emacs@gnu.org>
Subject: Re: `#` in org mode links doesn't open correctly?
Date: Tue, 8 Apr 2014 09:41:08 -0400	[thread overview]
Message-ID: <CAHa53uzTuUorAWnhYj1Pabo5FZOmfpfs5nE6A+_9keWRWLS6vg@mail.gmail.com> (raw)
In-Reply-To: <8738ho0xv0.fsf@gmail.com>

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	other threads:[~2014-04-08 13:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-08  2:06 `#` in org mode links doesn't open correctly? Tim Visher
2014-04-08  7:51 ` Thorsten Jolitz
2014-04-08 12:53   ` Tim Visher
2014-04-08 13:11     ` Thorsten Jolitz
2014-04-08 13:41       ` Tim Visher [this message]
2014-04-08 14:16         ` Thorsten Jolitz
2014-04-14 17:33           ` Tim Visher
2014-04-15  9:08             ` Thorsten Jolitz
     [not found] <mailman.19188.1396922831.10748.help-gnu-emacs@gnu.org>
2014-04-08 14:11 ` Rusi

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHa53uzTuUorAWnhYj1Pabo5FZOmfpfs5nE6A+_9keWRWLS6vg@mail.gmail.com \
    --to=tim.visher@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=tjolitz@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.