emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* possible URI handling bug: verification and reporting?
@ 2009-07-30 21:36 Tom Roche
  2009-07-30 21:54 ` Bernt Hansen
  2009-07-31  1:25 ` Bastien
  0 siblings, 2 replies; 5+ messages in thread
From: Tom Roche @ 2009-07-30 21:36 UTC (permalink / raw)
  To: emacs-orgmode


I've been using org-mode for a couple weeks now and am mostly very
impressed (not to mention occasionally overwhelmed). I have noticed
one bug, however, which

0 might just be me, so perhaps other folks can try to reproduce it

1 is probably in browse-url, so I'm not sure how to report it

Anyway, the behavior concerns the following link:

http://dx.doi.org/10.1016/S1352-2310(01)00429-0

0 When I paste the link from my browser into an org-mode buffer, only
  the part before the first '('

http://dx.doi.org/10.1016/S1352-2310

  is fontified.

1 When I subsequently click on the fontified link, the URI fragment

http://dx.doi.org/10.1016/S1352-2310

  gets passed to my browser. (Being a fragment, it 404s, though the
  full link above does not.)

FWIW I'm running

org-version="Org-mode version 6.28e"

emacs-version="GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.14.1)
of 2008-09-05 on vernadsky, modified by Ubuntu"

ubuntu-version="Ubuntu 9.04"

linux-kernel-version="2.6.28-14-generic i686"

HTH, Tom Roche <Tom_Roche@pobox.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: possible URI handling bug: verification and reporting?
  2009-07-30 21:36 possible URI handling bug: verification and reporting? Tom Roche
@ 2009-07-30 21:54 ` Bernt Hansen
  2009-07-31  1:27   ` Bastien
  2009-07-31  1:25 ` Bastien
  1 sibling, 1 reply; 5+ messages in thread
From: Bernt Hansen @ 2009-07-30 21:54 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Tom Roche

Tom Roche <Tom_Roche@pobox.com> writes:

> I've been using org-mode for a couple weeks now and am mostly very
> impressed (not to mention occasionally overwhelmed). I have noticed
> one bug, however, which
>
> 0 might just be me, so perhaps other folks can try to reproduce it
>
> 1 is probably in browse-url, so I'm not sure how to report it
>
> Anyway, the behavior concerns the following link:
>
> http://dx.doi.org/10.1016/S1352-2310(01)00429-0
>
> 0 When I paste the link from my browser into an org-mode buffer, only
>   the part before the first '('

I think the parenthesis should be URL encoded to be a valid URL.

Change ( to %28 and ) to %29 and you get 

http://dx.doi.org/10.1016/S1352-2310%2801%2900429-0

which works for me (at least it doesn't 404 anymore)

Gnus also stops the fontification at the ( so I don't think this is
org-mode specific.

-Bernt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: possible URI handling bug: verification and reporting?
  2009-07-30 21:36 possible URI handling bug: verification and reporting? Tom Roche
  2009-07-30 21:54 ` Bernt Hansen
@ 2009-07-31  1:25 ` Bastien
  1 sibling, 0 replies; 5+ messages in thread
From: Bastien @ 2009-07-31  1:25 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Tom Roche

Tom Roche <Tom_Roche@pobox.com> writes:

> http://dx.doi.org/10.1016/S1352-2310(01)00429-0
>
> 0 When I paste the link from my browser into an org-mode buffer, only
>   the part before the first '('
>
> http://dx.doi.org/10.1016/S1352-2310
>
>   is fontified.

Fixed, thanks.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: possible URI handling bug: verification and reporting?
  2009-07-30 21:54 ` Bernt Hansen
@ 2009-07-31  1:27   ` Bastien
  2009-08-03  4:37     ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2009-07-31  1:27 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Tom Roche, emacs-orgmode

Bernt Hansen <bernt@norang.ca> writes:

> I think the parenthesis should be URL encoded to be a valid URL.
>
> Change ( to %28 and ) to %29 and you get 
>
> http://dx.doi.org/10.1016/S1352-2310%2801%2900429-0
>
> which works for me (at least it doesn't 404 anymore)
>
> Gnus also stops the fontification at the ( so I don't think this is
> org-mode specific.

Org-mode explicitely excluded parentheses from `org-plain-link-re' so
yes, it was org-mode specific.  And (browse-url-url-at-point) was not
confused either by parentheses, so org-mode needed to be fixed (and
perhaps Gnus needs too!)

best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: possible URI handling bug: verification and reporting?
  2009-07-31  1:27   ` Bastien
@ 2009-08-03  4:37     ` Carsten Dominik
  0 siblings, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2009-08-03  4:37 UTC (permalink / raw)
  To: Bastien; +Cc: Bernt Hansen, emacs-orgmode, Tom Roche


On Jul 31, 2009, at 3:27 AM, Bastien wrote:

> Bernt Hansen <bernt@norang.ca> writes:
>
>> I think the parenthesis should be URL encoded to be a valid URL.
>>
>> Change ( to %28 and ) to %29 and you get
>>
>> http://dx.doi.org/10.1016/S1352-2310%2801%2900429-0
>>
>> which works for me (at least it doesn't 404 anymore)
>>
>> Gnus also stops the fontification at the ( so I don't think this is
>> org-mode specific.
>
> Org-mode explicitely excluded parentheses from `org-plain-link-re' so
> yes, it was org-mode specific.  And (browse-url-url-at-point) was not
> confused either by parentheses, so org-mode needed to be fixed (and
> perhaps Gnus needs too!)

The reason why Org (and probably GNUS) exclude parenthesis from
plain links it to make them good citizens in plain text.  Identifying
a plain link is a heuristic matter, and it seemed to me that
more often is a link the last thing in a pair of parenthesis than are
parenthesis part of a link.  To cover links with special characters,
Org has the <link> and [[link]] formats.

So I have reverted this change and will keep it this way unless
convinced/overruled by more discussion about the issue.

- Carsten

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-08-03  4:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-30 21:36 possible URI handling bug: verification and reporting? Tom Roche
2009-07-30 21:54 ` Bernt Hansen
2009-07-31  1:27   ` Bastien
2009-08-03  4:37     ` Carsten Dominik
2009-07-31  1:25 ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).