emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Rainer M Krug <r.m.krug@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: [babel] Links in tangled file - howto jump to .org?
Date: Sun, 17 Oct 2010 11:39:38 -0600	[thread overview]
Message-ID: <8762x090rp.fsf@gmail.com> (raw)
In-Reply-To: <AANLkTinmxQ2Zz1VdCqPU7LhqLdg1aMh=2pqdPiViQ2kB@mail.gmail.com> (Rainer M. Krug's message of "Sun, 17 Oct 2010 14:45:06 +0200")

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

      reply	other threads:[~2010-10-17 17:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-17 12:45 [babel] Links in tangled file - howto jump to .org? Rainer M Krug
2010-10-17 17:39 ` Eric Schulte [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8762x090rp.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=r.m.krug@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).