Commit Graph

10863 Commits

Author SHA1 Message Date
Nicolas Goaziou 33719e2ef9 ox-latex: Refactor matrices code
* lisp/ox-latex.el (latex): Introduce a dedicated pseudo-element:
  `latex-matrices'.
  (org-latex--wrap-latex-matrices, org-latex-matrices,
  org-latex-matrices-tree-filter): New functions.
  (org-latex--math-table): Delegate environment wrapping to new
  pseudo-element translator.
2014-10-17 21:33:25 +02:00
Kyle Meyer 70e0b08e66 org-clock: Fix CLOCK_INTO_DRAWER property check
* lisp/org-clock.el (org-clock-into-drawer): Fix processing of
properties so that they can override global value.

Previously, if the 'CLOCK_INTO_DRAWER' or 'LOG_INTO_DRAWER' property was
nil, the local property setting would not override the global
variable [1]. These changes make the behavior match the docstring
description ('CLOCK_INTO_DRAWER' and 'LOG_INTO_DRAWER' properties
override `org-clock-into-drawer', with 'CLOCK_INTO_DRAWER' given
precedence).

[1] http://stackoverflow.com/questions/26405415/how-to-locally-unset-org-clock-into-drawer-t

TINYCHANGE
2014-10-17 00:09:32 +02:00
Eric Abrahamsen 1feafbfa99 org-attach: Maybe delete heading attachments when archiving
* lisp/org-attach.el (org-attach-archive-delete): New option
  controlling what to do with attachments when
  archiving.
(org-attach-archive-delete-maybe): New function that runs as a hook on
  org-archive-hook.  Checks the value of `org-attach-archive-delete',
  and behaves accordingly.
2014-10-16 18:57:39 +02:00
Eric Abrahamsen a7c72e0de5 org-archive: Provide a hook during the archive process
* lisp/org-archive.el (org-archive-hook): New hook.
  (org-archive-subtree): Run hook.
2014-10-16 18:57:34 +02:00
Andrew Burgess 587280ea68 org-capture: Better indentation when creating a new list
lisp/org-capture.el (org-capture-place-item): When starting a new list
use org-indent-line to establish the correct indentation rather than
just using 0.

Creating an entry in org-capture-templates of type item adds entries
into a list, however, currently, if the list is empty then the first
list item will always be indented to depth 0 (so hard on the left),
which looks like this:

  * Top Level
  ** Second Level
  - item #1
  - item #2
  - item #3

This is fine if org-adapt-indentation is nil, however, with the
default value of t lists should be indented more like this:

  * Top Level
  ** Second Level
     - item #1
     - item #2
     - item #3

The patch below changes org-capture-place-item so that, when starting
a new list, the items are indented as above.

Care is taken to preserve two features of the existing behaviour,
first, when adding to an existing list, new items are indented to
match the items already in the list.  And secondly, when there is some
introductory text before the list new items are inserted after the
text, like this:

  * Top Level
  ** Second Level
     This is some introductory text:
     - item #1
     - item #2
     - item #3

TINYCHANGE
2014-10-14 22:24:30 +02:00
Nicolas Goaziou 39963a61d4 ob-clojure: Silence byte-compiler 2014-10-13 22:05:12 +02:00
Nicolas Goaziou ce2090ccfd Fix indentation in lists
* lisp/org-list.el (org-list-item-body-column): Take into
  consideration empty items and bullets followed by two spaces.

* lisp/org.el (org--get-expected-indentation): Fix return value for
  items in lists.
(org-indent-region): Fix infloop when indenting some types of plain
lists.  Also fix error when region starts with blank lines at the
beginning of the buffer.

* testing/lisp/test-org.el (test-org/indent-region): Add tests.
2014-10-13 19:03:14 +02:00
Nicolas Goaziou 89f5ad36d7 Merge branch 'maint' 2014-10-12 22:55:38 +02:00
Nicolas Goaziou a0ac1344fc ox: Fix 88457acff4
* lisp/ox.el (org-export-async-start): Limit first argument to lambda
  expressions.
* lisp/ox-publish.el (org-publish, org-publish-all,
  org-publish-current-file): Replace `ignore', per limit stated above.

