org-mode.git
18 hours agoorg-compat: Small refactoring master
Nicolas Goaziou [Sun, 26 Jun 2016 12:43:20 +0000]
org-compat: Small refactoring

* lisp/org-compat.el (org-compatible-face): Small refactoring.  Remove
  Emacs 22 related part of the code.

18 hours agoRemove Emacs 22 related code
Nicolas Goaziou [Sun, 26 Jun 2016 12:35:22 +0000]
Remove Emacs 22 related code

* contrib/lisp/htmlize.el (htmlize-face-color-internal):
(htmlize-face-to-fstruct):
* lisp/org-agenda.el (org-anniversary):
(org-cyclic):
(org-block):
(org-date):
* lisp/org-compat.el (org-region-active-p):
* lisp/org.el (org-use-extra-keys):
(occur-mode-find-occurrence-hook): Remove Emacs 22 related code and
comments.

(org-diary-class): Remove function.

23 hours agoorg-compat: Tiny refactoring
Nicolas Goaziou [Sun, 26 Jun 2016 08:29:27 +0000]
org-compat: Tiny refactoring

* lisp/org-compat.el (org-re): Use `obsolete' in `declare'.

40 hours agoUpdate testing/README
Michael Brand [Sat, 25 Jun 2016 15:08:23 +0000]
Update testing/README

* testing/README: Minor update, add how to run several tests.

40 hours agoERT: Spreadsheet references more sensitive
Michael Brand [Sat, 25 Jun 2016 15:06:12 +0000]
ERT: Spreadsheet references more sensitive

* testing/lisp/test-org-table.el:
(test-org-table/org-table-convert-refs-to-an/1):
(test-org-table/org-table-convert-refs-to-rc/1): Row and column number
different.

40 hours agoExtend a docstring
Michael Brand [Sat, 25 Jun 2016 15:04:43 +0000]
Extend a docstring

* lisp/org.el (org-startup-truncated): Extend docstring.
(org-set-font-lock-defaults): Also the last top level expression on an
own line.

2 days agoorg-colview.el: Fix typo in function name
Lele Gaifax [Fri, 24 Jun 2016 12:26:30 +0000]
org-colview.el: Fix typo in function name

* lisp/org-colview.el (org-columns-hscroll-title): Rename from
  `org-columns-hscoll-title'.
(org-columns--display-here-title):
(org-columns-remove-overlays): Adjust reference to renamed function.

2 days agoorg-colview: Fix last commit
Nicolas Goaziou [Fri, 24 Jun 2016 08:06:02 +0000]
org-colview: Fix last commit

* lisp/org-colview.el (org-columns-edit-value): Fix last commit.

2 days agoorg-colview: Replace `org-columns-eval' with `org-columns--call'
Nicolas Goaziou [Fri, 24 Jun 2016 07:57:53 +0000]
org-colview: Replace `org-columns-eval' with `org-columns--call'

* lisp/org-colview.el (org-columns-edit-value): Small refactoring.  Use
  new function.
(org-columns--call): New function.
(org-columns-eval): Remove function.
(org-columns-next-allowed-value): Use new function.

3 days agoMerge branch 'maint'
Nicolas Goaziou [Fri, 24 Jun 2016 07:22:00 +0000]
Merge branch 'maint'

3 days agoImprove a docstring maint
Nicolas Goaziou [Fri, 24 Jun 2016 07:21:38 +0000]
Improve a docstring

* lisp/org.el (org-delete-all): Improve docstring.

3 days agoorg-mobile: Fix TODO keywords generation
Nicolas Goaziou [Fri, 24 Jun 2016 07:16:39 +0000]
org-mobile: Fix TODO keywords generation

* lisp/org-mobile.el (org-mobile-create-index-file): Call
  `org-delete-all' later since it is a destructive operation.

Reported-by: Ian Dunn <dunni@gnu.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/107900>

3 days agoorg-capture: Remove forbidden value type from "file" templates
Nicolas Goaziou [Thu, 23 Jun 2016 23:11:49 +0000]
org-capture: Remove forbidden value type from "file" templates

* lisp/org-capture.el (org-capture-expand-file): Remove plain S-exps
  from allowed values.

3 days agoob-exp: Small fix
Nicolas Goaziou [Thu, 23 Jun 2016 22:55:03 +0000]
ob-exp: Small fix

* lisp/ob-exp.el (org-babel-exp-src-block): Use `symbol-name' instead of
  `eval' since the argument is a dynamically scoped variable anyhow.

3 days agoorg-clock: Remove handling for illicit :scope values
Nicolas Goaziou [Thu, 23 Jun 2016 22:52:19 +0000]
org-clock: Remove handling for illicit :scope values

* lisp/org-clock.el (org-dblock-write:clocktable): :scope is not meant
  to be a s-exp, so don't use `eval' on it.

3 days agoFix `org-no-properties' called with an optional argument
Nicolas Goaziou [Thu, 23 Jun 2016 13:55:39 +0000]
Fix `org-no-properties' called with an optional argument

