Nicolas Goaziou
3c5d215274
org-mhe: Use lexical binding
2016-06-21 23:01:52 +02:00
Nicolas Goaziou
5fcb15d976
org-macs: Use lexical binding
...
* lisp/org-macs.el (org-save-outline-visibility): Small refactoring.
2016-06-21 22:56:46 +02:00
Nicolas Goaziou
b2835f3b8f
org-irc: Use lexical binding
...
* lisp/org-irc.el (org-irc-ellipsify-description): Replace `mapc' +
`lambda' with `dolist'.
2016-06-21 22:45:08 +02:00
Nicolas Goaziou
8d87417111
org-inlinetask: Use lexical binding
2016-06-21 22:42:09 +02:00
Nicolas Goaziou
26f0f938f4
org-info: Use lexical binding
...
* lisp/org-info.el (org-info-store-link): Small refactoring.
2016-06-21 22:38:51 +02:00
Nicolas Goaziou
bb4b0d7efc
org-gnus: Use lexical binding
2016-06-21 22:36:06 +02:00
Nicolas Goaziou
b1c05d5169
org-eshell: Use lexical binding
2016-06-21 22:34:25 +02:00
Nicolas Goaziou
c69fd5bf61
org-entities: Tiny refactoring
...
* lisp/org-entities.el (org-entities--user-safe-p): Use pattern matching
and strengthen check for name.
2016-06-21 16:53:27 +02:00
Nicolas Goaziou
27c5cf153f
org-entities: Use lexical binding
...
* lisp/org-entities.el (org-entities):
(org-entities-create-table):
(org-entities-help): Silence byte-compiler.
2016-06-21 16:40:08 +02:00
Nicolas Goaziou
4f63cfabb3
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'.
2016-06-21 15:33:00 +02:00
Nicolas Goaziou
1c30dea0ec
ob-core: Small refactoring
...
* lisp/ob-core.el (org-babel-get-src-block-info): Small refactoring.
2016-06-21 14:42:17 +02:00
Nicolas Goaziou
f8eb0b30ea
ob-shell: Fix "wrong type sequencep: function" error
...
* lisp/ob-shell.el (org-babel-shell-names): Fix error introduced when
switching to lexical binding.
2016-06-20 22:12:02 +02:00
Nicolas Goaziou
47fdeb1f48
org-ctags: Do not require "cl" at compile time
2016-06-20 15:08:25 +02:00
Nicolas Goaziou
7d3380612f
org-ctags: Use lexical binding
...
* lisp/org-ctags.el (org-ctags-open-file):
(org-ctags-fail-silently): Silence byte-compiler.
2016-06-20 15:04:33 +02:00
Nicolas Goaziou
b67a3ff715
org-crypt: Use lexical binding
2016-06-20 15:00:47 +02:00
Nicolas Goaziou
2108f0c23a
ob-shell: Use lexical binding
...
* lisp/ob-shell.el (org-babel-sh-initiate-session): Silence
byte-compiler.
2016-06-20 14:58:32 +02:00
Nicolas Goaziou
d4ea5decea
ob-lob: Fix docstring
...
* lisp/ob-lob.el (org-babel-lob--src-info): Fix typo.
2016-06-20 14:47:22 +02:00
Nicolas Goaziou
a5cf0f6fb8
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 >
2016-06-20 14:47:10 +02:00
Nicolas Goaziou
bae2286393
ob-core: Tiny refactoring
...
* lisp/ob-core.el (org-babel-graphical-output-file): Refactor code. Fix
error messages.
2016-06-20 14:41:04 +02:00
Nicolas Goaziou
6cefae1637
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.
2016-06-20 14:35:16 +02:00
Kyle Meyer
160efb5129
Merge branch 'maint'
2016-06-19 14:18:10 -04:00
Kyle Meyer
792bb9b655
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.
2016-06-19 14:11:25 -04:00
Kyle Meyer
b237d4df04
org-set-effort: Remove extra space in prompt
...
* lisp/org.el (org-set-effort): Make spacing across different prompt
cases consistent. Simplify prompt concatenation.
2016-06-19 14:11:20 -04:00
Nicolas Goaziou
69552bd42f
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.
2016-06-19 00:57:03 +02:00
Nicolas Goaziou
65e9dcee8d
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.
2016-06-19 00:38:22 +02:00
Nicolas Goaziou
270ed02b02
ob-exp: Tiny refactoring
...
* lisp/ob-exp.el (org-export-babel-evaluate): Tiny refactoring.
2016-06-19 00:38:22 +02:00
Nicolas Goaziou
ce19c05e34
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.
2016-06-19 00:38:22 +02:00
Nicolas Goaziou
72d4c3db2d
ob-exp: Do not require `cl' at compile time
...
* lisp/ob-exp.el (org-babel-exp-process-buffer): Use `pcase' instead of
`case'.
2016-06-19 00:38:22 +02:00
Nicolas Goaziou
e1139e1895
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.
2016-06-19 00:38:22 +02:00
Nicolas Goaziou
cfaf0d54d7
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.
2016-06-18 22:11:14 +02:00
Nicolas Goaziou
f195259821
Merge branch 'maint'
2016-06-17 14:17:23 +02:00
Nicolas Goaziou
0279d84cd7
ob-exp: Remove spurious comma un-escaping
...
* lisp/ob-exp.el (org-babel-exp-code): Remove spurious comma
un-escaping.
2016-06-17 14:16:39 +02:00
Nicolas Goaziou
61a0fafb44
ORG-NEWS: Document last change to radio lists
2016-06-17 10:20:57 +02:00
Nicolas Goaziou
ee7ca3cc43
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.
2016-06-17 10:19:07 +02:00
Nicolas Goaziou
3781a3dbbd
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.
2016-06-17 10:05:40 +02:00
Nicolas Goaziou
4b3bdd019e
Merge branch 'maint'
2016-06-17 00:41:54 +02:00
Nicolas Goaziou
75238d25ed
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 >
2016-06-17 00:39:52 +02:00
Xi Shen
35df86c5c0
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
2016-06-17 00:26:20 +02:00
Nicolas Goaziou
8416402269
Silence byte-compiler
2016-06-17 00:24:12 +02:00
Nicolas Goaziou
db671e1449
ob-ref: Fix reference expansion
...
* lisp/ob-ref.el (org-babel-ref-resolve): Properly expand a reference to
a Babel call.
2016-06-16 23:44:53 +02:00
Nicolas Goaziou
c3b42e917f
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.
2016-06-16 23:37:40 +02:00
Nicolas Goaziou
dbb375fdfc
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.
2016-06-16 23:15:01 +02:00
Nicolas Goaziou
a04752d38c
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'.
2016-06-16 22:34:12 +02:00
Nicolas Goaziou
e3e52a45bb
ob-lob: Use lexical binding
2016-06-16 22:34:12 +02:00
Nicolas Goaziou
ddd661a783
ob-lob: Use cl-lib
2016-06-16 22:34:12 +02:00
Nicolas Goaziou
758629d6a0
ob-ref: Remove unnecessary function declarations
2016-06-16 22:34:12 +02:00
Nicolas Goaziou
9d448128b7
ox: Fix typo
...
* lisp/ox.el (org-export-get-reference): Fix typo.
2016-06-16 22:33:21 +02:00
Nicolas Goaziou
ed8dea83a9
orgguide: Mirror changes to Org manual
...
* doc/orgguide.texi (Installation):
(Clean view): Remove references to old Emacsen or XEmacs.
2016-06-15 13:17:32 +02:00
Nicolas Goaziou
a101aad97c
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".
2016-06-15 13:15:08 +02:00
Nicolas Goaziou
1ee633ecf1
org.texi: Fix previous commit
...
* doc/org.texi (Plain lists): Remove reference to filladapt, which is
not needed to fill plain lists.
2016-06-15 11:44:15 +02:00