Commit Graph

12076 Commits

Author SHA1 Message Date
Nicolas Goaziou dadde768f7 org-export: Fix docstring
* contrib/lisp/org-export.el (org-export-smart-quotes-alist): Fix
  docstring.
2012-11-19 21:32:59 +01:00
Eric Schulte f8a69a4250 passing as many tests as before
* lisp/ob-emacs-lisp.el (org-babel-execute:emacs-lisp): Better about
  when to fully escape the results or just print them close to verbatim.
2012-11-18 22:06:12 -07:00
Eric Schulte 78cdf14939 org-babel-result-cond - unified handling of results
* lisp/ob.el (org-babel-result-cond): This function should now be used
  by all language backends to handle the processing of raw code block
  output into scalar results, table results, or ignored results
  depending on the value of result-params.

* lisp/ob-C.el (org-babel-C-execute): Use org-babel-result-cond.
* lisp/ob-R.el (org-babel-R-evaluate-external-process): Use
  org-babel-result-cond.
  (org-babel-R-evaluate-session): Use org-babel-result-cond.
* lisp/ob-awk.el (org-babel-execute:awk): Use org-babel-result-cond.
* lisp/ob-clojure.el (org-babel-execute:clojure): Use
  org-babel-result-cond.
* lisp/ob-emacs-lisp.el (org-babel-execute:emacs-lisp): Use
  org-babel-result-cond.
* lisp/ob-fortran.el (org-babel-execute:fortran): Use
  org-babel-result-cond.
* lisp/ob-io.el (org-babel-io-evaluate): Use org-babel-result-cond.
* lisp/ob-java.el (org-babel-execute:java): Use org-babel-result-cond.
* lisp/ob-lisp.el (org-babel-execute:lisp): Use org-babel-result-cond.
* lisp/ob-maxima.el (org-babel-execute:maxima): Use
  org-babel-result-cond.
* lisp/ob-picolisp.el (org-babel-execute:picolisp): Use
  org-babel-result-cond.
* lisp/ob-python.el (org-babel-python-evaluate-external-process): Use
  org-babel-result-cond.
  (org-babel-python-evaluate-session): Use org-babel-result-cond.
* lisp/ob-scala.el (org-babel-scala-evaluate): Use org-babel-result-cond.
* lisp/ob-sh.el (org-babel-sh-evaluate): Use org-babel-result-cond.
* lisp/ob-shen.el (org-babel-execute:shen): Use org-babel-result-cond.
* lisp/ob-sql.el (org-babel-execute:sql): Use org-babel-result-cond.
* lisp/ob-sqlite.el (org-babel-execute:sqlite): Use
  org-babel-result-cond.
2012-11-18 21:58:38 -07:00
Nicolas Goaziou 5107ca3c9b org-export: Fix subtree option with `split' behaviour
* contrib/lisp/org-export.el (org-export--get-subtree-options): Store
  value of options with `split' behaviour as a list of strings, not
  simply as a string.  Small refactoring.
* testing/lisp/test-org-export.el: Add tests.
2012-11-18 14:44:20 +01:00
Eric Schulte c2223c8979 still execute code block even if :results none
* lisp/ob.el (org-babel-execute-src-block): Fixed bug introduced in
  d4b739f.
2012-11-17 17:54:08 -07:00
Nicolas Goaziou 626786c6eb org-e-beamer: Add "fullframe" special environment
* contrib/lisp/org-e-beamer.el (org-e-beamer-environments-special):
  Add "fullframe" environment.  Change access key for "againframe".
(org-e-beamer--frame-level): "fullframe" environment also sets the
frame level for the tree.
(org-e-beamer--format-frame): Ignore headline title when environment
is "fullframe".
(org-e-beamer-select-environment): Change access key for "againframe".
2012-11-17 21:55:26 +01:00
Nicolas Goaziou b58ce97144 org-e-beamer: Fix "columns" environment when explicitly requested
* contrib/lisp/org-e-beamer.el (org-e-beamer-environments-special):
  Add "columns" as a new special environment.
