emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] "Safe" local values for org-entities-user not recognized as su


From: Aaron Madlon-Kay
Subject: Re: [BUG] "Safe" local values for org-entities-user not recognized as such [9.6.11 (release_9.6.11 @ /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/org/)]
Date: Tue, 12 Dec 2023 21:01:21 +0900

> On Dec 12, 2023, at 20:40, Aaron Madlon-Kay <aaron@madlon-kay.com> wrote:
> 
> Locally redefining as follows results in the expected behavior:

The previous formulation was not very good. Actually it seems that the existing
function is correct except that the list case should be wrapped in (seq …).

(defun org-entities--user-safe-p (v)
  "Non-nil if V is a safe value for `org-entities-user'."
  (pcase v
    (`nil t)
    ((seq `(,(and (pred stringp)
                  (pred (string-match-p "\\`[a-zA-Z][a-zA-Z0-9]*\\'")))
        ,(pred stringp) ,(pred booleanp) ,(pred stringp)
        ,(pred stringp) ,(pred stringp) ,(pred stringp)))
     t)
    (_ nil)))

Regardless I leave the details to the developers.

-Aaron


reply via email to

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