From mboxrd@z Thu Jan 1 00:00:00 1970
From: Kevin Brubeck Unhammer
Subject: Re: synctex!! ...syncorg?
Date: Thu, 2 Sep 2010 21:50:02 +0200
Message-ID:
References:
<87occgz006.fsf@gnu.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Return-path:
Received: from [140.186.70.92] (port=42137 helo=eggs.gnu.org)
by lists.gnu.org with esmtp (Exim 4.43) id 1OrFnk-0003Fu-MB
for emacs-orgmode@gnu.org; Thu, 02 Sep 2010 15:50:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
(envelope-from ) id 1OrFnj-0001CG-Jd
for emacs-orgmode@gnu.org; Thu, 02 Sep 2010 15:50:24 -0400
Received: from mail-qw0-f41.google.com ([209.85.216.41]:55684)
by eggs.gnu.org with esmtp (Exim 4.69)
(envelope-from ) id 1OrFnj-0001C8-HQ
for emacs-orgmode@gnu.org; Thu, 02 Sep 2010 15:50:23 -0400
Received: by qwf7 with SMTP id 7so1277454qwf.0
for ; Thu, 02 Sep 2010 12:50:22 -0700 (PDT)
In-Reply-To: <87occgz006.fsf@gnu.org>
List-Id: "General discussions about Org-mode."
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org
Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org
To: Bastien
Cc: org-mode Mailinglist
2010/9/2 Bastien :
> Kevin Brubeck Unhammer writes:
>
>> But now the obvious question is: does there exist a "syncorg" to
>> transport me back into the org-mode file to the point that corresponds
>> to that place in the tex-file? I assume it should be possible since
>> org-mode outputs these \label{sec-3.3} things...
>
> Very dumb and stupid proof-of-nothing:
>
> (defun bzg/search-point-in-latex-source ()
> =A0"Switch to an Org's sister LaTeX file and find text at point."
> =A0(interactive)
> =A0(let ((txt (buffer-substring
> =A0 =A0 =A0 =A0 =A0 =A0 =A0(point) (save-excursion (forward-word 3) (poin=
t))))
> =A0 =A0 =A0 =A0(lfn (concat (file-name-sans-extension (buffer-file-name))=
".tex")))
> =A0 =A0(find-file-other-window lfn)
> =A0 =A0(goto-char (point-min))
> =A0 =A0(search-forward txt)))
>
> But using isearch might be fast enough, isn't it?
>
> After all, it's just text.
Yeah... I guess for anything truly robust, the exported tex-file would
have to be peppered with comments (alternatively output another file
with line-number correspondences).
best regards,
Kevin