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--