emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Shitikanth <shitikanth1@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [Patch] Fix for org-export-pubishing-directory
Date: Fri, 22 Nov 2013 03:16:11 -0500	[thread overview]
Message-ID: <CALjXJSQLkzkyzgA9fWYQhynXYc6cPyUNt8nH=cyCPHrdXZoquA@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 337 bytes --]

The new export system was ignoring the value of variable
org-export-publishing-directory.

For example, even with the value of org-export-publishing-directory set to
"./exports", the exported files would end up in the same folder as the org
file.

This patch seems to solve the problem, at least on my emacs.

Thanks,
Shitikanth Kashyap

[-- Attachment #1.2: Type: text/html, Size: 455 bytes --]

[-- Attachment #2: export-dir.patch --]
[-- Type: application/octet-stream, Size: 1598 bytes --]

From b3896669ff56c7f49866cc2635a99f5a94e4c980 Mon Sep 17 00:00:00 2001
From: Shitikanth Kashyap <shitikanth1@gmail.com>
Date: Fri, 22 Nov 2013 02:59:03 -0500
Subject: [PATCH] Capture: Make org-export use org-export-publishing-directory

* lisp/ox.el (org-export-output-file-name): Use the value of
variable org-export-publishin-directory, if available.

The new export system was ignoring the value of this variable,
resulting in the exported files being placed in the same directory
as the source, irrespective of the value of the variable.

TINYCHANGE
---
 lisp/ox.el |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index ff9b9f7..ea2056d 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -5770,6 +5770,9 @@ of subtree at point.
 When optional argument PUB-DIR is set, use it as the publishing
 directory.
 
+Otherwise, try to use \"org-export-publishing-directory\" as
+the publishing directory.
+
 When optional argument VISIBLE-ONLY is non-nil, don't export
 contents of hidden elements.
 
@@ -5804,6 +5807,10 @@ Return file name as a string."
 	    (concat (file-name-as-directory pub-dir)
 		    (file-name-nondirectory base-name)
 		    extension))
+	   (org-export-publishing-directory
+	    (concat (file-name-as-directory org-export-publishing-directory)
+		    (file-name-nondirectory base-name)
+		    extension))
 	   ((file-name-absolute-p base-name) (concat base-name extension))
 	   (t (concat (file-name-as-directory ".") base-name extension)))))
     ;; If writing to OUTPUT-FILE would overwrite original file, append
-- 
1.7.9


             reply	other threads:[~2013-11-22  8:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22  8:16 Shitikanth [this message]
2013-11-22 11:49 ` [Patch] Fix for org-export-pubishing-directory 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='CALjXJSQLkzkyzgA9fWYQhynXYc6cPyUNt8nH=cyCPHrdXZoquA@mail.gmail.com' \
    --to=shitikanth1@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).