diff options
author | Kyle Meyer <kyle@kyleam.com> | 2020-09-28 00:05:44 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2020-09-28 00:05:44 -0400 |
commit | 16f505db221b7250dd2849b15ae10d59deac78ee (patch) | |
tree | 09d563f2d20a07b7fe1470ad955869a258d6c56e | |
parent | 4b6495c3ba33a83532bb7528c864d86e9489793d (diff) | |
parent | 6676a97d27d0b9ab90d842c90a119d00bff44ad6 (diff) | |
download | org-mode-16f505db221b7250dd2849b15ae10d59deac78ee.tar.gz |
Merge branch 'maint' into master
-rw-r--r-- | lisp/org.el | 6 | ||||
-rw-r--r-- | testing/lisp/test-org.el | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el index 3e0891a..26f3f4d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11703,7 +11703,7 @@ See also `org-scan-tags'." (cons match0 `(lambda (todo tags-list level) ,matcher))))) (defun org--tags-expand-group (group tag-groups expanded) - "Recursively Expand all tags in GROUP, according to TAG-GROUPS. + "Recursively expand all tags in GROUP, according to TAG-GROUPS. TAG-GROUPS is the list of groups used for expansion. EXPANDED is an accumulator used in recursive calls." (dolist (tag group) @@ -11751,7 +11751,9 @@ When DOWNCASED is non-nil, expand downcased TAGS." (if (not downcased) g (mapcar (lambda (s) (mapcar #'downcase s)) g))))) (cond - (single-as-list (org--tags-expand-group (list match) tag-groups nil)) + (single-as-list (org--tags-expand-group + (list (if downcased (downcase match) match)) + tag-groups nil)) (org-group-tags (let* ((case-fold-search t) (tag-syntax org-mode-syntax-table) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index 38bab1a..edd1efd 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -7106,7 +7106,14 @@ Paragraph<point>" (equal "{A+}" (org-test-with-temp-text "#+TAGS: [ A : B C ]" (org-mode-restart) - (let ((org-tag-alist-for-agenda nil)) (org-tags-expand "{A+}")))))) + (let ((org-tag-alist-for-agenda nil)) (org-tags-expand "{A+}"))))) + ;; Uppercase MATCH works with a non-nil DOWNCASED and SINGLE-AS-LIST. + (should + (equal (list "a" "b" "c") + (org-test-with-temp-text "#+TAGS: [ A : B C ]" + (org-mode-restart) + (let ((org-tag-alist-for-agenda nil)) + (sort (org-tags-expand "A" t t) #'string-lessp)))))) ;;; TODO keywords |