* lisp/org-macs.el (org-no-properties): Fix function so that optional
  argument `restricted' is not ignored.

3 days agoRemove `org-substitute-posix-classes'
Nicolas Goaziou [Thu, 23 Jun 2016 13:28:45 +0000]
Remove `org-substitute-posix-classes'

* lisp/org-macs.el (org-substitute-posix-classes): Remove function.

This function is unused throughout the code base and not part of any
public API.

3 days agoDeprecate `org-format-seconds' in favor of `format-seconds'
Nicolas Goaziou [Thu, 23 Jun 2016 13:26:17 +0000]
Deprecate `org-format-seconds' in favor of `format-seconds'

* lisp/org-macs.el (org-format-seconds): Remove function.
* lisp/org-compat.el (org-format-seconds): Mark function as an obsolete
  alias.
* lisp/org-table.el (org-table-time-seconds-to-string):
* lisp/ox.el (org-export-stack-refresh): Apply removal.

3 days agoDeprecate `org-no-warnings' in favor of `with-no-warnings'
Nicolas Goaziou [Thu, 23 Jun 2016 13:20:32 +0000]
Deprecate `org-no-warnings' in favor of `with-no-warnings'

* lisp/org-macs.el (org-no-warnings): Rewove macro.
* lisp/org-compat.el (org-no-warnings): Mark `org-no-warnings' as
  obsolete.
* contrib/lisp/org-contacts.el (defvar):
* contrib/lisp/org-wl.el (org-wl-open):
* lisp/org-agenda.el (defvar):
(org-anniversary):
(org-cyclic):
(org-block):
(org-date):
* lisp/org-bbdb.el (defvar):
* lisp/org-clock.el (org-clock-out):
(org-clock-cancel):
* lisp/org-mouse.el (org-mouse-show-context-menu):
* lisp/org.el (org-modify-ts-extra):
(org-order-calendar-date-args): Small refactoring.
* lisp/ox-odt.el (org-odt-htmlfontify-string):

3 days agoorg-macs: Remove `org-replace-match-keep-properties'
Nicolas Goaziou [Thu, 23 Jun 2016 13:13:14 +0000]
org-macs: Remove `org-replace-match-keep-properties'

* lisp/org-macs.el (org-replace-match-keep-properties): Remove function.

This function is unused through the code base and doesn't specifically
belong to a public API.

3 days agoDeprecate `org-called-interactively-p' in favor of `called-interactively-p'
Nicolas Goaziou [Thu, 23 Jun 2016 12:34:40 +0000]
Deprecate `org-called-interactively-p' in favor of `called-interactively-p'

* lisp/org-compat.el (org-called-interactively-p): Make it an obsolete
  alias for `called-interactively-p'.
* lisp/org-macs.el (org-called-interactively-p): Remove function.
* contrib/lisp/org-expiry.el (org-expiry-insinuate):
(org-expiry-deinsinuate):
(org-expiry-process-entry):
(org-expiry-process-entries):
(org-expiry-archive-subtree):
(org-expiry-add-keyword):
* lisp/ob-core.el (org-babel-expand-src-block):
(org-babel-sha1-hash):
* lisp/org-agenda.el (org-toggle-sticky-agenda):
(org-agenda-write):
(org-agenda-dim-blocked-tasks):
(org-agenda-redo):
(org-agenda-show-1):
(org-agenda-set-tags):
* lisp/org-lint.el (org-lint):
* lisp/org-table.el (org-table-blank-field):
(org-table-current-column):
(org-table-current-dline):
(org-table-sort-lines):
(org-table-sum):
(org-table-rotate-recalc-marks):
(org-table-eval-formula):
(orgtbl-send-table):
* lisp/org.el (org-mode):
(org-copy-subtree):
(org-paste-subtree):
(org-store-link):
(org-todo):
(org-occur):
(org-create-math-formula):
(org-toggle-inline-images):
(org-mark-subtree):
(org-mark-element): Apply removal.

3 days agoRemove `org-inhibit-invisibility'
Nicolas Goaziou [Thu, 23 Jun 2016 12:28:20 +0000]
Remove `org-inhibit-invisibility'

* lisp/org-macs.el (org-inhibit-invisibility): Remove function.
* lisp/org.el (org-set-tags): Apply removal.

3 days agoRemove `org-maybe-intangible'
Nicolas Goaziou [Thu, 23 Jun 2016 12:25:51 +0000]
Remove `org-maybe-intangible'

* lisp/org-macs.el (org-maybe-intangible): Remove macro.
* lisp/org.el (org-activate-bracket-links):
(org-hide-wide-columns): Apply removal.

3 days agoMark `org-bound-and-true-p' as obsolete
Nicolas Goaziou [Thu, 23 Jun 2016 12:18:38 +0000]
Mark `org-bound-and-true-p' as obsolete

* lisp/org-macs.el (org-bound-and-true-p): Remove macro.
* lisp/org-compat.el (org-bound-and-true-p): Deprecated alias for
  `bound-and-true-p'.
