Commit Graph

16477 Commits

Author SHA1 Message Date
Nicolas Goaziou 6d75d708a1 ox-texinfo: Fix node names
* 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.
2014-08-11 14:56:00 +02:00
Nicolas Goaziou 2ef63acae2 ox-texinfo: Fix docstrings
* lisp/ox-texinfo.el (org-texinfo--sanitize-menu,
  org-texinfo--sanitize-content): Fix docstrings.
2014-08-11 13:38:50 +02:00
Nicolas Goaziou 3ee7895c03 ox-texinfo: Fix blank lines in output
* lisp/ox-texinfo.el (org-texinfo--normalize-headlines): Make sure
  a blank line always follows nodes.
2014-08-11 13:38:50 +02:00
Nicolas Goaziou ee5c224017 ox-texinfo: Fix menus
* 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.
2014-08-11 13:38:44 +02:00
Nicolas Goaziou 6326697f4e ox-texinfo: Fix appendix command
* lisp/ox-texinfo.el (org-texinfo-headline): Fix @appendix command.
2014-08-10 22:49:25 +02:00
Nicolas Goaziou 710e40f96a ox-texinfo: Fix heading text
* 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@}
2014-08-10 22:49:18 +02:00
Eric Schulte f85aeea69f error behavior for forth code blocks
* lisp/ob-forth.el (org-babel-forth-session-execute): Add error
  handling for the forth interpreter using
  `org-babel-eval-error-notify'.
2014-08-09 21:35:27 -04:00
Eric Schulte 385746d69c add support for forth code blocks
Currently only session code block evaluation is supported, however
  this is a reasonable default for forth.

* lisp/org.el (org-babel-load-languages): Add "Forth" to the list of
  loadable languages.

* list/ob-forth.el: New file.
2014-08-09 19:00:02 -04:00
Federico Beffa b3fbd31f17 org.el: Add function to indent environment inserted by cdlatex-enviroment
* lisp/org.el (org-cdlatex-environment-indent): New function.

New function is bound to "\C-c{" in `org-cdlatex-mode-map' to add
a LaTeX environment and indent it.

TINYCHANGE
2014-08-09 09:50:53 +02:00
Nicolas Goaziou d2c0bbcf52 Merge branch 'maint' 2014-08-09 00:08:12 +02:00
Nicolas Goaziou 1faeb4e680 ox-texinfo: Fix ":COPYING: nil" node properties
* lisp/ox-texinfo.el (org-texinfo--generate-menu-list): ":COPYING:
  nil" is expected to be equivalent to no COPYING property at all.
2014-08-09 00:05:43 +02:00
Nicolas Goaziou eb234d2b45 Merge branch 'maint' 2014-08-08 23:57:45 +02:00
Nicolas Goaziou 85bfda77ed org.texi: Fix typo 2014-08-08 23:57:16 +02:00
Nicolas Goaziou af62e8525c Merge branch 'maint' 2014-08-08 23:51:50 +02:00
Nicolas Goaziou 7bc6038ea2 org.texi: Fix e5aceea 2014-08-08 23:51:09 +02:00
Nicolas Goaziou d7c4f9e4e6 org.texi: Tiny fixes
* doc/org.texi (Evaluating code blocks): Use @code instead of @var for
  defcustoms, use @pxref instead of @ref within parenthesis, add
  missing double space at the end of a sentence
2014-08-08 23:43:42 +02:00
Nicolas Goaziou 4c9d3753cb Merge branch 'maint' 2014-08-08 23:41:20 +02:00
Nicolas Goaziou e5aceea83c org.texi: Fixes to Texinfo documentation 2014-08-08 23:39:21 +02:00
Nicolas Goaziou 1212769ed5 org.texi: Fix compilation errors 2014-08-08 23:05:37 +02:00
Nicolas Goaziou f197737a53 org-list: Fix failing test
* testing/lisp/test-org-list.el (test-org-list/to-texinfo): Fix test.
2014-08-08 22:57:50 +02:00
Nicolas Goaziou 80525f5384 Merge branch 'maint' 2014-08-08 22:42:45 +02:00
Nicolas Goaziou 70fce0270f ox-texinfo: Fix blank lines between in items
* lisp/ox-texinfo.el (org-texinfo-item): Fix blank lines between
  items.
