branch: externals/org
commit 5ce6801d3fc127102f8a7a9b2c28e923211b3acb
Author: Slawomir Grochowski <[email protected]>
Commit: Slawomir Grochowski <[email protected]>
; org-colview: Use `rx' for checkbox count cookie match
* lisp/org-colview.el (org-columns--summary-checkbox-count): Use `rx'
for checkbox count cookie match.
No behavior change.
---
lisp/org-colview.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index a261290b7b6..a59d1d81c27 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -1656,7 +1656,10 @@ When FORMAT-STRING is non-nil, use it to format the
result."
"Summarize CHECK-BOXES with a check-box cookie."
(format "[%d/%d]"
(cl-count-if (lambda (b) (or (equal b "[X]")
- (string-match-p "\\[\\([1-9]\\)/\\1\\]"
b)))
+ (string-match-p
+ (rx "[" (group (any "1-9")) "/"
+ (backref 1) "]")
+ b)))
check-boxes)
(length check-boxes)))