Commit Graph

16267 Commits

Author SHA1 Message Date
Nicolas Berthier 6f0843d8a3 ob-core: Preserve inline-ness of source blocks when inserting results
* lisp/ob-core.el (org-babel-insert-result): Preserve inline-ness of
source blocks.

* testing/lisp/test-ob-exp.el: Update newly passing tests.
2014-08-22 14:39:39 +02:00
Nicolas Berthier 2ea7bf4042 ox-html: Support for exporting inline source code to HTML
* lisp/ox-html.el (org-html-inline-src-block): support for exporting
inline source code to HTML.
2014-08-22 14:39:39 +02:00
Nicolas Berthier 795c004396 ob: Support for exporting inline source code
* lisp/ob-exp.el (org-babel-exp-inline-code-template): New
customizable variable to export inline source code (similar to
`org-babel-exp-code-template').
(org-babel-exp-code): New `type' argument to differentiate between
inline and standard code blocks.

* lisp/ob-core.el (org-babel-inline-src-block-regexp): Allow empty set
of switches and header arguments as in "src_sh[]{echo foo;}".  Also
permit spaces before them.

* testint/lisp/test-org-element.el
(test-org-element/inline-src-block-parser): Test extended syntax for
inline source code.

* testing/lisp/test-ob-exp.el (ob-exp/exports-inline-code): New
function for testing inline source code handling.  Also add three new
failing tests exhibiting unexpected results with ":results code"
switches.

* testing/lisp/test-ob.el
(test-org-babel/org-babel-get-inline-src-block-matches): Test for
inline source blocks with empty header arguments.

* testing/examples/babel.org: New sections for testing (i) exported
inline source code (used by `ob-exp/exports-inline-code'); (ii)
parsing inline source blocks with empty header arguments (used by
`test-org-babel/org-babel-get-inline-src-block-matches').

Until now pieces of inline source code were handled as standard code
blocks during export.  These changes enable them to be exported.
2014-08-22 14:39:38 +02:00
Nicolas Goaziou 767895c970 Merge branch 'maint' 2014-08-21 11:08:44 +02:00
Nicolas Goaziou b8b34eadb4 ox-md: Allow custom link type export function
* lisp/ox-md.el (org-md-link): Allow custom link type export function.

`md' back-end is now on par with other core export back-ends.

Thanks to Ken Markoff for reponting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90011
2014-08-21 11:05:45 +02:00
Nicolas Goaziou 86283db227 org.texi: Add missing publishing properties
* doc/org.texi (Publishing options): Add missing properties.
2014-08-21 10:51:19 +02:00
Richard Lawrence 24a61a2938 ox-latex: fix lost export option
* lisp/ox-latex.el (latex): reintroduce `latex-custom-id-labels' option in backend

TINYCHANGE
2014-08-21 01:26:58 -04:00
Nick Dokos f15a83ab9f Merge branch 'maint'
Revert commit 79873390ed.
The fix was wrong and gave rise to a different problem - see

    http://thread.gmane.org/gmane.emacs.orgmode/89945
2014-08-20 22:18:07 -04:00
Nick Dokos 50da53de51 Revert "org-clean-before-export matches non-special columns spuriously"
This reverts commit 79873390ed.
The fix was wrong and gave rise to a different problem  - see

   http://thread.gmane.org/gmane.emacs.orgmode/89945

Revert it for now, since there is a workaround for the original
problem and plan on a correct fix in the near future.
2014-08-20 22:14:53 -04:00
Achim Gratz 64821bd967 ob-lilypond: Code cleanup
* lisp/ob-lilypond.el (org-babel-lilypond-OSX-ly-path,
  org-babel-lilypond-OSX-pdf-path, org-babel-lilypond-OSX-midi-path,
  org-babel-lilypond-nix-ly-path, org-babel-lilypond-nix-pdf-path,
  org-babel-lilypond-nix-midi-path, org-babel-lilypond-w32-ly-path,
  org-babel-lilypond-w32-pdf-path, org-babel-lilypond-w32-midi-path,
  org-babel-lilypond-determine-ly-path,
  org-babel-lilypond-determine-pdf-path,
  org-babel-lilypond-determine-midi-path): Remove.
  (org-babel-lilypond-ly-command, org-babel-lilypond-midi-command,
  org-babel-lilypond-pdf-command): Replacement for removed variables
  and functions.  Adapt all calls to the removed functions to use
  these variables instead.
  (org-babel-lilypond-commands): New defcustom for setting up
  the *-command variables.  Keep different defaults for different
  systems as the original code did to avoid tripping up unsuspecting
  users.
  (org-babel-lilypond-execute-tangled-ly,
  org-babel-lilypond-check-for-compile-error): Revert conditions to
  avoid superfluous forms.  Remove unused return values.
* testing/lisp/test-ob-lilypond.el: Do test for new variables and
  replace removed function calls with the appropriate variable
  content.  Exercise the new defcustom thoroughly.
2014-08-20 22:24:01 +02:00
Achim Gratz b03ce7fc8d Merge branch 'maint' 2014-08-20 21:12:23 +02:00
Achim Gratz b8bd2147cb ob-lilypond: change prefix to org-babel-lilypond
* lisp/ob-lilypond.el, testing/lisp/test-ob-lilypond.el: Change prefix
  from `ly-' to `org-babel-lilypond-' throughout.
2014-08-20 21:10:00 +02:00
Nicolas Goaziou 258b572cd4 Merge branch 'maint' 2014-08-19 23:37:37 +02:00
Nicolas Goaziou f2ac6db0a6 ox-texinfo: Fix language case
* lisp/ox-texinfo.el (org-texinfo-template): Fix language and encoding
  case.

Thanks to Brian J. Carlson for reporting it and providing a patch.
http://permalink.gmane.org/gmane.emacs.orgmode/89965
2014-08-19 23:35:08 +02:00
Nicolas Goaziou 3a1fff1b22 Merge branch 'maint' 2014-08-16 16:22:48 +02:00
Nicolas Goaziou 3fed03941a ox-md: Fix blank lines in output
* lisp/ox-md.el (org-md-separate-elements): Outside of lists, preserve
  blank lines between paragraphs and plain lists.

For example

    Consider this list:

    - three
    - four

should become

  # Another test<a id="sec-2"></a>

  Consider this list:

  -   three
  -   four

Thanks to Rafael for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/89840
2014-08-16 16:21:46 +02:00
Aaron Ecay 2cbaa47fcc ob-R: Fix redundant code.
* lisp/ob-R.el (org-babel-R-check-evaluate-package): Fix redundant
code.
2014-08-16 00:48:10 -04:00
Aaron Ecay d582b3b563 fix docstring typo
* lisp/org.el (org-insert-heading): Fix docstring typo.
2014-08-16 00:45:39 -04:00
Aaron Ecay 246df88c95 ob-latex: fixes and improvements
* lisp/ob-latex.el (convert-pdf): Rename function to have
org-babel-latex- prefix.
(org-babel-execute:latex): Use renamed function.  Include :headers
when generating SVG/HTML also.
2014-08-16 00:43:37 -04:00
Nicolas Goaziou 88101ef434 Merge branch 'maint' 2014-08-15 21:52:17 +02:00
Nicolas Goaziou c1bc685500 org-list: Fix failing test
* testing/lisp/test-org-list.el (test-org-list/to-texinfo): Fix
  failing test.
2014-08-15 21:51:42 +02:00
Nicolas Goaziou 60851f4fc7 org-element: Fix common indentation removal in verse block
* lisp/org-element.el (org-element-normalize-contents): Fix
  indentation removal when there is an empty line within a verse block.
* testing/lisp/test-org-element.el (test-org-element/normalize-contents):
  Add test.
2014-08-15 21:46:46 +02:00
Nicolas Goaziou cc6aa45f3b Merge branch 'maint'
Conflicts:
	lisp/ox-texinfo.el
2014-08-14 14:11:40 +02:00
Nicolas Goaziou 1adec31993 ox-texinfo: Fix parse tree corruption
* lisp/ox-texinfo.el (org-texinfo--normalize-headlines): Properly add
  a section to the contents.
2014-08-14 14:08:16 +02:00
Nicolas Goaziou 57644f7ebf ox-texinfo: Small refactoring
* 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.
2014-08-14 14:06:48 +02:00
Nicolas Goaziou 6b9108741b ob-forth: Silence byte-compiler 2014-08-14 11:15:37 +02:00
Grégoire Jadi 34900f41d5 lisp/org-agenda.el (org-agenda-refile): Documentation improvement
* lisp/org-agenda.el (org-agenda-refile): State explicitly that
  '(16) = C-u C-u and that '(64) = C-u C-u C-u.
2014-08-12 20:49:44 +02:00
Nicolas Goaziou 644e602343 Merge branch 'maint' 2014-08-11 19:48:58 +02:00
Nicolas Goaziou e112f3c0df ox-texinfo: Fix corner case when fixing a node name
* lisp/ox-texinfo.el (org-texinfo--sanitize-node): Handle
  " (not)allowed" case.
2014-08-11 19:47:47 +02:00
Nicolas Goaziou 0a18095984 ox-texinfo: Do not sanitize sectioning titles
* lisp/ox-texinfo.el (org-texinfo-headline): Do not sanitize
  sectioning titles.
2014-08-11 15:46:21 +02:00
Nicolas Goaziou 2e98c7f43e Merge branch 'maint' 2014-08-11 15:45:35 +02:00
Nicolas Goaziou 7286925b7d ox-texinfo: Remove wrong code comments
* lisp/ox-texinfo.el (org-texinfo-headline): Remove wrong code
  comments.
2014-08-11 15:44:12 +02:00
Nicolas Goaziou ca46777144 Silence byte-compiler 2014-08-11 15:35:33 +02:00
Nicolas Goaziou 6400c9a8e5 Merge branch 'maint'
Conflicts:
	doc/org.texi
	lisp/ox-texinfo.el
2014-08-11 15:00:57 +02:00
Nicolas Goaziou 595cfd57dc org.texi: Document menus in Texinfo export
* doc/org.texi (Headings and sectioning structure): Document menus.
2014-08-11 14:56:01 +02:00
Nicolas Goaziou 3c35300162 ox-texinfo: Remove `not-in-toc' case in headline export
* 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.
2014-08-11 14:56:01 +02:00
Nicolas Goaziou 9f81c11d71 ox-texinfo: Remove left-over LaTeXism
* lisp/ox-texinfo.el (org-texinfo-headline): Remove LaTeXism (optional
  arguments within square brackets).
2014-08-11 14:56:01 +02:00
Nicolas Goaziou dcf5510053 ox-texinfo: Tiny refactoring
* 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).
2014-08-11 14:56:01 +02:00
Nicolas Goaziou d17cd9962f ox-texinfo: Fix a docstring
* lisp/ox-texinfo.el (org-texinfo-max-toc-depth): Fix docstring.
2014-08-11 14:56:00 +02:00
Nicolas Goaziou 4acfe1cba8 ox-texinfo: Remove unused internal functions
* lisp/ox-texinfo.el (org-texinfo--make-option-string,
  org-texinfo--sanitize-headline,
  org-texinfo--sanitize-headline-contents): Remove.
2014-08-11 14:56:00 +02:00
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