emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Using link abbrevations for EXPORT_FILE_NAME ?


From: AW
Subject: Re: [O] Using link abbrevations for EXPORT_FILE_NAME ?
Date: Mon, 09 Nov 2015 22:03:07 +0100
User-agent: KMail/4.14.10 (Linux/4.2.1-1-desktop; KDE/4.14.12; x86_64; ; )

Am Sonntag, 8. November 2015, 20:11:23 schrieb Nicolas Goaziou:
> Hello,
> 
> AW <address@hidden> writes:
> > on orgmode 8.3.2 I've got a large org-file. Offen, I need to export a
> > subtree like this:
> > 
> > -----------------
> > * Subtree to be exported
> > 
> > :PROPERTIES:
> > :EXPORT_FILE_NAME: /PATH/TO/FOLDER/filename
> > :EXPORT_TITLE:
> > 
> > :END:
> > foo
> > 
> > -----------------
> > 
> > I'd like to save the exported file in a project folder, as you can see in
> > EXPORT_FILE_NAME .
> > 
> > It would be very helpful to use link abbrevations in EXPORT_FILE_NAME :
> > 
> > (setq org-link-abbrev-alist
> > 
> >    '(("anglisky" . "~/Path/whereever/%s")))
> > 
> > in .emacs and write:
> > 
> > -----------------
> > * Subtree to be exported
> > 
> > :PROPERTIES:
> > :EXPORT_FILE_NAME: anglisky:filename
> > :EXPORT_TITLE:
> > 
> > :END:
> > foo
> > 
> > -----------------
> > 
> > Possible? Feature Request?
> 
> Not possible. Also, link syntax sounds awkward because most links
> wouldn't make sense there.
> 
> What about introducing a new property:
>   :EXPORT_FILE_DIRECTORY:
> When set, e.g. to "dir", assuming EXPORT_FILE_NAME is set to "foo/file",
> export file name becomes "dir/file".
> 
> Since you can set it per subtree or document, I think it would help in
> your situation.

Background: I'm using orgmode on different platforms, Windows and Linux. So I 
(being very proud of that!) wrote an if-clause:

(setq org-link-abbrev-alist
   (if (eq system-type 'windows-nt)
      '(("foopath" . "//Sbs2011/ra2000/Bilder/2010/271-2011/%s")
)
      '(("foopath" . "/home/AW/some/path/2011-271-project/%s")))



So on Windows foopath becomes the first path, and on Linux the second and all 
my links in the orgmode files work on both platforms.

A cheap solution for EXPORT_FILE_NAME: just have two lines and comment out the 
wrong one!

-----------------
* Subtree to be exported
:PROPERTIES:
# :EXPORT_FILE_NAME: //Sbs2011/ra2000/Bilder/2010/271-2011/filename
:EXPORT_FILE_NAME: /home/AW/some/path/2011-271-project/filename
:EXPORT_TITLE:
:END:

foo

-----------------

But comment seems not to work inside properties.

However, :EXPORT_FILE_DIRECTORY: would only improve _my_ situation, if I could 
make it dependend on a condition. 

Thank you very for your help!

Kind regards,

-- 

Alexander





reply via email to

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