Commit Graph

12030 Commits

Author SHA1 Message Date
Nicolas Goaziou 1f55456115 ob-lob: Small refactoring
* lisp/ob-lob.el (org-babel-lob-get-info): Refactor code.  Use parser to
  eschew false positives.
2015-11-26 15:13:22 +01:00
Nicolas Goaziou e103ad8ae1 Merge branch 'maint' 2015-11-26 14:23:01 +01:00
Nicolas Goaziou b0a436cb8e org-agenda: Write only currently visible items
* lisp/org-agenda.el (org-agenda-write): Fix arguments passed to
  `org-agenda-remove-marked-text' to properly remove entries with
  `invisible' property set to `org-filtered'.
* lisp/ox-icalendar.el (org-icalendar-export-current-agenda): Always
  include TODO entries in the output.  The motivation is that a user not
  filtering out TODO or DONE items in the current agenda probably wants
  them in the output.

Reported-by: "sgeorgii ." <sgeorgii@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102998>
2015-11-26 14:20:42 +01:00
Nicolas Goaziou 12c118b43d org-agenda: Fix f2d5083
* lisp/org-agenda.el (org-agenda-filter-make-matcher-tag-exp): Fix code
  typo in last commit.  Fix docstring.
2015-11-26 11:18:56 +01:00
Gustav Wikstrom f2d508347e org-agenda: Filter empty tags
* lisp/org-agenda.el (org-agenda-filter-make-matcher-tag-exp): Deal with
  the case when the user provided an empty string to filter or exclude
  rows from the agenda.

This is done in order to fix a problem reported in emacs-orgmode mailing
list 2015-11-25 02:50 with subject "[O] [RFC] [PATCH] Changes to Tag
groups - allow nesting and regexps".
2015-11-26 09:18:22 +01:00
Nicolas Goaziou 50359f705a Merge branch 'maint' 2015-11-23 23:23:06 +01:00
Nicolas Goaziou 16c7594a0f org-table: Fix `org-table-eval-formula'
* lisp/org-table.el (org-table-get-formula):
(org-table-store-formulas): Column formulas references are stored along
with their dollar-sign since "Fix `org-table-get-range' with column
formulas". Update functions accordingly.

Reported-by: John Hendy <jw.hendy@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103056>
2015-11-23 23:19:14 +01:00
Nicolas Goaziou 3e68159c3a Merge branch 'maint' 2015-11-23 12:10:57 +01:00
Nick Gunn 773e0e9c72 ox-publish: Handle includes with searches
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Ignore
  any link search suffix on an include so that the path represents
  a valid file during the publishing check.

TINYCHANGE
2015-11-23 10:53:42 +01:00
Nicolas Goaziou 522ec9a224 Merge branch 'maint' 2015-11-18 23:37:39 +01:00
Nicolas Goaziou d537a371be org-colview: Fix skip-empty-rows without ITEM
* lisp/org-colview.el (org-columns-capture-view): Obey to
  skip-empty-rows even when "ITEM" doesn't belong to current title.

Reported-by: Joon Ro <joon.ro@outlook.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102924>
2015-11-18 23:36:23 +01:00
Kyle Meyer 1aaa0817b6 Merge branch 'maint' 2015-11-17 21:33:53 -05:00
Paul Eggert 31459201ae Backport commit ac16149 from Emacs
Fix docstring quoting problems with ‘ '’
ac16149ba470ae8a625d42a61adbb6e84254c675
Paul Eggert
Tue Nov 17 15:29:35 2015 -0800
2015-11-17 21:30:57 -05:00
Nicolas Goaziou b5cb6a3873 org-archive: Fix "symbol as value is void: time"
* lisp/org-archive.el (org-archive-subtree): Fix "symbol as value is
  void: time".  Small refactoring.
2015-11-18 00:17:35 +01:00
Nicolas Goaziou 5e0efebef8 Merge branch 'maint' 2015-11-14 09:29:37 +01:00
Hiroshi Saito d452176885 org-feed.el: Load the xml library before substituting a guid XML element
* lisp/org-feed.el (org-feed-parse-rss-feed): Load the xml library
before calling `xml-substitute-special`.

TINYCHANGE
2015-11-14 09:29:21 +01:00
Nicolas Goaziou b48da39ed4 org-id: Use lexical binding
* lisp/org-id.el (org-id-get-with-outline-drilling): Remove unused
  optional argument.
