From mboxrd@z Thu Jan 1 00:00:00 1970 From: Diego Zamboni Subject: Re: Seeking identical output for export Date: Wed, 8 Jan 2020 08:20:26 +0100 Message-ID: References: <20CA6217-EECB-48CF-B17B-D933CD0ABD51@mac.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a751fd059b9bba58" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:50651) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ip5dw-0003rS-TG for emacs-orgmode@gnu.org; Wed, 08 Jan 2020 02:20:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ip5dv-0000Bp-KJ for emacs-orgmode@gnu.org; Wed, 08 Jan 2020 02:20:40 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:33808) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ip5dv-00009d-31 for emacs-orgmode@gnu.org; Wed, 08 Jan 2020 02:20:39 -0500 Received: by mail-wm1-x32a.google.com with SMTP id w5so548426wmi.1 for ; Tue, 07 Jan 2020 23:20:38 -0800 (PST) In-Reply-To: <20CA6217-EECB-48CF-B17B-D933CD0ABD51@mac.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: wlharvey4@mac.com Cc: Org-mode --000000000000a751fd059b9bba58 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Wesley, Can you post a small org file that reproduces these problems? Without looking at the entire file it's hard to figure out what's going on. For example, AFAIK the {{{date}}} macro does not magically expand the current date, rather it refers to the #+DATE property of the document. If this is for some reason not included in your standalone export command, maybe this is the reason why it's not being expanded. As for the others, I think orgXXXXX is the default auto-generated reference format, so my guess would be that something else in your main Emacs config is enabling the human-readable labels, and which is not being loaded in the script command. I do not really understand the third point about the periods. Again, a self-contained example would help. Best, --Diego On Tue, Jan 7, 2020 at 7:22 PM wrote: > Hello: > > I am seeking to find the right way to obtain identical output when > exporting an Org file into texinfo using the export menu from within the > Org file as well as from a Makefile using an Emacs batch script. > > Currently I am using (org-export-to-file =E2=80=98texinfo =E2=80=9C=E2=80=9D) from > within a Makefile. This produces a file that has a few differences from > that produced by using the export menu 'C-c C-e i t=E2=80=99. > > The batch script is: > > emacs -Q --batch --eval '\ > (progn \ > (require '\''org) \ > (require '\''ob) \ > (require '\''ox-texinfo) \ > (require '\''ob-shell) \ > (setq org-confirm-babel-evaluate nil) \ > (find-file "$(ORG)") \ > (org-export-to-file '\''texinfo "$(TEXI)"))' > > The differences include: > - the {{{date}}} macro is empty when created with the Makefile > e.g. subtitle Version 0.0.0 > versus > subtitle Version 0.0.0 2020-01-07 10:05 > > The Org source is: > #+subtitle {{{version}}} {{{date}}} > #+macro:version Version 0.0.0 > > The version macro is expanded but not the date macro. > > - references are random strings rather than similar to the #+name when > created with the Makefile > e.g. float Listing,orge1fba27 > versus > float Listing,get-org-filename > > - periods at the end of variable references > e.g. ... exists: $NEWDIR. > versus > ...exists: $NEWDIR@. > > Thank you for any suggestions. > > Wesley > --000000000000a751fd059b9bba58 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Wesley,

Can you post a small org fil= e that reproduces these problems? Without looking at the entire file it'= ;s hard to figure out what's going on.

For exa= mple, AFAIK the {{{date}}} macro does not magically expand the current date= , rather it refers to the #+DATE property of the document. If this is for s= ome reason not included in your standalone export command, maybe this is th= e reason why it's not being expanded.

As for t= he others, I think orgXXXXX is the default auto-generated reference format,= so my guess would be that something else in your main Emacs config is enab= ling the human-readable labels, and which is not being loaded in the script= command. I do not really understand the third point about the periods. Aga= in, a self-contained example would help.

Best,
--Diego


On Tue, Jan 7, 2020 at 7:22 PM <wlharvey4@mac.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">Hello:

I am seeking to find the right way to obtain identical output when exportin= g an Org file into texinfo using the export menu from within the Org file a= s well as from a Makefile using an Emacs batch script.

Currently I am using (org-export-to-file =E2=80=98texinfo =E2=80=9C<file= -name>=E2=80=9D) from within a Makefile.=C2=A0 This produces a file that= has a few differences from that produced by using the export menu 'C-c= C-e i t=E2=80=99.

The batch script is:

=C2=A0emacs -Q --batch --eval '\
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (progn \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (require '\''org) \ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (require '\''ob) \ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (require '\''ox-texin= fo) \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (require '\''ob-shell= ) \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq org-confirm-babel-evaluate = nil) \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (find-file "$(ORG)") \<= br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (org-export-to-file '\'&#= 39;texinfo "$(TEXI)"))'

The differences include:
- the {{{date}}} macro is empty when created with the Makefile
=C2=A0 e.g. subtitle Version 0.0.0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0versus
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0subtitle Version 0.0.0 2020-01-07 10:05
=C2=A0 =C2=A0 =C2=A0 =C2=A0 The Org source is:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 #+subtitle {{{version}}} {{{date}}}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 #+macro:version Version 0.0.0

=C2=A0 =C2=A0 =C2=A0 =C2=A0 The version macro is expanded but not the date = macro.

- references are random strings rather than similar to the #+name when crea= ted with the Makefile
=C2=A0 e.g. float Listing,orge1fba27
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0versus
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0float Listing,get-org-filename

- periods at the end of variable references
=C2=A0 e.g. ... exists: $NEWDIR.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0versus
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0...exists: $NEWDIR@.

Thank you for any suggestions.

Wesley
--000000000000a751fd059b9bba58--