Fix commit a9880a
* org.el (org-toggle-tags-groups): Correctly highlight group tags. (org-tags-expand): Expand tags as words, with characters ?@ and ?_ being considered words constituents.
This commit is contained in:
parent
9ae225f48a
commit
dd3fbd246e
17
lisp/org.el
17
lisp/org.el
|
@ -4753,12 +4753,11 @@ Support for group tags is controlled by the option
|
||||||
`org-group-tags', which is non-nil by default."
|
`org-group-tags', which is non-nil by default."
|
||||||
(interactive)
|
(interactive)
|
||||||
(setq org-group-tags (not org-group-tags))
|
(setq org-group-tags (not org-group-tags))
|
||||||
(if (and (derived-mode-p 'org-agenda-mode)
|
(cond ((and (derived-mode-p 'org-agenda-mode)
|
||||||
org-group-tags)
|
org-group-tags)
|
||||||
(org-agenda-redo))
|
(org-agenda-redo))
|
||||||
(when (derived-mode-p 'org-mode)
|
((derived-mode-p 'org-mode)
|
||||||
(org-set-regexps-and-options-for-tags)
|
(let ((org-inhibit-startup t)) (org-mode))))
|
||||||
(org-set-regexps-and-options))
|
|
||||||
(message "Groups tags support has been turned %s"
|
(message "Groups tags support has been turned %s"
|
||||||
(if org-group-tags "on" "off")))
|
(if org-group-tags "on" "off")))
|
||||||
|
|
||||||
|
@ -14049,13 +14048,17 @@ the list of tags in this group.
|
||||||
When DOWNCASE is non-nil, expand downcased TAGS."
|
When DOWNCASE is non-nil, expand downcased TAGS."
|
||||||
(if org-group-tags
|
(if org-group-tags
|
||||||
(let* ((case-fold-search t)
|
(let* ((case-fold-search t)
|
||||||
|
(stable org-mode-syntax-table)
|
||||||
(tal (or org-tag-groups-alist-for-agenda
|
(tal (or org-tag-groups-alist-for-agenda
|
||||||
org-tag-groups-alist))
|
org-tag-groups-alist))
|
||||||
(tal (if downcased (mapcar (lambda(tg) (mapcar 'downcase tg)) tal) tal))
|
(tal (if downcased (mapcar (lambda(tg) (mapcar 'downcase tg)) tal) tal))
|
||||||
(tml (mapcar 'car tal))
|
(tml (mapcar 'car tal))
|
||||||
(rtnmatch match) rpl)
|
(rtnmatch match) rpl)
|
||||||
|
;; @ and _ are allowed as word-components in tags
|
||||||
|
(modify-syntax-entry ?@ "w" stable)
|
||||||
|
(modify-syntax-entry ?_ "w" stable)
|
||||||
(while (and tml (string-match
|
(while (and tml (string-match
|
||||||
(concat "\\(?1:[+-]?\\)\\(?2:" (regexp-opt tml) "\\)")
|
(concat "\\(?1:[+-]?\\)\\(?2:\\<" (regexp-opt tml) "\\>\\)")
|
||||||
rtnmatch))
|
rtnmatch))
|
||||||
(let* ((dir (match-string 1 rtnmatch))
|
(let* ((dir (match-string 1 rtnmatch))
|
||||||
(tag (match-string 2 rtnmatch))
|
(tag (match-string 2 rtnmatch))
|
||||||
|
|
Loading…
Reference in New Issue