2015-11-14 00:05:50 +01:00
Nicolas Goaziou 8bbb789757 org-habit: Use lexical binding
* lisp/org-habit.el (org-habit-insert-consistency-graphs): Silence
  byte-compiler.
2015-11-14 00:03:51 +01:00
Nicolas Goaziou 3090bb29c8 org-archive: Silence byte-compiler 2015-11-13 23:59:33 +01:00
Nicolas Goaziou 3c49de4380 org-timer: Use lexical binding
* lisp/org-timer.el (org-timer-set-timer): Silence byte-compiler.
2015-11-13 23:58:38 +01:00
Nicolas Goaziou 403249a6ab org-attach: Use lexical binding
* lisp/org-attach.el (org-attach-dir): Silence byte-compiler.
2015-11-13 23:51:28 +01:00
Nicolas Goaziou 4e1f550224 org-archive: Use lexical binding
* lisp/org-archive.el (org-all-archive-files): Refactor code.
(org-archive-subtree):
(org-archive-all-done):
(org-archive-all-old): Silence byte-compiler.
2015-11-13 23:47:06 +01:00
Nicolas Goaziou f416ee1a24 Silence byte-compiler 2015-11-13 23:29:04 +01:00
Nicolas Goaziou 37810b7177 Remove outdated compatibility code 2015-11-13 23:25:57 +01:00
Nicolas Goaziou cfbd2b516b org-ctags: Silence byte-compiler
* lisp/org-ctags.el (y-or-n-minibuffer): Remove function.
(org-ctags-find-tag):
(org-ctags-find-tag-interactive): Use `xref-find-definitions' instead of
`find-tag'.
2015-11-13 23:21:26 +01:00
Nicolas Goaziou 7f937b3cea Silence byte-compiler 2015-11-13 23:13:41 +01:00
Nicolas Goaziou 39813c4d93 Merge branch 'maint' 2015-11-12 23:26:02 +01:00
Nicolas Goaziou c651e150cc org-table: Fix `org-table-get-range' with column formulas
* lisp/org-table.el (org-table-get-stored-formulas): Store complete
  column formulas including the "$" sign.  Remove interactive status.
(org-table-get-range): Handle nicely "$n..$m" ranges.  Apply
changes to `org-table-get-stored-formulas'.  Rename some bindings for
clarity.
(org-table-expand-lhs-ranges): Ignore column formalas.
(org-table-remote-reference-indirection): Refactor function.

Reported-by: Junpeng Qiu <qjpchmail@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102861>
2015-11-12 23:24:18 +01:00
Nicolas Goaziou bd921f0858 Merge branch 'maint' 2015-11-12 11:29:55 +01:00
Nicolas Goaziou 53a4209003 ox: Fix comments removal
* lisp/ox.el (org-export--delete-comments): Preserve document's
  structure when removing comment lines or comment blocks.

* testing/lisp/test-ox.el (test-org-export/comments): New test.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102860>
2015-11-12 11:28:13 +01:00
Nicolas Goaziou f0a48b9064 Merge branch 'maint' 2015-11-11 01:28:54 +01:00
Nicolas Goaziou 7bd20d0c6e org-table: Fix code typo
* lisp/org-table.el (org-table-analyze): Fix code typo introduced in
  5702908.
2015-11-11 01:28:27 +01:00
Nicolas Goaziou 64a602e822 Merge branch 'maint' 2015-11-11 00:41:06 +01:00
Nicolas Goaziou 57029084b5 org-table: Fix bug with "$>" reference
* lisp/org-table.el (org-table-analyze): Fix incorrect replacement for
  "$>" reference when the table ends on a hline.
* testing/lisp/test-org-table.el (test-org-table/end-on-hline): New
  test.
2015-11-11 00:37:57 +01:00
Nicolas Goaziou fe04055b3d org-src: Silence byte-compiler
* lisp/org-src.el (org-edit-inline-src-code): Remove unused binding.
2015-11-10 23:54:41 +01:00
Nicolas Goaziou b5b08a7f52 ox: Look for export and noexport tags in FILETAGS
* lisp/ox.el (org-export--selected-trees):
(org-export--skip-p): Check also FILETAGS.
* lisp/ox.el (org-export-get-tags): Also report export and noexport
  tags.

Reported-by: Michael Welle <mwe012008@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/102754>
2015-11-10 23:38:04 +01:00
Nicolas Goaziou c993007eb6 ox-publish: Fix publishing bug
* lisp/ox-publish.el (org-publish--collect-references): Ignore
  non-element.
