emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Seeking identical output for export
@ 2020-01-07 18:22 wlharvey4
  2020-01-08  7:20 ` Diego Zamboni
  0 siblings, 1 reply; 2+ messages in thread
From: wlharvey4 @ 2020-01-07 18:22 UTC (permalink / raw)
  To: emacs-orgmode

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 ‘texinfo “<file-name>”) 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’.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Seeking identical output for export
  2020-01-07 18:22 Seeking identical output for export wlharvey4
@ 2020-01-08  7:20 ` Diego Zamboni
  0 siblings, 0 replies; 2+ messages in thread
From: Diego Zamboni @ 2020-01-08  7:20 UTC (permalink / raw)
  To: wlharvey4; +Cc: Org-mode

[-- Attachment #1: Type: text/plain, Size: 2479 bytes --]

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 <wlharvey4@mac.com> 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 ‘texinfo “<file-name>”) 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’.
>
> 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
>

[-- Attachment #2: Type: text/html, Size: 3144 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-08  7:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-07 18:22 Seeking identical output for export wlharvey4
2020-01-08  7:20 ` Diego Zamboni

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