* [Patch] Fix for org-export-pubishing-directory
@ 2013-11-22 8:16 Shitikanth
2013-11-22 11:49 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Shitikanth @ 2013-11-22 8:16 UTC (permalink / raw
To: emacs-orgmode
[-- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch] Fix for org-export-pubishing-directory
2013-11-22 8:16 [Patch] Fix for org-export-pubishing-directory Shitikanth
@ 2013-11-22 11:49 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2013-11-22 11:49 UTC (permalink / raw
To: Shitikanth; +Cc: emacs-orgmode
Hello,
Shitikanth <shitikanth1@gmail.com> writes:
> 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 for the patch.
However, this variable doesn't exist in the new export framework, which
explains why its value is ignored.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-22 11:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-22 8:16 [Patch] Fix for org-export-pubishing-directory Shitikanth
2013-11-22 11:49 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.