2015-11-10 18:14:46 +01:00
Nicolas Goaziou 6c1f63b6a6 org-src: Allow to edit remotely inline src blocks
* lisp/org-src.el (org-edit-inline-src-code): New function.
(org-src--contents-area): Handle inline src blocks.

* lisp/org.el (org-edit-special): When on an inline src block, edit it.
2015-11-08 20:55:31 +01:00
Nicolas Goaziou 10173ad6d6 org-agenda: Fix `org-batch-agenda'
* lisp/org-agenda.el (org-batch-agenda): Fix function when CMD-KEY is
  a string of length 2.

Reported-by: Christoph Gaitzsch <privat@christophgaitzsch.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/102724>
2015-11-08 20:12:51 +01:00
Nicolas Goaziou 24aaa53573 ox: Fix code comment
* lisp/ox.el (org-export-output-file-name): Fix code comment.
2015-11-08 16:48:31 +01:00
Nicolas Goaziou 75c93f7c21 ox: Small refactoring
* lisp/ox.el (org-export-output-file-name): Small refactoring.
2015-11-08 16:44:26 +01:00
Nicolas Goaziou b8f100c14a Fix `org-cycle' within `orgstruct-mode'
* lisp/org.el (org-show-children): Fallback to `outline-show-children'
  when `orgstruct-mode' is active.

Reported-by: Jonas Bernoulli <jonas@bernoul.li>
<http://permalink.gmane.org/gmane.emacs.orgmode/102709>
2015-11-08 16:16:17 +01:00
Nicolas Goaziou df321b097f org-list: Fix unbound depth error
* lisp/org-list.el (org-list-parse-list): Use `letrec'.
(org-list-to-generic): Do not allow random sexp, but authorize functions.
(org-list-to-subtree): Apply change to previous function.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102651>
2015-11-08 00:07:33 +01:00
Nicolas Goaziou 49d3d06cb4 Silence byte-compiler 2015-11-07 23:36:02 +01:00
Nicolas Goaziou 71b3b51bca ox-publish: Silence byte-compiler
* lisp/ox-publish.el (org-publish-compare-directory-files):
(org-publish-get-base-files-1):
(org-publish-get-base-files):
(org-publish-index-generate-theindex):
(org-publish--collect-references):
(org-publish-resolve-external-link): Prefix functions from cl-lib with
"cl-" or replace `case' with `pcase'.
2015-11-07 23:28:04 +01:00
Nicolas Goaziou e1cb24288e org-capture: Silence byte-compiler
* lisp/org-capture.el (org-capture-place-template): Remove unused
  `org-capture-target-marker'.
2015-11-07 23:09:47 +01:00
Nicolas Goaziou 0547969c0c ob-ref: Silence byte-compiler
* lisp/ob-ref.el (org-babel-ref-resolve): Silence byte-compiler.
2015-11-07 23:06:21 +01:00
Charles Berry 27aa7b3f1e ob-R.el: org-babel-R-evaluate-session finds prompts more reliably
* lisp/ob-R.el (org-babel-R-evaluate-session) should find prompts more
  reliably.  First, the regular expression used requires spacing
  between and after instances of `[>+.]'.  Also, the search terminates
  at the first `\n', so complicated results with prompt like strings
  in them are not deleted.

Prompt finding is necessarily heuristic. It may be necessary to render
the regular expression with a defcustom as is done in ess-mode.
2015-11-07 13:26:11 -08:00
Aaron Ecay 635aae3917 ob-latex: Add some latex-specific header args
* lisp/ob-latex.el (org-babel-header-args:latex): Add headers, packages,
and buffer to the list of acceptable args.
2015-11-07 20:31:35 +00:00
Aaron Ecay 4773baf3a5 ob-awk: fix bug in 0d000f5
* lisp/ob-awk.el (org-babel-execute:awk): Fix bug introduced by
introduction of `org-babel--get-vars'.
2015-11-07 20:31:35 +00:00
Aaron Ecay 5b76509830 org-lint: don’t call org-babel-process-params
* lisp/org-lint.el (org-lint-wrong-header-value): Don’t call
`org-babel-process-params'.

This function adds generated values to the header args: it’s never a
user error if these are incorrect.  It also calls babel code to resolve
:var references, which makes linting an undesirably long and potentially
side-effectful operation.
2015-11-07 20:31:35 +00:00
Aaron Ecay f0380f54c1 ob-ref: fix bug
* lisp/ob-ref.el (org-babel-ref-resolve): Fix error when src block
result is nil.
2015-11-07 20:31:35 +00:00
Charles Berry 3f6e71e62e ob-core.el: org-babel-confirm-evaluate bugfix
* lisp/ob-core.el (org-babel-confirm-evaluate): Return t/nil for y/n answer to query.   Minor edits of prompt and message.
2015-11-07 09:39:17 -08:00
Nicolas Goaziou d24a9b7645 Change references from Org 8.4 to 9.0
According to <http://mid.gmane.org/87oai4w69i.fsf@gnu.org>, master is
the root for Org 9.0, not Org 8.4.
2015-11-07 17:11:48 +01:00
Nicolas Goaziou d35d1e0502 ob-core: Fix typo
* lisp/ob-core.el (org-babel-read-element): Remove `paragraph', which is
  matched earlier.
