Commit Graph

17923 Commits

Author SHA1 Message Date
Nicolas Goaziou 7875c3c498 org-docview: Use lexical binding
* lisp/org-docview.el (org-docview-store-link): Silence byte-compiler.
2015-12-20 22:15:41 +01:00
Nicolas Goaziou e82f48a8eb org-lint: Add checkers
* lisp/org-lint.el (org-lint-deprecated-export-blocks):
(org-lint-missing-backend-in-export-block):
(org-lint-obsolete-include-markup): New checkers.
2015-12-20 21:56:27 +01:00
Nicolas Goaziou 9f5a1ad51e org.texi: Update export blocks documentation
* doc/org.texi (Conventions):
(Include files):
(Special blocks):
(ASCII/Latin-1/UTF-8 export):
(Beamer specific syntax):
(Quoting HTML tags):
(Quoting @LaTeX{} code):
(Creating one-off styles):
(Quoting Texinfo code):
(Easy templates): Update export blocks documentation.
2015-12-20 21:56:27 +01:00
Nicolas Goaziou 54318add34 Change export block syntax
* 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
2015-12-20 21:56:27 +01:00
Nicolas Goaziou 8c2e232b00 ob-sql: Fix `case' calls
* lisp/ob-sql.el (org-babel-execute:sql): Replace erroneous `case' call
  with `pcase'.  Small refactoring.  Keep lines within 80 characters.
2015-12-20 16:57:07 +01:00
Peter Feigl cf8bfc178d ob-sql.el: Add support for Oracle via sqlplus
* lisp/ob-sql.el: Add a database type 'oracle that uses sqlplus to
support running SQL blocks against an Oracle database.

Use with properties like this (all mandatory):
 :engine oracle :dbhost <host.com> :dbport <1521> :dbuser <username>
 :database <database> :dbpassword <secret>

TINYCHANGE
2015-12-20 16:54:21 +01:00
Thomas Alexander Gerds 73803c1cf9 org-gnus.el: change nnir group reference
* lisp/org-gnus.el (org-gnus-store-link): Articles in an nnir group
  refer to the original group.

TINYCHANGE
2015-12-18 22:42:32 +01:00
Nicolas Goaziou babcfaa4eb Merge branch 'maint' 2015-12-18 22:32:26 +01:00
Nicolas Goaziou 713fe873b7 org-table: Fix "$<" constructs in formulas
* lisp/org-table.el (org-table-recalculate): Expand "$<" without
  returning an error.  Small refactoring.

* testing/lisp/test-org-table.el (test-org-table/first-rc): New test.

Reported-by: Stefan Nobis <stefan-ml@snobis.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/103693>
2015-12-18 22:30:41 +01:00
Alan Schmitt e43d0abdd1 org-mac-link: Do not quote lambdas
* contrib/lisp/org-mac-link.el (org-mac-grab-link): Do not quote
  lambdas.
2015-12-18 11:28:39 +01:00
Mike McLean 2e251821ce org-mac-link.el: Add support for Evernote Note Links
(org-mac-grab-Evernote-app-p, org-mac-evernote-path): New custom
variables to control Evernote grabbing
(org-mac-evernote-note-open): New function to open an Evernote note by
ID
(org-as-get-selected-evernote-notes,
org-mac-evernote-note-insert-selected): New functions to get the
selected Evernote note(s) and insert them into current buffer

Note this change also defines a new link type ("mac-evernote") via a
call to “org-add-link-type”.

Signed-off-by: Alan Schmitt <alan.schmitt@polytechnique.org>
2015-12-18 11:21:33 +01:00
Mike McLean aee0498f3f org-mac-link.el: Make path to Microsoft Outlook customizable
* org-mac-link.el (org-mac-outlook-path): New Custom String to hold the file system path to Microsoft Outlook
(org-mac-outlook-message-open, org-as-get-selected-outlook-mail): Use
 the new custom string instead of hard-coding the path to Outlook

Signed-off-by: Alan Schmitt <alan.schmitt@polytechnique.org>
2015-12-18 11:15:36 +01:00
Nicolas Goaziou 077fe86ad7 ob-latex: Properly declare :imagemagick header argument
* lisp/ob-latex.el (org-babel-header-args:latex): Declare :imagemagick.

Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/103654>
2015-12-17 15:34:33 +01:00
Marco Wahl 986475a699 Merge branch 'maint' 2015-12-16 08:41:19 +01:00
Paul M. Rodriguez 5761580def org-velocity: New version of org-velocity.
* contrib/lisp/org-velocity.el: New version.
2015-12-16 08:39:43 +01:00
Nicolas Goaziou 0bdf4cedc5 Merge branch 'maint' 2015-12-15 00:03:57 +01:00
Thierry Banel cfb82b7c62 org-table: Fix missing dollar bug revealed by commit 16c7594
* org-table.el (orgtbl-ascii-plot): Add missing dollar in formula.
2015-12-14 23:55:17 +01:00
Nicolas Goaziou d01ed5b89b ox-html: Remove spurious # in some links
* lisp/ox-html.el (org-html-link): Remove spurious # introduced in
  8594aed.

Reported-by: Alan Schmitt <alan.schmitt@polytechnique.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/103599>
2015-12-14 23:52:11 +01:00
Kyle Meyer f57778090e Update for change in letrec behavior
* lisp/ox-latex.el (org-latex--delayed-footnotes-definitions):
* lisp/ox.el (org-export--selected-trees):
(org-export--prune-tree):
(org-export--merge-external-footnote-definitions):
(org-export--footnote-reference-map): Provide nil value for binders.

Using

  (letrec ((SYMBOL)) ...)

to bind SYMBOL to nil relies on (setq SYMBOL) setting SYMBOL to nil.  As
of 5d93a89 (Byte compiler: on setq with an odd number of arguments,
generate a `signal', 2015-11-26) in the Emacs repo, setq signals an
error when given an odd number of arguments.

