From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brett Viren Subject: Re: Reverse lookup from pdf to org? Date: Tue, 25 Mar 2014 16:29:27 -0400 Message-ID: References: <871txqgla1.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSXyy-0004ss-9k for emacs-orgmode@gnu.org; Tue, 25 Mar 2014 16:30:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSXyp-0003ZR-Ss for emacs-orgmode@gnu.org; Tue, 25 Mar 2014 16:30:00 -0400 Received: from smtpgw.bnl.gov ([2620:10a:0:3::30]:7399 helo=iron3.sec.bnl.local) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSXyp-0003Vv-Mu for emacs-orgmode@gnu.org; Tue, 25 Mar 2014 16:29:51 -0400 In-Reply-To: <871txqgla1.fsf@alphaville.bos.redhat.com> (Nick Dokos's message of "Tue, 25 Mar 2014 14:56:06 -0400") 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: Nick Dokos Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Nick Dokos writes: > 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 Okay, here is a crazy idea. Maybe one can use hyperref and place \url{} and/or \href{}{} macros in the org file. These will turn into clickable links in the final PDF. In them place URLs that look like: file:///path/to/foo.tex.orglink?line=42 And then use .mailcap (or whatever MIME config that xpdf/evince/etc honors) to map the .orglink extension to a script that parses the URL (does that full URL get passed?) and invokes emacs to open foo.tex at line 42? If that much can be made to work (big if!) I see one problem in that the /path/to will break if the source is moved. Chance of success: 10% -Brett. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlMx5ycACgkQEixH2Z0dKCzcvwCfQmrDrAXxdmt2Qj/+S6ceud3Y Ur4AoK+AM+d1iyhCiB/vHkkYF7BtgUFA =Wzq0 -----END PGP SIGNATURE----- --=-=-=--