2015-11-06 23:33:45 +01:00
Nicolas Goaziou cdfc96f47c ox-latex: Do not merge consecutive $$...$$
* lisp/ox-latex.el (org-latex-latex-fragment): Since $$..$$ snippets are
  not wrapped within a math-block, do not remove markers.
(org-latex--wrap-latex-math-block): Do not wrap $$...$$ LaTeX snippets.
2015-11-06 23:01:03 +01:00
Nicolas Goaziou 265e5b9984 ox-ascii: Fix footnotes export
* lisp/ox-ascii.el (org-ascii-inner-template): Since 47265b3, footnotes
  definitions' contents do no start with `org-data'.  Update code.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102648>
2015-11-06 20:58:14 +01:00
Aaron Ecay cce317faf6 Fix bug in 95e2777 2015-11-06 19:11:07 +00:00
Aaron Ecay 95e2777663 ox.el: Add :safe declarations to defcustoms
* lisp/ox.el: Add :safe declarations to defcustoms.
2015-11-06 17:49:57 +00:00
Aaron Ecay fa1a9aad8e org.el: Don’t special-case ‘define-obsolete-function-alias’ for emacs <= 23 2015-11-06 12:50:42 +00:00
Aaron Ecay 861b6b1bd0 org.el: Obsolete ‘org-image-file-name-regexp’
* lisp/org.el (org-image-file-name-regexp): Make obsolete.  Change
callers.
2015-11-06 12:50:42 +00:00
Aaron Ecay d29d9a029c org.el: Refactor ‘org-previous-line-empty-p’
* lisp/org.el (org--line-empty-p):
(org-next-line-empty-p): New functions.
(org-previous-line-empty-p): Remove `next' argument.  Call
`org--line-empty-p'.
2015-11-06 12:50:41 +00:00
Aaron Ecay a6768538d6 org.el: mark `org-on-heading-p' obsolete.
* lisp/org.el (org-on-heading-p): Mark obsolete.
2015-11-06 12:50:41 +00:00
Aaron Ecay 8b4672bdd0 org.el: Minor refactorings.
* lisp/org.el (org-force-cycle-archived):
(org-do-emphasis-faces):
(org-entry-end-position):
(org-check-and-save-marker):
(org-cancel-repeater):
(org-update-parent-todo-statistics):
(org-scan-tags):
(org-yank-folding-would-swallow-text): Refactor.
2015-11-06 12:50:41 +00:00
Aaron Ecay e4cd3dd22b Remove some home-grown copies of cl-lib functions.
* lisp/org.el (org-count, org-remove-if, org-remove-if-not):
(org-reduce, org-every, org-some): Obsolete, use cl-lib versions
everywhere.
(org-sublist): Reimplement in terms of `cl-subseq'; make obsolete.
2015-11-06 12:50:40 +00:00
Aaron Ecay 2e26751b4c org.el: use ‘when’ and ‘unless’ instead of single-branch ‘if’
* lisp/org.el: Refactor single-branch `if' to `when' or `unless' as
appropriate.  Also apply other misc. refactorings of conditionals.
2015-11-06 12:47:04 +00:00
Aaron Ecay c7f1b55995 Mark `org-table-recognize-table.el' obsolete
* lisp/org.el (org-at-table-hline-p): Mark obsolete.

No org code has called this function since 2010.
2015-11-06 12:47:04 +00:00
Aaron Ecay 48096562ba Make `org-table-p' obsolete.
* lisp/org.el: Make `org-table-p' obsolete.  Change all callers.
2015-11-06 12:47:04 +00:00
Nicolas Goaziou 89b05fe7f7 ox-texinfo: Use lexical binding
* lisp/ox-texinfo.el (org-texinfo-format-drawer-function):
(org-texinfo--filter-section-blank-lines):
(org-texinfo--text-markup):
(org-texinfo-bold):
(org-texinfo-center-block):
(org-texinfo-clock):
(org-texinfo-code):
(org-texinfo-dynamic-block):
(org-texinfo-entity):
(org-texinfo-example-block):
(org-texinfo-export-block):
(org-texinfo-export-snippet):
(org-texinfo-fixed-width):
(org-texinfo-footnote-reference):
(org-texinfo-format-headline-default-function):
(org-texinfo-inline-src-block):
(org-texinfo-format-inlinetask-default-function):
(org-texinfo-italic):
(org-texinfo-keyword):
(org-texinfo-line-break):
(org-texinfo-node-property):
(org-texinfo-paragraph):
(org-texinfo-planning):
(org-texinfo-property-drawer):
(org-texinfo-quote-block):
(org-texinfo-special-block):
(org-texinfo-src-block):
(org-texinfo-statistics-cookie):
(org-texinfo-subscript):
(org-texinfo-superscript):
(org-texinfo-target):
(org-texinfo-timestamp):
(org-texinfo-verbatim):
(org-texinfo-verse-block): Silence byte-compiler.
2015-11-06 00:11:00 +01:00
Nicolas Goaziou 5ed56ffa4c ox-publish: Use lexical binding
* lisp/ox-publish.el (org-publish-needed-p):
(org-publish-update-timestamp):
(org-publish-remove-all-timestamps):
(org-publish-get-base-files-1):
(org-publish-get-base-files):
(org-publish-get-project-from-filename):
(org-publish-attachment):
(org-publish-org-sitemap):
(org-publish):
(org-publish-all):
(org-publish-current-file):
(org-publish-collect-index):
(org-publish--collect-references):
(org-publish-cache-file-needs-publishing): Silence byte-compiler.
Replace `mapc' + `lambda' with `dolist'.
2015-11-05 23:55:51 +01:00
Nicolas Goaziou 9d3d95b6e5 ox-org: Use lexical binding
* lisp/ox-org.el (org-org-identity):
(org-org-keyword):
(org-org-link): Silence byte-compiler.
2015-11-05 23:40:53 +01:00
Nicolas Goaziou 0edad6725a Merge branch 'maint' 2015-11-05 23:24:10 +01:00
Nicolas Goaziou 73a5c27cc1 Fix table editing with an active region
* lisp/org.el (org-self-insert-command): Do not call
  `backward-delete-char' since it possibly deletes active region.
  Simplify code.

