emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] internal links don't match other links


From: Scott Otterson
Subject: Re: [Orgmode] internal links don't match other links
Date: Tue, 16 Jan 2007 11:13:19 -0800
User-agent: Thunderbird 1.5.0.5 (X11/20060719)

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





reply via email to

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