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
51623c2ac8
News for 0d000f5
2015-11-06 12:53:59 +00:00
Aaron Ecay
eb2774b17d
News entries for several commits
...
Namely:
861b6b1
, d29d9a0
, a676853
, e4cd3dd
, c7f1b55
, 4809656
, 40356ae
2015-11-06 12:50:56 +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
ea238b78f8
contrib: move a few libraries to cl-lib in place of compile-time cl.
...
Specifically ob-julia, ob-stata, org-contacts, ox-bibtex.
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
4c9b24b4d5
Remove test for `org-babel-get-header' function.
...
The function was removed in 0d000f5
.
2015-11-05 17:04:15 +00: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
Aaron Ecay
e47c7c3ed6
babel: update the manual wrt :cache header arg
...
* doc/org.texi (cache): Update manual section.
2015-11-05 14:50:23 +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
77fa0018b8
Merge branch 'maint'
2015-11-05 13:45:29 +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