This fixes bug#21838.
2015-11-05 23:18:13 +01:00
Aaron Ecay 07e16c2fc5 Use setq-local and defvar-local.
* lisp/org-macs.el (org-set-local): Remove.  All callers changed.
* lisp/org-clock.el:
* lisp/org-colview.el:
* lisp/org-macro.el:
* lisp/org-mouse.el:
* lisp/org-table.el:
* lisp/org.el: Use defvar-local.
* lisp/org-agenda.el:
* lisp/org-capture.el:
* lisp/org-crypt.el:
* lisp/org-ctags.el:
* lisp/org-plot.el:
* lisp/org.el:
* lisp/ox-odt.el:
* lisp/ox.el: Use setq-local instead of set + make-local-variable.

Changes in contrib:

* contrib/lisp/org-colview-xemacs.el (org-colview-xemacs-set-local): New
macro. Adjust old callers of `org-set-local'.
2015-11-05 16:47:38 +00:00
Aaron Ecay 40356ae376 babel: convert org-babel-check-confirm-evaluate to defun, add test
* lisp/ob-core.el (org-babel-check-confirm-evaluate): Convert from macro
to function.
(org-babel-check-evaluate):
(org-babel-confirm-evaluate): Adapt to above change.  Convert from
defsubst to defun.
* testing/lisp/test-ob.el (ob/check-eval) New test.
(org-test-babel-confirm-evaluate): New function supporting it.
2015-11-05 15:54:19 +00:00
Aaron Ecay 4750e4427d babel: small fix.
* lisp/ob-core.el (org-babel-execute-src-block): Simplify code slightly.

The old code would error on evaluating the call line in:

,----
| #+name: foo
| #+begin_src emacs-lisp :var bar="baz"
|   bar
| #+end_src
|
| #+call: foo[:cache yes]("qux")
|
| #+RESULTS:
| : qux
`----
2015-11-05 15:03:58 +00:00
Nicolas Goaziou 02c7850147 ob: Ignore data in COMMENTed headings
* lisp/ob-core.el (org-babel-read-element): New function.
* lisp/ob-ref.el (org-babel-ref-resolve): Use new function.  Refactor
  code.
