Nicolas Goaziou
085f150372
ob-tangle: Add a test
...
* testing/lisp/test-ob-tangle.el (ob-tangle/block-order): Add test.
2018-10-14 09:08:44 +02:00
Dima Gerasimov
7a09c33867
org-agenda: New test for setting priority
...
* testing/examples/agenda-file.org: Add a subnote, make sure it has no
impact on agenda.
* testing/lisp/test-org-agenda.el (test-org-agenda/set-priority): New
test.
TINYCHANGE
2018-10-13 16:58:33 +02:00
Nicolas Goaziou
2fda33bfef
ob-tangle: Fix tangling order
...
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Preserver order
of code blocks from the source document.
* testing/lisp/test-ob-tangle.el (ob-tangle/block-order): New test.
Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-10/msg00062.html >
2018-10-11 00:01:50 +02:00
Marco Wahl
0ae2e656d7
test-org: More tests for cut and paste subtree
2018-10-04 23:49:00 +02:00
Marco Wahl
f82a3051a9
test-org-bbdb.el: new tests
...
* testing/lisp/test-org-bbdb.el (test-org-bbdb-anniv-extract-date):
Test function `org-bbdb-anniv-extract-date'.
2018-09-23 17:03:00 +02:00
Nicolas Goaziou
17edaf8c14
"src block" -> "source block" in documentation and comments
...
* etc/ORG-NEWS (Maxima: new headers ~:prologue~ and ~:epilogue~):
(Texinfo exports inline source blocks as ~@code{}~):
(Default lexical evaluation of emacs-lisp source blocks):
* lisp/ob-clojure.el (org-babel-clojure-default-ns):
* lisp/ob-core.el (org-babel-named-src-block-regexp-for-name):
(org-babel-current-src-block-location):
(org-babel-mark-block):
(org-babel-insert-result):
* lisp/ob-emacs-lisp.el (org-babel-default-header-args:emacs-lisp):
* lisp/ob-exp.el (org-babel-exp-process-buffer):
* lisp/ob-lob.el (org-babel-lob-ingest):
* lisp/ob-ref.el:
* lisp/org-element.el (org-element-object-restrictions):
(org-element-src-block-parser):
(org-element-inline-src-block-parser):
* lisp/org-lint.el:
(org-lint--checkers):
* lisp/org-pcomplete.el (pcomplete/org-mode/block-option/src):
* lisp/org-src.el (org-edit-inline-src-code):
* lisp/org.el (org-ctrl-c-ctrl-c):
(org-in-src-block-p):
(org-fill-element):
* lisp/ox-html.el (org-html--textarea-block):
(org-html-format-code):
* lisp/ox-latex.el (org-latex-minted-options):
(org-latex-custom-lang-environments):
* lisp/ox-md.el:
* lisp/ox-odt.el (org-odt-format-code):
* lisp/ox.el (org-export-collect-listings):
* testing/lisp/test-ob-exp.el (ob-exp/src-block-with-affiliated-keyword):
* testing/lisp/test-ob.el (test-ob/preserve-results-indentation):
Correct "src block" occurrences when they do not specifically refer
to the element type `src-block'.
2018-09-20 11:23:49 +02:00
Robert Klein
1e6ab19b2a
Fix tests for sqlite
...
- sqlite executable used by ob-sqlite is 'sqlite3'
- require ob-sqlite for test
2018-09-13 23:04:57 +02:00
Nicolas Goaziou
9029161bcd
org-footnote: Fix failing test
...
* testing/lisp/test-org-footnote.el (test-org-footnote/new): Fix
failing test.
2018-09-05 19:04:34 +02:00
Nicolas Goaziou
cbb7be9c25
Revert "org-footnote: Fix location after moving to definition"
...
This reverts commit 8500501984
.
2018-08-30 23:59:01 +02:00
Nicolas Goaziou
1334572582
org-macs: Optimize `org-string-width'
...
* lisp/org-macs.el (org--string-from-props): New function.
(org-string-display): Remove function.
(org-string-width): Use new function.
2018-08-30 21:09:57 +02:00
Matt Lundin
5e27b2fd32
Ensure that org-get-tags returns all local tags
...
* lisp/org.el: (org-get-tags) Create a clearer separation between
local and inherited tags in the function, so that
org-remove-uninherited tags is only run on inherited tags. This is
important to avoid destroying existing tags when adding new tags.
* testing/lisp/test-org.el: (test-org/get-tags) Add regression test
2018-08-19 10:28:27 +02:00
Nicolas Goaziou
d975b44fd4
Fix `org-kill-line' on tag lines
...
* lisp/org.el (org-kill-line): Preserve tags when `org-special-ctrl-k'
is non-nil.
* testing/lisp/test-org.el (test-org/kill-line): New test.
Reported-by: Matt Lundin <mdl@imapmail.org>
<http://lists.gnu.org/r/emacs-orgmode/2018-07/msg00122.html >
2018-07-17 22:24:01 +02:00
Nicolas Goaziou
65ebb128bc
org-macro: Fix "results" macro
...
* lisp/org-macro.el (org-macro-initialize-templates): Do not
initialize the special "results" macro.
(org-macro-replace-all): Do not raise an error if "results" macro has
no associated template yet.
* lisp/ox.el (org-export-as): Update code comments.
* testing/lisp/test-ox.el (test-org-export/expand-macro): Add test.
2018-07-07 12:53:13 +02:00
Nicolas Goaziou
7d9e4da447
Prevent spurious newline character in fixed-width area value
...
* lisp/org-element.el (org-element-fixed-width-parser): Prevent
spurious newline character at the end of the value.
* lisp/ox-latex.el (org-latex-fixed-width):
* lisp/ox-man.el (org-man-fixed-width):
* lisp/ox-texinfo.el (org-texinfo-fixed-width):
* contrib/lisp/ox-groff.el (org-groff-fixed-width): Adapt to change.
* testing/lisp/test-org-element.el (test-org-element/fixed-width-parser):
Update tests.
Reported-by: 孙振祥 <sunznx@icloud.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2018-07/msg00003.html >
2018-07-02 00:24:38 +02:00
Nicolas Goaziou
937e7ce76b
org-macs: Fix last commit
...
* lisp/org-macs.el (org-parse-time-string): Fix typo in last commit.
* testing/lisp/test-org-element.el (test-org-element/timestamp):
Rename to `test-org-element/timestamp-parser'.
2018-07-02 00:18:44 +02:00
Robert Irelan
e1f197aec7
org-clock: Test clocktable behavior under `org-extend-today-until'
...
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/extend-today-until):
New test.
2018-06-27 08:31:47 +02:00
Nicolas Goaziou
627cb7f578
org-footnote: Fix `org-footnote-goto-previous-reference'
...
* lisp/org-footnote.el (org-footnote-goto-previous-reference): Only
add to mark ring on a successful match. Improve error message when
reference is outside visible part of buffer.
(org-footnote-get-next-reference): Avoid using
`org-footnote-at-reference-p', which is inaccurate, due to
`org-footnote-in-valid-context-p'.
* testing/lisp/test-org-footnote.el (test-org-footnote/goto-previous-reference):
New test.
2018-06-24 11:25:15 +02:00
Marco Wahl
a6b4cec691
org-agenda: Refactored. Add test.
...
* lisp/org-agenda.el (org-agenda-mode): Factored out a function for a
loop occuring two times.
* testing/lisp/test-org-agenda.el: test the text scale after
agenda-undo.
2018-06-24 09:52:29 +02:00
Nicolas Goaziou
62dd2cc829
Fix regression in tags alignment
...
* lisp/org.el (org--align-tags-here): Correctly preserve column.
* testing/lisp/test-org.el (test-org/tag-align): Add test.
The regression was introduced in
593058e4a6
.
Reported-by: Bernt Hansen <bernt@norang.ca>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00245.html >
2018-06-22 18:49:11 +02:00
Henry Blevins
f2500e06f3
ob-scheme: Add tests for scheme result types
...
* test-ob-scheme.el (test-ob-scheme/verbatim, test-ob-scheme/list):
New tests.
2018-06-21 22:00:50 +02:00
Nicolas Goaziou
031c53103a
org-capture: Fix formulas when capturing rows
...
* lisp/org-capture.el (org-capture-finalize): Possibly update formula
when inserting the captured rows in the table.
* testing/lisp/test-org-capture.el (test-org-capture/table-line): Add
tests.
Reported-by: "Holst Thomas (PS-EC/ESE4)" <Thomas.Holst@de.bosch.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00276.html >
2018-06-21 18:09:40 +02:00
Nicolas Goaziou
547b431e70
org-capture: Fix row insertion in a table with a formula
...
* lisp/org-capture.el (org-capture-place-table-line): Insert new row
above the formula, not below.
* testing/lisp/test-org-capture.el (test-org-capture/table-line): Add
test.
2018-06-21 12:17:07 +02:00
Nicolas Goaziou
593058e4a6
`org-set-tags' modifies buffer only when necessary
...
* lisp/org.el (org--align-tags-here):
(org-set-tags): Modify buffer only when necessary.
* testing/lisp/test-org.el (test-org/set-tags): Add tests.
Reported-by: Allen Li <darkfeline@felesatra.moe>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00242.html >
2018-06-19 09:40:00 +02:00
Nicolas Goaziou
3745c0af9f
Fix indentation when wrapping a block around a region
...
* lisp/org.el (org-insert-structure-template): Indent like the first
line, not the line the point happens to be on.
Reported-by: stardiviner <numbchild@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00107.html >
2018-06-12 09:03:33 +02:00
Marco Wahl
13a09b3ba5
Merge branch 'maint'
2018-06-06 16:05:26 +02:00
Marco Wahl
2b76aebfc6
org-element: Fix interpretation as todo kwd when prefix of headline
...
* lisp/org-element.el (org-element-headline-parser): Check for space
after todo-kwd.
* testing/lisp/test-org-element.el (test-org-element/headline-todo-keyword):
Respective tests.
2018-06-06 15:58:20 +02:00
Nicolas Goaziou
ed7d1dc6d7
Fix quirks in `org-insert-structure-template'
...
* lisp/org.el (org-insert-structure-template): Fix some issues.
Refactor code.
* testing/lisp/test-org.el (test-org/insert-structure-template):
Update tests.
Reported-by: stardiviner <numbchild@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00553.html >
2018-06-02 23:41:56 +02:00
Nicolas Goaziou
9d51a8b5a0
org-capture: Fix table line capture with custom location
...
* lisp/org-capture.el (org-capture-place-table-line): Fix error when
a precise location is given, e.g. with `file+function' target.
* testing/lisp/test-org-capture.el (test-org-capture/table-line): Add
test.
Reported-by: Thomas Holst <thomas_holst@gmx.de>
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00359.html >
2018-05-17 22:57:49 +02:00
Nicolas Goaziou
c46fcd9874
org-lint: Add checker for spurious colons in tags
...
* lisp/org-lint.el (org-lint--checkers): Add checker.
(org-lint-spurious-colons): New function.
* testing/lisp/test-org-lint.el (test-org/spurious-colons): New test.
2018-05-14 17:41:04 +02:00
Aaron Ecay
d94d52489d
test files: use cl- prefixed functions, and require cl-lib
2018-05-10 04:22:30 +01:00
Aaron Ecay
7fb3328db8
testing/README: update to new header arg property format
2018-05-10 04:22:30 +01:00
Nicolas Goaziou
9ab45860a6
Merge branch 'maint'
2018-05-01 15:06:57 +02:00
Nicolas Goaziou
80eb69b648
org-list: Proper error message when trying to indent top level item
...
* lisp/org-list.el (org-list-struct-indent): Return proper error
message upon trying to indent a top-level item. Use `user-error'.
* testing/lisp/test-org-list.el (test-org-list/indent-item): Add test.
2018-05-01 15:06:08 +02:00
Nicolas Goaziou
ab53ee2c3d
org-capture: Fix capturing in a table
...
* lisp/org-capture.el (org-capture-place-table-line): Rewrite function.
* testing/lisp/test-org-capture.el (test-org-capture/table-line): New
test.
2018-04-30 00:52:57 +02:00
Nicolas Goaziou
946b469cc2
Remove unnecessary `(require 'cl)'
...
* testing/examples/babel.org: Remove unnecessary `(require 'cl)'.
2018-04-29 12:04:26 +02:00
Nicolas Goaziou
a2994cb005
Mark "org-version-check" obsolete
...
* lisp/org-compat.el (org-version-check): Mark as obsolete.
(org-no-popups):
* testing/examples/babel.org: Remove use of `org-version-check'.
2018-04-29 11:54:40 +02:00
Nicolas Goaziou
ba5bedc17f
org-clock: Re-activate tests
...
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/ranges):
(test-org-clock/clocktable/step): Un-comment tests.
They were commented out in "org-clock.el: New option :tags to insert
tags in clock reports".
2018-04-29 00:22:53 +02:00
Nicolas Goaziou
1615261cdc
Preserve point when setting or aligning tags
...
* lisp/org.el (org--align-tags-here):
(org-set-tags-command):
(org-align-tags): Preserve point.
* testing/lisp/test-org.el (test-org/set-tags-command): Add test.
2018-04-28 23:45:04 +02:00
Nicolas Goaziou
c7c8370dfb
Fix clock-related failing tests
...
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/match):
(test-org-clock/clocktable/tags): Fix test.
2018-04-28 02:47:35 +02:00
Nicolas Goaziou
031f362352
Fix `org-toggle-tag'
...
* lisp/org.el (org-toggle-tag): Fix weird behavior with inherited tags.
* testing/lisp/test-org.el (test-org/toggle-tag): Add test.
Reported-by: Bernt Hansen <bernt@norang.ca>
<http://lists.gnu.org/r/emacs-orgmode/2018-04/msg00537.html >
2018-04-28 02:10:44 +02:00
Marco Wahl
a0a40a4651
org: Remove special whitespace treatment when moving subtree
...
* lisp/org.el (org-move-subtree-down): Remove special whitespace treatment.
* testing/lisp/test-org.el (test-org/drag-element-backward):
Accommodate test.
2018-04-27 01:08:29 +02:00
Bastien
f80f7ed98b
org-clock.el: New option :tags to insert tags in clock reports
...
* lisp/org-clock.el (org-clocktable-defaults)
(org-clocktable-write-default, org-clock-get-table-data):
Rename :tags to :match and use :tags to insert a column with
the headline's tags.
Thanks to Raymond Zeitler for suggesting this.
2018-04-26 20:55:27 +02:00
Nicolas Goaziou
3719cdd48e
org-table: Fix shrunk hlines
...
* lisp/org-table.el (org-table--shrink-field): Handle properly shrunk
hlines with a width cookie.
* testing/lisp/test-org-table.el (test-org-table/toggle-column-width):
Add test. Fix tests.
Reported-by: William Denton <wtd@pobox.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-04/msg00306.html >
2018-04-20 11:57:37 +02:00
Nicolas Goaziou
4d152b994e
Rewrite tags setting functions
...
* lisp/org.el (org-setting-tags): Remove variable.
(org-set-tags-command): Change signature. For interactive use only.
(org-set-tags-to): Remove function.
(org-align-all-tags): Remove function.
(org-align-tags): New function.
(org-set-tags): Change signature. For non-interactive use only.
(org-promote):
(org-demote):
(org-refile):
(org-todo):
(org-priority):
(org-toggle-tag):
(org-entry-put):
(org-fix-tags-on-the-fly):
(org-ctrl-c-ctrl-c):
(org-delete-indentation):
(org-return):
(org-kill-line): Apply signature change. Use new functions.
* lisp/ox-beamer.el (org-beamer-property-changed):
(org-beamer-select-environment): Apply signature change. Use new
functions.
* testing/lisp/test-org-archive.el (test-org-archive/to-archive-sibling):
Update test.
* testing/lisp/test-org.el (test-org/set-tags): Add tests.
(test-org/set-tags-command): New test.
(test-org/set-tags-to): Remove test.
2018-04-20 10:51:21 +02:00
Nicolas Goaziou
2a293843ad
org-lint: Remove useless checker
...
* lisp/org-lint.el (org-lint--checkers): Remove useless checker.
(org-lint-empty-headline-with-tags): Remove function.
* testing/lisp/test-org-lint.el (test-org-lint/empty-headline-with-tags):
Remove test.
2018-04-19 11:52:07 +02:00
Nicolas Goaziou
fbe56f89f7
Change `org-get-tags' specifications
...
* lisp/org.el (org-tag-line-re): New variable.
(org-hide-archived-subtrees):
(org-get-buffer-tags): Use new function.
(org--get-local-tags): New function.
(org-get-tags): Change meaning. Now get all inherited tags. Change
signature.
* lisp/org-archive.el (org-archive-subtree):
* lisp/org-mobile.el (org-mobile-apply):
(org-mobile-edit):
* lisp/org-mouse.el (org-mouse-tag-menu):
* lisp/org-pcomplete.el (pcomplete/org-mode/tag): Apply change
* testing/lisp/test-org.el (test-org/get-tags): New test.
(test-org/tags-at): Remove test.
2018-04-19 11:51:54 +02:00
stardiviner
b088389c6b
ob-core: Add document and test for "graphics" format
...
* doc/org-manual.org: Document value.
* lisp/ob-core.el (org-babel-common-header-args-w-values): Handle
symbol "graphics".
* testing/lisp/test-ob.el (test-ob/result-graphics-link-type-header-argument):
New test.
2018-04-12 15:16:04 +02:00
stardiviner
296b0de4e8
ob-core: Add "link" results format
...
* lisp/ob-core.el (org-babel-execute-src-block): Handle "link" :results
format.
* doc/org-manual.org: Add document for new result format "link".
* testing/lisp/test-ob.el (test-ob/result-file-link-type-header-argument):
New test.
2018-04-12 15:15:59 +02:00
Nicolas Goaziou
fb58727f32
Merge branch 'maint'
2018-04-08 18:39:36 +02:00
Nicolas Goaziou
f05c2eae33
Fix RET on multi-line links
...
* lisp/org.el (org-return): Follow multi-line links.
* testing/lisp/test-org.el (test-org/return): Add tests.
Reported-by: Brent Goodrick <bgoodr@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-04/msg00105.html >
2018-04-08 18:35:40 +02:00