* lisp/ob-core.el (org-babel-confirm-evaluate):
* lisp/org-agenda.el (org-agenda-write):
(org-agenda-add-entry-text):
(org-agenda-todo):
* lisp/org-clock.el (org-clocktable-defaults):
(org-clocktable-write-default):
* lisp/org-colview.el (org-columns):
(org-columns--compute-spec):
(org-agenda-columns):
* lisp/org-indent.el (org-indent-set-line-properties):
* lisp/org-inlinetask.el (org-inlinetask-fontify):
* lisp/org-mobile.el (org-mobile-write-agenda-for-mobile):
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/options):
(pcomplete/org-mode/file-option/infojs_opt):
* lisp/org-src.el (org-src-mode-configure-edit-buffer):
(org-edit-table.el):
* lisp/org.el (org-store-link):
(org-refile):
(org-get-export-keywords):
(org-set-tags):
(org-order-calendar-date-args):
(org-mode-restart):
(org-tbl-menu):
(org-beginning-of-line):
(org-end-of-line):
(org-kill-line):
(org-truely-invisible-p):
(org-remove-flyspell-overlays-in): Use `bound-and-true-p' instead of
`org-bound-and-true-p'.

3 days agoDeprecate `org-char-to-string' in favor of `char-to-string'
Nicolas Goaziou [Thu, 23 Jun 2016 12:10:34 +0000]
Deprecate `org-char-to-string' in favor of `char-to-string'

* lisp/org-macs.el (org-char-to-string): Remove function.
* lisp/org-compat.el (org-char-to-string): Declare function as obsolete.
* lisp/org.el (org-link-unescape-compound): Apply removal.

3 days agoorg-list: Silence byte-compiler
Nicolas Goaziou [Thu, 23 Jun 2016 08:21:07 +0000]
org-list: Silence byte-compiler

* lisp/org-list.el (org-list-item-body-column): Silence byte-compiler.

3 days agoMark a few functions as obsolete
Nicolas Goaziou [Thu, 23 Jun 2016 08:00:00 +0000]
Mark a few functions as obsolete

* lisp/ob-R.el (org-babel-variable-assignments:R):
* lisp/ob-ref.el (org-babel-ref-goto-headline-id):
* lisp/org-agenda.el (org-agenda-prepare-window):
(org-agenda-switch-to):
* lisp/org-capture.el (org-capture-goto-target):
* lisp/org-clock.el (org-clock-goto):
(org-clock-special-range):
* lisp/org-ctags.el (org-ctags-visit-buffer-or-file):
* lisp/org-eshell.el (org-eshell-open):
* lisp/org-feed.el (org-feed-show-raw-feed):
* lisp/org-id.el (org-id-goto):
* lisp/org-irc.el (org-irc-visit-erc):
* lisp/org-macs.el (org-string-nw-p):
* lisp/org-mobile.el (org-mobile-apply):
* lisp/org-src.el (org-src-switch-to-buffer):
* lisp/org.el (org-get-location):
(org-tree-to-indirect-buffer):
(org-mark-ring-goto):
(org-refile):
(org-add-log-note):
(org-revert-all-org-buffers):
(org-switchb):
(org-cycle-agenda-files):
(org-submit-bug-report):
(org-goto-marker-or-bmk):
* lisp/ox-html.el (org-html-htmlize-generate-css): Silence byte
  compiler.

The following functions are marked as obsolete:
- `org-string-match-p'
- `org-number-sequence'
- `org-floor*'
- `org-pop-to-buffer-same-window'
- `org-delete-directory'
- `org-buffer-narrowed-p'

4 days agoorg-compat: Use lexical binding
Nicolas Goaziou [Thu, 23 Jun 2016 07:25:33 +0000]
org-compat: Use lexical binding

* lisp/org-compat.el (org-move-to-column):
(org-pop-to-buffer-same-window): Silence byte-compiler.

4 days agoDeprecate `org-find-if' in favor of `cl-find-if'
Nicolas Goaziou [Thu, 23 Jun 2016 07:22:49 +0000]
Deprecate `org-find-if' in favor of `cl-find-if'

* lisp/org.el (org-find-if): Remove function.
(org-key):
* contrib/lisp/org-contacts.el (org-contacts-db-need-update-p):
(org-contacts-filter):
(org-contacts-test-completion-prefix):
(org-contacts-remove-ignored-property-values): Use `cl-find-if'
* lisp/org-compat.el (org-find-if): Mark function as an obsolete alias
  for `cl-find-if'.

4 days agoMerge branch 'maint'
Nicolas Goaziou [Wed, 22 Jun 2016 22:56:57 +0000]
Merge branch 'maint'

4 days agoWork around a display bug when previewing LaTeX fragments
Nicolas Goaziou [Wed, 22 Jun 2016 22:54:39 +0000]
Work around a display bug when previewing LaTeX fragments

* lisp/org.el (org-format-latex): Change signature.
(org-toggle-latex-fragment):
* lisp/ox-html.el (org-html-format-latex): Apply signature change.

