emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel] Links in tangled file - howto jump to .org?
@ 2010-10-17 12:45 Rainer M Krug
  2010-10-17 17:39 ` Eric Schulte
  0 siblings, 1 reply; 2+ messages in thread
From: Rainer M Krug @ 2010-10-17 12:45 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 991 bytes --]

Hi

I just discovered one of the mysteries I experienced with org: the appearing
ID properties.
They are caused by the back-linking of code (sitting in the file resulting
from tangling) to the actual location in the .org file which was tangled - a
REALLY nice feature.
Now I am using R (and therefore ESS), and I would like to know, how I can
jump from the .R file to the .org file? The links are not recognised in ESS
- how can I tell ESS that these are .org links?

Cheers,

Rainer


-- 
NEW GERMAN FAX NUMBER!!!

Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Cell:           +27 - (0)83 9479 042
Fax:            +27 - (0)86 516 2782
Fax:            +49 - (0)321 2125 2244
email:          Rainer@krugs.de

Skype:          RMkrug
Google:         R.M.Krug@gmail.com

[-- Attachment #1.2: Type: text/html, Size: 1269 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please 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] 2+ messages in thread

* Re: [babel] Links in tangled file - howto jump to .org?
  2010-10-17 12:45 [babel] Links in tangled file - howto jump to .org? Rainer M Krug
@ 2010-10-17 17:39 ` Eric Schulte
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2010-10-17 17:39 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: emacs-orgmode

Hi Rainer,

Rainer M Krug <r.m.krug@gmail.com> writes:

> Hi
>
> I just discovered one of the mysteries I experienced with org: the appearing
> ID properties.

Yes, I think this is caused by a recent change in the org-store-link
function which is called during tangling.

> 
> They are caused by the back-linking of code (sitting in the file
> resulting from tangling) to the actual location in the .org file which
> was tangled - a REALLY nice feature.  Now I am using R (and therefore
> ESS), and I would like to know, how I can jump from the .R file to the
> .org file? The links are not recognised in ESS - how can I tell ESS
> that these are .org links?
>

To follow a link you need only call the `org-open-at-point' function
with the point over top of the link.  As for making the links look like
org-mode links and responsive to C-c C-o, that would probably require
the creation of a new minor mode.  The creation of which while not the
most onerous of tasks escapes me at the moment, however as a temporary
workaround, you could add something like the following to your ess-mode
hook to make links stand out...

--8<---------------cut here---------------start------------->8---
(defun style-org-links ()
  (interactive)
  (font-lock-add-keywords
   nil `((,org-bracket-link-regexp
          (0 (prog1 nil
               (compose-region (match-beginning 0) (match-beginning 3)
                               "→"))))
         (,org-bracket-link-regexp
          (0 (prog1 nil
               (compose-region (match-end 3) (match-end 0)
                               "←")))))))
--8<---------------cut here---------------end--------------->8---

Best -- Eric

>
> Cheers,
>
> Rainer

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

end of thread, other threads:[~2010-10-17 17:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-17 12:45 [babel] Links in tangled file - howto jump to .org? Rainer M Krug
2010-10-17 17:39 ` Eric Schulte

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).