Reported-by: Zack Piper <zack@apertron.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/103539>
<http://permalink.gmane.org/gmane.emacs.devel/196182>
2015-12-12 22:46:24 -05:00
Marc Ihm d1796108f6 Version 5.0.0 of org-index 2015-12-12 22:36:13 +01:00
Marco Wahl 5ca98b9213 Merge branch 'maint' 2015-12-12 19:57:22 +01:00
Marco Wahl 700b8e70f6 org-agenda: Refactoring
* lisp/org-agenda.el(org-agenda--quit): Removed an unnecessary variable.
2015-12-12 19:46:34 +01:00
Marco Wahl 9b1c682425 org-agenda: Fix quit sticky agenda
* lisp/org-agenda.el(org-agenda--quit): Removed the argument from the
  call to `bury-buffer' to let the agenda disappear.
2015-12-12 19:35:26 +01:00
Nicolas Goaziou 8594aed1d6 ox-html: Always resolve external custom-id links
* lisp/ox-html.el (org-html-link): Always resolve external custom-id links.

Suggested-by: Alan Schmitt <alan.schmitt@polytechnique.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/103552>
2015-12-12 09:57:51 +01:00
Nicolas Goaziou ce4143e79d Merge branch 'maint' 2015-12-12 00:41:43 +01:00
Nicolas Goaziou 7d1a6777d0 ox: Fix uninterpreted subscript
* lisp/ox.el (org-export--remove-uninterpreted-data-1): Fix
  un-interpreted subscript containing another object.

* testing/lisp/test-ox.el (test-org-export/uninterpreted): Add test.

Reported-by: Yasushi SHOJI <yashi@atmark-techno.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103553>
2015-12-12 00:38:39 +01:00
Nicolas Goaziou 64aee4692a org-list: Fix sending empty lists
* lisp/org-list.el (org-list--to-generic-item): Fix sending empty lists.

* testing/lisp/test-org-list.el (test-org-list/to-generic): Add test.

Reported-by: Eric Abrahamsen <eric@ericabrahamsen.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/103462>
2015-12-08 18:45:21 +01:00
Nicolas Goaziou 38fd09e29b Fix code typo
* lisp/org.el (org-get-local-variables): Fix code typo.
2015-12-06 18:35:09 +01:00
Aaron Ecay a198d81080 Revert "Fix a slowdown in footnote parsing."
This reverts commit 046310d273.
2015-12-05 15:40:36 +00:00
Aaron Ecay 046310d273 Fix a slowdown in footnote parsing.
* lisp/org-footnote.el (org-footnote-in-valid-context-p): Fix slowdown.

Apply de Morgan’s law and reorder clauses from (apparently) quickest to
slowest.  See <http://mid.gmane.org/loom.20151204T081351-244@post.gmane.org>.
2015-12-05 13:41:33 +00:00
Nicolas Goaziou 7c08d5c12f ORG-NEWS: Fix an entry 2015-12-05 13:50:19 +01:00
Nicolas Goaziou d02f9d41af Ignore some local variables upon cloning
* lisp/org.el (org-unique-local-variables): New variable.
(org-get-local-variables):
(org-clone-local-variables): Use variable above.  Do not rely on an
obscure naming convention to determine if a local variable is meant to
be cloned or read.
2015-12-05 13:44:12 +01:00
Nicolas Goaziou dbaab40bda Obey to `org-inhibit-startup'
* lisp/org.el (org-mode): `org-startup-truncated' and
  `org-startup-indented' are expected to have an effect only when
  `org-inhibit-startup' is non-nil.
2015-12-05 13:36:41 +01:00
Nicolas Goaziou d6a169a82c org-capture: Fix cache in capture buffers
* lisp/org-capture.el (org-capture-steal-local-variables): Remove function.
(org-capture-fill-template): Apply removal.  Use
`org-clone-local-variables' instead.  Focus on Org specific variables.