4 days agoWork around a display bug when previewing LaTeX fragments
Nicolas Goaziou [Wed, 22 Jun 2016 22:33:22 +0000]
Work around a display bug when previewing LaTeX fragments

* lisp/org.el (org-format-latex): Change signature.
(org-toggle-latex-fragment):
* lisp/ox-html.el (org-html-format-latex): Apply signature change.

4 days agoMerge branch 'maint'
Nicolas Goaziou [Wed, 22 Jun 2016 20:43:19 +0000]
Merge branch 'maint'

4 days agoTiny fix to `org-set-effort'
Nicolas Goaziou [Wed, 22 Jun 2016 20:39:50 +0000]
Tiny fix to `org-set-effort'

* lisp/org.el (org-set-effort): Use `equal' instead of `string='.

Since (string= "nil" nil) is non-nil, a "nil" heading could be mistaken
for the current clocked task if `org-clock-current-task' is not bound,
or if there is no current clocked task.

4 days agoMerge branch 'maint'
Nicolas Goaziou [Wed, 22 Jun 2016 20:38:07 +0000]
Merge branch 'maint'

4 days agoMerge branch 'maint' of orgmode.org:org-mode into maint
Nicolas Goaziou [Wed, 22 Jun 2016 20:36:22 +0000]
Merge branch 'maint' of orgmode.org:org-mode into maint

4 days agoox: Fix export of empty footnote definitions outside scope
Nicolas Goaziou [Wed, 22 Jun 2016 20:34:53 +0000]
ox: Fix export of empty footnote definitions outside scope

* lisp/ox.el (org-export-get-footnote-definition): When a definition is
  empty, but does exist, return the empty string instead of raising an
  error.
* testing/lisp/test-ox.el (test-org-export/get-footnote-definition): New
  test.

Reported-by: Mark Edgington <edgimar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/107873>

4 days agoorg.texi: Fix typo
Nicolas Goaziou [Wed, 22 Jun 2016 16:36:29 +0000]
org.texi: Fix typo

* doc/org.texi (Sources and destinations): Add missing word.

4 days agoox-publish: Change signature for preparation and completion functions
Nicolas Goaziou [Wed, 22 Jun 2016 13:28:05 +0000]
ox-publish: Change signature for preparation and completion functions

* doc/org.texi (Sources and destinations): Document new signature.
* lisp/ox-publish.el (org-publish-project-alist): Update docstring.
(org-publish-projects): Call preparation and
completion functions with the project properties as the sole argument.

`project-plist' used to be dynamically scoped.  This is no longer
possible due to the switch to lexical binding.

Reported-by: Arun Isaac <arunisaac@systemreboot.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/107856>

5 days agoorg-mobile: Use lexical binding
Nicolas Goaziou [Tue, 21 Jun 2016 22:01:10 +0000]
org-mobile: Use lexical binding

* lisp/org-agenda.el (org-agenda-keep-restricted-file-list): New
  variable, dynamically scoped.
(org-agenda): Variable is now necessarily bound.

* lisp/org-mobile.el (org-mobile-create-index-file): Silence
  byte-compiler.

5 days agoorg-w3m: Use lexical binding
Nicolas Goaziou [Tue, 21 Jun 2016 21:41:41 +0000]
org-w3m: Use lexical binding

5 days agoorg-rmail: Use lexical binding
Nicolas Goaziou [Tue, 21 Jun 2016 21:38:39 +0000]
org-rmail: Use lexical binding

5 days agoorg-protocol: Tiny clean up
Nicolas Goaziou [Tue, 21 Jun 2016 21:37:19 +0000]
org-protocol: Tiny clean up

5 days agoorg-protocol: Silence byte-compiler
Nicolas Goaziou [Tue, 21 Jun 2016 21:36:31 +0000]
org-protocol: Silence byte-compiler

5 days agoorg-protocol: Use lexical binding
Nicolas Goaziou [Tue, 21 Jun 2016 21:23:18 +0000]
org-protocol: Use lexical binding

* lisp/org-protocol.el (org-protocol-store-link):
(org-protocol-open-source):
(org-protocol-check-filename-for-protocol):
(org-protocol-create): Silence byte-compiler.

5 days agoorg-plot: Use lexical binding
Nicolas Goaziou [Tue, 21 Jun 2016 21:19:11 +0000]
org-plot: Use lexical binding

* lisp/org-plot.el (org-plot/add-options-to-plist): Silence
  byte-compiler.

5 days agoorg-pcomplete: Small clean-up
Nicolas Goaziou [Tue, 21 Jun 2016 21:16:19 +0000]
org-pcomplete: Small clean-up

5 days agoorg-pcomplete: Use lexical binding
Nicolas Goaziou [Tue, 21 Jun 2016 21:14:49 +0000]
org-pcomplete: Use lexical binding

5 days agoorg-mouse: Use lexical binding
Nicolas Goaziou [Tue, 21 Jun 2016 21:12:23 +0000]
org-mouse: Use lexical binding

* lisp/org-mouse.el (org-mouse-main-buffer): New dynamically scoped
  variable.
