From mboxrd@z Thu Jan 1 00:00:00 1970 From: AW Subject: Re: Using link abbrevations for EXPORT_FILE_NAME ? Date: Mon, 09 Nov 2015 22:03:07 +0100 Message-ID: <1680721.RnRcZu7HBl@linux-k2bd.site> References: <8038470.jhX8ZjFPSM@linux-k2bd.site> <87bnb471d0.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zvtau-0006tV-8j for emacs-orgmode@gnu.org; Mon, 09 Nov 2015 16:03:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zvtaq-00022B-HE for emacs-orgmode@gnu.org; Mon, 09 Nov 2015 16:03:16 -0500 Received: from mailout01.t-online.de ([194.25.134.80]:49173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zvtaq-0001zG-9o for emacs-orgmode@gnu.org; Mon, 09 Nov 2015 16:03:12 -0500 In-Reply-To: <87bnb471d0.fsf@nicolasgoaziou.fr> 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 Cc: Nicolas Goaziou Am Sonntag, 8. November 2015, 20:11:23 schrieb Nicolas Goaziou: > Hello, > > AW 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