2014-08-08 22:42:08 +02:00
Nicolas Goaziou b1406dcddb Merge branch 'maint'
Conflicts:
	doc/org.texi
	lisp/ox-texinfo.el
2014-08-08 22:07:45 +02:00
Nicolas Goaziou 0d6c95699b org.texi: Document Texinfo export back-end 2014-08-08 17:56:29 +02:00
Nicolas Goaziou fe133aadca ox-org: Update wrt `org-element-block-name-alist' change
* lisp/ox-org.el (org-org-keyword): Do not check for keywords
  targeting other export back-ends since
  `org-element-block-name-alist' doesn't contain such information
  anymore.
2014-08-08 10:34:34 +02:00
Nicolas Goaziou c7a2024f65 ox-org: OPTIONS keyword belong to the template
* lisp/ox-org.el (org-org-keyword): Do not handle OPTIONS keywords
  since those are handled in the template.
(org-org-template): Handle OPTIONS keyword.

As a consequence, OPTIONS keyword do not appear anymore when doing
a body-only export.

Thanks to Thorsten Jolitz for suggesting the idea.
http://permalink.gmane.org/gmane.emacs.orgmode/89633
2014-08-08 10:29:59 +02:00
Aaron Ecay 59cd25cd75 Revert "ob-R.el: Improve the capturing of output-type results in sessions."
This reverts commit b51746332d.
2014-08-07 14:00:01 -04:00
Nicolas Goaziou dd085235e3 ox-texinfo: Code comments clean-up 2014-08-07 15:35:45 +02:00
Joe Corneli 3ea1ce2e85 Fix bug associated with setting image size via ATTR.
* lisp/org.el (org-display-inline-images): This change is necessary to
  make ATTR work.  Removed unnecessary save-match-data forms.
2014-08-07 15:02:42 +02:00
Nicolas Goaziou 879010160e org-element: Accept missing final newlines in block values
* lisp/org-element.el (org-element-comment-block-interpreter,
  org-element-example-block-interpreter,
  org-element-src-block-interpreter): Handle values with missing final
  newline, e.g., when built by the user.

* testing/lisp/test-org-element.el (test-org-element/comment-block-interpreter,
  test-org-element/example-block-interpreter,
  test-org-element/src-block-interpreter): Add tests

Thanks to Thorsten Jolitz for suggesting the idea.
http://permalink.gmane.org/gmane.emacs.orgmode/89602
2014-08-07 14:55:48 +02:00
Aaron Ecay b51746332d ob-R.el: Improve the capturing of output-type results in sessions.
* lisp/ob-R.el (org-babel-R-evaluate-session): Improve the capturing
of R output.

This uses a built-in facility of R to write the output to a file,
rather than trying to capture it in an emacs buffer using ESS (a
process by which the output can get mixed with other irrelevant text,
such as R command prompts).
2014-08-07 01:54:23 -04:00
Aaron Ecay d035c14765 ob-R.el: fix a bug when a :var is propertized text
* lisp/ob-R.el (org-babel-R-assign-elisp): Strip text properties from
strings.

Before this change, babel would try to format propertized strings
using elisp read syntax.  The upshot is that evaluating the following
code block would give an error (in R, not emacs), since the “bar” in
foo-ex gets text properties via font lock:

| #+name: foo-ex
| #+begin_example
| bar
| #+end_example
|
| #+name: foo
| #+begin_src R :var foo=foo-ex
|   foo
| #+end_src
2014-08-07 01:54:23 -04:00
Nicolas Goaziou d58a2960e0 ox-texinfo: Fix plain lists export
* lisp/ox-texinfo.el (org-texinfo-plain-list): Fix format string.
  Small refactoring.
