From aa2537d2ee7a28283a1e330f0a1430cac55ca02c Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Sat, 5 Feb 2022 23:26:41 +0300 Subject: [PATCH] feat: rx in query search --- org-journal-tags.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/org-journal-tags.el b/org-journal-tags.el index 5721e59..349ff7d 100644 --- a/org-journal-tags.el +++ b/org-journal-tags.el @@ -1378,7 +1378,9 @@ BODY is put in that lambda." ("q" "Quit" transient-quit-one)]) (define-derived-mode org-journal-tags-status-mode magit-section "Org Journal Tags" - "A major mode to display the org-journal-tags status buffer.") + "A major mode to display the org-journal-tags status buffer." + :group 'org-journal-tags + (setq-local buffer-read-only t)) (defun org-journal-tags--buffer-render-info () "Render the miscellaneous information for the status buffer." @@ -1832,7 +1834,12 @@ OBJ in an instance of that class." Used in the `org-journal-tags--transient-regex' class. PROMPT is a string to prompt with, INITIAL-INPUT is the default state of the minibuffer." - (read-from-minibuffer prompt initial-input)) + (let ((value (read-from-minibuffer prompt initial-input))) + (if (string-match-p (rx "(rx") value) + (condition-case err + (eval (car (read-from-string value))) + (error (format "Error: %s" (prin1-to-string err)))) + value))) (cl-defmethod transient-format-value ((obj org-journal-tags--transient-regex)) "Format value of `org-journal-tags--transient-regex'.