(org-mouse-replace-match-and-surround):
(org-mouse-for-each-item):
(org-mouse-move-tree-start):
(org-mouse-do-remotely):
(org-mouse-agenda-context-menu): Silence byte-compiler.

5 days agoorg-macs: Silence byte-compiler
Nicolas Goaziou [Tue, 21 Jun 2016 21:02:35 +0000]
org-macs: Silence byte-compiler

* lisp/org-macs.el (org-save-outline-visibility): Remove unused symbol.

5 days agoorg-mhe: Use lexical binding
Nicolas Goaziou [Tue, 21 Jun 2016 21:01:52 +0000]
org-mhe: Use lexical binding

5 days agoorg-macs: Use lexical binding
Nicolas Goaziou [Tue, 21 Jun 2016 20:56:46 +0000]
org-macs: Use lexical binding

* lisp/org-macs.el (org-save-outline-visibility): Small refactoring.

5 days agoorg-irc: Use lexical binding
Nicolas Goaziou [Tue, 21 Jun 2016 20:45:08 +0000]
org-irc: Use lexical binding

* lisp/org-irc.el (org-irc-ellipsify-description): Replace `mapc' +
  `lambda' with `dolist'.

5 days agoorg-inlinetask: Use lexical binding
Nicolas Goaziou [Tue, 21 Jun 2016 20:42:09 +0000]
org-inlinetask: Use lexical binding

5 days agoorg-info: Use lexical binding
Nicolas Goaziou [Tue, 21 Jun 2016 20:38:51 +0000]
org-info: Use lexical binding

* lisp/org-info.el (org-info-store-link): Small refactoring.

5 days agoorg-gnus: Use lexical binding
Nicolas Goaziou [Tue, 21 Jun 2016 20:36:06 +0000]
org-gnus: Use lexical binding

5 days agoorg-eshell: Use lexical binding
Nicolas Goaziou [Tue, 21 Jun 2016 20:34:25 +0000]
org-eshell: Use lexical binding

5 days agoorg-entities: Tiny refactoring
Nicolas Goaziou [Tue, 21 Jun 2016 14:52:05 +0000]
org-entities: Tiny refactoring

* lisp/org-entities.el (org-entities--user-safe-p): Use pattern matching
  and strengthen check for name.

5 days agoorg-entities: Use lexical binding
Nicolas Goaziou [Tue, 21 Jun 2016 14:40:08 +0000]
org-entities: Use lexical binding

* lisp/org-entities.el (org-entities):
(org-entities-create-table):
(org-entities-help): Silence byte-compiler.

5 days agoDeprecate `org-babel-trim' in favor of `org-trim'
Nicolas Goaziou [Tue, 21 Jun 2016 13:24:06 +0000]
Deprecate `org-babel-trim' in favor of `org-trim'

* lisp/org.el (org-trim): Add optional argument.

* contrib/lisp/ob-mathematica.el (org-babel-execute:mathematica):
* contrib/lisp/org-bibtex-extras.el (obe-html-export-citations):
* contrib/lisp/org-mime.el (org-mime-compose):
* lisp/ob-C.el (org-babel-C-execute):
* lisp/ob-calc.el (org-babel-execute:calc):
* lisp/ob-clojure.el (org-babel-expand-body:clojure):
* lisp/ob-core.el (org-babel-initiate-session):
(org-babel-parse-multiple-vars):
(org-babel-read-element):
(org-babel-insert-result):
(org-babel-expand-noweb-references):
(org-babel-trim): Mark obsolete.
* lisp/ob-forth.el (org-babel-forth-session-execute):
* lisp/ob-fortran.el (org-babel-execute:fortran):
* lisp/ob-haskell.el (org-babel-execute:haskell):
* lisp/ob-latex.el (org-babel-expand-body:latex):
* lisp/ob-lisp.el (org-babel-expand-body:lisp):
* lisp/ob-ocaml.el (org-babel-execute:ocaml):
* lisp/ob-octave.el (org-babel-octave-evaluate-session):
* lisp/ob-python.el (org-babel-python-evaluate-external-process):
(org-babel-python-evaluate-session):
* lisp/ob-ref.el (org-babel-ref-split-args):
* lisp/ob-ruby.el (org-babel-ruby-evaluate):
* lisp/ob-shell.el (org-babel-sh-evaluate):
* lisp/ob-table.el (org-sbe):
* lisp/ob-tangle.el (org-babel-spec-to-string):
* lisp/org-bibtex.el (org-bibtex-get):
* testing/lisp/test-ob.el (test-ob/parse-header-args): Use `org-trim'
  instead of `org-babel-trim'.

5 days agoob-core: Small refactoring
Nicolas Goaziou [Tue, 21 Jun 2016 12:42:17 +0000]
ob-core: Small refactoring

* lisp/ob-core.el (org-babel-get-src-block-info): Small refactoring.

6 days agoob-shell: Fix "wrong type sequencep: function" error
Nicolas Goaziou [Mon, 20 Jun 2016 20:12:02 +0000]
ob-shell: Fix "wrong type sequencep: function" error