* lisp/org.el (org-get-local-variables):
(org-clone-local-variables): Ignore internal local variables, whose
value is probably tied to their respective buffer.  In particular, this
prevents cache related variables from being copied.

* lisp/org-indent.el (org-indent--initial-marker): Renamed from
  `org-indent-initial-marker'.  Marking it as internal prevents it from
  being copied by `org-clone-local-variables' and alike.
(org-indent-mode):
(org-indent-initialize-buffer): Apply renaming.
2015-12-05 11:55:02 +01:00
Nicolas Goaziou 43009088b7 org-list: Silence byte-compiler (part 2) 2015-12-05 09:41:14 +01:00
Nicolas Goaziou 2beaeffef1 org-list: Silence byte-compiler 2015-12-05 09:38:49 +01:00
Nicolas Goaziou a682b20a46 org-capture: Use lexical binding
* lisp/org-capture.el (org-capture-is-refiling): New variable.
(org-capture-place-template): Silence byte-compiler.

* lisp/org.el (org-refile): Use new variable.
2015-12-05 09:30:17 +01:00
Nicolas Goaziou 9e1d625971 org-capture: Add missing %s placeholder
* lisp/org-capture.el (org-capture-fill-template): Add missing placeholder.
2015-12-05 09:25:06 +01:00
Nicolas Goaziou 9534b159e8 Merge branch 'maint' 2015-12-04 21:37:18 +01:00
Nicolas Goaziou 06c6ba4ac3 org-table: Fix named fields with TAB-indentation
* lisp/org-table.el (org-table-eval-formula): Properly parse named
  fields when indentation of current line ends with a TAB character.

* testing/lisp/test-org-table.el (test-org-table/tab-indent): New test.

