* commas in URLs?
@ 2008-01-30 18:53 Adam Spiers
2008-01-31 5:43 ` Carsten Dominik
0 siblings, 1 reply; 15+ messages in thread
From: Adam Spiers @ 2008-01-30 18:53 UTC (permalink / raw)
To: org-mode mailing list
It looks like there's a regular expression somewhere which might need
tweaking, e.g. when pasting the following into an org-mode buffer:
http://reviews.cnet.co.uk/dvdpvr/0,39030416,49283669,00.htm
only the bit up to the first comma gets hyperlinked. That's with
5.17a at least - ashamed to say I haven't had a chance to upgrade yet
:-)
Thanks!
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: commas in URLs?
2008-01-30 18:53 commas in URLs? Adam Spiers
@ 2008-01-31 5:43 ` Carsten Dominik
2008-01-31 14:46 ` Adam Spiers
0 siblings, 1 reply; 15+ messages in thread
From: Carsten Dominik @ 2008-01-31 5:43 UTC (permalink / raw)
To: Adam Spiers; +Cc: org-mode mailing list
Yes, plain links are terminated by (among other) comma.
Please enclose such links into <...> or [[...]]]
- Carsten
On Jan 30, 2008, at 7:53 PM, Adam Spiers wrote:
> It looks like there's a regular expression somewhere which might need
> tweaking, e.g. when pasting the following into an org-mode buffer:
>
> http://reviews.cnet.co.uk/dvdpvr/0,39030416,49283669,00.htm
>
> only the bit up to the first comma gets hyperlinked. That's with
> 5.17a at least - ashamed to say I haven't had a chance to upgrade yet
> :-)
>
> Thanks!
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: commas in URLs?
2008-01-31 5:43 ` Carsten Dominik
@ 2008-01-31 14:46 ` Adam Spiers
2008-01-31 14:59 ` Carsten Dominik
0 siblings, 1 reply; 15+ messages in thread
From: Adam Spiers @ 2008-01-31 14:46 UTC (permalink / raw)
To: org-mode mailing list
On Thu, Jan 31, 2008 at 06:43:25AM +0100, Carsten Dominik wrote:
> Yes, plain links are terminated by (among other) comma.
>
> Please enclose such links into <...> or [[...]]]
Ah, OK thanks! Just curious - what's the reasoning behind excluding
commas?
> On Jan 30, 2008, at 7:53 PM, Adam Spiers wrote:
>
> >It looks like there's a regular expression somewhere which might need
> >tweaking, e.g. when pasting the following into an org-mode buffer:
> >
> > http://reviews.cnet.co.uk/dvdpvr/0,39030416,49283669,00.htm
> >
> >only the bit up to the first comma gets hyperlinked. That's with
> >5.17a at least - ashamed to say I haven't had a chance to upgrade yet
> >:-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: commas in URLs?
2008-01-31 14:46 ` Adam Spiers
@ 2008-01-31 14:59 ` Carsten Dominik
2008-01-31 16:29 ` Adam Spiers
2008-01-31 17:39 ` Bastien
0 siblings, 2 replies; 15+ messages in thread
From: Carsten Dominik @ 2008-01-31 14:59 UTC (permalink / raw)
To: Adam Spiers; +Cc: org-mode mailing list
On Jan 31, 2008, at 3:46 PM, Adam Spiers wrote:
> On Thu, Jan 31, 2008 at 06:43:25AM +0100, Carsten Dominik wrote:
>> Yes, plain links are terminated by (among other) comma.
>>
>> Please enclose such links into <...> or [[...]]]
>
> Ah, OK thanks! Just curious - what's the reasoning behind excluding
> commas?
So that you can write
Popular search engines are http://google.com, http://yahoo.com, and http://ask.com
.
- Carsten
>
>
>> On Jan 30, 2008, at 7:53 PM, Adam Spiers wrote:
>>
>>> It looks like there's a regular expression somewhere which might
>>> need
>>> tweaking, e.g. when pasting the following into an org-mode buffer:
>>>
>>> http://reviews.cnet.co.uk/dvdpvr/0,39030416,49283669,00.htm
>>>
>>> only the bit up to the first comma gets hyperlinked. That's with
>>> 5.17a at least - ashamed to say I haven't had a chance to upgrade
>>> yet
>>> :-)
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: commas in URLs?
2008-01-31 14:59 ` Carsten Dominik
@ 2008-01-31 16:29 ` Adam Spiers
2008-01-31 17:39 ` Bastien
1 sibling, 0 replies; 15+ messages in thread
From: Adam Spiers @ 2008-01-31 16:29 UTC (permalink / raw)
To: org-mode mailing list
On Thu, Jan 31, 2008 at 03:59:43PM +0100, Carsten Dominik wrote:
> On Jan 31, 2008, at 3:46 PM, Adam Spiers wrote:
>
> >On Thu, Jan 31, 2008 at 06:43:25AM +0100, Carsten Dominik wrote:
> >>Yes, plain links are terminated by (among other) comma.
> >>
> >>Please enclose such links into <...> or [[...]]]
> >
> >Ah, OK thanks! Just curious - what's the reasoning behind excluding
> >commas?
>
> So that you can write
>
> Popular search engines are http://google.com, http://yahoo.com, and
> http://ask.com .
Nice - agreed that that's a more common use case than the one
involving commas in URLs. Thanks again!
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: commas in URLs?
2008-01-31 14:59 ` Carsten Dominik
2008-01-31 16:29 ` Adam Spiers
@ 2008-01-31 17:39 ` Bastien
2008-01-31 18:22 ` Adam Spiers
2008-01-31 18:34 ` Carsten Dominik
1 sibling, 2 replies; 15+ messages in thread
From: Bastien @ 2008-01-31 17:39 UTC (permalink / raw)
To: Carsten Dominik; +Cc: org-mode mailing list
Carsten Dominik <dominik@science.uva.nl> writes:
>> On Thu, Jan 31, 2008 at 06:43:25AM +0100, Carsten Dominik wrote:
>>> Yes, plain links are terminated by (among other) comma.
>>>
>>> Please enclose such links into <...> or [[...]]]
>>
>> Ah, OK thanks! Just curious - what's the reasoning behind excluding
>> commas?
>
> So that you can write
>
> Popular search engines are http://google.com, http://yahoo.com, and
> http://ask.com
So URLs should just exclude commas that are followed by a whitespace or
a line break, not all commas - right? Anyway, I guess 99% of URLs are
enclosed in brackets, so it might not be worth being fussy on this...
--
Bastien
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: commas in URLs?
2008-01-31 17:39 ` Bastien
@ 2008-01-31 18:22 ` Adam Spiers
2008-01-31 18:34 ` Carsten Dominik
1 sibling, 0 replies; 15+ messages in thread
From: Adam Spiers @ 2008-01-31 18:22 UTC (permalink / raw)
To: org-mode mailing list
On Thu, Jan 31, 2008 at 06:39:19PM +0100, Bastien wrote:
> Carsten Dominik <dominik@science.uva.nl> writes:
> >> On Thu, Jan 31, 2008 at 06:43:25AM +0100, Carsten Dominik wrote:
> >>> Yes, plain links are terminated by (among other) comma.
> >>>
> >>> Please enclose such links into <...> or [[...]]]
> >>
> >> Ah, OK thanks! Just curious - what's the reasoning behind excluding
> >> commas?
> >
> > So that you can write
> >
> > Popular search engines are http://google.com, http://yahoo.com, and
> > http://ask.com
>
> So URLs should just exclude commas that are followed by a whitespace or
> a line break, not all commas - right?
Hmm, good point!
> Anyway, I guess 99% of URLs are enclosed in brackets,
Not true here, by a long shot!
$ egrep -c 'https?://' */TODO.org
work/TODO.org:78
personal/TODO.org:180
$ egrep -c '[<[]https?://' */TODO.org
work/TODO.org:8
personal/TODO.org:50
So that's 58 out of 258 enclosed in brackets, which is 22.5%.
> so it might not be worth being fussy on this...
s/not be// ;-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: commas in URLs?
2008-01-31 17:39 ` Bastien
2008-01-31 18:22 ` Adam Spiers
@ 2008-01-31 18:34 ` Carsten Dominik
2008-01-31 23:16 ` Leo
2008-02-01 8:58 ` Phil Jackson
1 sibling, 2 replies; 15+ messages in thread
From: Carsten Dominik @ 2008-01-31 18:34 UTC (permalink / raw)
To: Bastien; +Cc: org-mode mailing list
On Jan 31, 2008, at 6:39 PM, Bastien wrote:
> Carsten Dominik <dominik@science.uva.nl> writes:
>
>>> On Thu, Jan 31, 2008 at 06:43:25AM +0100, Carsten Dominik wrote:
>>>> Yes, plain links are terminated by (among other) comma.
>>>>
>>>> Please enclose such links into <...> or [[...]]]
>>>
>>> Ah, OK thanks! Just curious - what's the reasoning behind excluding
>>> commas?
>>
>> So that you can write
>>
>> Popular search engines are http://google.com, http://yahoo.com, and
>> http://ask.com
>
> So URLs should just exclude commas that are followed by a whitespace
> or
> a line break, not all commas - right?
Yes, but this is harder to do with a regexp. I wish Emacs had look-
ahead assertions like perl.
- Carsten
> Anyway, I guess 99% of URLs are
> enclosed in brackets, so it might not be worth being fussy on this...
>
> --
> Bastien
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: commas in URLs?
2008-01-31 18:34 ` Carsten Dominik
@ 2008-01-31 23:16 ` Leo
2008-01-31 23:43 ` Adam Spiers
2008-02-01 8:58 ` Phil Jackson
1 sibling, 1 reply; 15+ messages in thread
From: Leo @ 2008-01-31 23:16 UTC (permalink / raw)
To: emacs-orgmode
On 2008-01-31 18:34 +0000, Carsten Dominik wrote:
>> So URLs should just exclude commas that are followed by a
>> whitespace or
>> a line break, not all commas - right?
>
> Yes, but this is harder to do with a regexp. I wish Emacs had look-
> ahead assertions like perl.
>
> - Carsten
Maybe we can add something to the manual to avoid confusion.
--
.: Leo :. [ sdl.web AT gmail.com ] .: [ GPG Key: 9283AA3F ] :.
Use the best OS -- http://www.fedoraproject.org/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: commas in URLs?
2008-01-31 23:16 ` Leo
@ 2008-01-31 23:43 ` Adam Spiers
2008-01-31 23:59 ` Leo
0 siblings, 1 reply; 15+ messages in thread
From: Adam Spiers @ 2008-01-31 23:43 UTC (permalink / raw)
To: emacs-orgmode
On Thu, Jan 31, 2008 at 11:16:24PM +0000, Leo wrote:
> On 2008-01-31 18:34 +0000, Carsten Dominik wrote:
> >> So URLs should just exclude commas that are followed by a
> >> whitespace or a line break, not all commas - right?
> >
> > Yes, but this is harder to do with a regexp. I wish Emacs had look-
> > ahead assertions like perl.
Ach, true :-)
> Maybe we can add something to the manual to avoid confusion.
Wouldn't hurt.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: commas in URLs?
2008-01-31 23:43 ` Adam Spiers
@ 2008-01-31 23:59 ` Leo
2008-02-01 0:40 ` Adam Spiers
0 siblings, 1 reply; 15+ messages in thread
From: Leo @ 2008-01-31 23:59 UTC (permalink / raw)
To: emacs-orgmode
On 2008-01-31 23:43 +0000, Adam Spiers wrote:
>>> Yes, but this is harder to do with a regexp. I wish Emacs had look-
>>> ahead assertions like perl.
>
> Ach, true :-)
Can someone propose this feature to emacs-devel?
--
.: Leo :. [ sdl.web AT gmail.com ] .: [ GPG Key: 9283AA3F ] :.
Use the best OS -- http://www.fedoraproject.org/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: commas in URLs?
2008-01-31 23:59 ` Leo
@ 2008-02-01 0:40 ` Adam Spiers
0 siblings, 0 replies; 15+ messages in thread
From: Adam Spiers @ 2008-02-01 0:40 UTC (permalink / raw)
To: emacs-orgmode
On Thu, Jan 31, 2008 at 11:59:21PM +0000, Leo wrote:
> On 2008-01-31 23:43 +0000, Adam Spiers wrote:
> >>> Yes, but this is harder to do with a regexp. I wish Emacs had look-
> >>> ahead assertions like perl.
> >
> > Ach, true :-)
>
> Can someone propose this feature to emacs-devel?
FWIW it's in here already:
http://www.emacswiki.org/cgi-bin/wiki/WishList#toc5
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: commas in URLs?
2008-01-31 18:34 ` Carsten Dominik
2008-01-31 23:16 ` Leo
@ 2008-02-01 8:58 ` Phil Jackson
2008-02-01 15:09 ` Piotr Zielinski
1 sibling, 1 reply; 15+ messages in thread
From: Phil Jackson @ 2008-02-01 8:58 UTC (permalink / raw)
To: Carsten Dominik; +Cc: org-mode mailing list
Carsten Dominik <dominik@science.uva.nl> writes:
[...]
>> So URLs should just exclude commas that are followed by a whitespace
>> or a line break, not all commas - right?
> Yes, but this is harder to do with a regexp. I wish Emacs had look-
> ahead assertions like perl.
This is the main bother I have with emacs, I wish RMS would allow it to
be linked with PCRE or similar. It would rid us of most of those ugly
backslashes too.
Cheers,
Phil
--
Phil Jackson
http://www.shellarchive.co.uk
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: commas in URLs?
2008-02-01 8:58 ` Phil Jackson
@ 2008-02-01 15:09 ` Piotr Zielinski
2008-02-01 22:31 ` Carsten Dominik
0 siblings, 1 reply; 15+ messages in thread
From: Piotr Zielinski @ 2008-02-01 15:09 UTC (permalink / raw)
To: Phil Jackson; +Cc: org-mode mailing list
Just to to add one vote for including commas in the urls by default
(at least in some cases); I often copy long links directly from the
browser and have this problem quite often.
> >> So URLs should just exclude commas that are followed by a whitespace
> >> or a line break, not all commas - right?
>
> > Yes, but this is harder to do with a regexp. I wish Emacs had look-
> > ahead assertions like perl.
What about saying that a url cannot end with a comma, but can contain
commas? Something like [a-z,]*[a-z] (this is a big big simplication!).
Piotr
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: commas in URLs?
2008-02-01 15:09 ` Piotr Zielinski
@ 2008-02-01 22:31 ` Carsten Dominik
0 siblings, 0 replies; 15+ messages in thread
From: Carsten Dominik @ 2008-02-01 22:31 UTC (permalink / raw)
To: Piotr Zielinski; +Cc: org-mode mailing list
On Feb 1, 2008, at 4:09 PM, Piotr Zielinski wrote:
> Just to to add one vote for including commas in the urls by default
> (at least in some cases); I often copy long links directly from the
> browser and have this problem quite often.
>
>>>> So URLs should just exclude commas that are followed by a
>>>> whitespace
>>>> or a line break, not all commas - right?
>>
>>> Yes, but this is harder to do with a regexp. I wish Emacs had look-
>>> ahead assertions like perl.
>
> What about saying that a url cannot end with a comma, but can contain
> commas? Something like [a-z,]*[a-z] (this is a big big
> simplication!).
Excellent suggestion, yes, this works. Sometimes there are good ways to
work around, and in this case this works perfectly. Thanks!
- Carsten
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2008-02-01 22:32 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-30 18:53 commas in URLs? Adam Spiers
2008-01-31 5:43 ` Carsten Dominik
2008-01-31 14:46 ` Adam Spiers
2008-01-31 14:59 ` Carsten Dominik
2008-01-31 16:29 ` Adam Spiers
2008-01-31 17:39 ` Bastien
2008-01-31 18:22 ` Adam Spiers
2008-01-31 18:34 ` Carsten Dominik
2008-01-31 23:16 ` Leo
2008-01-31 23:43 ` Adam Spiers
2008-01-31 23:59 ` Leo
2008-02-01 0:40 ` Adam Spiers
2008-02-01 8:58 ` Phil Jackson
2008-02-01 15:09 ` Piotr Zielinski
2008-02-01 22:31 ` Carsten Dominik
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).