Commit Graph

1826 Commits

Author SHA1 Message Date
Nicolas Goaziou ab311b85ae Merge branch 'maint' 2019-04-13 09:43:32 +02:00
Nicolas Goaziou 222408d70a org-table: Prevent expanding columns upon applying formulas
* lisp/org-table.el (org-table-recalculate): Prevent expanding columns
  upon applying formulas.
* testing/lisp/test-org-table.el (test-org-table/shrunk-columns): Add
  test.

Reported-by: Nick Dokos <ndokos@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-04/msg00079.html>
2019-04-13 09:40:27 +02:00
Nicolas Goaziou 09a1a24b73 ol: Fix `org-previous-link' skipping links
* lisp/ol.el (org-next-link): Do not skip links when searching
  backwards.

Reported-by: stardiviner <numbchild@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-04/msg00022.html>
2019-04-10 15:26:46 +02:00
Nicolas Goaziou 21fa859c4d Merge branch 'maint' 2019-04-09 09:24:46 +02:00
Nicolas Goaziou 6efe53cf0b org-capture: Do not break planning when capturing items
* lisp/org-capture.el (org-capture-place-item): When there is no list
  to augment, insert new list after planning info and properties
  drawers.
* testing/lisp/test-org-capture.el (test-org-capture/item): Add tests.

Reported-by: Allen Li <darkfeline@felesatra.moe>
<http://lists.gnu.org/r/emacs-orgmode/2019-04/msg00060.html>
2019-04-09 09:23:00 +02:00
Nicolas Goaziou 3375f039dd ol: Fix `org-next-link' in an item tag
* lisp/ol.el (org-next-link): Fix `org-next-link' in an item tag.
* testing/lisp/test-ol.el (test-ol/next-link): Add test.
2019-04-04 15:52:41 +02:00
Nicolas Goaziou da517aaeb8 Merge branch 'maint' 2019-04-02 22:12:10 +02:00
Nicolas Goaziou b913b7404b org-capture: Fix capture on empty entries
* lisp/org-capture.el (org-capture-fill-template): Prevent raising an
  error when template is an empty entry.
* testing/lisp/test-org-capture.el (test-org-caputre/entry): Add test.

Reported-by: Roland Everaert <reveatwork@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-04/msg00019.html>
2019-04-02 22:10:50 +02:00
Marco Wahl f0dc3a06d1 test-org-clock: Fix one test
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/link):
  Align the table after the substitution of a filename.  Further let
  org-link-descriptive be nil for better readablity of the tables.
2019-03-15 12:58:03 +01:00
Sebastian Miele e96f055ce2 ob-emacs-lisp: Test :lexical src block header argument
* testing/lisp/test-ob-emacs-lisp.el
  (ob-emacs-lisp/dynamic-lexical-execute,
  ob-emacs-lisp/dynamic-lexical-edit): Add tests that check the
  correct handling of the :lexical header argument when executing
  source blocks and when creating editing buffers for source blocks.
2019-03-14 22:58:45 +01:00
Nicolas Goaziou 83fb091a62 Merge branch 'maint' 2019-03-14 18:12:08 +01:00
Nicolas Goaziou 0007df863d org-lint: Do not warn about URL setup files
* lisp/org-lint.el (org-lint-non-existent-setupfile-parameter): Do not
  warn when setup file is a URL.
* testing/lisp/test-org-lint.el (test-org-lint/non-existent-setupfile-parameter):
Add test.

Reported-by: Dominik Schrempf <dominik.schrempf@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-03/msg00169.html>
2019-03-14 18:11:00 +01:00
Nicolas Goaziou 589cfb7488 Merge branch 'maint' 2019-03-10 18:22:05 +01:00
Pierre Téchoueyres 2216f4d2c7 org-protocol: Fix URL handling -- add tests
* testing/lisp/test-org-protocol.el (test-org-protocol/org-protocol-parse-parameters):
  Add test for the commit e0bfdec22 which un-escape extracted link as
  it is url-encoded externally.
2019-03-10 18:20:58 +01:00
Nicolas Goaziou a8a0d66900 org-clock: Fix failing test 2019-03-10 18:00:36 +01:00
Nicolas Goaziou c04372dbfe org-lint: Add checker for obsolete link escape syntax
* lisp/org-lint.el (org-lint--checkers): Add new linter.
(org-lint-percent-encoding-link-escape): New function.
* testing/lisp/test-org-lint.el (test-org-lint/percenc-encoding-link-escape):
  New test.
2019-03-10 18:00:36 +01:00
Nicolas Goaziou 2b00d62816 Change bracket link escape syntax
* contrib/lisp/org-link-edit.el (org-link-edit--link-data):
* lisp/ob-tangle.el (org-babel-tangle-comment-links): Update match-group.
(org-babel-detangle): Remove unnecessary `org-link-escape' call.
(org-babel-tangle-jump-to-org): Update match group.
(org-link-url-hexify):
(org-link-escape-chars): Remove variables.
* lisp/ol.el (org-link--decode-compound): Renamed from
  `org-link--unescape-compound'.
(org-link--decode-single-byte-sequence): Renamed from
`org-link--unescape-single-byte-sequence'.
(org-link-make-regexps): Update `org-link-bracket-re' syntax.
(org-link-encode): New function, renamed from `org-link-escape'.
(org-link-decode): New function, renamed from `org-link-unescape'.
(org-link-escape):
(org-link-unescape): Use new escape syntax.
(org-link-make-string): Apply new escaping rules.
(org-link-display-format):
(org-insert-link): Update match group.
* lisp/org-agenda.el (org-diary):
(org-agenda-format-item):
(org-agenda-to-appt): Update match group.
* lisp/org-clock.el (org-clocktable-write-default): Update match group.
* lisp/org-element.el (org-element-link-parser): Update match group.
* lisp/org-mobile.el (org-mobile-escape-olp):
(org-mobile-locate-entry): Apply function renaming.
* lisp/org-protocol.el (org-protocol-split-data):
(org-protocol-parse-parameters): Apply function renaming.
* lisp/org.el (org-refile): Update match group.
* testing/README (Interactive testing from within Emacs): Fix
  examples.
* testing/lisp/test-ol.el (test-ol/encode): Merge old escape tests.
(test-ol/decode): Merge old unescape tests.
(test-ol/escape):
(test-ol/unescape):
(test-ol/make-string): New tests.
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/link):
* testing/lisp/test-org.el (test-org/custom-id):
(test-org/fuzzy-links):
* testing/lisp/test-ox.el (test-org-export/resolve-fuzzy-link): Update
  tests.
2019-03-10 18:00:36 +01:00
Nicolas Goaziou 4ff8947ea8 Fix `org-(next|previous)-link'
* lisp/ol.el (org-next-link): Rewrite function.
* testing/lisp/test-ol.el (test-ol/next-link):
(test-ol/previous-link): New tests.
2019-03-10 18:00:36 +01:00
Nicolas Goaziou 8ffe341989 Move link tests to a dedicated file
* testing/lisp/test-org.el: Move test to the...
* testing/lisp/test-ol.el: ... new file.
2019-03-10 18:00:36 +01:00
Nicolas Goaziou 499c0a50cc Prefix link-related libraries filenames with "ol"
* lisp/org.el (org-modules): Update provided symbols.
2019-03-10 18:00:36 +01:00
Nicolas Goaziou 51444aadf5 org-clock: Fix failing test
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/insert):
  Fix test now default scope is not file.