(org-babel-ref-at-ref-p): Remove function.

* testing/lisp/test-ob.el (test-ob/ignore-reference-in-commented-headings):
  New test.
* testing/lisp/test-ob.el (test-ob/resolve-code-blocks-before-data-blocks):
  Remove test

The second test is removed because names are expected to be unique.
There is no order to expect when more than one uses the same name.

Reported-by: myq <myqlarson@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102464>
2015-11-05 15:44:22 +01:00
Nicolas Goaziou 5e22dcd622 Fix bug#21818
* lisp/org.el (org-insert-link): Redisplay after inserting link.

Reported-by: Emanuel Evans <mail@emanuel.industries>
<http://permalink.gmane.org/gmane.emacs.orgmode/102591>
2015-11-05 13:45:12 +01:00
Nicolas Goaziou d5767ad31f Fix bug#21818
* lisp/org.el (org-insert-link): Redisplay after inserting link.

Reported-by: Emanuel Evans <mail@emanuel.industries>
<http://permalink.gmane.org/gmane.emacs.orgmode/102591>
2015-11-05 12:26:01 +01:00
Nicolas Goaziou 3b8ebff351 ox: Fix failing tests
* lisp/ox.el (org-export-as): Add missing arguments to
  `org-export--get-export-attributes'.
2015-11-05 12:07:48 +01:00
Nicolas Goaziou 47573133a6 ox: Small refactoring
* lisp/ox.el (org-export--get-min-level):
(org-export-install-filters):
(org-export--generate-copy-script):
(org-export-table-has-special-column-p):
(org-export-table-row-is-special-p):
(org-export-table-cell-borders):
(org-export--dispatch-action): Use dolist instead of `mapc' + `lambda'.
2015-11-05 11:05:29 +01:00
Nicolas Goaziou 8048973bae ox: Rename `org-export-collect-tree-properties'
* lisp/ox.el (org-export-collect-tree-properties): Remove function.
(org-export--collect-tree-properties): New function.
  Renamed from `org-export-collect-tree-properties'
(org-export-as): Apply renaming.
* testing/lisp/test-ox.el (org-test-with-parsed-data): Apply renaming.
2015-11-05 10:56:59 +01:00
Nicolas Goaziou b414b85a7c ox: Factorize export properties
* lisp/ox.el (org-export-get-environment): Do not handle :back-end
  and :translate-alist.
(org-export--collect-tree-properties): Do not handle :exported-data.
(org-export--get-export-attributes): New function.
(org-export-as): Use new function.

* testing/lisp/test-ox.el (org-test-with-parsed-data): Use new function.
2015-11-05 10:56:42 +01:00
Nicolas Goaziou f329279757 ox: Check id links in export scope only
* lisp/ox.el (org-export-get-environment): Do not fill :id-alist yet.
(org-export-collect-tree-properties): Complete it here instead.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102540>
2015-11-05 09:20:05 +01:00
Nicolas Goaziou 0611129578 Small fixes
* lisp/ob-asymptote.el (org-babel-asymptote-define-type):
* lisp/ob-processing.el (org-babel-processing-define-type): Small fixes
  following lexical binding move.
2015-11-03 12:34:47 +01:00
Nicolas Goaziou 9b5757cb47 org-list: Fix small bug
* lisp/org-list.el (org-list-to-generic): Fix lexical binding mistake.
2015-11-02 22:09:05 +01:00
Nicolas Goaziou a274c21419 ox-latex: Fix "void function nil" error
* lisp/ox-latex.el (org-latex--delayed-footnotes-definitions): Fix "void
  function nil" error.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102477>
