|
@@ -6969,8 +6969,8 @@ Paragraph<point>"
|
|
|
(should
|
|
|
(equal "* H1 :foo:"
|
|
|
(org-test-with-temp-text "* H1"
|
|
|
- (cl-letf (((symbol-function 'completing-read)
|
|
|
- (lambda (&rest args) ":foo:")))
|
|
|
+ (cl-letf (((symbol-function 'completing-read-multiple)
|
|
|
+ (lambda (&rest args) '("foo"))))
|
|
|
(let ((org-use-fast-tag-selection nil)
|
|
|
(org-tags-column 1))
|
|
|
(org-set-tags-command)))
|
|
@@ -6979,8 +6979,8 @@ Paragraph<point>"
|
|
|
(should
|
|
|
(equal "* H1 :foo:\nContents"
|
|
|
(org-test-with-temp-text "* H1\n<point>Contents"
|
|
|
- (cl-letf (((symbol-function 'completing-read)
|
|
|
- (lambda (&rest args) ":foo:")))
|
|
|
+ (cl-letf (((symbol-function 'completing-read-multiple)
|
|
|
+ (lambda (&rest args) '("foo"))))
|
|
|
(let ((org-use-fast-tag-selection nil)
|
|
|
(org-tags-column 1))
|
|
|
(org-set-tags-command)))
|
|
@@ -6988,30 +6988,20 @@ Paragraph<point>"
|
|
|
(should-not
|
|
|
(equal "* H1 :foo:\nContents2"
|
|
|
(org-test-with-temp-text "* H1\n<point>Contents2"
|
|
|
- (cl-letf (((symbol-function 'completing-read)
|
|
|
- (lambda (&rest args) ":foo:")))
|
|
|
+ (cl-letf (((symbol-function 'completing-read-multiple)
|
|
|
+ (lambda (&rest args) '("foo"))))
|
|
|
(let ((org-use-fast-tag-selection nil)
|
|
|
(org-tags-column 1))
|
|
|
(org-set-tags-command)))
|
|
|
(org-at-heading-p))))
|
|
|
- ;; Strip all forbidden characters from user-entered tags.
|
|
|
- (should
|
|
|
- (equal "* H1 :foo:"
|
|
|
- (org-test-with-temp-text "* H1"
|
|
|
- (cl-letf (((symbol-function 'completing-read)
|
|
|
- (lambda (&rest args) ": foo *:")))
|
|
|
- (let ((org-use-fast-tag-selection nil)
|
|
|
- (org-tags-column 1))
|
|
|
- (org-set-tags-command)))
|
|
|
- (buffer-string))))
|
|
|
;; When a region is active and
|
|
|
;; `org-loop-over-headlines-in-active-region' is non-nil, insert the
|
|
|
;; same value in all headlines in region.
|
|
|
(should
|
|
|
(equal "* H1 :foo:\nContents\n* H2 :foo:"
|
|
|
(org-test-with-temp-text "* H1\nContents\n* H2"
|
|
|
- (cl-letf (((symbol-function 'completing-read)
|
|
|
- (lambda (&rest args) ":foo:")))
|
|
|
+ (cl-letf (((symbol-function 'completing-read-multiple)
|
|
|
+ (lambda (&rest args) '("foo"))))
|
|
|
(let ((org-use-fast-tag-selection nil)
|
|
|
(org-loop-over-headlines-in-active-region t)
|
|
|
(org-tags-column 1))
|
|
@@ -7023,8 +7013,8 @@ Paragraph<point>"
|
|
|
(should
|
|
|
(equal "* H1\nContents\n* H2 :foo:"
|
|
|
(org-test-with-temp-text "* H1\nContents\n* H2"
|
|
|
- (cl-letf (((symbol-function 'completing-read)
|
|
|
- (lambda (&rest args) ":foo:")))
|
|
|
+ (cl-letf (((symbol-function 'completing-read-multiple)
|
|
|
+ (lambda (&rest args) '("foo"))))
|
|
|
(let ((org-use-fast-tag-selection nil)
|
|
|
(org-loop-over-headlines-in-active-region nil)
|
|
|
(org-tags-column 1))
|
|
@@ -7043,8 +7033,8 @@ Paragraph<point>"
|
|
|
(should
|
|
|
(equal ":foo:"
|
|
|
(org-test-with-temp-text "* <point>"
|
|
|
- (cl-letf (((symbol-function 'completing-read)
|
|
|
- (lambda (&rest args) ":foo:")))
|
|
|
+ (cl-letf (((symbol-function 'completing-read-multiple)
|
|
|
+ (lambda (&rest args) '("foo"))))
|
|
|
(let ((org-use-fast-tag-selection nil)
|
|
|
(org-tags-column 1))
|
|
|
(org-set-tags-command)))
|
|
@@ -7053,8 +7043,8 @@ Paragraph<point>"
|
|
|
(should
|
|
|
(equal "* H1 :foo:"
|
|
|
(org-test-with-temp-text "* H1"
|
|
|
- (cl-letf (((symbol-function 'completing-read)
|
|
|
- (lambda (&rest args) ":foo:")))
|
|
|
+ (cl-letf (((symbol-function 'completing-read-multiple)
|
|
|
+ (lambda (&rest args) '("foo"))))
|
|
|
(let ((org-use-fast-tag-selection nil)
|
|
|
(org-tags-column 1))
|
|
|
(org-set-tags-command)))
|
|
@@ -7063,8 +7053,8 @@ Paragraph<point>"
|
|
|
(should
|
|
|
(equal "* H1 :foo:"
|
|
|
(org-test-with-temp-text "*<point>* H1"
|
|
|
- (cl-letf (((symbol-function 'completing-read)
|
|
|
- (lambda (&rest args) ":foo:")))
|
|
|
+ (cl-letf (((symbol-function 'completing-read-multiple)
|
|
|
+ (lambda (&rest args) '("foo"))))
|
|
|
(let ((org-use-fast-tag-selection nil)
|
|
|
(org-tags-column 1))
|
|
|
(org-set-tags-command)))
|
|
@@ -7073,8 +7063,8 @@ Paragraph<point>"
|
|
|
(should
|
|
|
(equal " b :foo:"
|
|
|
(org-test-with-temp-text "* a<point> b"
|
|
|
- (cl-letf (((symbol-function 'completing-read)
|
|
|
- (lambda (&rest args) ":foo:")))
|
|
|
+ (cl-letf (((symbol-function 'completing-read-multiple)
|
|
|
+ (lambda (&rest args) '("foo"))))
|
|
|
(let ((org-use-fast-tag-selection nil)
|
|
|
(org-tags-column 1))
|
|
|
(org-set-tags-command)))
|
|
@@ -7083,9 +7073,9 @@ Paragraph<point>"
|
|
|
(should
|
|
|
(equal "b :foo:"
|
|
|
(org-test-with-temp-text "* a :foo:\n** <point>b :foo:"
|
|
|
- (cl-letf (((symbol-function 'completing-read)
|
|
|
+ (cl-letf (((symbol-function 'completing-read-multiple)
|
|
|
(lambda (prompt coll &optional pred req initial &rest args)
|
|
|
- initial)))
|
|
|
+ (list initial))))
|
|
|
(let ((org-use-fast-tag-selection nil)
|
|
|
(org-tags-column 1))
|
|
|
(org-set-tags-command)))
|