From: AW <alexander.willand@t-online.de>
To: emacs-orgmode@gnu.org
Cc: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: Using link abbrevations for EXPORT_FILE_NAME ?
Date: Mon, 09 Nov 2015 22:03:07 +0100 [thread overview]
Message-ID: <1680721.RnRcZu7HBl@linux-k2bd.site> (raw)
In-Reply-To: <87bnb471d0.fsf@nicolasgoaziou.fr>
Am Sonntag, 8. November 2015, 20:11:23 schrieb Nicolas Goaziou:
> Hello,
>
> AW <alexander.willand@t-online.de> 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
next prev parent reply other threads:[~2015-11-09 21:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 14:07 Using link abbrevations for EXPORT_FILE_NAME ? AW
2015-11-08 19:11 ` Nicolas Goaziou
2015-11-09 12:53 ` Stelian Iancu
2015-11-14 8:35 ` Nicolas Goaziou
2015-11-14 19:11 ` Aaron Ecay
2015-11-09 21:03 ` AW [this message]
2015-11-10 17:22 ` 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=1680721.RnRcZu7HBl@linux-k2bd.site \
--to=alexander.willand@t-online.de \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/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).