From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Several questions about beamer export
Date: Mon, 15 Jul 2013 09:05:56 -0400 [thread overview]
Message-ID: <87bo64ezwr.fsf@gmail.com> (raw)
In-Reply-To: 87zjtoi4a7.fsf@free.fr
Julien Cubizolles <j.cubizolles@free.fr> writes:
> Darlan Cavalcante Moreira <darcamo@gmail.com> 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
next prev parent reply other threads:[~2013-07-15 13:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-11 21:55 Several questions about beamer export Julien Cubizolles
2013-07-12 3:21 ` Nick Dokos
2013-07-12 5:16 ` Julien Cubizolles
2013-07-12 7:13 ` Nick Dokos
2013-07-12 7:19 ` Nicolas Goaziou
2013-07-12 7:02 ` Nick Dokos
2013-07-12 15:05 ` Julien Cubizolles
2013-07-12 15:16 ` Nick Dokos
2013-07-12 16:45 ` Darlan Cavalcante Moreira
2013-07-12 17:14 ` Nick Dokos
2013-07-15 9:03 ` Julien Cubizolles
2013-07-15 13:05 ` Nick Dokos [this message]
2013-07-15 19:58 ` Julien Cubizolles
2013-09-03 8:31 ` Julien Cubizolles
2013-07-12 7:16 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bo64ezwr.fsf@gmail.com \
--to=ndokos@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).