branch: externals/org
commit 818ea9b43f6ce1a12bc0852b97e1b8564c1e25b4
Author: Morgan Smith <[email protected]>
Commit: Ihor Radchenko <[email protected]>

    org-tags-completion-function: Return correct boundary
    
    * lisp/org.el (org-tags-completion-function): Previously a string was
    returned when the boundry should be a number.  Now it is a number.
    * testing/lisp/test-org.el (org-test-with-minibuffer-setup): Update
    comment as test now fails for a different reason.
    
    Reported-by: "martin" <[email protected]>
    Link: 
https://list.orgmode.org/caofdpfwvy6ouzrz3qkn7aqlyvpgs3exx6qa-ftgfj1c7oak...@mail.gmail.com/
---
 lisp/org.el              | 2 +-
 testing/lisp/test-org.el | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 707405ff29..0da0388980 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12277,7 +12277,7 @@ which see."
       (`lambda (assoc string org-last-tags-completion-table)) ;exact match?
       (`(boundaries . ,suffix)
        (let ((end (if (string-match "[-+:&,|]" suffix)
-                      (match-string 0 suffix)
+                      (match-beginning 0)
                     (length suffix))))
          `(boundaries ,(or begin 0) . ,end)))
       (`nil
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index eecaa140bb..c25ae52eeb 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -9977,7 +9977,8 @@ two
 
 (ert-deftest test-org/org-tags-completion-function ()
   "Test completion with `org-tags-completion-function'."
-  ;; (wrong-type-argument number-or-marker-p "-")
+  ;; Completes in unbalanced parenthesis.
+  ;; TIMESTAMP_IA="<2025- TAB adds a tag completion.
   :expected-result :failed
   ;; To aid in debbugging try the following:
   ;; (add-function :before (symbol-function 'kbd) #'message)

Reply via email to