* lisp/ob-shell.el (org-babel-shell-names): Fix error introduced when
  switching to lexical binding.

6 days agoorg-ctags: Do not require "cl" at compile time
Nicolas Goaziou [Mon, 20 Jun 2016 13:08:25 +0000]
org-ctags: Do not require "cl" at compile time

6 days agoorg-ctags: Use lexical binding
Nicolas Goaziou [Mon, 20 Jun 2016 13:04:33 +0000]
org-ctags: Use lexical binding

* lisp/org-ctags.el (org-ctags-open-file):
(org-ctags-fail-silently): Silence byte-compiler.

6 days agoorg-crypt: Use lexical binding
Nicolas Goaziou [Mon, 20 Jun 2016 13:00:47 +0000]
org-crypt: Use lexical binding

6 days agoob-shell: Use lexical binding
Nicolas Goaziou [Mon, 20 Jun 2016 12:58:32 +0000]
ob-shell: Use lexical binding

* lisp/ob-shell.el (org-babel-sh-initiate-session): Silence
  byte-compiler.

6 days agoob-lob: Fix docstring
Nicolas Goaziou [Mon, 20 Jun 2016 12:47:22 +0000]
ob-lob: Fix docstring

* lisp/ob-lob.el (org-babel-lob--src-info): Fix typo.

6 days agoob-lob: Remove `org-babel-lob-files'
Nicolas Goaziou [Mon, 20 Jun 2016 12:44:44 +0000]
ob-lob: Remove `org-babel-lob-files'

* lisp/ob-lob.el (org-babel-lob-files): Remove variable.
(org-babel-library-of-babel): Fix docstring.

Since its creation, `org-babel-lob-files' has been a no-op.  Since no-one
noticed it during those 7 years, it can safely be removed.

Reported-by: "Charles C. Berry" <ccberry@ucsd.edu>
<http://permalink.gmane.org/gmane.emacs.orgmode/107824>

6 days agoob-core: Tiny refactoring
Nicolas Goaziou [Mon, 20 Jun 2016 12:41:04 +0000]
ob-core: Tiny refactoring

* lisp/ob-core.el (org-babel-graphical-output-file): Refactor code.  Fix
  error messages.

6 days agoob-core: Use lexical binding
Nicolas Goaziou [Mon, 20 Jun 2016 12:35:16 +0000]
ob-core: Use lexical binding

* lisp/ob-core.el (org-babel-get-src-block-info):
(org-babel-insert-header-arg):
(org-babel-enter-header-arg-w-completion):
(org-babel-params-from-properties):
(org-babel-process-params):
(org-babel-read): Use lexical scoping when eval'ing.
(org-babel-examplify-region): Silence byte-compiler.
(org-babel-merge-params):
(org-babel-noweb-p): Refactor code.

7 days agoMerge branch 'maint'
Kyle Meyer [Sun, 19 Jun 2016 18:15:02 +0000]
Merge branch 'maint'

7 days agoorg-set-effort: Fix void variable error
Kyle Meyer [Sun, 19 Jun 2016 18:11:25 +0000]
org-set-effort: Fix void variable error

* lisp/org.el (org-set-effort): Check if org-clock-current-task is
  defined because org-clock.el may not be loaded yet.

7 days agoorg-set-effort: Remove extra space in prompt
Kyle Meyer [Sun, 19 Jun 2016 18:11:20 +0000]
org-set-effort: Remove extra space in prompt

* lisp/org.el (org-set-effort): Make spacing across different prompt
  cases consistent.  Simplify prompt concatenation.

8 days agoob-tangle: Fix failing test on Emacs 24.3
Nicolas Goaziou [Sat, 18 Jun 2016 22:57:03 +0000]
ob-tangle: Fix failing test on Emacs 24.3

* lisp/ob-tangle.el (org-babel-tangle): Do not use `add-to-list' on
  a let-bound symbol.

8 days agoob-tangle: Use lexical binding
Nicolas Goaziou [Sat, 18 Jun 2016 22:05:25 +0000]
ob-tangle: Use lexical binding

* lisp/ob-tangle.el (org-babel-process-comment-text):
(org-babel-spec-to-string):
(org-babel-tangle-single-block):
(org-babel-tangle-comment-links):
(org-babel-tangle-jump-to-org): Silence byte-compiler.

8 days agoob-exp: Tiny refactoring
Nicolas Goaziou [Sat, 18 Jun 2016 21:40:12 +0000]
ob-exp: Tiny refactoring

* lisp/ob-exp.el (org-export-babel-evaluate): Tiny refactoring.

8 days agoob-exp: Use lexical binding
Nicolas Goaziou [Sat, 18 Jun 2016 21:31:15 +0000]
ob-exp: Use lexical binding

