From fb291061c6c1ab6aff0e58e2be2f09ca84b7fd75 Mon Sep 17 00:00:00 2001 From: OZoneGuy Date: Sun, 7 Jan 2024 18:11:49 -0500 Subject: [PATCH] refact: using pcase instead of if --- org-ql-search.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org-ql-search.el b/org-ql-search.el index e4b8bd67..f65ff3a8 100644 --- a/org-ql-search.el +++ b/org-ql-search.el @@ -322,9 +322,9 @@ this (must be a single line in the Org buffer): (cons 'heading (lambda (element) (let ((normalized-heading (org-ql-search--link-heading-search-string (org-element-property :raw-value element)))) - (if not-links - normalized-heading - (org-ql-search--org-make-link-string normalized-heading (org-link-display-format normalized-heading)))))) + (pcase links + (t (org-ql-search--org-make-link-string normalized-heading (org-link-display-format normalized-heading))) + (nil normalized-heading))))) (cons 'priority (lambda (element) (--when-let (org-element-property :priority element) (char-to-string it))))