From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Several questions about beamer export Date: Mon, 15 Jul 2013 09:05:56 -0400 Message-ID: <87bo64ezwr.fsf@gmail.com> References: <87li5cwymc.fsf@free.fr> <87r4f445wi.fsf@gmail.com> <871u737ra6.fsf@free.fr> <8761wf4xm4.fsf@gmail.com> <87sizj7mnb.fsf@gmail.com> <87zjtoi4a7.fsf@free.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyiTl-00013A-41 for emacs-orgmode@gnu.org; Mon, 15 Jul 2013 09:06:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UyiTj-0001Bl-8q for emacs-orgmode@gnu.org; Mon, 15 Jul 2013 09:06:12 -0400 Received: from plane.gmane.org ([80.91.229.3]:52970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyiTi-0001BV-Uq for emacs-orgmode@gnu.org; Mon, 15 Jul 2013 09:06:11 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UyiTh-00038D-Ad for emacs-orgmode@gnu.org; Mon, 15 Jul 2013 15:06:09 +0200 Received: from pool-108-7-96-134.bstnma.fios.verizon.net ([108.7.96.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Jul 2013 15:06:09 +0200 Received: from ndokos by pool-108-7-96-134.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Jul 2013 15:06:09 +0200 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 Julien Cubizolles writes: > Darlan Cavalcante Moreira writes: > >> I don't think you can change the behavior of a link type to take into >> account somethink similar to graphicspath, but you can easily define >> custom link types: For instance, put this in your org-file >> #+LINK: fig file:my_figure_path/%s >> >> Then you will be able to You write a link such as >> >> [[fig:some_figure.png]] > > It looks perfect, unfortunately, I can't get it to work: > > #+LINK: fig file:/home/wilk/enseignement/doc_cours/optique/%s > > [[fig:test.jpg]] > [[file:/home/wilk/enseignement/doc_cours/optique/test.jpg]] > > The second one gives a picture, the first one doesn't. I'm running a > fairly recent git pull of org-mode, and this possibility is described in > its info file. > It works fine here. The relevant function is org-link-expand-abbrev and it depends on the variables org-link-abbrev-alist and org-link-abbrev-alist-local. The latter gets initialized from the former and any #+LINK lines in the buffer are added on to it. In my case, the first one is nil, so the second one is affected only by the #+LINK lines in the org buffer. In the context of the org buffer containing the link line, check that the variable is set: C-h v org-link-abbrev-alist-alist-local RET should say that the variable has the value (("fig" . "file:/home/wilk/enseignement/doc_cours/optique/%s")) If that is the case, then again in the context of the buffer, doing ESC ESC : (org-link-expand-abbrev "fig:test.jpg") RET should return the expanded value "file:/home/wilk/enseignement/doc_cours/optique/test.jpg" Hope this helps to track it down. >> ps: Remember to do "C-c C-c" in the #+LINK line after you insert it. > > I was just about to ask about it, thanks ! > Closing and reopening the file should take care of the initialization as well. -- Nick