* lisp/ob-exp.el (org-babel-exp-src-block): Use `eval' with optional
  LEXICAL argument.
(org-babel-exp-process-buffer): Remove unused bindings.

8 days agoob-exp: Do not require `cl' at compile time
Nicolas Goaziou [Sat, 18 Jun 2016 21:24:22 +0000]
ob-exp: Do not require `cl' at compile time

* lisp/ob-exp.el (org-babel-exp-process-buffer): Use `pcase' instead of
  `case'.

8 days agoob-exp: Consolidate export of code blocks
Nicolas Goaziou [Sat, 18 Jun 2016 21:15:24 +0000]
ob-exp: Consolidate export of code blocks

* lisp/ob-exp.el (org-babel-exp--at-source): New macro.
(org-babel-exp-in-export-file): Remove macro.
(org-babel-exp-src-block): Remove unused argument.  Use new macro.
(org-babel-exp-process-buffer): Apply signature change above.  Put
temporary properties on top of Babel code so as to find original
location without relying on heuristics.
(org-babel-exp-results): Use new macro.

Export process has to know context of Babel code being evaluated (e.g.,
so as to retrieve parameters from node properties).  However, evaluating
previous code can drastically change the buffer.  The library used some
heuristics to find the original location.  Those are not necessary
anymore.

8 days agoox: Remove `org-export-execute-babel-code'
Nicolas Goaziou [Sat, 18 Jun 2016 20:11:14 +0000]
ox: Remove `org-export-execute-babel-code'

* lisp/ox.el (org-export-execute-babel-code): Remove function.
(org-export-as): Replace previous function with
`org-babel-exp-process-buffer'.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Change signature.
  Copy buffer before evaluating code.

* testing/lisp/test-ob-exp.el (ob-exp/exports-inline-code):
(ob-exp/exports-inline-code-double-eval):
(ob-exp/exports-inline-code-eval-code-once):
(ob-exp/exports-inline-code-double-eval-exports-both):
(ob-export/export-with-results-before-block):
(ob-export/export-src-block-with-switches):
(ob-export/export-src-block-with-flags):
(ob-export/export-and-indentation):
(ob-export/export-under-commented-headline):
(ob-export/reference-in-post-header):
(ob-export/babel-evaluate):
(org-test-with-expanded-babel-code):
* testing/lisp/test-ob-lob.el (test-ob-lob/export-lob-lines):
(test-ob-lob/do-not-eval-lob-lines-in-example-blocks-on-export): Apply
change.

This patch merges `org-export-execute-babel-code' within
`org-babel-exp-process-buffer', removing one level of indirection.  Now,
all the Babel evaluation is on the Babel side.

9 days agoMerge branch 'maint'
Nicolas Goaziou [Fri, 17 Jun 2016 12:17:23 +0000]
Merge branch 'maint'

9 days agoob-exp: Remove spurious comma un-escaping
Nicolas Goaziou [Fri, 17 Jun 2016 12:16:39 +0000]
ob-exp: Remove spurious comma un-escaping

* lisp/ob-exp.el (org-babel-exp-code): Remove spurious comma
  un-escaping.

9 days agoORG-NEWS: Document last change to radio lists
Nicolas Goaziou [Fri, 17 Jun 2016 08:20:57 +0000]
ORG-NEWS: Document last change to radio lists

9 days agoorg-list: Allow multiple receiver locations for radio lists
Nicolas Goaziou [Fri, 17 Jun 2016 08:19:07 +0000]
org-list: Allow multiple receiver locations for radio lists

* lisp/org-list.el (org-list-send-list): Allow multiple receiver
  locations.
* testing/lisp/test-org-list.el (test-org-list/send-list): Add test.

9 days agoorg-table: Allow multiple receiver locations for radio tables
Nicolas Goaziou [Fri, 17 Jun 2016 08:05:40 +0000]
org-table: Allow multiple receiver locations for radio tables

* lisp/org-table.el (orgtbl-send-replace-tbl): Allow multiple receiver
  locations.
* testing/lisp/test-org-table.el (test-org-table/send-region): Add test.

10 days agoMerge branch 'maint'
Nicolas Goaziou [Thu, 16 Jun 2016 22:41:54 +0000]
Merge branch 'maint'

10 days agoFix refiling to an empty headline
Nicolas Goaziou [Thu, 16 Jun 2016 22:39:52 +0000]
Fix refiling to an empty headline

* lisp/org.el (org-refile): Do not assume the headline is not empty.

Reported-by: Fabrice Popineau <fabrice.popineau@supelec.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/107772>

10 days agoob-sql.el: Support sqlcmd in Cygwin environment
Xi Shen [Wed, 8 Jun 2016 05:49:54 +0000]
ob-sql.el: Support sqlcmd in Cygwin environment

* lisp/ob-sql.el (org-babel-sql-dbstring-mssql): Format Microsoft
  `sqlcmd' command line args.
(org-babel-sql-convert-standard-filename): Convert a Posix path to
Windows long path in Cygwin environment, or do nothing.
(org-babel-execute:sql): Add `mssql' engine support and remove support
for `msosql' engine.

The `osql' command line tool was last updated in 2004,
https://technet.microsoft.com/en-us/library/aa214012(v=sql.80).aspx, and
could not output the query result in a way that morden `org-table.el'
expects.  The `sqlcmd' is the preferred command line tool to connect the
Microsoft SQL Server and it also has a Linux version,
https://msdn.microsoft.com/en-us/library/hh568447(v=sql.110).aspx.

