emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aaron Madlon-Kay <aaron@madlon-kay.com>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <EC72E108-B2E7-47CC-BA30-18E8B3AAEE15@madlon-kay.com> (raw)
In-Reply-To: <CE38D26C-DCF2-44ED-B469-49584B9FB070@madlon-kay.com>

> 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	other threads:[~2023-12-12 12:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12 11:40 [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/)] Aaron Madlon-Kay
2023-12-12 12:01 ` Aaron Madlon-Kay [this message]
2023-12-12 12:29   ` Aaron Madlon-Kay
2023-12-12 12:55     ` Ihor Radchenko
     [not found]       ` <98E48EEB-5E10-42ED-91D4-9369B6B98B20@madlon-kay.com>
     [not found]         ` <87y1dz5wxm.fsf@localhost>
2023-12-12 14:36           ` Aaron Madlon-Kay
2023-12-12 15:18             ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=EC72E108-B2E7-47CC-BA30-18E8B3AAEE15@madlon-kay.com \
    --to=aaron@madlon-kay.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).