(org-e-beamer--format-block): Allow options in columns environment
when explictly requested as a BEAMER_env property.  Small refactoring.
2012-11-17 21:17:19 +01:00
Eric Schulte d4b739fbf2 "none" header avoids result post-process
This patch introduces a new header argument which hide all code block
results from Emacs so that they are not processed into Emacs-lisp
objects; a process which may take a great deal of time for large
objects.

* lisp/ob.el (org-babel-common-header-args-w-values): Adding the new
  "none" header argument.
  (org-babel-execute-src-block): Don't do *any* result processing if the
  "none" header argument has been specified.
  (org-babel-sha1-hash): Remove the none header argument from
  header arg lists when calculating cache sums.
  (org-babel-insert-result): Flesh out some documentation.
2012-11-17 10:08:45 -07:00
Myles English 359b10b307 org-e-latex: Fixes bug introduced by commit 907110e
* contrib/lisp/org-e-latex.el: Floating tables get a \centering
  declaration, otherwise the table get wrapped in \begin{center}
  and \end{center} environment.

Thanks to Andreas Leha for reporting it.

TINYCHANGE
2012-11-17 16:44:47 +01:00
Nicolas Goaziou 4c7dcd0830 Silence byte compiler
* contrib/lisp/org-invoice.el (org-invoice-info-to-table,
  org-invoice-list-to-table): Silence byte compiler.
* lisp/org-agenda.el (org-agenda-show-clocking-issues,
  org-agenda-format-item): Silence byte compiler.
* lisp/org-colview-xemacs.el (org-agenda-columns): Silence byte
  compiler.
* lisp/org-colview.el (org-agenda-columns): Silence byte compiler.
* lisp/org.el (org-properties-postprocess-alist): Silence byte
  compiler.

Function renaming was necessary as of
a00a7b2918.
2012-11-17 15:51:26 +01:00
Toby S. Cubitt a00a7b2918 Allow more flexible customization of clocksum format
* lisp/org.el (org-time-clocksum-format, org-time-clocksum-fractional-format):
in addition to a single format string, the clocksum formats can now be
plists specifying separate formats for different time units.

* lisp/org.el (org-minutes-to-clocksum-string): new function to
replace org-minutes-to-hh:mm-string, which converts a number of
minutes to a string according to the customization options.

* lisp/org-colview.el (org-columns-number-to-string): use new
org-minutes-to-clocksum-string function to format clocksum durations.

* lisp/org-clock.el: always call new org-minutes-to-clocksum-string
function when formatting time durations, instead of calling
org-minutes-to-hh:mm-string or passing org-time-clocksum-format
directly to format.
2012-11-17 15:39:07 +01:00
Nicolas Goaziou daf0275085 org-e-latex: Stuff label and caption within special blocks
* contrib/lisp/org-e-latex.el (org-e-latex-special-block): Stuff label
  and caption within special blocks.
2012-11-17 14:47:26 +01:00
Nicolas Goaziou 74faf5bd26 org-export: New `org-export-derived-backend-p' predicate
* contrib/lisp/org-export.el (org-export-define-derived-backend): Add
  `:parent' property to derived backend.
(org-export-derived-backend-p): New function.
* testing/lisp/test-org-export.el: Add tests.

