emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] synctex!! ...syncorg?


From: Kevin Brubeck Unhammer
Subject: Re: [Orgmode] synctex!! ...syncorg?
Date: Thu, 2 Sep 2010 21:50:02 +0200

2010/9/2 Bastien <address@hidden>:
> Kevin Brubeck Unhammer <address@hidden> 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 ()
>  "Switch to an Org's sister LaTeX file and find text at point."
>  (interactive)
>  (let ((txt (buffer-substring
>              (point) (save-excursion (forward-word 3) (point))))
>        (lfn (concat (file-name-sans-extension (buffer-file-name)) ".tex")))
>    (find-file-other-window lfn)
>    (goto-char (point-min))
>    (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



reply via email to

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