* doc/org.texi (Info directory file): Fix node name.
(Headings and sectioning structure): Document location of text before
first headline.
(A Texinfo example): Update example.
* lisp/ox-texinfo.el (org-texinfo-template): Handle contents of very
first section.
(org-texinfo-section): Ignore very first section.
According to Texinfo specifications, Top node contents should not
appear in printed output. Move it near "@top" command, within
"@ifnottex".
* lisp/ox-texinfo.el (org-texinfo-keyword): Index keywords are
specific to Texinfo back-end, so they expect regular Texinfo code.
* doc/org.texi (Indices): Update documentation.
* lisp/ox-texinfo.el (org-texinfo-table-default-markup): Rename from
`org-texinfo-def-table-markup'. Set default value to the neutral
"@asis".
(org-texinfo-plain-list): Use new name.
* lisp/org-compat.el (org-texinfo-def-table-markup): Mark as obsolete.
* doc/org.texi (Publishing options): Document change.
* lisp/ox-texinfo.el (org-texinfo-text-markup-alist): Change default
value.
(org-texinfo--text-markup): Handle protected @samp{...} command.
@samp{} is more versatile than @verb{} as it can belong to more
commands. So, it makes more sense as a default value.
* lisp/ox-texinfo.el (org-texinfo--sanitize-title): New function.
(org-texinfo--get-node): Use new function. Tiny improvement over
aesthetics of duplicate node names.
(org-texinfo--sanitize-node): Fix docstring.
(org-texinfo-headline): Use new function
(org-texinfo--@ref): Remove colons and protect commas in description.
(org-texinfo-link): Use new function. Better handling of targets
within headings.
(org-texinfo--format-entries): Use new function. Remove colons from
menu entries.
* lisp/ox-texinfo.el (org-texinfo--@ref): New function.
(org-texinfo-link): Use new function.
When node name doesn't correspond to actual title, use the third @ref
argument to ensure the node name is not printed nor displayed.
* lisp/org-info.el (org-info-export): Handle links when exporting to
"texinfo" back-end.
* lisp/ox-texinfo.el (org-texinfo-link): Delegate "info" links
handling to the function above.
* lisp/ox-texinfo.el (texinfo): Add transcoders.
(org-texinfo-text-markup-alist): Allow `strike-though' and `underline'
as keys. Remove unused `comment'.
(org-texinfo-strike-through):
(org-texinfo-underline): New functions.
By default, new markup produce no Texinfo code, but can be customized by
users for specific uses.
* lisp/org.el (org-compile-file):
(org-file-newer-than-p): New functions.
* lisp/ox-latex.el (org-latex-compile): Use new functions.
* lisp/ox-man.el (org-man-compile): Use new functions.
(org-man-collect-errors): Remove it.
* lisp/ox-texinfo.el (org-texinfo-compile): Use new functions.
(org-texinfo-collect-errors): Remove function as it is not accurate
enough (e.g., it doesn't handle internationalization).
* lisp/org-element.el (org-element-export-block-parser):
(org-element--current-element): Use new syntax for export blocks.
(org-element-block-name-alist): Remove.
* lisp/ox.el (org-export-register-backend):
(org-export-define-derived-backend): Remove :export-block keyword from
back-end's definition.
(org-export-expand-include-keyword): Use new syntax for include
keywords.
* lisp/ox-ascii.el (ascii):
* lisp/ox-beamer.el (beamer):
* lisp/ox-html.el (html):
* lisp/ox-latex.el (latex):
(org-latex-prefer-user-labels):
* lisp/ox-man.el (man):
* lisp/ox-md.el (md):
* lisp/ox-odt.el (odt):
* lisp/ox-texinfo.el (texinfo): Propagate changes to "ox.el".
* lisp/ob-core.el (org-babel-insert-result):
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs): Use new syntax.
* lisp/org.el (org-structure-template-alist): Use new syntax.
(org-protecting-blocks): Add "export" to protected blocks. Remove
back-ends blocks, which are now special blocks.
(org-fontify-meta-lines-and-blocks-1): Fontify correctly new blocks.
* lisp/org-footnote.el (org-footnote-forbidden-blocks):
* lisp/org-list.el (org-list-forbidden-blocks): Add "export" to
forbidden blocks. Remove back-ends blocks, which are now special
blocks.
* contrib/lisp/ox-extra.el: Update comments.
* testing/lisp/test-org-element.el (test-org-element/export-block-parser):
(test-org-element/export-block-interpreter):
* testing/lisp/test-ob.el (test-ob/org-babel-remove-result--results-html):
(test-ob/org-babel-remove-result--results-latex):
* testing/lisp/test-ox.el (test-org-export/expand-include): Update tests.
Export blocks are explicitly marked as such at the syntax level to
disambiguate their parsing from special blocks. The new syntax is
#+BEGIN_EXPORT backend
...
#+END_EXPORT
instead of
#+BEGIN_backend
...
#+END_backend
As a consequence, =INCLUDE= keywords syntax is modified, e.g.,
#+INCLUDE: "file.org" HTML
becomes
#+INCLUDE: "file.org" export html
* lisp/ob-latex.el (convert-pdf):
* lisp/org-crypt.el (org-crypt-check-auto-save):
* lisp/ox-man.el (org-man-compile):
* lisp/ox-odt.el (org-odt--export-wrap):
* lisp/ox-texinfo.el (org-texinfo-compile):
Use %s to avoid translating quotes of file names etc. in diagnostics.
Use %s to format strings instead of splicing them
ab11a1cf27ebe3791df45cccde3c851affd184dd
Paul Eggert
Sun Sep 20 09:42:05 2015 -0700
* lisp/ob-core.el (org-babel-check-evaluate)
(org-babel-confirm-evaluate):
* lisp/ob-fortran.el (org-babel-fortran-var-to-fortran):
* lisp/ox-latex.el (org-latex-compile):
* lisp/ox-man.el (org-man-compile):
* lisp/ox-odt.el (org-odt-template):
* lisp/ox-texinfo.el (org-texinfo-compile):
Change (message (format ...)) to (message ...), and likewise
for ‘error’. This lessens the probability of confusion when the
output of ‘format’ contains ‘%’.
Fix some confusion with ‘format’
0c856a2c459016f1f9cce173f5b2b49be36e3452
Paul Eggert
Wed Aug 5 19:07:28 2015 -0700
* lisp/ox-texinfo.el (org-texinfo-compile): Put Texinfo output into
`compilation-mode'.
Suggested-by: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97961>
* lisp/ox-texinfo.el (org-texinfo--inline-image): Add an @anchor for
labelled images without a caption.
Reported-by: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97961>
* lisp/ox-texinfo.el (org-texinfo-inline-image-rules): New variable.
(org-texinfo--inline-image): New function.
(org-texinfo-link): Use new function.
* doc/org.texi (Texinfo specific attributes):
* etc/ORG-NEWS: Document new feature.
* lisp/ox-texinfo.el (texinfo): Offer to open produced file from
dispatcher.
File is opened through `org-open-file' since texinfo back-end can
output multiple formats.
* lisp/ox-ascii.el (ascii):
* lisp/ox-latex.el (latex):
* lisp/ox-man.el (man):
* lisp/ox-md.el (md):
* lisp/ox-org.el (org):
* lisp/ox-texinfo.el (texinfo):
* contrib/lisp/ox-groff.el (groff): Remove `comment' and
`comment-block' translators.
`comment' and `comment-block' translators are not needed since both
commented lines and comment blocks do not appear anymore in the parse
tree. See 69dd4301ab.
* lisp/ox.el (org-export-with-creator): Change default value.
* lisp/ox-ascii.el (org-ascii-template):
* lisp/ox-beamer.el (org-beamer-template):
* lisp/ox-latex.el (org-latex-template):
* lisp/ox-odt.el (org-odt-template):
* lisp/ox-org.el (org-org-template):
* lisp/ox-texinfo.el (org-texinfo-template): Treat
`org-export-with-creator' as a boolean.
* testing/lisp/test-ox.el (test-org-export/parse-option-keyword):
Update test.
* doc/org.texi (Export settings): Update allowed values in
`org-export-with-creator'.
* etc/ORG-NEWS: Signal change.
Special `comment' value isn't meaningful for all back-ends and is not
implemented in every back-end where it makes sense anyway.
It is possible to add a comment including creator at the end of the
document using a body filter instead.
* ox.el (org-export-with-title): New variable.
* ox (org-export-options-alist),
ox-ascii.el (org-ascii-template--document-title),
ox-beamer.el (org-beamer-template), ox-html.el (org-html-template),
ox-latex.el (org-latex-template), ox-man.el (org-man-template),
ox-odt.el (org-odt-template), ox-org.el (org-org-template),
ox-publish.el (org-publish-project-alist),
ox-texinfo.el (org-texinfo-template),
ox-groff.el (org-groff--mt-head): Use new variable.
* ox-koma-letter.el (org-koma-letter-use-title): Mark obsolete.
* test-ox.el (test-org-export/parse-option-keyword): Add :with-title.
* ORG-NEWS, org.texi: Mention org-export-with-title.
This is useful in e.g. ox-html where title can be set via
`org-html-preamble-template' or when using the {{{title}}}-macro.
* lisp/org.el (org-translate-time): Remove function.
(org-timestamp-translate): Rewrite function so it doesn't use the one
above.
* lisp/ox-ascii.el (org-ascii-clock, org-ascii-planning):
* lisp/ox-html.el (org-html-clock, org-html-planning, org-html-timestamp):
* lisp/ox-latex.el (org-latex-clock, org-latex-planning):
* lisp/ox-texinfo.el (org-texinfo-clock, org-texinfo-planning): Use
`org-timestamp-translate' instead of `org-translate-time'.
* etc/ORG-NEWS: Document function removal.
Reported-by: Ian Barton <lists@wilkesley.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/93127>
* lisp/ox-texinfo.el (org-texinfo--get-node): Return a node or anchor
name.
(org-texinfo--sanitize-content): Fix regexp.
(org-texinfo-link): Fix various bugs in link export.
* lisp/ox-texinfo.el (org-texinfo--normalize-headlines): Do not set
pre blanks since the value is now hard-coded.
(org-texinfo-headline): Force one blank line before contents, when non
empty. Refactoring.
(org-texinfo-src-block): Refactor code. Comply to predicate naming.
* lisp/ox-texinfo.el (org-texinfo-headline): Remove `not-in-toc'
special case for tags.
Check is useless for 2 reasons :
1. there is no way to control @contents in the file header so
sectioning name,
2. menu entries provide their own title. If it has to be handled,
that should be elsewhere anyway.
* lisp/ox-texinfo.el (org-texinfo-info-process): Fix docstring.
(org-texinfo-compile): Do not check for impossible cases (e.g., if the
previous variable contains a function).
* lisp/ox-texinfo.el (org-texinfo--sanitize-node): "@", "{" and "}"
characters are allowed in a node name. So are "(" and ")" unless
"(" starts the name and there is ")" somewhere in the name. Also
trim and collapse whitespace characters. Renamed from
`org-texinfo--sanitize-menu'.
(org-texinfo--get-node): Do not sanitize node names over zealously.
Ensure returned node names are unique.
(org-texinfo-headline): Only add @node command where it makes sense.
* lisp/ox-texinfo.el (org-texinfo-make-menu): Change signature.
Remove some intermediate functions. Generate the full master menu
when asked.
(org-texinfo--build-menu): Use a simpler algorithm.
(org-texinfo--format-entries): Fix entries when both node and title
are different.
(org-texinfo--menu-entries): Renamed from `org-texinfo--generate-menu-list'.
(org-texinfo-headline): Move menu handling to next function.
(org-texinfo-section): Handle menu for current parent.
(org-texinfo--menu-headlines, org-texinfo--generate-detailed): Remove
functions.
(org-texinfo--normalize-headlines): New function.
* lisp/ox-texinfo.el (org-texinfo-headline): Do not sanitize heading
text for sectioning command.
For example
* This is ~code~
should be possibly exported as
@chapter This is @code{code}
not
@chapter This is @@code@{code@}
* lisp/ox-texinfo.el (org-texinfo-table): Remove reference to
"verbatim" attribute. Handle table.el tables. Tiny refactoring.
(org-texinfo-table--org-table, org-texinfo-table--table.el-table):
Remove functions.
(org-texinfo-table-column-widths): Indent code correctly. Ignore
special column, if any. Add a comment about the limitation on the
width computation.
(org-texinfo-table-row): Small refactoring.
* lisp/ox-texinfo.el (texinfo): Do not provide a default value for
@setfilename value.
(org-texinfo-filename): Remove variable.
(org-texinfo-template): Correctly find value for @setfilename command.
If none is possible, do not provide the command at all.
* lisp/ox-texinfo.el (org-texinfo-classes): Change default value.
Update docstring.
(org-texinfo-template): Insert header string from current class after
"@settitle" command. Always provide "\input texinfo" at the beginning
of the output.
Header string in the class was inserted before "@setfilename".
Texinfo ignores anything between "\input texinfo" and that command,
making any value besides the default one useless.
* lisp/ox-texinfo.el (org-texinfo-template): Fix multi-line
subauthors. Correctly add email, when provided. Check if author
info is wanted first.
This patch also removes AUTHOR variable since it's up to the user to
set it or not, through a class or a header keyword.
* lisp/ox-texinfo.el (texinfo): Make sure comments are ignored.
(org-texinfo-comment, org-texinfo-comment-block): Remove functions.
This is consistent with all other back-ends, which ignore any comment.
* lisp/ox-html.el: Remove options.
* lisp/ox-icalendar.el: Remove options.
* lisp/ox-latex.el (org-latex-guess-inputenc, org-latex-compile,
org-latex--collect-warnings): Use full variable name instead of an
option.
* lisp/ox-man.el: Remove options.
* lisp/ox-odt.el: Remove options.
* lisp/ox-texinfo.el: Remove options.
* doc/org.texi (Publishing options): Update documentation accordingly.
These variables are meant to be used outside (or on the fringe) of the
export process, where information channel is not available.
remove
* lisp/ox-ascii.el:
* lisp/ox-beamer.el:
* lisp/ox-html.el:
* lisp/ox-latex.el:
* lisp/ox-man.el:
* lisp/ox-md.el:
* lisp/ox-odt.el:
* lisp/ox-org.el:
* lisp/ox-texinfo.el: All defcustoms are defined as options in the
back-end.
* lisp/ox-icalendar.el (icalendar): Ditto. Also rename :with-vtodo
property to :icalendar-include-todo.
* doc/org.texi (Publishing options): Update back-end specific
properties. Remove @vindex entries so as not to clobber variables
index.
This change allows to change default value for any defcustom on the
fly when publishing. It also normalizes how to choose and name what
variables to define as back-end options.
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-html.el (org-html-link): Do not expand absolute file names
and do not try to fix hierarchy part, as it is already taken care of
at the parser level.
* lisp/ox-md.el (org-md-link): Ditto. Also fix absolute file names.
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-texinfo.el (org-texinfo-link):
* contrib/lisp/ox-groff.el (org-groff-link): Ditto. Do not prepend
scheme part to relative file names either.
* contrib/lisp/ox-deck.el (org-deck-link): Small refactoring.
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-texinfo.el (org-texinfo-link): Append "//" after some link
types.
* lisp/ox-md.el (org-md-link):
* contrib/lisp/ox-groff.el (org-groff-link): Ditto. Also remove some
unused code, as search options are already stripped out link's path.
Since 3589f64e42, Org ignores "//" in
a link type so it has to be re-introduced upon exporting.