Due to a hack allowing to provide quasi-quoted lambda expressions,
symbols are not allowed as result handler.  This limitation is not
much of a problem as `org-export-async-start' is only meant to be used
internally.
2014-10-12 22:53:01 +02:00
Aaron Ecay bc9a582f1e [export] Raise an error if footnote definition is not found.
* lisp/ox.el (org-export-get-footnote-definition): Raise an error if
footnote definition is not found.
2014-10-12 16:47:09 +01:00
Aaron Ecay 5f423f1208 Warn about unexpanded macros on export
* lisp/org-macro.el (org-macro-replace-all): Add optional `finalize'
argument.
* lisp/ox.el (org-export-as): Use it.
2014-10-12 16:47:09 +01:00
Thierry Banel 4753bfa3bf Enable multiple files in :includes header
* ob-C.el (org-babel-C-expand-C, org-babel-C-expand-D): Let
:includes, :defines, :imports accept several items separated by
blanks without enclosing them in parenthesis.

Thanks to Will Everett for reporting this.
2014-10-12 14:00:51 +02:00
Thierry Banel 0e07eb5665 Ascii and Gnuplot key-bindings
* org.el (org-mode-map): change key-binding from C-c p to C-c " a add
C-c " g key-binding for Gnuplot
(org-tbl-menu): add sub-menu for plotting featuring Gnuplot and ascii
plot
* org-table.el (orgtbl-setup): add sub-menu for plotting featuring
Gnuplot and ascii plot
2014-10-12 11:25:51 +02:00
Dima Kogan 1c1f91811d org-table: Field formulas can now create columns as needed
* org-table.el (org-table-formula-create-columns): New variable.
(org-table-recalculate): Use the new org-table-formula-make-new-cols
customization to control whether org creates new columns when
a formula explicitly targets them.
2014-10-12 11:11:57 +02:00
Christopher Schmidt 9c3d22f864 org.el (orgstruct-make-binding): Do not use loop in interpreted code.
* lisp/org.el (orgstruct-make-binding): Do not use loop in
interpreted code.
2014-10-12 06:57:35 +02:00
Christopher Schmidt 2b98cd6554 org.el (orgstruct-make-binding): Do not use loop in interpreted code.
* lisp/org.el (orgstruct-make-binding): Do not use loop in
interpreted code.
2014-10-11 21:40:45 +02:00
Marco Wahl 4a872ae3a0 [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda
* lisp/org-agenda.el (org-get-entries-from-diary): Use the suitable
  display function.  Drop the usage of the obsolete diary-display-hook.

fancy-diary-display has been dropped in Emacs 25.  diary-fancy-display
is the long known replacement of fancy-diary-display.

diary-display-hook has been marked obsolete before Emacs 23.2.
2014-10-11 18:16:36 +02:00
Nicolas Goaziou 39eb7796e8 org-table: Fix :raw parameter in radio tables
* lisp/org-table.el (org-table--to-generic-cell): Use
  `org-element-interpret' data when parameter :raw is non-nil so
  pseudo elements and objects are not ignored.

* testing/lisp/test-org-table.el (test-org-table/to-latex): Add test.

Thanks to Giuseppe Lipari for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/91559
2014-10-11 17:10:05 +02:00
Aaron Ecay fcce67cdeb ob-R: fix interaction with ESS for new sessions
* lisp/ob-R.el (org-babel-R-initiate-session): Properly wait on a new
ESS process.
2014-10-10 12:35:57 -04:00
Nicolas Goaziou fac4677e51 Merge branch 'maint' 2014-10-10 11:11:06 +02:00
Nicolas Goaziou 88457acff4 ox: Fix "void-variable ignore" error when publishing
* lisp/ox.el (org-export-async-start): Allow to use symbols as
  function.

Thanks to Julien Cubizolles for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/91532
2014-10-10 11:05:06 +02:00
Rainer M. Krug 780db69cdf ob-R.el: Add package name to read.table call
* lisp/ob-R.el: (ob-R-transfer-variable-table-with-header)
(ob-R-transfer-variable-table-without-header): Add package name to
call of R function `read.table'.

Thus, it now reads `utils::read.table'.  This clarifies the call as
well as avoids "could not find function" error in R with the devtools
package.  See
<https://github.com/hadley/devtools/issues/336#issuecomment-23517837>.
2014-10-10 00:16:31 -04:00
Nicolas Goaziou 06944507f1 Merge branch 'maint' 2014-10-07 12:29:35 +02:00
Mike McLean d5c531725a org-agenda.el: Update docstring
* org-agenda.el (org-agenda-time-grid): Change docstring.

TINYCHANGE
2014-10-07 12:28:51 +02:00
Bastien Guerry 942eb607e6 ob-clojure.el: Fix compatibility issue
* ob-clojure.el (org-babel-execute:clojure): Fix compatibility
issue with cider >0.7.0.  This breaks compatibility with Cider
<=0.7.0.

Thanks to Daniel Szmulewicz for the suggested fix.
2014-10-06 15:47:40 +02:00
Bastien Guerry 9c64957609 Merge branch 'master' of orgmode.org:org-mode 2014-10-06 14:25:40 +02:00
Bastien Guerry e81b911c46 ob-clojure.el: Remove nrepl.el support
* ob-clojure.el (org-babel-clojure-backend)
(org-babel-execute:clojure): Remove nrepl.el support.
2014-10-06 11:56:04 +02:00
rasmus b54ad32a79 ob-table: Updated documentation.
* ob-table.el (org-sbe): Updated documentation.
2014-10-04 12:10:49 +02:00
Nicolas Goaziou a526ee3b82 Fix 464cd96
* lisp/ox-html.el (org-html-link):
* lisp/ox-md.el (org-md-link): Fix errors introduced in
  464cd965cb.
2014-10-03 22:23:25 +02:00
Rasmus 464cd965cb ox: Support unnumbered headlines via property
* ox.el (org-export--collect-headline-numbering): Ignore unnumbered headline.
(org-export-get-headline-id,
org-export--collect-unnumbered-headline-id): New functions.
(org-export-numbered-headline-p): Further tests for unnumbered headline.
* ox-odt.el (org-odt-headline, org-odt-link,
org-odt-link--infer-description)
ox-md.el (org-md-headline, org-md-link),
ox-latex.el (org-latex-headline, org.latex-link),
ox-html.el (org-html-headline, org-html-link),
ox-ascii.el (org-ascii-link): Support unnumbered headlines.
* test-ox.el (test-org-export/org-export-get-headline-id): New test.
* OrgOdtStyles.xml: Add styles for unnumbered headings.
2014-10-03 22:06:34 +02:00
Nicolas Goaziou cf77a8e878 Fix `org-edit-special' on file names with spaces
* lisp/org.el (org-edit-special): Fix function when INCLUDE or
  SETUPFILE keyword points to a file name with spaces.
2014-10-02 19:23:03 +02:00
Rasmus 986037a538 ox: Allow file-links with #+INCLUDE-keyword
* org.el (org-edit-special): Handle file-links for INCLUDE.
* ox.el (org-export--prepare-file-contents): Handle links and
add option no-heading.
* ox.el (org-export-expand-include-keyword): Resolve headline
links and add option :only-contents.
* orgguide.texi (Include files)
org.texi (Include files): Updated.
* testing/examples/include.org: New examples.
* test-ox.el (test-org-export/expand-include): New tests.
2014-10-02 18:51:37 +02:00
Marco Wahl 58d95c3a4f org-eww: Org-module to store url from eww
* contrib/lisp/org-eww.el: New file
* contrib/README: Added org-eww.
* lisp/org.el (org-modules): Add org-eww to the pool of org-modules.

The hook gets hooked in the module.

The file is more or less a fraction of the org-w3m module with 'w3m'
replaced by 'eww'.
2014-10-01 13:48:55 -04:00
Nicolas Goaziou 39f5f03946 ox: Resurrect :input-buffer property
* lisp/ox.el (org-export--get-buffer-attributes):
  Resurrect :input-buffer property.

This property was removed in 604b9389. since it wasn't necessary
anymore internally.  It is back again as a consequence of a user
request.
http://permalink.gmane.org/gmane.emacs.orgmode/91230
2014-09-28 23:29:59 +02:00
Aaron Ecay 9386b0c584 [ox-latex] add \phantomsection where appropriate.
* lisp/ox-latex.el (org-latex--wrap-label): Add \phantomsection.

Without this, links will jump to the nearest sectioning command
instead of to the exact spot of definition.
2014-09-28 00:03:50 -04:00
Aaron Ecay 710d3c864e allow speed commands to have prefix args
* lisp/org.el (org-self-insert-command): Allow speed commands to be
invoked with prefix args.
2014-09-27 23:37:14 -04:00
Aaron Ecay c29209d919 org-faces: remove org-copy-face
* lisp/org-faces.el (org-copy-face): Remove function.
(org-checkbox-statistics-todo, org-checkbox-statistics-done)
(org-block-begin-line, org-block-end-line, org-quote)
(org-verse, org-agenda-date, org-agenda-date-today)
(org-agenda-clocking, org-agenda-date-weekend)
(org-agenda-current-time, org-mode-line-clock)
(org-mode-line-clock-overrun): Convert to `defface' from
`org-copy-face'.

The ‘org-copy-face’ function didn’t properly deal with face
customizations and color themes.
2014-09-27 23:36:37 -04:00
Nicolas Goaziou f3b2b74baf Merge branch 'maint' 2014-09-27 14:58:51 +02:00
Sebastien Vauban d2ecbe637a ox-ascii: Fix boxquote characters in UTF-8 export
* ox-ascii.el (org-ascii--box-string): Choose more universal Unicode
characters for boxquote corners.
2014-09-27 14:57:19 +02:00
Nicolas Goaziou 45a00a4d82 Merge branch 'maint' 2014-09-26 11:11:34 +02:00
Kyle Meyer 4f81b8cac0 ox.el: Fix typo in documentation
* lisp/ox.el (org-export-show-temporary-export-buffer): Fix typo.

TINYCHANGE
2014-09-26 11:11:02 +02:00
Aaron Ecay 200eeb5723 ox-latex: support :float nil with caption for minted listings
* lisp/ox-latex.el (org-latex-src-block): Support :float nil with
caption for minted.
(org-latex-listings): Edit docstring to describe this usecase.
* lisp/org.el (org-latex-default-packages-alist): Add “capt-of”
package.

This takes advantage of the capt-of package’s \captionof command,
which allows to insert a caption (with autogenerated number and
\ref-able label) without creating a floating environment.  One example
of where this is useful is in the case of a minted source code listing
that spans more than one page.  (Latex floats can’t be larger than a
page, generally speaking.)

The listings package already handles this case using its own mechanism.
2014-09-22 22:46:26 -04:00
Nicolas Goaziou a24ac01cd5 Merge branch 'maint'
Conflicts:
	lisp/ox-latex.el
2014-09-22 17:43:30 +02:00
Nicolas Goaziou 05d8d76e74 ox-latex: Fix link to unnumbered headline
* lisp/ox-latex.el (org-latex-link): Improve test for unnumbered
  headlines.
2014-09-22 17:40:55 +02:00
Achim Gratz 7585fe449b ob-ruby: clean up the session code some more and work around an I/O sync problem in comint
* lisp/ob-ruby.el (org-babel-ruby-evaluate): Clean up the session code
  and remove a superfluous `butlast'.  Work around a problem in comint
  where the first prompt in a session may be printed after the
  evaluation has already started, thus producing a spurious line in
  the output.

* testing/lisp/test-ob-ruby.el (test-ob-ruby/session-output-1,
  test-ob-ruby/session-output-2 test-ob-ruby/session-output-3): Test
  correct transfer of interpreter state across several session
  invocations.
2014-09-21 17:59:49 +02:00
Achim Gratz 4ef78e68c1 ob-ruby: fix a24775dc79 again
* lisp/ob-ruby.el (org-babel-ruby-evaluate): Temporarily disable the
  irb prompt to ensure that the output is properly recognized using
  the standard settings from inf-ruby and no extra settings in .irbrc
  or other configuration files from Ruby.  Remove superfluous
  `comint-send-input' that produced a spurious empty line in output.
* testing/lisp/test-ob-ruby.el (test-ob-ruby/session-output): Remove
  spurious emtpy line in expected output.
2014-09-21 12:57:49 +02:00
Steven Rémot e228cd1060 ob-sql.el: Clean mysql parameters generation
* lisp/ob-sql.el (dbstring-mysql): Rename function and tweak a bit its
  implementation
  (org-babel-execute:sql): Use new function name

Prefix `dbstring-mysql' function with the namespace "org-babel-sql" to
avoid name collisions.

Also replace the call to `remq' by `delq' because it is a bit more
efficient, and also to be consistent with
`org-babel-sql-dbstring-postgresql'.
2014-09-20 23:06:40 +02:00
Steven Rémot e5e9fc974d ob-sql.el: Enhance postgresql support
* lisp/ob-sql.el (org-babel-sql-dbstring-postgresql): New function
  (org-babel-execute:sql): Use new function.

Before this patch, it was necessary to use :cmdline parameter to
specify host, user and database different the the default ones.  Now,
this can be done using parameters that are independents of the engine
used.

This is not trivial (and not recommended) to pass password as a
command line argument to psql, so :dbpassword is not supported.
2014-09-20 23:06:36 +02:00
Nicolas Goaziou 20539b8d1d Merge branch 'maint' 2014-09-20 23:02:20 +02:00
marcowahlsoft@gmail.com 60418c5ca8 Fix to determine a bulk-markable line
* lisp/org-agenda.el (org-agenda-bulk-mark,
  org-agenda-bulk-mark-regexp, org-agenda-bulk-toggle-all): This fixes
  e.g. org-agenda-bulk-mark-all when time-grid is shown.

TINYCHANGE
2014-09-20 23:01:51 +02:00