From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70589: [PATCH] Refine the Custom type of generated '*-modes' options Date: Sat, 27 Apr 2024 17:47:45 +0200 Message-ID: References: <86h6foz91p.fsf@gnu.org> <867cgjxpd8.fsf@gnu.org> Reply-To: Eshel Yaron Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35146"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: eliz@gnu.org, monnier@iro.umontreal.ca To: 70589@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 27 17:49:06 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s0kIT-0008xk-Mv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Apr 2024 17:49:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s0kI8-0000iO-AK; Sat, 27 Apr 2024 11:48:44 -0400 Original-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 1s0kI7-0000i7-GS for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 11:48:43 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s0kI7-0003Do-7q for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 11:48:43 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s0kIQ-0005QW-1e for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 11:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Apr 2024 15:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70589 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: Eli Zaretskii , 70589@debbugs.gnu.org, Stefan Monnier Original-Received: via spool by 70589-submit@debbugs.gnu.org id=B70589.171423288920577 (code B ref 70589); Sat, 27 Apr 2024 15:49:02 +0000 Original-Received: (at 70589) by debbugs.gnu.org; 27 Apr 2024 15:48:09 +0000 Original-Received: from localhost ([127.0.0.1]:49543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0kHZ-0005Lm-14 for submit@debbugs.gnu.org; Sat, 27 Apr 2024 11:48:09 -0400 Original-Received: from mail.eshelyaron.com ([107.175.124.16]:59322 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0kHX-0005LV-6y; Sat, 27 Apr 2024 11:48:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1714232867; bh=qGc7s/ltqACOuqykga0Y/U68FNqgc8b9asdZQOl1xrU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=pAVmq1WlziAYGCm1tdP0AOs9HVCDrrsSw1+3NtVGNxd764GJgJwvFsGTfzB81//fU ZfTb/4h14uphOxbZeydB9oeUCLjmFLXIYEBD8MLYqM6vZgRzU+6A4c75Fyu1oZzHqQ kwFc/d1EKsa774Sy5XDCLzhYlBK2pDKCPtgbAB55KsjKvfQgskus/ucFWUdLmCpN66 4l8PAG40u9DF0yntTS2Z54s1ZfWzGsgU5GJuvajM6ATjdlHh8gdeQq4DCQ1cYocqPA fbLQyxhbkfzFOG1ojquKehxe/hSKaebB2yYJviFlBF8TJv7rQpUHx0lL44JLMDIWZl Z5H9XzpuoJ4rg== In-Reply-To: (Eshel Yaron via's message of "Sat, 27 Apr 2024 17:35:19 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284055 Archived-At: reopen 70589 quit Eshel Yaron writes: > Thanks, so I've now pushed it to master. I'm not closing the bug yet, > in favor of your additional suggestion below. Sorry, I mistakenly closed the bug nonetheless. Reopening. >> but really this is Lars's code, so you don't need me "on board", really. >> >> Also, while I'm here: I think part of the "problem" is in the semantics: >> anything after a t or nil is ignored, which is hard to explain via >> a "single small line" of text. > > Agreed. Although it's not such a big problem IMO, since the Customize > buffer also shows the docstring of the option, which explains the > semantics pretty clearly. > >> We could imagine extending the semantics so that you can use `((not a) >> . t)` instead, in which case this meaning of `t` can be shared with the >> "main one" (instead of having two `t` cases and two `nil` cases) in the >> sense that the syntax would be: >> >> PRED can be: >> t Always accept >> nil Always decline >> ((not . MODES) . PRED) Decline if in MODES, otherwise like PRED >> (MODE . PRED) Accept if in MODE, otherwise like PRED >> > > That sounds neat. > >> but then we couldn't use the `repeat` Custom type and instead we'd have >> to implement an ad-hoc type for it, I believe. > > I think that's right.