This function can be useful in filters implemation. I.e.

  (defun my-filter (contents backend info)
    (when (memq backend '(e-latex e-beamer some-derived-backend-from-latex))
      ...))

can be replaced with:

  (defun my filter (contents backend info)
    (when (org-export-derived-backend-p backend 'e-latex)
      ...))
2012-11-17 13:33:38 +01:00
Christophe Junke 60abb38ee3 Change fontification order for links
* lisp/org.el (org-set-font-lock-defaults): let footnote fontifications
  be done before other links' fontification. This allows links appearing
  inside footnotes to be both visible and active.

TINYCHANGE
2012-11-16 18:19:47 +01:00
Nicolas Goaziou b46b5d1c44 org-element: Return nil for unspecified time values
* lisp/org-element.el (org-element-timestamp-parser): Return nil for
  unspecified :hour-end and :minute-end properties.
* testing/lisp/test-org-element.el: Add tests.
2012-11-15 21:02:26 +01:00
Nicolas Goaziou aa7dbec775 org-export: Fix dispatcher
* contrib/lisp/org-export.el (org-export-dispatch-ui): Correctly
  compute allowed keys, taking into account derived backends.
(org-export-dispatch-action): Correctly compute action associated to
key combination, taking into account derived backends.
2012-11-15 14:05:05 +01:00
Peter Münster 8fb2cb8c19 Make org-notify.el work with latest org-element.el
* contrib/lisp/org-notify.el (org-notify-convert-deadline): New function.
(org-notify-make-todo): Use that function.
2012-11-14 19:28:30 +01:00
Myles English 907110e913 org-e-latex: Tables get correct amount of vertical space
* contrib/lisp/org-e-latex.el: Replaced a set of \begin{center}
  and \end{center} environment markers with a \centering
  declaration.

Using both \begin{table} and \being{center} environments leads to double
the vertical space around the float, whereas \centering adds none.

TINYCHANGE
2012-11-14 15:00:36 +01:00
Nicolas Goaziou 72a27c3b3f org-export: Make backend registration more stable wrt Org reload
* contrib/lisp/org-export.el (org-export-define-backend,
  org-export-define-derived-backend): Modify backend properties if
  backend is already registered.
(org-export-registered-backends): Use defvar instead of defconst so
a reload doesn't reset it.
2012-11-14 14:43:11 +01:00
Nicolas Goaziou 3d56f56399 org-export: Internal changes to back-end definition
* contrib/lisp/org-export.el (org-export-registered-backends): New
  variable.
(org-export-define-backend, org-export-define-derived-backend): Use
new variable. Also redefine how sub-menus are defined.
(org-export-backend-filters, org-export-backend-menu,
org-export-backend-options, org-export-backend-translate-table): New
functions.
(org-export-get-environment, org-export--parse-option-keyword,
org-export--get-subtree-options, org-export--get-inbuffer-options,
org-export--get-global-options, org-export-install-filters,
org-export-with-backend): Access to data stored in new variable.
(org-export-dispatch-ui): Display sub-menus according to new
definition.
(org-export-dispatch-menu-entries): Removed variable.
* contrib/lisp/org-e-beamer.el: Use new sub-menu definition.
(org-e-beamer--format-section, org-e-beamer-item,
org-e-beamer-keyword): Use `org-export-with-backend' instead of
relying on removed variables.
* testing/lisp/test-org-export.el: Update tests.

This patch gets rid of "invisible" variables, that is variables
defvar'ed within a macro.
2012-11-13 23:25:08 +01:00
Nicolas Goaziou 0421be2cee Merge branch 'maint' 2012-11-13 15:46:33 +01:00
Nicolas Goaziou 5dbccdb432 org-list: Fix infloop when inserting an item
* lisp/org-list.el (org-list-separating-blank-lines-number): When
  computing number of blank lines separating items, also count those
  in unparsed blocks, like example blocks.
* testing/lisp/test-org-list.el: Add tests.

In the following situation, with `org-blank-before-new-entry' set to
`auto' for `plain-list-item, a blank line should be inserted when
inserting the following item:

- item1
  #+BEGIN_EXAMPLE

  contents

  #+END_EXAMPLE
2012-11-13 15:45:09 +01:00
Nicolas Goaziou 6d099eedc8 org-element: Allow footnote references in table cells
* lisp/org-element.el (org-element-object-restrictions): Add footnote
  references objects in table cells.
* contrib/lisp/org-e-latex.el (org-e-latex-footnote-reference,
  org-e-latex-table): Add support for footnote reference in table
  cells.
2012-11-12 21:14:43 +01:00
Nicolas Goaziou aaf179fe7f org-e-publish: Fix cache invalid read syntax error
* contrib/lisp/org-e-publish.el (org-e-publish-collect-index): Do not
  store text properties from strings in the cache.  Instead focus on
  necessary data only.
(org-e-publish-index-generate-theindex): Apply changes to previous
function.
2012-11-12 00:04:07 +01:00
Nicolas Goaziou c40a0dbd38 org-element: Clear text properties when interpreting a string
* lisp/org-element.el (org-element-interpret-data): Clear text
  properties when interpreting a string .
2012-11-11 23:47:34 +01:00
Thomas Dye 2eaed05e70 org-e-texinfo: Correct typo in error message
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-collect-errors):
Correct typo in error message.
2012-11-11 10:09:20 +01:00
Nicolas Goaziou 4a7d1f7b9e org-e-texinfo: Follow noexport tag specifications in menu
* contrib/lisp/org-e-texinfo.el (org-e-texinfo--sanitize-headline-contents,
  org-e-texinfo--generate-menu-list): Provide communication channel as
  as optional argument so `org-element-map' can properly skip ignored
  elements.
(org-e-texinfo--find-copying, org-e-texinfo-headline,
org-e-texinfo-make-menu, org-e-texinfo-table-column-widths): Tiny
refactoring.
2012-11-11 10:08:49 +01:00
Nicolas Goaziou b0a0511ff4 org-e-beamer: Output "\date{}" when :with-date is nil
* contrib/lisp/org-e-beamer.el (org-e-beamer-template): Output "\date{}"
  when :with-date is nil.
* contrib/lisp/org-e-latex.el (org-e-latex-template): Make sure output
  contains "\date{}" when date is empty.
2012-11-09 20:45:57 +01:00
Alan Schmitt 292f70ee7f org-export: Output "\date{}" in LaTeX export when :with-date is nil
* contrib/lisp/org-e-latex.el (org-e-latex-template):
  output "\date{}" instead of nothing when :with-date is nil

TINYCHANGE
2012-11-09 20:25:13 +01:00
Nicolas Goaziou c6d709d0ed org-export: Allow to toggle date insertion
* contrib/lisp/org-export.el (org-export-with-date): New variable.
(org-export-options-alist): Use new variable.
* contrib/lisp/org-e-ascii.el (org-e-ascii-template--document-title):
  Check `:with-date' property in communication channel.
* contrib/lisp/org-e-beamer.el (org-e-beamer-template): Check
  `:with-date' property in communication channel.
* contrib/lisp/org-e-groff.el (org-e-groff--mt-head): Check
  `:with-date' property in communication channel.
(org-e-groff-date-format): Remove variable.
* contrib/lisp/org-e-html.el (org-e-html--build-meta-info,
  org-e-html--build-preamble, org-e-html--build-postamble): Check
  `:with-date' property in communication channel.
(org-e-html-format-date): Remove variable.
* contrib/lisp/org-e-latex.el (org-e-latex-template): Check
  `:with-date' property in communication channel.
contrib/lisp/org-e-man.el: Do not redefine DATE keyword.
2012-11-09 11:04:07 +01:00
Nicolas Goaziou 94605246e5 Merge branch 'maint' 2012-11-09 02:47:23 +01:00
Toby S. Cubitt 2aeb28d2af Bug fix in org-beginning-of-line visual line motion
* lisp/org.el (org-beginning-of-line): check `visual-line-mode'
instead of `line-visual-mode' to determine whether to move by visual
lines.

* lisp/org.el (org-kill-line): use of org-bound-and-true-p macro.

* testing/lisp/test-org.el: Add test
2012-11-09 02:46:21 +01:00
Jambunathan K 0125685553 org-e-html.el: Handle clickable images correctly
Fix bug http://permalink.gmane.org/gmane.emacs.orgmode/62197.
2012-11-09 02:03:51 +01:00
Nicolas Goaziou 359891f811 org-export: Consider colons as a safe character for targets
* contrib/lisp/org-export.el (org-export-solidify-link-text): Consider
  colons as a safe character for targets.
2012-11-08 00:36:41 +01:00
Achim Gratz c149e04ade Merge branch 'maint' 2012-11-07 18:45:25 +01:00
Achim Gratz ca5d5e9c9b Makefile: fix a bug with ORG_ADD_CONTRIB
* lisp/Makefile: The added files from contrib need to be known before
  LISPF is constructed.  Also, make all variables simply defined to
  avoid recursive evaluation.
2012-11-07 18:44:20 +01:00
Eric Schulte c2ebeea6f6 fix bug in drawer results (should not escape)
* lisp/ob.el (org-babel-insert-result): Don't escape results in drawers.
2012-11-06 06:20:43 -07:00
Nicolas Goaziou 854ddf635c Merge branch 'maint' 2012-11-05 17:40:48 +01:00
Nicolas Goaziou c20730be9a Fix `org-end-of-line' behaviour in visual line mode
* lisp/org.el (org-end-of-line): When visual line mode is on, really
  move by visual lines.  Small refactoring.
2012-11-05 17:39:06 +01:00
Nicolas Goaziou 1896fc352f org-e-ascii: Fix docstring
* contrib/lisp/org-e-ascii.el (org-e-ascii-format-drawer-function):
  Fix docstring.
2012-11-05 15:44:46 +01:00
Nicolas Goaziou 11c5faa7dd org-e-icalendar: Fix events duration when ending time is specified
* contrib/lisp/org-e-icalendar.el (org-e-icalendar-convert-timestamp):
  Fix events duration when ending time is specified.
2012-11-05 15:25:14 +01:00
Nicolas Goaziou 7d87ed1e4a org-e-icalendar: Remove over-zealous tasks filter
* contrib/lisp/org-e-icalendar.el (org-e-icalendar-include-todo): New
  variable.
(org-e-icalendar-with-tasks): Remove variable.
(org-e-icalendar-entry): Handle new variable.
2012-11-05 14:03:57 +01:00
Nicolas Goaziou d94a0bcd61 org-capture: Fix docstring
* lisp/org-capture.el (org-capture--expand-keyword-in-embedded-elisp):
  Fix docstring.
2012-11-05 13:38:18 +01:00
Nicolas Goaziou 6e31cf5a1e Merge branch 'maint' 2012-11-05 09:51:02 +01:00
Rafael Laboissiere 209afadbf9 org-bibtex.el: Fix broken URL
* lisp/org-bibtex.el: In the documentation section of the file, fix
  the broken URL to Andrew Roberts' document on BibTeX entries.

TINYCHANGE
2012-11-05 09:50:04 +01:00
Ryo TAKAISHI fb143b6787 org-capture: Expand keywords within %(sexp) placeholder in template
* lisp/org-capture.el: (org-capture--expand-keyword-in-embedded-elisp): New function.
(org-capture-expand-embedded-elisp): Use new function.
2012-11-05 01:29:25 +01:00
Nicolas Goaziou 5acffad561 Merge branch 'maint' 2012-11-05 00:58:34 +01:00
Nicolas Goaziou f48a8b7bf8 Fix end of line function called on an hidden block
* lisp/org.el (org-end-of-line): On a hidden block make sure to
  delegate motion to `end-of-line' instead of `move-end-of-line' in
  order to stay on the current line.
* testing/lisp/test-org.el: Update test.
2012-11-05 00:57:56 +01:00
Jambunathan K 7cdfa64677 org-e-odt.el: Fix broken export
Followup to commit 9751dc45.  See also,
http://comments.gmane.org/gmane.emacs.orgmode/61784
2012-11-03 19:28:02 +01:00
Nicolas Goaziou d8a3b84c93 org-export: New function to locally use another back-end
* contrib/lisp/org-export.el (org-export-with-backend): New function.
* contrib/lisp/org-e-beamer.el (org-e-beamer-link): Use new function.
2012-11-03 17:43:04 +01:00