2019-03-04 23:16:48 +01:00
Nicolas Goaziou 0c1916657a ob: Fix and add tests for mkdirp header argument
* testing/lisp/test-ob.el (test-ob-core/dir-mkdirp): Add tests.
2019-03-04 22:34:31 +01:00
stardiviner 8b5941330b ob-core: Make :mkdirp work for :dir too
* lisp/ob-core.el (org-babel-execute-src-block): Make directory if
  ":dir path" does not exist when ":mkdirp yes" exist.

* doc/org-manual.org (Header arguments): Document it.

* testing/lisp/test-ob.el: Add a specific testing file for ob-core.el,
  and add a testing for ":mkdir yes" work with :dir header argument
  usage.
2019-03-04 22:25:48 +01:00
Nicolas Goaziou 3a106a213c Merge branch 'maint' 2019-02-18 23:38:55 +01:00
Nicolas Goaziou 6b8fb446b6 org-list: Fix `org-list-demote-modify-bullet' with alpha bullets
* lisp/org-list.el (org-list-struct-indent): Match case-sensitively
  against current bullet in order the tell the difference between "a."
  and "A.".
* testing/lisp/test-org-list.el (test-org-list/indent-item): Add test.
2019-02-18 23:38:13 +01:00
Nicolas Goaziou 7e98c5c4cc Merge branch 'maint' 2019-02-15 22:47:53 +01:00
Nicolas Goaziou 6872088c7a Prevent spurious newline characters when inserting a heading
* lisp/org.el (org-insert-heading): Do not insert spurious newline
  characters.
* testing/lisp/test-org.el (test-org/insert-heading): Update tests.

Reported-by: Leo Vivier <zaephon@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00128.html>
2019-02-15 22:47:28 +01:00
Kyle Meyer f362df7eb7 Merge branch 'maint' 2019-02-12 19:55:26 -05:00
Paul Eggert 2cd1f9b028 When testing, fake the current time more robustly
The old approach required Lisp code to use (current-time)
explicitly when calling other primitives, e.g., (float-time
(current-time)).  The new approach fakes all the primitives,
so that Lisp code can now use expressions like plain (float-time).
* testing/org-test.el (org-test-at-time): New macro.
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
* testing/lisp/test-org-timer.el (test-org-timer/with-current-time):
* testing/lisp/test-org.el (test-org/org-read-date)
(test-org/deadline-close-p, test-org/deadline)
(test-org/schedule, test-org/time-stamp):
Use it.
2019-02-12 19:34:08 -05:00
Nicolas Goaziou 232160cf7a Merge branch 'maint' 2019-02-12 01:19:19 +01:00
Nicolas Goaziou 931b7b8faf Fix included nested relative file links
* lisp/ox.el (org-export--update-included-link): New function.
(org-export--prepare-file-contents): Use new function.  Also check
possible file links within link's description.
* testing/lisp/test-ox.el (test-org-export/expand-include/links): Fix
  prefix.  Add tests.

Reported-by: "Dietrich Foethke" <foethke@web.de>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00103.html>
2019-02-12 01:15:55 +01:00
Nicolas Goaziou ce48c6b0d1 Merge branch 'maint' 2019-02-03 14:42:18 +01:00
Nicolas Goaziou 70c90c2cb5 Fix nested VISIBILITY property
* lisp/org.el (org-set-visibility-according-to-property): Fix nested
  VISIBILITY property. Small refactoring.
* testing/lisp/test-org.el (test-org/set-visibility-according-to-property):
  Add test.

Reported-by: Michael Maurer <maurer.michael@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-01/msg00402.html>
2019-02-03 14:23:44 +01:00
Nicolas Goaziou ee29cdc40e Merge branch 'maint' 2019-01-30 22:36:14 +01:00
Nicolas Goaziou 5e47e49832 Revert actionable repeaters in inactive timestamps
* lisp/org.el (org-repeat-re): Repeaters are for active timestamps
  only.
* testing/lisp/test-org.el (test-org/auto-repeat-maybe): Update test.

Reported-by: cesar mena <cesar.mena@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-01/msg00095.html>
2019-01-30 22:19:28 +01:00
stardiviner bcdb2b5568 ob-clojure: Don't tangle with auto prepend ns statement
* lisp/ob-clojure.el: (org-babel-expand-body:clojure,
  org-babel-header-args:clojure): whether auto prepend Clojure (ns ..)
  statement depend on whether have :ns header argument specified.

* testing/test-ob-clojure.el: Add a test.
2019-01-21 21:17:47 +01:00
Yasushi SHOJI 4a076ed545 Allow cloning subtrees while shifting them backward in time
* lisp/org.el (org-clone-subtree-with-time-shift): Accept a negative
value to shift the timestamp backward in time.
* testing/lisp/test-org.el (test-org/clone-with-time-shift): Add test.

Reported-by: Scott Randby <srandby@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-01/msg00151.html>

Signed-off-by: Yasushi SHOJI <yasushi.shoji@gmail.com>
2019-01-21 18:47:49 +01:00
Marco Wahl c006a60fac test-org-agenda: Test diary inclusion
* testing/lisp/test-org-agenda.el (test-org-agenda/diary-inclusion):
  New test.
2019-01-08 21:32:44 +01:00
Kaushal Modi 8a5d8f79a1 Merge branch 'maint' 2019-01-08 11:35:34 -05:00
Kaushal Modi 34e5dcfb06 Fix the order of org-get-tags collected tags from #+filetags
* lisp/org.el (org-get-tags): Now org-get-tags returns tags list with
  tags from #+filetags in the beginning.

* testing/lisp/test-org.el (test-org/get-tags): Add test.

Fixes regression caused by commit
<5e27b2fd32>.

Bug reported in
<https://lists.gnu.org/r/emacs-orgmode/2019-01/msg00052.html>.
2019-01-08 11:29:58 -05:00
Nicolas Goaziou 21d646775b org-num: Fix failing tests 2019-01-08 11:32:34 +01:00
Marco Wahl 7d638dcd49 test-org: Concretize test
* testing/lisp/test-org.el (test-org/set-tags-command): Test
  specifically for the C-u prefix for tag alignment.
2019-01-05 13:45:04 +01:00
Kaushal Modi b334a59902 Merge branch 'maint' 2019-01-04 08:59:10 -05:00
Kaushal Modi 539091799b Fix C-u M-x org-align-tags not aligning all tags in buffer
* lisp/org.el (org-align-tags): Move point to the beginning of the
  visible buffer first before attempting to look for Org headline
  tags.

* testing/lisp/test-org.el (test-org/tag-align): Add test.

Fixes a regression in
1615261cdc.

Bug reported in
<https://lists.gnu.org/r/emacs-orgmode/2019-01/msg00051.html>.
2019-01-04 08:57:10 -05:00
stardiviner 34b71a0ca9 Add a dispatcher command for inserting dynamic blocks
* lisp/org.el (org-dynamic-block-insert-dblock,
  org-dynamic-block-alist, org-dynamic-block-functions,
  org-dynamic-block-types, org-dynamic-block-define,
  org-dynamic-block-function): New variables, New functions.

* lisp/org-keys.el (org-dynamic-block-insert-dblock): Add binding for
  the function.
(org-clock-report, org-columns-insert-dblock): Remove function
keybindings. Mark them as obsolete.

* doc/org-manual.org (Dynamic Blocks): : Add manual for dispatch
command `org-dynamic-block-insert-dblock'.

* testing/lisp/test-org-clock.el: New test.
2019-01-02 15:55:51 +01:00
Nicolas Goaziou 69c300bbf6 Add Org Num minor mode
* doc/org-manual.org (Headlines): Refer to new section.
(Dynamic Headline Numbering): New section.
* lisp/org-num.el:
* testing/lisp/test-org-num.el: New files.
2019-01-01 22:08:24 +01:00
Nicolas Goaziou 114de1571a org-colview: Fix failing test
* testing/lisp/test-org-colview.el (test-org-colview/columns-width):
  Fix failing test.
2019-01-01 17:23:35 +01:00
Bastien 7a22b8f93b Merge branch 'maint' 2019-01-01 11:54:01 +01:00
Bastien f584d37a67 Update copyright year 2019-01-01 11:50:56 +01:00
Nicolas Goaziou 372099440f Merge branch 'master' into next 2018-12-17 17:45:24 +01:00