emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] questions about links


From: Jan Böcker
Subject: Re: [Orgmode] questions about links
Date: Mon, 09 Aug 2010 09:33:31 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6

On 08/07/2010 07:00 PM, address@hidden wrote:
> Hi guys,
> 
> Ok, if I make "foo" a link:
> 
> blah blah [[foo]] blah
> 
> it will pop over to "foo" elsewhere in the buffer.
> 
> (This is a tangent, but I see carets in the documentation, like
> "<foo>" , but they don't seem to be needed-- the link finds
> "foo" just fine)
> 
> Can I make [[foo]] link to all the foos in the buffer,
> maybe via a list with a bit of context from which to
> choose?

Try this one: [[elisp:(occur "foo")]]

"occur" is a standard emacs feature which lists all lines matching a
given regexp.

If you're going to use this, I'd recommend setting
org-confirm-elisp-link-function to 'with-y-or-n for less annoyance while
still being warned you are about to follow a link that can execute
arbitrary code.

> also, once I'm at the target, how can I return easily to
> the anchor and refold whatever section the target was in?

You can go back to where you came from using C-c &:

| C-c & runs the command org-mark-ring-goto, which is an interactive
| Lisp function in `org.el'.
|
| It is bound to C-c &.
|
| (org-mark-ring-goto &optional n)
|
| Jump to the previous position in the mark ring.
| With prefix arg n, jump back that many stored positions.  When
| called several times in succession, walk through the entire ring.
| Org-mode commands jumping to a different position in the current file,
| or to another Org-mode file, automatically push the old position
| onto the ring.

I don't know about refolding the target headline.


HTH, Jan



reply via email to

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