Morgan Smith <[email protected]> writes: > @@ -12275,6 +12275,16 @@ org-tags-completion-function > (confirm (lambda (x) (stringp (car x)))) > (prefix "") > begin) > + ;; Abort if the string has unbalanced quotes > + (let ((quotes 0)) > + (mapc > + (lambda (char) > + (when (eq char ?\") > + (setq quotes (1+ quotes)))) > + string) > + (when (and (< 0 quotes) > + (not (eq (% quotes 2) 0))) > + (setq flag 'invalid)))
This does not look right. What is the reason behind the need to have a special case for unbalanced parenthesis? Which part of the completion function is failing and why? > (defun org-tags-completion-function (string _predicate &optional flag) > "Complete tag STRING. > + > +The format for tag string is described in the > +Info node `(org) Matching tags and properties'. > + > FLAG specifies the type of completion operation to perform. This > function is passed as a collection function to `completing-read', > which see." > + ;; FIXME: This function is used to complete a tag string which can > + ;; include properties but does not know anything about properties Right. We may need a separate function with more features to support matcher syntax. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