TINYCHANGE

10 days agoSilence byte-compiler
Nicolas Goaziou [Thu, 16 Jun 2016 22:24:12 +0000]
Silence byte-compiler

10 days agoob-ref: Fix reference expansion
Nicolas Goaziou [Thu, 16 Jun 2016 21:44:53 +0000]
ob-ref: Fix reference expansion

* lisp/ob-ref.el (org-babel-ref-resolve): Properly expand a reference to
  a Babel call.

10 days agoob: Remove `org-babel-lob-execute'
Nicolas Goaziou [Thu, 16 Jun 2016 21:32:58 +0000]
ob: Remove `org-babel-lob-execute'

* lisp/ob-lob.el (org-babel-lob-execute): Remove function
(org-babel-lob-execute-maybe):
* lisp/ob-ref.el (org-babel-ref-resolve):
* testing/lisp/test-ob-header-arg-defaults.el (test-ob-header-arg-defaults/global/call):
(test-ob-header-arg-defaults/tree/overwrite/call):
(test-ob-header-arg-defaults/tree/accumulate/call):
(test-ob-header-arg-defaults/tree/complex/call):
* testing/lisp/test-ob-lob.el (test-ob-lob/named-caching-call-line):
(test-ob-lob/caching-call-line):
(test-ob-lob/call-with-header-arguments): Apply removal.

10 days agoSimplify Babel calls evaluation
Nicolas Goaziou [Thu, 16 Jun 2016 20:16:41 +0000]
Simplify Babel calls evaluation

* lisp/ob-lob.el (org-babel-default-lob-header-args): Merge value with
  `org-babel-default-header-args' since this variable is meant to
  replace the latter.
(org-babel-lob-ingest): Make sure `org-babel-default-lob-header-args' is
used instead of `org-babel-default-header-args'.
(org-babel-lob--src-info): New function.
(org-babel-lob-get-info): Use new function.  Make return value
a replacement for `org-babel-get-src-block-info'.
(org-babel-lob-execute): Use `org-babel-execute-src-block' instead of
duplicating functionalities.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Apply changes to
  `org-babel-lob-get-info' return value.

* testing/examples/ob-header-arg-defaults.org:
* testing/lisp/test-ob-header-arg-defaults.el (test-ob-header-arg-defaults/tree/accumulate/call):
(test-ob-header-arg-defaults/tree/complex/call):
(test-ob-header-arg-defaults/tree/overwrite/call):
* testing/lisp/test-ob-lob.el (test-ob-lob/caching-call-line):
(test-ob-lob/named-caching-call-line): Update tests.

The purpose of this commit is to make Babel calls more
predictable (e.g., wrt property inheritance) and to remove code
duplication.  Also, Babel calls results are no longer treated as Emacs
Lisp values.

10 days agoorg-element: Small fix
Nicolas Goaziou [Thu, 16 Jun 2016 14:19:18 +0000]
org-element: Small fix

* lisp/org-element.el (org-element-inline-babel-call-parser): Empty
  arguments return nil instead of the empty string, so as to be on par
  with `org-element-babel-call-parser'.

10 days agoob-lob: Use lexical binding
Nicolas Goaziou [Wed, 15 Jun 2016 10:36:26 +0000]
ob-lob: Use lexical binding

10 days agoob-lob: Use cl-lib
Nicolas Goaziou [Wed, 15 Jun 2016 10:35:19 +0000]
ob-lob: Use cl-lib

10 days agoob-ref: Remove unnecessary function declarations
Nicolas Goaziou [Wed, 15 Jun 2016 08:40:56 +0000]
ob-ref: Remove unnecessary function declarations

10 days agoox: Fix typo
Nicolas Goaziou [Thu, 16 Jun 2016 20:33:21 +0000]
ox: Fix typo

* lisp/ox.el (org-export-get-reference): Fix typo.

11 days agoorgguide: Mirror changes to Org manual
Nicolas Goaziou [Wed, 15 Jun 2016 11:17:32 +0000]
orgguide: Mirror changes to Org manual

* doc/orgguide.texi (Installation):
(Clean view): Remove references to old Emacsen or XEmacs.

11 days agoorg.texi: Fix left-overs from src block syntax change
Nicolas Goaziou [Wed, 15 Jun 2016 11:13:31 +0000]
org.texi: Fix left-overs from src block syntax change

* doc/org.texi (Evaluating code blocks):
(results):
* doc/orgguide.texi (HTML export):
(@LaTeX{} and PDF export): Use "#+begin_export" foo instead of
"#+begin_foo".

11 days agoorg.texi: Fix previous commit
Nicolas Goaziou [Wed, 15 Jun 2016 09:44:15 +0000]
org.texi: Fix previous commit

* doc/org.texi (Plain lists): Remove reference to filladapt, which is
  not needed to fill plain lists.