From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Reverse lookup from pdf to org? Date: Tue, 25 Mar 2014 14:56:06 -0400 Message-ID: <871txqgla1.fsf@alphaville.bos.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSWWT-0006J4-CV for emacs-orgmode@gnu.org; Tue, 25 Mar 2014 14:56:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSWWM-0007XT-KE for emacs-orgmode@gnu.org; Tue, 25 Mar 2014 14:56:29 -0400 Received: from plane.gmane.org ([80.91.229.3]:59570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSWWM-0007XB-EB for emacs-orgmode@gnu.org; Tue, 25 Mar 2014 14:56:22 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WSWWI-0005Uh-Tc for emacs-orgmode@gnu.org; Tue, 25 Mar 2014 19:56:18 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Mar 2014 19:56:18 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Mar 2014 19:56:18 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Rainer M Krug writes: > Hi > > I am working on a longish document which will be converted to pdf, and I > am doing debugging of scripts at the moment. > > Therefore I export the document to pdf, and look for errors there. Now I > have to find the corresponding section in the org file - possible, but > tedious. > > Would it be possibler to include reverse-lookup in org, so that I click > in the pdf, and the cursor jumps to the position in the org document? I > really like this feature when e.g. using LyX. > > I have no idea how this could be implemented and if this would be > difficult, but I think this could be a useful feature for longer documents. > One more (half-)possibility is as follows: produce the tex file and compile it not with pdflatex, but with plain latex, producing a DVI file. Passing the -src option to the latex invocation inserts "source specials" into the DVI file that some DVI viewers (in particular, xdvi) can interpret to jump back from the DVI view to the (approximate) corresponding location in the tex file: latex --shell-escape -src foo.tex xdvi foo.dvi C- at a location invokes your editor of choice (presumably emacsclient) on the tex file and puts point in the general vicinity. Invoking pdflatex with -src does not elicit any complaints, so it might actually insert "source specials" in the PDF file, but even if it does I don't know if any viewer is capable of interpreting them - xpdf does not seem to be. And it also leaves you in the tex file, not in the org file - hence a half-possibility, or maybe even less. Nick