2015-11-02 20:58:50 +01:00
Nicolas Goaziou 4ca1179c9e ox-odt: Use lexical binding
* lisp/ox-odt.el (org-odt-styles-dir):
(org-odt-schema-dir):
(org-odt-format-drawer-function):
(org-odt--zip-extract):
(org-odt-format-toc-headline):
(org-odt--build-date-styles):
(org-odt-template):
(org-odt-bold):
(org-odt-center-block):
(org-odt-code):
(org-odt-dynamic-block):
(org-odt-entity):
(org-odt-example-block):
(org-odt-export-snippet):
(org-odt-export-block):
(org-odt-fixed-width):
(org-odt-footnote-reference):
(org-odt-format-headline--wrap):
(org-odt-headline):
(org-odt-horizontal-rule):
(org-odt-inline-src-block):
(org-odt-italic):
(org-odt-item):
(org-odt-keyword):
(org-odt-latex-environment):
(org-odt-latex-fragment):
(org-odt-line-break):
(org-odt--enumerate):
(org-odt-link--inline-image):
(org-odt-link--inline-formula):
(org-odt--enumerable-p):
(org-odt--standalone-link-p):
(org-odt-link):
(org-odt-node-property):
(org-odt-plain-list):
(org-odt--encode-plain-text):
(org-odt-plain-text):
(org-odt-property-drawer):
(org-odt-quote-block):
(org-odt-section):
(org-odt-htmlfontify-string):
(org-odt-src-block):
(org-odt-statistics-cookie):
(org-odt-strike-through):
(org-odt-subscript):
(org-odt-superscript):
(org-odt-table-cell):
(org-odt--table):
(org-odt-target):
(org-odt-timestamp):
(org-odt-underline):
(org-odt-verbatim):
(org-odt-verse-block):
(org-odt--translate-latex-fragments):
(org-odt--translate-description-lists):
(org-odt--translate-list-tables):
(org-odt-write-manifest-file):
(org-odt--export-wrap):
(org-odt-do-convert):
(org-odt-reachable-formats):
(org-odt-convert): Silence byte-compiler.  Replace `mapc' + `lambda'
with `dolist'.
2015-11-01 00:58:57 +01:00
Nicolas Goaziou ed76447f59 ox-md: Use lexical binding
* lisp/ox-md.el (org-md-separate-elements):
(org-md-bold):
(org-md-verbatim):
(org-md-example-block):
(org-md-horizontal-rule):
(org-md-italic):
(org-md-line-break):
(org-md-node-property):
(org-md-paragraph):
(org-md-plain-list):
(org-md-property-drawer):
(org-md-quote-block):
(org-md-section):
(org-md-template): Silence byte-compiler.
2015-11-01 00:05:22 +01:00
Nicolas Goaziou 3f6746d8a9 ox-man: Use lexical binding
* lisp/ox-man.el (org-man-custom-lang-environments): Remove variable.
(org-man-clock): Remove function.

(org-man-bold):
(org-man-center-block):
(org-man-drawer):
(org-man-dynamic-block):
(org-man-entity):
(org-man-example-block):
(org-man-export-block):
(org-man-export-snippet):
(org-man-fixed-width):
(org-man-headline):
(org-man-inline-src-block):
(org-man-italic):
(org-man-keyword):
(org-man-line-break):
(org-man-link):
(org-man-node-property):
(org-man-paragraph):
(org-man-plain-list):
(org-man-property-drawer):
(org-man-quote-block):
(org-man-radio-target):
(org-man-section):
(org-man-special-block):
(org-man-src-block):
(org-man-statistics-cookie):
(org-man-strike-through):
(org-man-subscript):
(org-man-superscript):
(org-man-table-row):
(org-man-target):
(org-man-timestamp):
(org-man-underline):
(org-man-verbatim):
(org-man-verse-block): Silence byte-compiler.
2015-11-01 00:00:40 +01:00
Nicolas Goaziou a87c34cb8d Refuse to follow link right after the link
* lisp/org.el (org-open-at-point):
(org-return): Refuse to follow link right after the link.

* testing/lisp/test-org.el (test-org/return): Add tests.
(test-org/coderef):
(test-org/custom-id):
(test-org/fuzzy-links): Update tests.

Reported-by: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/102054>
2015-10-31 23:32:47 +01:00
Nicolas Goaziou 11a451ff98 Fix `org-in-regexp'
* lisp/org.el (org-in-regexp): Fix VISUALLY optional argument.  Also
  prevent useless searches past the point.  Improve docstring.

