From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Cannot get the EXPORT_FILE_NAME override to work Date: Thu, 04 May 2017 15:30:51 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113cc734e684da054eb475ec Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6Iil-0001K7-A6 for emacs-orgmode@gnu.org; Thu, 04 May 2017 11:31:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6Iie-0005Sm-RT for emacs-orgmode@gnu.org; Thu, 04 May 2017 11:31:11 -0400 Received: from mail-lf0-x229.google.com ([2a00:1450:4010:c07::229]:35396) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d6Iie-0005Qq-KT for emacs-orgmode@gnu.org; Thu, 04 May 2017 11:31:04 -0400 Received: by mail-lf0-x229.google.com with SMTP id j1so10212616lfh.2 for ; Thu, 04 May 2017 08:31:04 -0700 (PDT) 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" To: emacs-org list --001a113cc734e684da054eb475ec Content-Type: text/plain; charset=UTF-8 Hello, I am trying to use the EXPORT_FILE_NAME property for the first time, but it is not working. Here is the MWE: ===== override-export-file-name.org ===== #+TITLE: Test overriding of export file name * Heading 1 :PROPERTIES: :EXPORT_FILE_NAME: foo :END: I want to name the exported file as =foo.=(something). If I export to HTML, it should be named =foo.html=. ===== I am using emacs and org version built from master today. Attempt 1: Export the whole file using C-c C-e h h. But override-export-file-name.html gets created instead of foo.html. Attempt 2: Select just the Heading 1 subtree, narrow to it, and export that using C-c C-e h h. Again override-export-file-name.html gets created instead of foo.html. So when does the EXPORT_FILE_NAME property work? What am I doing wrong? Thanks. -- Kaushal Modi --001a113cc734e684da054eb475ec Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

I am trying to use the EXPORT_FI= LE_NAME property for the first time, but it is not working.

<= /div>
Here is the MWE:

=3D=3D=3D=3D=3D override-export-file-name.org= =3D=3D=3D=3D=3D
#+TITLE: Test overriding of export file nam= e

* Heading 1
:PROPERTIES:
:EX= PORT_FILE_NAME: foo
:END:
I want to name the exported f= ile as =3Dfoo.=3D(something). If I export to HTML, it should be named =3Dfo= o.html=3D.
=3D=3D=3D=3D=3D

I am us= ing emacs and org version built from master today.

Attempt 1: Export the whole file using C-c C-e h h. But override-export-fi= le-name.html gets created instead of foo.html.

Att= empt 2: Select just the Heading 1 subtree, narrow to it, and export that us= ing C-c C-e h h. Again override-export-file-name.html gets created instead = of foo.html.

So when does the EXPORT_FILE_NAME= property work? What am I doing wrong?

Thanks.

--

Kaushal Modi

