[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re created using regexp-opt fails in an org agenda command

From: Samuel Wales
Subject: re created using regexp-opt fails in an org agenda command
Date: Sun, 12 Dec 2021 20:59:43 -0700

this bug is strange because it appears as if regexp-opt is broken, but
the only likely difference is an org upgrade via git clone.

in an org agenda command, the same set of org todo kw works if a
regexp was created using mapconcat, but not with regexp-opt.

i expected that regexp-opt with 'words is identical to the mapconcat
version in functionality in this context.


i am trying to upgrade to recent org 9.5 main.  [goal is to eventually
use bugfix branch with a couple of patches.]  [on main, however, i
intend to first try the batch agenda archive speedups.  current is org
9.4.6.  thank you very very much for those.]

i am running 25.1.1
i used git clone from savannah to get the org repo
i have not tried -Q yet as that woudl require a lot of setup
i compiled with make which defaulted to make oldorg

in my current versin of org, this bug does not exist, even though
regexp-opt should not have changed.


here is the org-agenda-custom-commands command.  i have provided some
raw strings produced by the commands.

this version errors with "and: Invalid regexp: "Unmatched ( or \\("".
toggling backtrace on does not produce a backtrace.

but if the regexp-opt is commented out and mapconcat is uncommented,
it does not produce an error and it works.

it also works with the string /produced by/ mapconcat.  but it still
fails with the string produced by regexp-opt.  i confirmed that the
string version of the regexp-opt works using re-search-forward, so idk
why it would not work from one version of org.

            ("ne" "clean up by expired CLOSED"
             tags (concat
                   ;; the + makes no difference seemingly
                   ;; "DONE"
                   ;; (alpha-org-todo-of--regexp :doneish)
                   ;; (apply #'append (mapcar #'alpha-org-todo-of '(:doneish)))
                   (regexp-opt '("DONEKA" "DONE" "MOSTKA" "MOST"
                   ;; (re-search-forward
;; this line works
                   ;; (mapconcat #'identity (apply #'append (mapcar
#'alpha-org-todo-of '(:doneish))) "\\|")
                   ;; this line works


The Kafka Pandemic

A blog about science, health, human rights, and misopathy:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]