2014-08-07 00:02:16 +02:00
Nicolas Goaziou 73809c1aa8 ox-texinfo: Allow to set a different title for hard copy
* lisp/ox-texinfo.el (texinfo): Provide new export property.
(org-texinfo-template): Use dedicated title for hard copy, when
available.
2014-08-07 00:02:16 +02:00
Nicolas Goaziou e0dbe1c776 ox-texinfo: Appendix has precedence over regular sectionning
* lisp/ox-texinfo.el (org-texinfo-headline): Always obey to
  a non-nil :APPENDIX: property.  Small refactoring.
2014-08-07 00:02:16 +02:00
Nicolas Goaziou 3e018d0afd ox-texinfo: Fix verse block export
* lisp/ox-texinfo.el (org-texinfo-verse-block): Generate somewhat
  meaningful Texinfo code instead of LaTeX.
2014-08-07 00:02:16 +02:00
Nicolas Goaziou 3b1d2811a8 ox-texinfo: Fix table export
* 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.
2014-08-07 00:01:18 +02:00
Nicolas Goaziou beed9cbe63 ox-texinfo: Fix @setfilename command
* 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.
2014-08-07 00:00:25 +02:00
Nicolas Goaziou 9f9aa52f14 ox: Provide output file name, if any, to back-ends
* lisp/ox.el (org-export-to-file): Provide output file name in
  communication channel, through :output-file property.

This change is needed to fix back-ends needing this information during
the process, e.g., `texinfo'.
2014-08-07 00:00:19 +02:00
Rick Frankel 6fa58b3cc2 Fix html checkbox output.
* lisp/ox-html.el (html): Add missing `:html-checkbox-type' option.
2014-08-06 10:24:27 -04:00
Mark Edgington d44bf92fdc contrib/lisp/ox-extra.el: Add ignore-headlines filter.
* contrib/lisp/ox-extra.el: Add ignore-headlines filter.

Thanks to Eric Schulte for the code.

Signed-off-by: Aaron Ecay <aaronecay@gmail.com>
2014-08-06 00:07:57 -04:00
Aaron Ecay 107a2c83ba ob-core.el: add :output-dir header arg to org-babel-common-header-args-w-values
* lisp/ob-core.el (org-babel-common-header-args-w-values): Add
:output-dir'.

Otherwise tthis property is not inherited correctly from
subtree-/file-level properties.
2014-08-06 00:04:52 -04:00
Nicolas Goaziou f002451544 ox-texinfo: Do not hardcode "Manual" in top node
* lisp/ox-texinfo.el (org-texinfo-template): Do not hardcode "Manual"
  in top node.
2014-08-05 10:53:39 +02:00
Nicolas Goaziou 4b6f9b25b8 ox-texinfo: Fix `org-texinfo-classes'
* 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.
2014-08-05 10:52:19 +02:00
Nicolas Goaziou 3ff46fdbff ox-texinfo: Remove spurious blank lines in output
* lisp/ox-texinfo.el (org-texinfo-template): Remove spurious blank
  lines in output.  Refactor code.
2014-08-05 10:52:14 +02:00
Nicolas Goaziou 33f6dc57ae ox-texinfo: Fix multi-line subtitles
* lisp/ox-texinfo.el (org-texinfo-template): Fix multi-line subtitles.
2014-08-05 10:51:46 +02:00
Nicolas Goaziou 6f73155454 ox-texinfo: Check options before inserting TOC
* lisp/ox-texinfo.el (org-texinfo-template): Make sure table of
  contents are allowed before inserting them.
2014-08-05 10:51:46 +02:00
Nicolas Goaziou b3fdf490b7 ox-texinfo: Handle documents without copying information
* lisp/ox-texinfo.el (org-texinfo-template): Check if copying data is
  not nil before using it.
2014-08-05 10:51:43 +02:00
Nicolas Goaziou 2dfaf78058 ox-texinfo: Properly handle subauthors and email
* 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.
2014-08-04 13:29:26 +02:00
Nicolas Goaziou e9c1f5ca53 ox-texinfo: Fix docstrings
* lisp/ox-texinfo.el (org-texinfo-node-description-column,
  org-texinfo-format-drawer-function): Fix docstrings.
2014-08-04 13:29:26 +02:00