--001a113cc734e684da054eb475ec-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Cannot get the EXPORT_FILE_NAME override to work Date: Thu, 04 May 2017 15:36:56 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c1a1a40a1b7cd054eb48b56 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6IoY-0006u9-7k for emacs-orgmode@gnu.org; Thu, 04 May 2017 11:37:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6IoX-000503-2V for emacs-orgmode@gnu.org; Thu, 04 May 2017 11:37:10 -0400 Received: from mail-lf0-x230.google.com ([2a00:1450:4010:c07::230]:33831) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d6IoW-0004zZ-PT for emacs-orgmode@gnu.org; Thu, 04 May 2017 11:37:08 -0400 Received: by mail-lf0-x230.google.com with SMTP id t144so10329855lff.1 for ; Thu, 04 May 2017 08:37:08 -0700 (PDT) In-Reply-To: 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" To: emacs-org list --94eb2c1a1a40a1b7cd054eb48b56 Content-Type: text/plain; charset=UTF-8 Here's the motive for this question. I am working on this project ( https://github.com/kaushalmodi/eless ) that is basically a bash script. I have eless.org and am tangling the bash script eless from that, plus all the documentation (HTML, Info, README.md, CONTRIBUTING.md, etc.). The publish project alist is here: https://github.com/kaushalmodi/eless/blob/master/build/build.el If EXPORT_FILE_NAME starting working for me, I would not need these completion functions for publish that just do the file renaming: (defun eless/readme-completion-fn (proj-plist) (let* ((pub-dir (plist-get proj-plist :publishing-directory)) (before-name (concat pub-dir "eless.md")) (after-name (concat pub-dir "README.md"))) (rename-file before-name after-name :ok-if-already-exists))) (defun eless/contributing-completion-fn (proj-plist) (let* ((pub-dir (plist-get proj-plist :publishing-directory)) (before-name (concat pub-dir "eless.md")) (after-name (concat pub-dir "CONTRIBUTING.md"))) (rename-file before-name after-name :ok-if-already-exists))) (defun eless/wiki-tcsh-completion-fn (proj-plist) (let* ((pub-dir (plist-get proj-plist :publishing-directory)) (before-name (concat pub-dir "eless.md")) (after-name (concat pub-dir "Example eless Config in tcsh.md"))) (rename-file before-name after-name :ok-if-already-exists))) -- Kaushal Modi --94eb2c1a1a40a1b7cd054eb48b56 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Here's the motive for this question.