Reported-by: Piotr Gajewski <pg7@outlook.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103290>
2015-12-04 21:34:40 +01:00
Marco Wahl 54f93be1d0 test-org-inlinetask: Testing inlinetasks
* testing/lisp/test-org-inlinetask.el: New file.  Testing
  `org-inlinetask-goto-end'.
2015-12-04 19:59:52 +01:00
Marco Wahl a426abffa5 org-inlinetask: Fix folding inlinetask children
* org-inlinetask.el(org-inlinetask-goto-end): Position point just at the
  end.  Do not forward-line.

Fixes org-cycle for state CHILDREN when the children are inlinetasks
which have immediate neigbors.
2015-12-04 19:54:21 +01:00
Marco Wahl ca7d6f9366 org-colview: Fix column view editing
* lisp/org-colview.el (org-columns-edit-value): Setting some values for
  postponed evaluation more directly as before.  Catchword:
  lexical-binding.
2015-12-04 12:37:42 +01:00
Nicolas Goaziou 5c13a6b765 org-capture: Expand interactive placeholders last
* lisp/org-capture.el (org-capture-templates): Update docstring.
(org-capture-fill-template): Expand interactive placeholders when the
template is otherwise completely filled.

This restores the previous behaviour for template's expansion.
2015-12-03 23:27:07 +01:00
Nicolas Goaziou 11291ffcd0 org-list: Radio lists use Org Export library
* lisp/org-list.el (org-list-to-lisp): New function.
(org-list-parse-list): Mark function obsolete.

(org-list-send-list):
(org-list-to-generic):
(org-list-make-subtree): Use new function.

(org-list-item-trim-br): Remove function.

(org-list-to-generic): Use Org Export library.
(org-list--depth):
(org-list--trailing-newlines):
(org-list--generic-eval):
(org-list--to-generic-plain-list):
(org-list--to-generic-item): New functions.

(org-list-to-latex):
(org-list-to-html):
(org-list-to-texinfo): Apply changes.  Allow parameters.
(org-list-to-subtree): Apply changes.

* lisp/org.el (org-toggle-heading):
* lisp/ob-core.el (org-babel-insert-result): Apply changes.

* doc/org.texi (Radio lists): Update documentation.

* testing/lisp/test-org-list.el (test-org-list/to-generic): New test.
2015-12-03 09:54:49 +01:00
Nicolas Goaziou a5977a2740 ox: Tiny refactoring
* lisp/ox.el (org-export--smart-quote-status): Tiny refactoring.
2015-12-02 23:27:28 +01:00
Nicolas Goaziou b49f2e0b75 org-capture: Fix bd3a2cb (part 2)
* lisp/org-capture.el (org-capture-fill-template): Allow more than one
  word when filling %{prompt} place holders.

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/103251>
2015-12-02 22:22:24 +01:00
Ruben Maher 6b2c38bb71 ox-html.el: Add lang attribute to html tag
* lisp/ox-html.el (org-html-template): Add lang attribute to exported
  html tag.  Some features of the CSS Text Module (Level 3) require this
  attribute to be present (for example, so that the browser knows how to
  hyphenate the text). For more info, please take a look here:
  https://drafts.csswg.org/css-text-3/#languages

TINYCHANGE
2015-12-01 23:34:27 +01:00
Ruben Maher eeee60da70 ox-html.el: Remove superflous whitespace
* lisp/ox-html.el: Remove superfluous whitespace from meta tags, put
  there by `org-html--buld-meta-info' and `org-html--build-head'.
  `org-html-close-tag' already inserts a space, so it is not necessary
  to add another.  Previously these affected tags would look like
  <meta  name="generator" content="Org-mode" />.

TINYCHANGE
2015-12-01 23:34:23 +01:00
Nicolas Goaziou fb32b28057 org-capture: Fix bd3a2cb
* lisp/org-capture.el (org-capture-fill-template): Fix regexp and type
  for KEY.

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/103214>
2015-12-01 23:20:44 +01:00