* internal links don't match other links
@ 2007-01-15 17:28 Scott Otterson
2007-01-15 21:06 ` DSPAM " Bastien
2007-01-15 21:21 ` Carsten Dominik
0 siblings, 2 replies; 5+ messages in thread
From: Scott Otterson @ 2007-01-15 17:28 UTC (permalink / raw)
To: emacs-orgmode
In org-mode 4.61, internal links don't match on external link
description text. Here's an example org file
--------------------------
* head1
an internal link that should match the external link: [[BBC story]]
* head2
[[http://news.bbc.co.uk/2/hi/americas/6262555.stm][BBC story]]
* head3
--------------------------
The behavior I was expecting was that a C-c C-o on the text "BBC story"
under head1 would move the cursor to the link under head2.
When I'm writing big org files, I often create one headline per article
I've read, and underneath it, I put an external link to the article and
a bunch of text summarizing what I found interesting about it. In other
parts of the outline, I've tried to use internal links to refer to that
headline but I can't get it to work.
Scott
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: DSPAM internal links don't match other links
2007-01-15 17:28 internal links don't match other links Scott Otterson
@ 2007-01-15 21:06 ` Bastien
2007-01-15 21:21 ` Carsten Dominik
1 sibling, 0 replies; 5+ messages in thread
From: Bastien @ 2007-01-15 21:06 UTC (permalink / raw)
To: emacs-orgmode
Scott Otterson <scotto@u.washington.edu> writes:
> --------------------------
> * head1
> an internal link that should match the external link: [[BBC story]]
> * head2
> [[http://news.bbc.co.uk/2/hi/americas/6262555.stm][BBC story]]
> * head3
> --------------------------
>
> The behavior I was expecting was that a C-c C-o on the text "BBC
> story" under head1 would move the cursor to the link under head2.
Maybe you can use the radio button within the descriptive part of the
link:
[[http://news.bbc.co.uk/2/hi/americas/6262555.stm][<<BBC story>>]]
C-c C-o on [[BBC Story]] will jump to the radio link.
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: internal links don't match other links
2007-01-15 17:28 internal links don't match other links Scott Otterson
2007-01-15 21:06 ` DSPAM " Bastien
@ 2007-01-15 21:21 ` Carsten Dominik
2007-01-16 19:13 ` Scott Otterson
1 sibling, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2007-01-15 21:21 UTC (permalink / raw)
To: Scott Otterson; +Cc: emacs-orgmode
That is on purpose, or a link would always find itself.
- Carsten
On Jan 15, 2007, at 18:28, Scott Otterson wrote:
> In org-mode 4.61, internal links don't match on external link
> description text. Here's an example org file
>
> --------------------------
> * head1
> an internal link that should match the external link: [[BBC story]]
> * head2
> [[http://news.bbc.co.uk/2/hi/americas/6262555.stm][BBC story]]
> * head3
> --------------------------
>
> The behavior I was expecting was that a C-c C-o on the text "BBC
> story" under head1 would move the cursor to the link under head2.
>
> When I'm writing big org files, I often create one headline per
> article I've read, and underneath it, I put an external link to the
> article and a bunch of text summarizing what I found interesting about
> it. In other parts of the outline, I've tried to use internal links
> to refer to that headline but I can't get it to work.
>
> Scott
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: internal links don't match other links
2007-01-15 21:21 ` Carsten Dominik
@ 2007-01-16 19:13 ` Scott Otterson
0 siblings, 0 replies; 5+ messages in thread
From: Scott Otterson @ 2007-01-16 19:13 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Can't a self-match just be excluded from the list of matches? I don't
know elisp regexps but in perl, the regexp would be:
$match = $string =~/$description/ && $string !~ /\[\[$description\]\]/;
This would match on $description in plain text or in external links and
would exclude internal links. This would be perfect for my uses
although it's somewhat inconsistent because internal self links match on
any plain text and this would be broadening that to only one type of
link. On the other hand, the current behavior is also inconsistent
(doesn't match on any links). For perfect consistency, I guess you
could match on everything and then filter match positions to remove self
matches. This is probably harder, anyway, I think the semi-consistent
approach is likely to be better for most use cases.
Well, you have excellent user interface taste, so I won't complain if
you don't think this is worth your time!
Scott
Carsten Dominik (1/15/2007 1:21 PM) wrote:
> That is on purpose, or a link would always find itself.
>
> - Carsten
>
> On Jan 15, 2007, at 18:28, Scott Otterson wrote:
>
>> In org-mode 4.61, internal links don't match on external link
>> description text. Here's an example org file
>>
>> --------------------------
>> * head1
>> an internal link that should match the external link: [[BBC story]]
>> * head2
>> [[http://news.bbc.co.uk/2/hi/americas/6262555.stm][BBC story]]
>> * head3
>> --------------------------
>>
>> The behavior I was expecting was that a C-c C-o on the text "BBC
>> story" under head1 would move the cursor to the link under head2.
>>
>> When I'm writing big org files, I often create one headline per
>> article I've read, and underneath it, I put an external link to the
>> article and a bunch of text summarizing what I found interesting
>> about it. In other parts of the outline, I've tried to use internal
>> links to refer to that headline but I can't get it to work.
>>
>> Scott
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* internal links don't match other links
@ 2007-01-15 17:26 Scott Otterson
0 siblings, 0 replies; 5+ messages in thread
From: Scott Otterson @ 2007-01-15 17:26 UTC (permalink / raw)
To: emacs-orgmode
In org-mode 4.61, internal links don't match on external link
description text. Here's an example org file
--------------------------
* head1
an internal link that should match the external link: [[BBC story]]
* head2
[[http://news.bbc.co.uk/2/hi/americas/6262555.stm][BBC story]]
* head3
--------------------------
The behavior I was expecting was that a C-c C-o on the text "BBC story"
under head1 would move the cursor to the link under head2.
When I'm writing big org files, I often create one headline per article
I've read, and underneath it, I put an external link to the article and
a bunch of text summarizing what I found interesting about it. In other
parts of the outline, I've tried to use internal links to that headline
but I can't get it to work.
Scott
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-01-16 19:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-15 17:28 internal links don't match other links Scott Otterson
2007-01-15 21:06 ` DSPAM " Bastien
2007-01-15 21:21 ` Carsten Dominik
2007-01-16 19:13 ` Scott Otterson
-- strict thread matches above, loose matches on Subject: below --
2007-01-15 17:26 Scott Otterson
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).