I am working on this project (=C2=A0https://github.com/kaushalmodi/eless=C2=A0) that is basical= ly a bash script.

I have eless.org and am tangling the bash script eless from that, plus all= the documentation (HTML, Info, README.md, CONTRIBUTING.md, etc.). The publ= ish project alist is here:=C2=A0https://github.com/kaushalmodi/eless/blob/= master/build/build.el

If EXPORT_FILE_NAME star= ting working for me, I would not need these completion functions for publis= h that just do the file renaming:

(defun eles= s/readme-completion-fn (proj-plist)
=C2=A0 (let* ((pub-dir (plist= -get proj-plist :publishing-directory))
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(before-name (concat pub-dir "el= ess.md"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(after-name = (concat pub-dir "README.md")))
=C2=A0 =C2=A0 (rename-fi= le before-name after-name :ok-if-already-exists)))

(defun eless/contributing-completion-fn (proj-plist)
=C2=A0 (let= * ((pub-dir (plist-get proj-plist :publishing-directory))
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(before-name (concat pub-dir "eless.md"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(after-name (concat pub-dir "CONTRIBUTING.md")))
= =C2=A0 =C2=A0 (rename-file before-name after-name :ok-if-already-exists)))<= /div>

(defun eless/wiki-tcsh-completion-fn (proj-plist)<= /div>
=C2=A0 (let* ((pub-dir (plist-get proj-plist :publishing-director= y))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(before-name (concat pub-di= r "eless.md"))
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(after-name (concat pub-dir "Example eless = Config in tcsh.md")))
=C2=A0 = =C2=A0 (rename-file before-name after-name :ok-if-already-exists)))

--

Kaushal Modi

--94eb2c1a1a40a1b7cd054eb48b56-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Cannot get the EXPORT_FILE_NAME override to work Date: Thu, 04 May 2017 12:40:10 -0400 Message-ID: <871ss44lud.fsf@alphaville.usersys.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6Jnk-00039X-20 for emacs-orgmode@gnu.org; Thu, 04 May 2017 12:40:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6Jng-0000XV-U0 for emacs-orgmode@gnu.org; Thu, 04 May 2017 12:40:24 -0400 Received: from [195.159.176.226] (port=44023 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d6Jng-0000Wq-NL for emacs-orgmode@gnu.org; Thu, 04 May 2017 12:40:20 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1d6JnY-0004a2-8B for emacs-orgmode@gnu.org; Thu, 04 May 2017 18:40:12 +0200 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" To: emacs-orgmode@gnu.org Kaushal Modi writes: > Hello, > > I am trying to use the EXPORT_FILE_NAME property for the first time, but it is not working. > > Here is the MWE: > > ===== override-export-file-name.org ===== > #+TITLE: Test overriding of export file name > > * Heading 1 > :PROPERTIES: > :EXPORT_FILE_NAME: foo > :END: > I want to name the exported file as =foo.=(something). If I export to HTML, it should be named =foo.html > =. > ===== > > I am using emacs and org version built from master today. > > Attempt 1: Export the whole file using C-c C-e h h. But override-export-file-name.html gets created > instead of foo.html. > That does not work: you have to set #+EXPORT_FILE_NAME: foo for that. > Attempt 2: Select just the Heading 1 subtree, narrow to it, and export that using C-c C-e h h. Again > override-export-file-name.html gets created instead of foo.html. > I don't know how narrowing interacts with export but the following C-c C-e C-s h h works (assuming you are in the correct subtree at the time). > So when does the EXPORT_FILE_NAME property work? What am I doing wrong? > > Thanks. > > -- > > Kaushal Modi > -- Nick From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Cannot get the EXPORT_FILE_NAME override to work Date: Thu, 04 May 2017 17:02:51 +0000 Message-ID: References: <871ss44lud.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c1cc636eec4a1054eb5be39 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6K9i-0007di-9u for emacs-orgmode@gnu.org; Thu, 04 May 2017 13:03:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6K9g-0002mO-RI for emacs-orgmode@gnu.org; Thu, 04 May 2017 13:03:06 -0400 Received: from mail-lf0-x234.google.com ([2a00:1450:4010:c07::234]:34658) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d6K9g-0002kq-FN for emacs-orgmode@gnu.org; Thu, 04 May 2017 13:03:04 -0400 Received: by mail-lf0-x234.google.com with SMTP id t144so11723007lff.1 for ; Thu, 04 May 2017 10:03:04 -0700 (PDT) In-Reply-To: <871ss44lud.fsf@alphaville.usersys.redhat.com> 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" To: Nick Dokos , emacs-orgmode@gnu.org --94eb2c1cc636eec4a1054eb5be39 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, May 4, 2017 at 12:41 PM Nick Dokos wrote: > That does not work: you have to set #+EXPORT_FILE_NAME: foo for that. > That works. But the node property should also have worked: In (org) Export settings: When exporting only a subtree, each of the previous keywords(4) can be overridden locally by special node properties. These begin with =E2=80=98EXPORT_=E2=80=99, followed by the name of the keyword they supplan= t, unless the keyword already beging with =E2=80=98EXPORT_=E2=80=99. For example, =E2=80= =98DATE=E2=80=99 and =E2=80=98EXPORT_FILE_NAME=E2=80=99 keywords become, respectively, =E2=80=98= EXPORT_DATE=E2=80=99 and =E2=80=98EXPORT_FILE_NAME=E2=80=99 properties. > I don't know how narrowing interacts with export but the following > > C-c C-e C-s h h > > works (assuming you are in the correct subtree at the time). > I tried with narrowing and that works. =3D=3D=3D=3D=3D #+TITLE: Test overriding of export file name # Below works #+EXPORT_FILE_NAME: baz * Heading 1 :PROPERTIES: :EXPORT_FILE_NAME: foo :END: # Above override does not work I want to name the exported file as =3Dfoo.=3D(something). If I export to H= TML, it should be named =3Dfoo.html=3D. #+EXPORT_FILE_NAME: hd2 * Heading 2 Stuff in heading 2 =3D=3D=3D=3D=3D I narrowed down to =3D=3D=3D=3D=3D #+EXPORT_FILE_NAME: hd2 * Heading 2 Stuff in heading 2 =3D=3D=3D=3D=3D And that exported to hd2.html.. But this does not fit my requirement.. I need to specify the export file name to be different for different subtrees. So that publishing the whole project "eless-all" would put stuff in their correct files in one go: (setq org-publish-project-alist `(;; HTML ("eless-html" :base-directory ,eless-root-dir :with-tags nil :exclude-tags ("noexport" "readme" "wiki") :publishing-function org-html-publish-to-html :publishing-directory ,eless-doc-dir) ;; Info ("eless-info" :base-directory ,eless-root-dir :with-tags nil :exclude-tags ("noexport" "readme" "wiki") :publishing-function org-texinfo-publish-to-texinfo :publishing-directory ,eless-doc-dir :completion-function my/org-texinfo-publish-to-info) ;; eless script ("eless-tangle" :base-directory ,eless-root-dir :publishing-function org-babel-tangle-publish :publishing-directory ,eless-root-dir) ;; README.md ("eless-readme" :base-directory ,eless-root-dir :with-toc nil :with-tags nil :select-tags ("readme") ;Cannot have hyphens in tags! :publishing-function org-gfm-publish-to-gfm :publishing-directory ,eless-root-dir :completion-function eless/readme-completion-fn) ;; CONTRIBUTING.md ("eless-contributing" :base-directory ,eless-root-dir :with-toc nil :with-tags nil :select-tags ("contributing") ;Cannot have hyphens in tags! :publishing-function org-gfm-publish-to-gfm :publishing-directory ,eless-root-dir :completion-function eless/contributing-completion-fn) ;; Wiki Pages ("eless-wiki-tcsh" :base-directory ,eless-root-dir :with-toc nil :with-tags nil :select-tags ("wikitcsh") ;Cannot have hyphens in tags! :publishing-function org-gfm-publish-to-gfm :publishing-directory ,eless-wiki-dir :completion-function eless/wiki-tcsh-completion-fn) ("eless-wiki" :components ("eless-wiki-tcsh")) ("eless-all-docs" :components ("eless-html" "eless-info" "eless-readme" "eless-contributing" "eless-wiki")) ("eless-all" :components ("eless-all-docs" "eless-tangle")))) --=20 Kaushal Modi --94eb2c1cc636eec4a1054eb5be39 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Thu, May 4,= 2017 at 12:41 PM Nick Dokos <ndokos= @gmail.com> wrote:
That doe= s not work: you have to set #+EXPORT_FILE_NAME: foo for that.

That works.

But the node pr= operty should also have worked:

In (org) Export se= ttings:

When exporting only a subtree, e= ach of the previous keywords(4) can
be overridden locally by spec= ial node properties.=C2=A0 These begin with
=E2=80=98EXPORT_=E2= =80=99, followed by the name of the keyword they supplant, unless the
=
keyword already beging with =E2=80=98EXPORT_=E2=80=99.=C2=A0 For examp= le, =E2=80=98DATE=E2=80=99 and
=E2=80=98EXPORT_FILE_NAME=E2=80=99= keywords become, respectively, =E2=80=98EXPORT_DATE=E2=80=99 and
=E2=80=98EXPORT_FILE_NAME=E2=80=99 properties.

<= div>=C2=A0
I don't know h= ow narrowing interacts with export but the following

=C2=A0 =C2=A0C-c C-e C-s h h

works (assuming you are in the correct subtree at the time).

I tried with narrowing and that works.

=
=3D=3D=3D=3D=3D
#+TITLE: Test overriding of expor= t file name
# Below works
#+EXPORT_FILE_NAME: baz
=

* Heading 1
:PROPERTIES:
:EXPORT_FI= LE_NAME: foo
:END:
# Above override does not work
=
I want to name the exported file as =3Dfoo.=3D(something). If I export= to HTML, it should be named =3Dfoo.html=3D.
#+EXPORT_FILE_NAME: = hd2
* Heading 2
Stuff in heading 2
=3D= =3D=3D=3D=3D

I narrowed down to=C2=A0
=3D=3D=3D=3D=3D
#+EXPORT_FILE_NAME: hd2
* Heading 2
Stuff in heading 2
=3D=3D=3D=3D=3D=

And that exported to hd2.html.. But this does not= fit my requirement.. I need to specify the export file name to be differen= t for different subtrees. So that publishing the whole project "eless-= all" would put stuff in their correct files in one go:

<= /div>
(setq org-publish-project-alist
=C2=A0 =C2=A0 =C2= =A0 `(;; HTML
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("eless-html"=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:base-directory ,eless-root-di= r
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:with-tags nil
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:exclude-tags ("noexport" "re= adme" "wiki")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:p= ublishing-function org-html-publish-to-html
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0:publishing-directory ,eless-doc-dir)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 ;; Info
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("eless-in= fo"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:base-directory ,eless= -root-dir
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:with-tags nil
<= div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:exclude-tags ("noexport" &= quot;readme" "wiki")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0:publishing-function org-texinfo-publish-to-texinfo
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0:publishing-directory ,eless-doc-dir
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:completion-function my/org-texinfo-publi= sh-to-info)

=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; eless s= cript
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("eless-tangle"
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:base-directory ,eless-root-dir
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:publishing-function org-babel-tang= le-publish
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:publishing-director= y ,eless-root-dir)

=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; = README.md
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("eless-readme"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:base-directory ,eless-root-dir<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:with-toc nil
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0:with-tags nil
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0:select-tags ("readme") =C2=A0 =C2=A0 ;Cannot have h= yphens in tags!
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:publishing-fun= ction org-gfm-publish-to-gfm
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:p= ublishing-directory ,eless-root-dir
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0:completion-function eless/readme-completion-fn)

=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; CONTRIBUTING.md
=C2=A0 =C2=A0= =C2=A0 =C2=A0 ("eless-contributing"
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0:base-directory ,eless-root-dir
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0:with-toc nil
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0:with-tags nil
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:select-tags = ("contributing") =C2=A0 =C2=A0 ;Cannot have hyphens in tags!
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:publishing-function org-gfm-publis= h-to-gfm
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:publishing-directory = ,eless-root-dir
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:completion-fun= ction eless/contributing-completion-fn)

=C2=A0 =C2= =A0 =C2=A0 =C2=A0 ;; Wiki Pages
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (&quo= t;eless-wiki-tcsh"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:base-d= irectory ,eless-root-dir
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:with-= toc nil
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:with-tags nil
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:select-tags ("wikitcsh") =C2= =A0 =C2=A0 ;Cannot have hyphens in tags!
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0:publishing-function org-gfm-publish-to-gfm
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0:publishing-directory ,eless-wiki-dir
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:completion-function eless/wiki-tcsh-complet= ion-fn)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("eless-wiki"
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:components ("eless-wiki-tcsh&q= uot;))

=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("eless-al= l-docs"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:components ("= ;eless-html" "eless-info"
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "eless-readme&quo= t; "eless-contributing" "eless-wiki"))

=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("eless-all"
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:components ("eless-all-docs" &quo= t;eless-tangle"))))


--
Kaushal Modi

--94eb2c1cc636eec4a1054eb5be39-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Cannot get the EXPORT_FILE_NAME override to work Date: Thu, 04 May 2017 13:33:38 -0400 Message-ID: <87fugk34st.fsf@alphaville.usersys.redhat.com> References: <871ss44lud.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6KdX-0004Rj-WD for emacs-orgmode@gnu.org; Thu, 04 May 2017 13:33:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6KdR-00042e-SA for emacs-orgmode@gnu.org; Thu, 04 May 2017 13:33:55 -0400 Received: from [195.159.176.226] (port=34650 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d6KdR-000428-LS for emacs-orgmode@gnu.org; Thu, 04 May 2017 13:33:49 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1d6KdI-00065O-Af for emacs-orgmode@gnu.org; Thu, 04 May 2017 19:33:40 +0200 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" To: emacs-orgmode@gnu.org Kaushal Modi writes: >> I don't know how narrowing interacts with export but the following >> >> C-c C-e C-s h h >> works (assuming you are in the correct subtree at the time). >> I meant that this works with the property set in the subtree. > ... > And that exported to hd2.html.. But this does not fit my requirement.. I need to specify the export file > name to be different for different subtrees. So add the EXPORT_FILE_NAME property to each subtree, and then do C-c C-e C-s h h *for each subtree of interest*. You could probably org-map your way through the subtrees and export each one by calling (org-export-as 'html t) N.B. the subtreep setting in this call. -- Nick From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Cannot get the EXPORT_FILE_NAME override to work Date: Thu, 04 May 2017 18:28:15 +0000 Message-ID: References: <871ss44lud.fsf@alphaville.usersys.redhat.com> <87fugk34st.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f403045e9d1c586e01054eb6f022 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6LUL-0007hX-9z for emacs-orgmode@gnu.org; Thu, 04 May 2017 14:28:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6LUK-0007kZ-Ex for emacs-orgmode@gnu.org; Thu, 04 May 2017 14:28:29 -0400 Received: from mail-lf0-x229.google.com ([2a00:1450:4010:c07::229]:35154) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d6LUK-0007jm-70 for emacs-orgmode@gnu.org; Thu, 04 May 2017 14:28:28 -0400 Received: by mail-lf0-x229.google.com with SMTP id j1so12971847lfh.2 for ; Thu, 04 May 2017 11:28:28 -0700 (PDT) In-Reply-To: <87fugk34st.fsf@alphaville.usersys.redhat.com> 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" To: Nick Dokos , emacs-orgmode@gnu.org --f403045e9d1c586e01054eb6f022 Content-Type: text/plain; charset=UTF-8 On Thu, May 4, 2017 at 1:34 PM Nick Dokos wrote: > I meant that this works with the property set in the subtree. > Ah, I understand now. So add the EXPORT_FILE_NAME property to each subtree, and then do > > C-c C-e C-s h h > > *for each subtree of interest*. Got it. So the EXPORT_FILE_NAME property is exclusive to subtree scope exporting. Even though a tag is present on only one subtree, exporting by selecting that tag will not do the same thing. (I assumed, hoped that would happen :)) > You could probably org-map your way > through the subtrees and export each one by calling > > (org-export-as 'html t) > > N.B. the subtreep setting in this call. > org-map is a golden suggestion! I'll dive into that. All said, looks like ox-publish misses an ":export_file_name" option. Don't you think? -- Kaushal Modi --f403045e9d1c586e01054eb6f022 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Thu, May 4,= 2017 at 1:34 PM Nick Dokos <ndokos@= gmail.com> wrote:
I meant = that this works with the property set in the subtree.
=
Ah, I understand now.

So add the EXPORT_FILE_NAME property to each subtree, and then do

=C2=A0 C-c C-e C-s h h

*for each subtree of interest*.

Got it. So= the EXPORT_FILE_NAME property is exclusive to subtree scope exporting. Eve= n though a tag is present on only one subtree, exporting by selecting that = tag will not do the same thing. (I assumed, hoped that would happen :))
=C2=A0
You could probably org-ma= p your way
through the subtrees and export each one by calling

=C2=A0 =C2=A0(org-export-as 'html t)

N.B. the subtreep setting in this call.

org-map is a golden suggestion! I'll dive into that.

All said, looks like ox-publish misses an ":export_file_name&q= uot; option. Don't you think?=C2=A0
-= -

Kaushal = Modi

--f403045e9d1c586e01054eb6f022-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Cannot get the EXPORT_FILE_NAME override to work Date: Thu, 04 May 2017 19:56:11 +0000 Message-ID: References: <871ss44lud.fsf@alphaville.usersys.redhat.com> <87fugk34st.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113cc734d30298054eb82a4e Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6MrS-0001vm-Db for emacs-orgmode@gnu.org; Thu, 04 May 2017 15:56:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6MrR-0005NR-0N for emacs-orgmode@gnu.org; Thu, 04 May 2017 15:56:26 -0400 Received: from mail-lf0-x234.google.com ([2a00:1450:4010:c07::234]:36481) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d6MrQ-0005Mv-LF for emacs-orgmode@gnu.org; Thu, 04 May 2017 15:56:24 -0400 Received: by mail-lf0-x234.google.com with SMTP id h4so14226143lfj.3 for ; Thu, 04 May 2017 12:56:24 -0700 (PDT) In-Reply-To: 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" To: Nick Dokos , emacs-orgmode@gnu.org --001a113cc734d30298054eb82a4e Content-Type: text/plain; charset=UTF-8 > > On Thu, May 4, 2017 at 1:34 PM Nick Dokos wrote: > >> You could probably org-map your way >> through the subtrees and export each one by calling >> >> (org-export-as 'html t) >> >> N.B. the subtreep setting in this call. > > Thanks for the tip. I ended up with this: (let ((subtree-tags-to-export '("readme" "contributing" "wikitcsh")) ;; If a subtree matches a tag, do not try to export further ;; subtrees separately that could be under that. (org-use-tag-inheritance nil) (org-export-with-toc nil) ;Do not export TOC (org-export-with-tags nil)) ;Do not print tag names in exported files (dolist (tag subtree-tags-to-export) (let* ((exported-file-list (org-map-entries '(org-gfm-export-to-markdown nil :subtreep) tag)) ;; The assumption is that for each tag, *only* one file is exported (exported-file (when exported-file-list (car exported-file-list)))) (when (string-match-p "\\`wiki.+" tag) ;Move the wiki files to the correct directory (rename-file (expand-file-name exported-file eless-root-dir) (expand-file-name exported-file eless-wiki-dir) :ok-if-already-exists))))) https://github.com/kaushalmodi/eless/blob/4c4aea14f7293b25644d48ebf90dbc68cf1b3654/build/build.el#L88-L104 -- Kaushal Modi --001a113cc734d30298054eb82a4e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
=
On Thu, May 4,= 2017 at 1:34 PM Nick Dokos <ndokos@gmail.com> wrote:
You could prob= ably org-map your way
through the subtrees and export each one by calling

=C2=A0 =C2=A0(org-export-as 'html t)

N.B. the subtreep setting in this call.

Thanks for the tip. I ended up with this:
<= br>
(let ((subtree-tags-to-export '("readme" "= contributing"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "wi= kitcsh"))
=C2=A0 =C2=A0 =C2=A0 ;; If a subtree matches a tag= , do not try to export further
=C2=A0 =C2=A0 =C2=A0 ;; subtrees s= eparately that could be under that.
=C2=A0 =C2=A0 =C2=A0 (org-use= -tag-inheritance nil)
=C2=A0 =C2=A0 =C2=A0 (org-export-with-toc n= il) =C2=A0;Do not export TOC
=C2=A0 =C2=A0 =C2=A0 (org-export-wit= h-tags nil)) ;Do not print tag names in exported files
=C2=A0 (do= list (tag subtree-tags-to-export)
=C2=A0 =C2=A0 (let* ((exported-= file-list (org-map-entries '(org-gfm-export-to-markdown nil :subtreep) = tag))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; The assumption = is that for each tag, *only* one file is exported
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(exported-file (when exported-file-list
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 (car exported-file-list))))
=C2=A0 =C2= =A0 =C2=A0 (when (string-match-p "\\`wiki.+" tag) ;Move the wiki = files to the correct directory
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (renam= e-file (expand-file-name exported-file eless-root-dir)
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(expand-f= ile-name exported-file eless-wiki-dir)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:ok-if-already-exists))= )))=C2=A0


--

Kaushal Modi

--001a113cc734d30298054eb82a4e--