From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id MAddOW9SeGWzWAAAkFu2QA (envelope-from ) for ; Tue, 12 Dec 2023 13:30:40 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id UGCONG9SeGUB1wAA62LTzQ (envelope-from ) for ; Tue, 12 Dec 2023 13:30:39 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=madlon-kay.com header.s=google header.b="N1zhp/2d"; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1702384239; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=lrVJAdiC7nvw2iVT/11avFD/V/ScwSaegOHL3K+QMVw=; b=VWneEFzAtyxkA4A5599ML0VfK9hozZt1HifoaiwSQGksSYafpI04V4HDr8WGoAW7Z9DuS4 5YrYTDE3SEck+A0oqVbNT9xOjqWCBAc5XJNpjtpOIzXT0dAuEUmjdlRgfK18ddRIs0PqBl f8rYsXEZZXFTslUAsSUIb2dAoiFf9dciFAyYwlpBNWMeJ/HU5iAMt9DQPNFZ2hRclWGHtD FBDE+Sn0WorfSovMRxm5Cc6OOJjRZ2ZUiJfzoLUxZqzRPO5G1nj32pxbIrPKUVlS1Aotbo uhriFD7sU5ivGES9mRs1LRfM87uCZqsL3dsOJDBIsf/NffCynx/Q/Nnls3VNPg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1702384239; a=rsa-sha256; cv=none; b=owG1gKFqfKj0i9brImhMbOn/NSiyYwWWM0vR9MtztKVbk9/8b9k6ffGc0loWA74ZzkI9Sj zxmPYHuu/IP2xG0K7LQ077ekm2XLR/RWPbMmplC6p6ONswQLl5gh8vTdM6S1lIMiI30qgE mh7wXL9KNH+UlLlHqqcPKtnXCsF4MkPFpMSacHnGm+U0hfn18pKVDmfzQPOWXMemi2yObo MmdhI8jCLXKhK78Y8px7cQCiZ4aIKFQTcGZNwtxXs502xDAoYIq+skoY0GT6NEodL9WQaR 1phfzJomJ5Kqv5A+widJtxiNJh0x0YO3HvCylXRoQv8lYg2vEpwk/bAW+betVw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=madlon-kay.com header.s=google header.b="N1zhp/2d"; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EBB9916291 for ; Tue, 12 Dec 2023 13:30:38 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rD1tS-0006Gv-K7; Tue, 12 Dec 2023 07:29:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rD1tQ-0006GT-La for emacs-orgmode@gnu.org; Tue, 12 Dec 2023 07:29:44 -0500 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rD1tO-0005bG-UN for emacs-orgmode@gnu.org; Tue, 12 Dec 2023 07:29:44 -0500 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-5c1f8b0c149so2955756a12.3 for ; Tue, 12 Dec 2023 04:29:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=madlon-kay.com; s=google; t=1702384181; x=1702988981; darn=gnu.org; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=lrVJAdiC7nvw2iVT/11avFD/V/ScwSaegOHL3K+QMVw=; b=N1zhp/2d7w331u/SbqXbiLbuBuJje+yexFHGD45k7NZdQT6rHjCalgtMPdxLIfTl1G hWxGSgOhm2Pdsi6xoaYYbbSN5M3WSXP90zbfa0kD3k+wpKdToMho0YRrXT8btSa5L030 6aQxp/K7iH3d9bWD2sZQus3cQlcvo2WMkaQvU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702384181; x=1702988981; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lrVJAdiC7nvw2iVT/11avFD/V/ScwSaegOHL3K+QMVw=; b=bcNB5zNTBTVHpDR8RXvWr/xXxDcxPvDoMHObjnvNLRhZ0d/3tLCrqBFj22z+a30vyx FDL9xTBANkjKPmc1tGeYYug83qTKWVfbgCnvGM4C7lqsWrLX34LTh6p8+5cbGaZ81wz4 dxpV9qhs9EYGbqzwchU30bQhoV9P7R0oqmO/pJ7VjM9yAIHvUU7l7TTSwE+W0Wq0MbHV Z7IUCWJISGN+v6ZWgTwupoinaC960csWBVGGvwb8F27PHDTT15s6LpClUb/Q+zzF9B0x 3syk6ZM9ZrzWTdvUOvH5lblw+xegsYC8v3kni5iHvsQWdbN4ykZ54JZfhgUYrvSygBxt qB/Q== X-Gm-Message-State: AOJu0YwCTsOn5eHU5c9lfIZEFZEIOLKPg3rF0S/vQhJwr0ueSlr5Z1CR CwMvVvShiMZ/W6BYR4HFdDNYm7PINr8SjqdgWuQ= X-Google-Smtp-Source: AGHT+IH77aIExuhUwPCNPkfrAhoN0l3RtrZ9q1Xx+qOlP7i7iFeHhY5puHLdz3y4BEUCuWi1LmYA2A== X-Received: by 2002:a05:6a20:1006:b0:190:17a6:24af with SMTP id gs6-20020a056a20100600b0019017a624afmr3094606pzc.101.1702384181328; Tue, 12 Dec 2023 04:29:41 -0800 (PST) Received: from smtpclient.apple (p4139069-ipxg22701hodogaya.kanagawa.ocn.ne.jp. [153.129.207.69]) by smtp.gmail.com with ESMTPSA id p12-20020a17090a348c00b00286f2b39a95sm9735351pjb.31.2023.12.12.04.29.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Dec 2023 04:29:40 -0800 (PST) From: Aaron Madlon-Kay Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) 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:29:28 +0900 References: To: emacs-orgmode@gnu.org In-Reply-To: Message-Id: <9F699FA3-5FC1-4470-958C-05DD976B6096@madlon-kay.com> X-Mailer: Apple Mail (2.3774.300.61.1.2) Received-SPF: none client-ip=2607:f8b0:4864:20::534; envelope-from=aaron@madlon-kay.com; helo=mail-pg1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -1.61 X-Spam-Score: -1.61 X-Migadu-Queue-Id: EBB9916291 X-Migadu-Scanner: mx11.migadu.com X-TUID: 2qG4cgBqUsvZ > On Dec 12, 2023, at 21:01, Aaron Madlon-Kay = wrote: >=20 >> On Dec 12, 2023, at 20:40, Aaron Madlon-Kay = wrote: >>=20 >> Locally redefining as follows results in the expected behavior: >=20 > 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 =E2=80=A6). OK this was also wrong, because seq only matches a finite sequence. I = couldn=E2=80=99t find a way to match an arbitrary-length list with pcase, so here=E2=80=99s= my final attempt: (defun org-entities--user-safe-p (v) "Non-nil if V is a safe value for `org-entities-user'." (cond ((not v) t) ((listp v) (seq-every-p (lambda (e) (pcase e (`(,(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))) v)))) This seems to handle all cases correctly, but again of course I leave = the details to the devs (is seq-every-p allowed? is there actually a way to = do it with just pcase?). Thanks, Aaron=