* testing/lisp/test-org.el (test-org/in-regexp): New test.
2015-10-31 23:19:51 +01:00
Nicolas Goaziou 7f20175807 org-agenda: Small refactoring
* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled):
2015-10-31 22:28:04 +01:00
Nicolas Goaziou e6ac458988 org-agenda: Fix diary sexp timestamps
* lisp/org-agenda.el (org-agenda--timestamp-to-absolute): New function.
(org-agenda-get-timestamps):
(org-agenda-get-deadlines):
(org-agenda-get-scheduled): Use new function.

* lisp/org.el (org-diary-sexp-no-match): New error.
(org-time-string-to-absolute): Raise an error when a diary sexp cannot
match instead of returning a nonsensical value.

Reported-by: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/102417>
2015-10-31 22:26:13 +01:00
Nicolas Goaziou 6e6b19bc96 org-compat: Implement `org-define-error'
* lisp/org-compat.el (org-define-error): New function.
* lisp/ox.el (org-link-broken): Use new function.
2015-10-31 22:26:13 +01:00
Kyle Meyer 59468ab2d8 Merge branch 'maint' 2015-10-31 12:49:59 -04:00
Kyle Meyer 59d706219b org-format-outline-path: Ignore nil path elements
* lisp/org.el (org-format-outline-path): Ignore nil path elements.
* testing/lisp/test-org.el (test-org/format-outline-path): Add test.

The PATH argument shouldn't contain a nil item.  However, this didn't
fail before 1c74002, and helm-get-org-candidates-in-file relies on this
behavior, so prevent it from failing now.

Reported-by: Simon Thum <simon.thum@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/102411>
2015-10-31 12:47:17 -04:00
Kyle Meyer 1ec47568f4 org-format-outline-path: Cosmetic fix
* lisp/org.el (org-format-outline-path): Change loop counter.

The old version gives the same result when combined with the other for
clause, but it reads as though the intention is to reach
(length path) rather than (1- (length path)).
2015-10-31 12:35:13 -04:00
Aaron Ecay 0b78c71cd5 fix 0d000f5
* lisp/ob-core.el (org-babel-process-params): Fix bug introduced by
commit 0d000f5.
2015-10-30 11:35:45 +00:00
Aaron Ecay 0d000f5680 babel: small change in API.
* lisp/ob-core.el (org-babel--get-vars): New function.
(org-babel-get-header): Delete.
* lisp/ob-C.el (org-babel-C-expand-C):
(org-babel-C-expand-D):
* lisp/ob-R.el (org-babel-variable-assignments:R):
* lisp/ob-abc.el (org-babel-expand-body:abc):
* lisp/ob-asymptote.el (org-babel-variable-assignments:asymptote):
* lisp/ob-awk.el (org-babel-execute:awk):
* lisp/ob-calc.el (org-babel-execute:calc):
* lisp/ob-clojure.el (org-babel-expand-body:clojure):
* lisp/ob-dot.el (org-babel-expand-body:dot):
* lisp/ob-emacs-lisp.el (org-babel-expand-body:emacs-lisp):
* lisp/ob-fortran.el (org-babel-expand-body:fortran):
(org-babel-fortran-ensure-main-wrap):
* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars):
* lisp/ob-haskell.el (org-babel-variable-assignments:haskell):
* lisp/ob-js.el (org-babel-variable-assignments:js):
* lisp/ob-latex.el (org-babel-expand-body:latex):
* lisp/ob-lilypond.el (org-babel-expand-body:lilypond):
* lisp/ob-lisp.el (org-babel-expand-body:lisp):
* lisp/ob-maxima.el (org-babel-maxima-expand):
* lisp/ob-ocaml.el (org-babel-variable-assignments:ocaml):
* lisp/ob-octave.el (org-babel-variable-assignments:octave):
* lisp/ob-org.el (org-babel-expand-body:org):
* lisp/ob-perl.el (org-babel-variable-assignments:perl):
* lisp/ob-picolisp.el (org-babel-expand-body:picolisp):
* lisp/ob-processing.el (org-babel-variable-assignments:processing):
* lisp/ob-python.el (org-babel-variable-assignments:python):
* lisp/ob-ruby.el (org-babel-variable-assignments:ruby):
* lisp/ob-scheme.el (org-babel-expand-body:scheme):
* lisp/ob-shell.el (org-babel-variable-assignments:shell):
* lisp/ob-shen.el (org-babel-expand-body:shen):
* lisp/ob-sql.el (org-babel-expand-body:sql):
* lisp/ob-sqlite.el (org-babel-expand-body:sqlite): Adapt to change.
* etc/ORG-NEWS: Document change.
2015-10-29 19:26:11 +00:00