GNU bug report logs - #70589
[PATCH] Refine the Custom type of generated '*-modes' options

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Eshel Yaron <me@HIDDEN>; Keywords: patch; Done: Eshel Yaron <me@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 30.1, send any further explanations to 70589 <at> debbugs.gnu.org and Eshel Yaron <me@HIDDEN> Request was from Eshel Yaron <me@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 28 Apr 2024 19:07:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 28 15:07:54 2024
Received: from localhost ([127.0.0.1]:52178 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s19sQ-00066q-JB
	for submit <at> debbugs.gnu.org; Sun, 28 Apr 2024 15:07:54 -0400
Received: from mail.eshelyaron.com ([107.175.124.16]:55400 helo=eshelyaron.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>)
 id 1s19sO-00066g-Op; Sun, 28 Apr 2024 15:07:53 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1714331252;
 bh=OurvjNHN5SQ3MbOnKZMGmOGU/+5atwXne4D2U0AANhc=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=AcqzFW2CSq3f8sJ3wiBwf4WtmbEOg574b2I+RFHBf4YZHBoglN//JcD9Y7AEqc6FE
 TFBays6MRNGkNR61jeXpCcFz6/jaYhmf0n+IhKp1axrRPo3NhXgQMXv5z22jLqOtlX
 UF4iRf1DuN6CNYQG/pYtmbRK5BXbT9X8rysGncSL1CHuVfWcCuQ6kQOM/8DBXwsvRf
 F5PnCBS0V8P384vXq1f71mExL+qodgZIEKhj2IfnHTngkCVOoxK4fL2G+Ri+KUewby
 V8FWz3ZcUnaJd9i6xCbZ9UVPXasAA7V0+3fM2LxjJNXsEVLGWlFL/BlHX+4aVYbS7J
 palTE5NufQR3Q==
From: Eshel Yaron <me@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated
 '*-modes' options
In-Reply-To: <jwvttjmldsq.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Sat, 27 Apr 2024 17:03:05 -0400")
References: <m11q6sihcw.fsf@HIDDEN> <86h6foz91p.fsf@HIDDEN>
 <867cgjxpd8.fsf@HIDDEN> <jwvsez6nayp.fsf-monnier+emacs@HIDDEN>
 <m1y18yom2w.fsf@HIDDEN> <m1h6fmoli6.fsf@HIDDEN>
 <jwvttjmldsq.fsf-monnier+emacs@HIDDEN>
Date: Sun, 28 Apr 2024 21:07:30 +0200
Message-ID: <m1mspdpaq5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 70589
Cc: Eli Zaretskii <eliz@HIDDEN>, 70589 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

close 70589 30.1
quit

Stefan Monnier <monnier@HIDDEN> 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.
>
> FWIW, I think we can close it: the bug was about improving the Custom
> type and that's done.

All right then, closing again :)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 27 Apr 2024 21:03:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 27 17:03:33 2024
Received: from localhost ([127.0.0.1]:49755 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0pCn-0000mJ-Az
	for submit <at> debbugs.gnu.org; Sat, 27 Apr 2024 17:03:33 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13550)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1s0pCm-0000m9-9f
 for 70589 <at> debbugs.gnu.org; Sat, 27 Apr 2024 17:03:32 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 50C5B80962;
 Sat, 27 Apr 2024 17:03:07 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1714251786;
 bh=awr2Y2ZHAp12CoZlCRKdGD9nivAPHK/AvaXR4P0vk2I=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=e63FwZg8KZMoqtKG5RUlFS6nyesL2mWCrqeyA3bgI6DAMGty22/or80yrT9kdF7Vp
 GfeiFG3qXdbvKxqj4MurOG83OjzmBesuSkLe9jbTGAt4+rR+heY5jSpHcjXJ8KnHDE
 ff23jWv4tkCvYS6Wm1q6rf/C7yLMR/t7fMIJGrhilhTLxANLFL6y0dipYo0nK9rLni
 5O7kfKWakcSl3Vzj2LUizHFVQ5rSWS4UQDshdZ6SzX2NQDzanCLHGTWkdWCrMWD7H1
 xTHI1K18uDx1Z3kcn+CXmW48b2uIK3W+kQVmWJI4rLaHZPXqIJLHRO36JNd3mQc9Eo
 AsFhnYJI0FjlA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 798A58001C;
 Sat, 27 Apr 2024 17:03:06 -0400 (EDT)
Received: from pastel (unknown [45.72.201.215])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4F6B81201FC;
 Sat, 27 Apr 2024 17:03:06 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eshel Yaron <me@HIDDEN>
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated
 '*-modes' options
In-Reply-To: <m1h6fmoli6.fsf@HIDDEN> (Eshel Yaron's message of "Sat, 27
 Apr 2024 17:47:45 +0200")
Message-ID: <jwvttjmldsq.fsf-monnier+emacs@HIDDEN>
References: <m11q6sihcw.fsf@HIDDEN> <86h6foz91p.fsf@HIDDEN>
 <867cgjxpd8.fsf@HIDDEN> <jwvsez6nayp.fsf-monnier+emacs@HIDDEN>
 <m1y18yom2w.fsf@HIDDEN> <m1h6fmoli6.fsf@HIDDEN>
Date: Sat, 27 Apr 2024 17:03:05 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.053 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70589
Cc: Eli Zaretskii <eliz@HIDDEN>, 70589 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> 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.

FWIW, I think we can close it: the bug was about improving the Custom
type and that's done.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.
bug No longer marked as fixed in versions 30.1 and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 27 Apr 2024 15:48:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 27 11:48:09 2024
Received: from localhost ([127.0.0.1]:49543 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0kHZ-0005Lm-14
	for submit <at> debbugs.gnu.org; Sat, 27 Apr 2024 11:48:09 -0400
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 <me@HIDDEN>)
 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==
From: Eshel Yaron <me@HIDDEN>
To: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated
 '*-modes' options
In-Reply-To: <m1y18yom2w.fsf@HIDDEN> (Eshel Yaron via's message of
 "Sat, 27 Apr 2024 17:35:19 +0200")
References: <m11q6sihcw.fsf@HIDDEN> <86h6foz91p.fsf@HIDDEN>
 <867cgjxpd8.fsf@HIDDEN> <jwvsez6nayp.fsf-monnier+emacs@HIDDEN>
 <m1y18yom2w.fsf@HIDDEN>
Date: Sat, 27 Apr 2024 17:47:45 +0200
Message-ID: <m1h6fmoli6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 70589
Cc: Eli Zaretskii <eliz@HIDDEN>, 70589 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Apr 2024 15:48:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 27 11:48:19 2024
Received: from localhost ([127.0.0.1]:49548 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0kHi-0005Mv-PB
	for submit <at> debbugs.gnu.org; Sat, 27 Apr 2024 11:48:19 -0400
Received: from lists.gnu.org ([2001:470:142::17]:41764)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1s0kHh-0005MF-EA
 for submit <at> debbugs.gnu.org; Sat, 27 Apr 2024 11:48:17 -0400
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 <me@HIDDEN>) id 1s0kHH-0008RM-5q
 for bug-gnu-emacs@HIDDEN; Sat, 27 Apr 2024 11:47:52 -0400
Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <me@HIDDEN>)
 id 1s0kHF-00035x-Nm; Sat, 27 Apr 2024 11:47:50 -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==
From: Eshel Yaron <me@HIDDEN>
To: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated
 '*-modes' options
In-Reply-To: <m1y18yom2w.fsf@HIDDEN> (Eshel Yaron via's message of
 "Sat, 27 Apr 2024 17:35:19 +0200")
References: <m11q6sihcw.fsf@HIDDEN> <86h6foz91p.fsf@HIDDEN>
 <867cgjxpd8.fsf@HIDDEN> <jwvsez6nayp.fsf-monnier+emacs@HIDDEN>
 <m1y18yom2w.fsf@HIDDEN>
Date: Sat, 27 Apr 2024 17:47:45 +0200
Message-ID: <m1h6fmoli6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@HIDDEN;
 helo=eshelyaron.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, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
Cc: Eli Zaretskii <eliz@HIDDEN>, 70589 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.
bug marked as fixed in version 30.1, send any further explanations to 70589 <at> debbugs.gnu.org and Eshel Yaron <me@HIDDEN> Request was from Eshel Yaron <me@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 27 Apr 2024 15:35:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 27 11:35:44 2024
Received: from localhost ([127.0.0.1]:49518 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0k5X-0002S6-K1
	for submit <at> debbugs.gnu.org; Sat, 27 Apr 2024 11:35:43 -0400
Received: from mail.eshelyaron.com ([107.175.124.16]:35590 helo=eshelyaron.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>)
 id 1s0k5V-0002Rx-I4; Sat, 27 Apr 2024 11:35:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1714232122;
 bh=0dPhN4493c2KDAJt9FcyNagMHNRLeafGo37PAVq+ZmY=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=YXDn/dcRJJz/ZQZ0u4wsBPdkMA/zk4pxRQtibJewNX3oGDrFVQOILxgJfDw8sL3gw
 PNlTA3xIbiGrl8VDqiPkUz6+hvuxbHfyU9IyPTbYU7wsNKi78zNGpOnyIdU2PI40Vp
 0wKefZvKyiKfk/UjFR2j/yCkQ+15BOoVhkpYNe5F55xf/ewIBzbcvjPQWt/VctCVsp
 jAaqOs6PMzK4MD9WjFHFfhC6oDvWkVRSHrjlEA3GpY2c/jY6NU7eCk4U39Eduaq2k4
 sXXFtwCqhnylvkjxMQ9930QupTkSHx374NXRowV0S8Cqn/00BvNSHc4Ccx2F816AyX
 2cJ91m+JZjZew==
From: Eshel Yaron <me@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated
 '*-modes' options
In-Reply-To: <jwvsez6nayp.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Sat, 27 Apr 2024 10:33:04 -0400")
References: <m11q6sihcw.fsf@HIDDEN> <86h6foz91p.fsf@HIDDEN>
 <867cgjxpd8.fsf@HIDDEN> <jwvsez6nayp.fsf-monnier+emacs@HIDDEN>
Date: Sat, 27 Apr 2024 17:35:19 +0200
Message-ID: <m1y18yom2w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 70589
Cc: Eli Zaretskii <eliz@HIDDEN>, 70589 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

close 70589 30.1
quit

Stefan Monnier <monnier@HIDDEN> writes:

>>> > This makes it easier for users to customize generated '*-modes' optio=
ns,
>>> > such as 'global-completion-preview-modes', via the Custom interface.
>>>
>>> This kind of discussion is not useful with Stefan (CC'ed) on board.
>>                                         ^^^^
>> Oops, I meant "without", of course.  Sorry.
>
> =F0=9F=99=82
>
> FWIW, the latest patch looks fine to me,

Thanks, so I've now pushed it to master.  I'm not closing the bug yet,
in favor of your additional suggestion below.

> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 27 Apr 2024 14:33:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 27 10:33:35 2024
Received: from localhost ([127.0.0.1]:49480 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0j7O-0001Wu-PF
	for submit <at> debbugs.gnu.org; Sat, 27 Apr 2024 10:33:35 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:56475)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1s0j7M-0001Wo-Gq
 for 70589 <at> debbugs.gnu.org; Sat, 27 Apr 2024 10:33:32 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 55C4480A68;
 Sat, 27 Apr 2024 10:33:07 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1714228385;
 bh=hqTTAEoJp7+7pdyo8NprCmro/fMdCJR0bTub41hd7l0=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=mdU5ekbDo3ktoq/B2kkuUTBkPgZgBouqItVdtWjaZGO+6CiUzsrt/XFMQ4Z5IU3la
 t2cTIEFHUjs5imTFK+unfEXwoG8nY+oYqz/7/zpnWcE/5AyQaSWGMvO3hDkdbnP9a+
 4iPKEOzBHnxANteWCKZcl6QQSivjf/Z3uSSt7mGyA4z3xKTun8wqplRJOT5vFN4djw
 +nrWEsdpftx/M8Lx3v7TCnik0nbM7H9MvdBXUCdekpFwLCkcNwmzxk8rj+4eeSWw+C
 ywsjW1HRKUHyDxu77hqn8iinjL7D5/nTkh17KxvKyAutPmvS8hTWlSsTrdC2b4he9s
 PZHoGgQ8WcqKw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E84D280348;
 Sat, 27 Apr 2024 10:33:05 -0400 (EDT)
Received: from pastel (unknown [45.72.201.215])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BB6211201A9;
 Sat, 27 Apr 2024 10:33:05 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated
 '*-modes' options
In-Reply-To: <867cgjxpd8.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 27 Apr
 2024 09:59:31 +0300")
Message-ID: <jwvsez6nayp.fsf-monnier+emacs@HIDDEN>
References: <m11q6sihcw.fsf@HIDDEN> <86h6foz91p.fsf@HIDDEN>
 <867cgjxpd8.fsf@HIDDEN>
Date: Sat, 27 Apr 2024 10:33:04 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.055 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70589
Cc: 70589 <at> debbugs.gnu.org, me@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> > This makes it easier for users to customize generated '*-modes' option=
s,
>> > such as 'global-completion-preview-modes', via the Custom interface.
>>=20
>> This kind of discussion is not useful with Stefan (CC'ed) on board.
>                                         ^^^^
> Oops, I meant "without", of course.  Sorry.

=F0=9F=99=82

FWIW, the latest patch looks fine to me, 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.

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

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.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 27 Apr 2024 07:00:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 27 03:00:05 2024
Received: from localhost ([127.0.0.1]:38798 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0c2U-0007R1-Lv
	for submit <at> debbugs.gnu.org; Sat, 27 Apr 2024 03:00:04 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:45772)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s0c2Q-0007PD-62
 for 70589 <at> debbugs.gnu.org; Sat, 27 Apr 2024 03:00:00 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s0c21-0007Yi-QR; Sat, 27 Apr 2024 02:59:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=8y6rFI59EMv01zYZ/jjCGcGD+0u9TzrlKQTcYAG2kWg=; b=YoCl8i7ej5O+
 5Ms/jYFJYJut0VJqsfiJS7Qok6CWUTo7wGsZBOegHUFz5eE1KwchGlXjLFY9KLRLX7VCwyGo3odJ3
 bldghROK1WuVKEX3EgUAdbbb+sFXEsaXukxsetdoZaE8deDTjx4jLlqTI6rh90AcV9QnpLMGgOjA4
 468zOAxgInjGv+6Fy5qZTdhGiN09IV1XwRPCDym1CzSUtSj/mtHDTI8PoZzywnce9u4rn5C2Jm78y
 qNNwDOpxsLUSFLgDyjONdsft/gnaGPaPtM2a68gbUxKUNelT+9SHdcIuZ94pRhz5GwWWVk7Cy5DWN
 syK+d7DVQVHOnsVep0yaGA==;
Date: Sat, 27 Apr 2024 09:59:31 +0300
Message-Id: <867cgjxpd8.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: monnier@HIDDEN
In-Reply-To: <86h6foz91p.fsf@HIDDEN> (message from Eli Zaretskii on Fri, 26
 Apr 2024 13:56:50 +0300)
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated '*-modes'
 options
References: <m11q6sihcw.fsf@HIDDEN> <86h6foz91p.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70589
Cc: 70589 <at> debbugs.gnu.org, me@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 70589 <at> debbugs.gnu.org
> Date: Fri, 26 Apr 2024 13:56:50 +0300
> From: Eli Zaretskii <eliz@HIDDEN>
> 
> > Date: Fri, 26 Apr 2024 11:49:19 +0200
> > From:  Eshel Yaron via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> > 
> > This makes it easier for users to customize generated '*-modes' options,
> > such as 'global-completion-preview-modes', via the Custom interface.
> 
> This kind of discussion is not useful with Stefan (CC'ed) on board.
                                        ^^^^
Oops, I meant "without", of course.  Sorry.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 26 Apr 2024 18:30:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 26 14:30:09 2024
Received: from localhost ([127.0.0.1]:38421 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0QKl-0003lC-HI
	for submit <at> debbugs.gnu.org; Fri, 26 Apr 2024 14:30:09 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:38242)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s0QKi-0003jS-V5
 for 70589 <at> debbugs.gnu.org; Fri, 26 Apr 2024 14:30:05 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s0QKL-0002Fm-2u; Fri, 26 Apr 2024 14:29:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=pKLa3IB5rBvTYEBADvnk0Cp7pQ6vyX83LyBuLiQwFRI=; b=XWSzSuFE1hrU
 2u9RqeH2lecKh2+e3OeMTOTcpZUPEn/VmaBGBIFeA/U2H303RijoGQrLYeoc7dmbkPI+XrYdUUd7J
 iObElvhgHLLUTE8BleDQo0p1nGingmjQgwPL9YGc7MAYX0bmazX44xrqow3zfW3GSRfRdPmF4zKsr
 5SJEOKliVMijW4tjn8EJ4ZUISwsytS625SgCq6oLOFmJlz5Nxs29WCIbZqxUVnIZ18rna9e6l0wqx
 SJn4Z1JjGPAViO3sVWmd26vhqCPtT5FqhGfDkFaHdjzjXNBNNXP2v4iFoBbYqQ4nzxOTnEGQZtaDO
 5Lm5fBFZh+0KXuF541S5KA==;
Date: Fri, 26 Apr 2024 21:29:39 +0300
Message-Id: <86mspgx9ik.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Eshel Yaron <me@HIDDEN>
In-Reply-To: <m1sez8t3eu.fsf@HIDDEN> (message from Eshel Yaron on Fri, 
 26 Apr 2024 19:55:05 +0200)
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated
 '*-modes' options
References: <m11q6sihcw.fsf@HIDDEN> <86frv8z8zc.fsf@HIDDEN>
 <m1mspggyvy.fsf@HIDDEN> <865xw4z7bn.fsf@HIDDEN>
 <m134r8gvlh.fsf@HIDDEN> <86zftgxj75.fsf@HIDDEN>
 <m17cgkulpv.fsf@HIDDEN> <86r0esxcy3.fsf@HIDDEN>
 <m1sez8t3eu.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70589
Cc: 70589 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Eshel Yaron <me@HIDDEN>
> Cc: 70589 <at> debbugs.gnu.org,  monnier@HIDDEN
> Date: Fri, 26 Apr 2024 19:55:05 +0200
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> >> > Thanks, but I find the likes of "By default, enable" not clear enough.
> >> > Would it be accurate to say this instead:
> >> >
> >> >                         (const :tag "Enable in any other mode" t)
> >> >                         (const :tag "Don't enable in the other modes" nil)
> >>
> >> That could also work, but I think this wording is a bit confusing when
> >> entering the first list element (so there are no "other mode/s" yet).
> >> If you think it's nevertheless preferable, I don't object.
> >
> > Feel free to suggest a better wording, that caters also to that
> > special situation.
> 
> Hmm, how about "Enable in all (other) modes" and "Don't enable in any
> (other) mode"?

Fine with me, thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 26 Apr 2024 17:55:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 26 13:55:39 2024
Received: from localhost ([127.0.0.1]:38397 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0PnM-0005by-O9
	for submit <at> debbugs.gnu.org; Fri, 26 Apr 2024 13:55:38 -0400
Received: from mail.eshelyaron.com ([107.175.124.16]:56050 helo=eshelyaron.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1s0PnD-0005Zo-8r
 for 70589 <at> debbugs.gnu.org; Fri, 26 Apr 2024 13:55:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1714154108;
 bh=s/KOpzWG5i1lbh0D8Qz80LIzrgqVjS7UApNjozKIMyk=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=Dc7ka6JYoQC1CVjzIayqFHYY0aMcATjVERkhnIuAsFo44kBgtiiNhZBGagJtSzubi
 HC3qhnjtkmAYic3ruMk9ddsiK/TxOOhouATB0i54svCraZz3k0yyMeAiZ08YKvuh2E
 9XD8tbUk2J/ixkmAI0GJ+8OTaZMk5i7Khm474LPBDedxzzuN5dJfl/3Fes3w/te6PE
 4GG3YLy5zTsRrjlLksY+6AbDZvAlEgDvvzaPD7OIwXTKyTEhcGJVhReTy/rqTzt14t
 KdWkXXUiC+JTZSQg7bpUF4s6X00mmB1VDD2gRb7hhRzLyPYI6pcCA/BkAQRhUOKKca
 C4RyliwkBlsQg==
From: Eshel Yaron <me@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated
 '*-modes' options
In-Reply-To: <86r0esxcy3.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 26 Apr
 2024 20:15:32 +0300")
References: <m11q6sihcw.fsf@HIDDEN> <86frv8z8zc.fsf@HIDDEN>
 <m1mspggyvy.fsf@HIDDEN> <865xw4z7bn.fsf@HIDDEN>
 <m134r8gvlh.fsf@HIDDEN> <86zftgxj75.fsf@HIDDEN>
 <m17cgkulpv.fsf@HIDDEN> <86r0esxcy3.fsf@HIDDEN>
X-Hashcash: 1:20:240426:70589 <at> debbugs.gnu.org::tcKd6Vxq7+mpSANy:0kLQ
X-Hashcash: 1:20:240426:eliz@HIDDEN::yCvefMrct/F9iFHs:5tok
X-Hashcash: 1:20:240426:monnier@HIDDEN::Wfa2x3lYVzd6lMso:1MVL
Date: Fri, 26 Apr 2024 19:55:05 +0200
Message-ID: <m1sez8t3eu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 70589
Cc: 70589 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> > Thanks, but I find the likes of "By default, enable" not clear enough.
>> > Would it be accurate to say this instead:
>> >
>> >                         (const :tag "Enable in any other mode" t)
>> >                         (const :tag "Don't enable in the other modes" nil)
>>
>> That could also work, but I think this wording is a bit confusing when
>> entering the first list element (so there are no "other mode/s" yet).
>> If you think it's nevertheless preferable, I don't object.
>
> Feel free to suggest a better wording, that caters also to that
> special situation.

Hmm, how about "Enable in all (other) modes" and "Don't enable in any
(other) mode"?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 26 Apr 2024 17:16:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 26 13:16:07 2024
Received: from localhost ([127.0.0.1]:38380 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0PB5-0006Tl-Pp
	for submit <at> debbugs.gnu.org; Fri, 26 Apr 2024 13:16:07 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48776)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s0PB1-0006Rv-9e
 for 70589 <at> debbugs.gnu.org; Fri, 26 Apr 2024 13:16:01 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s0PAc-0001kn-KF; Fri, 26 Apr 2024 13:15:34 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=BIJ5Bv0r5ZEvb68MM/S7FwNhKPzwyXG1d9h+KV6MBPI=; b=pjcdqwxTDkRn
 mTjMqIawg8Xx+NkXzPleUGJzbZI/G39Q+H1UPFrX3UlKYpBZZwUvNZvahbnbmqagBKgfup6jfGgr2
 Fnkio175S6q2KjeAxk9jvcGak83EKCSmRZVk1SoFnwGn71xM6eKLoySKnG8tRaWvVOBWx9DR63bkj
 W+5cKeTw2ynNoXw4WnBfAIns2EmWx6LNnahqykfbkkaYwf2CFYJ9I6hmoiNEAAIF5WCJQkQePeVfN
 FXs9a9Bi5udjQ2wLT+e/bhkv25/f5h1TNrnhDM4kRyZmXYMPYWuCd4Opdv22bjlTHIYkP+9evDr2M
 vk+RUTH0TuhRRW1CbxW7rw==;
Date: Fri, 26 Apr 2024 20:15:32 +0300
Message-Id: <86r0esxcy3.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Eshel Yaron <me@HIDDEN>
In-Reply-To: <m17cgkulpv.fsf@HIDDEN> (message from Eshel Yaron on Fri, 
 26 Apr 2024 18:34:20 +0200)
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated
 '*-modes' options
References: <m11q6sihcw.fsf@HIDDEN> <86frv8z8zc.fsf@HIDDEN>
 <m1mspggyvy.fsf@HIDDEN> <865xw4z7bn.fsf@HIDDEN>
 <m134r8gvlh.fsf@HIDDEN> <86zftgxj75.fsf@HIDDEN>
 <m17cgkulpv.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70589
Cc: 70589 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Eshel Yaron <me@HIDDEN>
> Cc: 70589 <at> debbugs.gnu.org,  monnier@HIDDEN
> Date: Fri, 26 Apr 2024 18:34:20 +0200
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> >> From: Eshel Yaron <me@HIDDEN>
> >> Cc: 70589 <at> debbugs.gnu.org,  monnier@HIDDEN
> >> Date: Fri, 26 Apr 2024 14:24:42 +0200
> >>
> >> >> These are slightly different: a value of t ("Enable in all major modes")
> >> >> says to enable everywhere, while a t inside a list ("All major modes")
> >> >> says to enable in modes that were not mentioned earlier in the list (so
> >> >> putting t in the end of the list means "otherwise, enable").  Similarly
> >> >> for the "none" alternatives: a value of nil ("Don't enable...") means we
> >> >> never enable the minor mode, while the effect of a nil inside the list
> >> >> is relative to the previous elements, and means "otherwise, don't".
> >> >> Does that make sense?
> >> >
> >> > It might make sense, if we change the labels to say what you tell
> >> > above.
> >> >
> >> > Thanks.
> >>
> >> OK, here's an updated patch with revised labels:
> >
> > Thanks, but I find the likes of "By default, enable" not clear enough.
> > Would it be accurate to say this instead:
> >
> >                         (const :tag "Enable in any other mode" t)
> >                         (const :tag "Don't enable in the other modes" nil)
> 
> That could also work, but I think this wording is a bit confusing when
> entering the first list element (so there are no "other mode/s" yet).
> If you think it's nevertheless preferable, I don't object.

Feel free to suggest a better wording, that caters also to that
special situation.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 26 Apr 2024 16:34:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 26 12:34:57 2024
Received: from localhost ([127.0.0.1]:38322 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0OXI-0004OL-AB
	for submit <at> debbugs.gnu.org; Fri, 26 Apr 2024 12:34:57 -0400
Received: from mail.eshelyaron.com ([107.175.124.16]:38740 helo=eshelyaron.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1s0OX3-0004Lj-HK
 for 70589 <at> debbugs.gnu.org; Fri, 26 Apr 2024 12:34:43 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1714149262;
 bh=P98xwUHx5r+FKGlOLU4gy87N/fjX3/F8/J9RNQYmEK4=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=B+fB3I2qnJ2zkDMa04ilWJVqhuN+b0HO/mwM9AmkGXKi3/Hb4WsV0pGXg/XT9JNLn
 SJbqk0Rh8zfWPqjvr/SzY8UPtcpl8tCcxyMPi6ENTpdzZ0O+z/jbIywulb9frw9wL5
 hz7S6aZvxHQr7213qb+/KQCgwNdWRLspHBvm0IxEhceKYyi6yrr4VrQlP89ao7Muqt
 gtfvoIQ6xTWbsdSF7LUlbYVgRLxWe4JWg3Qqm3wK264IzGBp3oK4lFsho0AtxBJQJl
 wkGXwcLTsI5vBm+1IRx+lm3RXDzPbpGXsrVALxbixXiXOpt4D/Tl3qEhl17bYccxDt
 O3g3W9X8er6QQ==
From: Eshel Yaron <me@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated
 '*-modes' options
In-Reply-To: <86zftgxj75.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 26 Apr
 2024 18:00:30 +0300")
References: <m11q6sihcw.fsf@HIDDEN> <86frv8z8zc.fsf@HIDDEN>
 <m1mspggyvy.fsf@HIDDEN> <865xw4z7bn.fsf@HIDDEN>
 <m134r8gvlh.fsf@HIDDEN> <86zftgxj75.fsf@HIDDEN>
Date: Fri, 26 Apr 2024 18:34:20 +0200
Message-ID: <m17cgkulpv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 70589
Cc: 70589 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Eshel Yaron <me@HIDDEN>
>> Cc: 70589 <at> debbugs.gnu.org,  monnier@HIDDEN
>> Date: Fri, 26 Apr 2024 14:24:42 +0200
>>
>> >> These are slightly different: a value of t ("Enable in all major modes")
>> >> says to enable everywhere, while a t inside a list ("All major modes")
>> >> says to enable in modes that were not mentioned earlier in the list (so
>> >> putting t in the end of the list means "otherwise, enable").  Similarly
>> >> for the "none" alternatives: a value of nil ("Don't enable...") means we
>> >> never enable the minor mode, while the effect of a nil inside the list
>> >> is relative to the previous elements, and means "otherwise, don't".
>> >> Does that make sense?
>> >
>> > It might make sense, if we change the labels to say what you tell
>> > above.
>> >
>> > Thanks.
>>
>> OK, here's an updated patch with revised labels:
>
> Thanks, but I find the likes of "By default, enable" not clear enough.
> Would it be accurate to say this instead:
>
>                         (const :tag "Enable in any other mode" t)
>                         (const :tag "Don't enable in the other modes" nil)

That could also work, but I think this wording is a bit confusing when
entering the first list element (so there are no "other mode/s" yet).
If you think it's nevertheless preferable, I don't object.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 26 Apr 2024 15:01:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 26 11:01:45 2024
Received: from localhost ([127.0.0.1]:38206 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0N54-00044W-2U
	for submit <at> debbugs.gnu.org; Fri, 26 Apr 2024 11:01:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48184)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s0N4z-00042U-Ct
 for 70589 <at> debbugs.gnu.org; Fri, 26 Apr 2024 11:01:39 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s0N4b-0003AP-Jr; Fri, 26 Apr 2024 11:01:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=/LgGwM/PYhBBxvyIgX/JuyJ28MveVATp9440mw2ZZjk=; b=PsZ4w0fJY2FZ
 WmUl9fxMm4bfvaXYtyCXlq+Q5vjX5MD6Ljq26UVMUR5cmLQ4vFUfAumYOxu33UX9L0t5N/lWDDgN+
 /FPZ6VpybNSenpPnDanMngAC9pXmaAYqXBugXpjUO+ZY3xObYvInL6Y9bXXoN8tSvb0hhiRsrIOTf
 TdxQig9BAQU8Gbno4EMOBzj2IbeJeUA1UNmENt0ZyTlWO5AW/NbZflWcErMfUBhdNDOcmIhWdBXlS
 GFfnK65GTl0z1iy+IY8cU4UHjHvDGePaVfxE2PGI6AINGCSqnMQJTKlWNkuL9sdJ6147Ye1nTXp4U
 7VPI1CPBpC8WhXYMy/jEhw==;
Date: Fri, 26 Apr 2024 18:00:30 +0300
Message-Id: <86zftgxj75.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Eshel Yaron <me@HIDDEN>
In-Reply-To: <m134r8gvlh.fsf@HIDDEN> (message from Eshel Yaron on Fri, 
 26 Apr 2024 14:24:42 +0200)
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated
 '*-modes' options
References: <m11q6sihcw.fsf@HIDDEN> <86frv8z8zc.fsf@HIDDEN>
 <m1mspggyvy.fsf@HIDDEN> <865xw4z7bn.fsf@HIDDEN>
 <m134r8gvlh.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70589
Cc: 70589 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Eshel Yaron <me@HIDDEN>
> Cc: 70589 <at> debbugs.gnu.org,  monnier@HIDDEN
> Date: Fri, 26 Apr 2024 14:24:42 +0200
> 
> >> These are slightly different: a value of t ("Enable in all major modes")
> >> says to enable everywhere, while a t inside a list ("All major modes")
> >> says to enable in modes that were not mentioned earlier in the list (so
> >> putting t in the end of the list means "otherwise, enable").  Similarly
> >> for the "none" alternatives: a value of nil ("Don't enable...") means we
> >> never enable the minor mode, while the effect of a nil inside the list
> >> is relative to the previous elements, and means "otherwise, don't".
> >> Does that make sense?
> >
> > It might make sense, if we change the labels to say what you tell
> > above.
> >
> > Thanks.
> 
> OK, here's an updated patch with revised labels:

Thanks, but I find the likes of "By default, enable" not clear enough.
Would it be accurate to say this instead:

                        (const :tag "Enable in any other mode" t)
                        (const :tag "Don't enable in the other modes" nil)





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 26 Apr 2024 12:25:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 26 08:25:15 2024
Received: from localhost ([127.0.0.1]:34270 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0Kdb-00073a-FD
	for submit <at> debbugs.gnu.org; Fri, 26 Apr 2024 08:25:15 -0400
Received: from mail.eshelyaron.com ([107.175.124.16]:48806 helo=eshelyaron.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1s0KdT-00071g-AG
 for 70589 <at> debbugs.gnu.org; Fri, 26 Apr 2024 08:25:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1714134284;
 bh=2UziZCSKRflv89IgJR+eN1RpCKnqOG/7Ihr02oALcPI=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=kxEX0/mgKGCkBiiHpc8WTtWeRH1r2PB4SFr7Otn9iBRCDZxX2x8yuaNlM1+ZldO7y
 ttGT9r76Lphk17ZzUhdDX1pjRn1Txwu2WOUBpjy1paXTinaJmY0kY8n15+8DUfXde9
 QTWan43SQvumz3evEwJJDXuYQBl+XhZcKU2a7gqGwCn3Q59uWgyHYyzAzueVQkhPI3
 nuW8JgNg+wnaFwx8FZ7b4S6u4fVlqdd2f5gas0SqCjX5wmfV2A6dG+Kw3ogNaO8QJW
 RoSXTVqjeM9OxEbEmR6nfe582aP1vUncAe2Q0m/5LCmfhupiqb6DHNYClxxbqnLEoz
 7AJ4UF45PeBlA==
From: Eshel Yaron <me@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated
 '*-modes' options
In-Reply-To: <865xw4z7bn.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 26 Apr
 2024 14:34:04 +0300")
References: <m11q6sihcw.fsf@HIDDEN> <86frv8z8zc.fsf@HIDDEN>
 <m1mspggyvy.fsf@HIDDEN> <865xw4z7bn.fsf@HIDDEN>
X-Hashcash: 1:20:240426:eliz@HIDDEN::qfLJXtt9w4v1CuQD:2KrG
X-Hashcash: 1:20:240426:70589 <at> debbugs.gnu.org::o9LGtgZg/DPSoDdG:0UVS
X-Hashcash: 1:20:240426:monnier@HIDDEN::lD83i67OzJILhWhU:2EaR
Date: Fri, 26 Apr 2024 14:24:42 +0200
Message-ID: <m134r8gvlh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 70589
Cc: 70589 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Eshel Yaron <me@HIDDEN>
>> Cc: 70589 <at> debbugs.gnu.org,  Stefan Monnier <monnier@HIDDEN>
>> Date: Fri, 26 Apr 2024 13:13:37 +0200
>> 
>> Eli Zaretskii <eliz@HIDDEN> writes:
>> 
>> > Why does it make sense to have the "all" and "none" alternatives
>> > twice?
>> 
>> These are slightly different: a value of t ("Enable in all major modes")
>> says to enable everywhere, while a t inside a list ("All major modes")
>> says to enable in modes that were not mentioned earlier in the list (so
>> putting t in the end of the list means "otherwise, enable").  Similarly
>> for the "none" alternatives: a value of nil ("Don't enable...") means we
>> never enable the minor mode, while the effect of a nil inside the list
>> is relative to the previous elements, and means "otherwise, don't".
>> Does that make sense?
>
> It might make sense, if we change the labels to say what you tell
> above.
>
> Thanks.

OK, here's an updated patch with revised labels:


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=v2-0001-Refine-the-Custom-type-of-generated-modes-options.patch

From 88ad06894cba8cfaf7b7c1916449f9f10e1cb6e7 Mon Sep 17 00:00:00 2001
From: Eshel Yaron <me@HIDDEN>
Date: Fri, 26 Apr 2024 11:43:29 +0200
Subject: [PATCH v2] Refine the Custom type of generated '*-modes' options

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Refine the Custom type of the '*-modes' option, generated when
this macro is given a ':predicate' argument.  (Bug#70589)
---
 lisp/emacs-lisp/easy-mmode.el | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index eaad9646985..081619002c8 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -580,7 +580,19 @@ define-globalized-minor-mode
 and nil means \"don't use\".  There's an implicit nil at the end of the
 list."
                       mode)
-             :type '(repeat sexp)
+             :type '(choice (const :tag "Enable in all major modes" t)
+                            (const :tag "Don't enable in any major mode" nil)
+                            (repeat :tag "Rules (earlier takes precedence)..."
+                                    (choice
+                                     (const :tag "By default, enable" t)
+                                     (const :tag "By default, don't enable" nil)
+                                     (symbol :value fundamental-mode
+                                             :tag "Enable in major mode")
+                                     (cons :tag "Don't enable in major modes"
+                                           (const :tag "Don't enable in..." not)
+                                           (repeat
+                                            (symbol :value fundamental-mode
+                                                    :tag "Major mode"))))))
              ,@group))
 
        ;; Autoloading define-globalized-minor-mode autoloads everything
-- 
2.44.0


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 26 Apr 2024 11:34:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 26 07:34:46 2024
Received: from localhost ([127.0.0.1]:34103 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0Jql-0004WT-Ct
	for submit <at> debbugs.gnu.org; Fri, 26 Apr 2024 07:34:46 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50198)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s0JqZ-0004PF-Mn
 for 70589 <at> debbugs.gnu.org; Fri, 26 Apr 2024 07:34:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s0JqB-0000rb-NT; Fri, 26 Apr 2024 07:34:07 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=aJj4anf6AE/6O2j5zZntFSXCPKb4t/ICXBnJnjvPkW4=; b=llLPDC47O30q
 dgvK0ZZgEsmyFdxRTyb4+Q2Uv+TH/nauF6HuLjmHbd0brh+pJL/EnGxve+wfDa7SZCML12BmiinKe
 FzRje5n4oKdg9tEhlE7Pb1hHX49k+qcATCHaKfGOCO3U6jeaRAap26cvTQ2VkDsLeDAl5FbZ+Ojim
 i42Q22efKzR08rPAF3BOJT0caDq6rnpr6L/gCZpuSzZH8dQe7uAu5rLoMysaavVAVtltDv7HNp5aH
 WNmGqcyKHI91ozCV8NVmxN8nBsqNSkvw/fvE+cTJfJbuyPw2/t7tcbtVeLzEtO2TQhgVdoPdmhUlv
 nhzKIVftzx/b/vQdaRWhoA==;
Date: Fri, 26 Apr 2024 14:34:04 +0300
Message-Id: <865xw4z7bn.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Eshel Yaron <me@HIDDEN>
In-Reply-To: <m1mspggyvy.fsf@HIDDEN> (message from Eshel Yaron on Fri, 
 26 Apr 2024 13:13:37 +0200)
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated
 '*-modes' options
References: <m11q6sihcw.fsf@HIDDEN> <86frv8z8zc.fsf@HIDDEN>
 <m1mspggyvy.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70589
Cc: 70589 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Eshel Yaron <me@HIDDEN>
> Cc: 70589 <at> debbugs.gnu.org,  Stefan Monnier <monnier@HIDDEN>
> Date: Fri, 26 Apr 2024 13:13:37 +0200
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > Why does it make sense to have the "all" and "none" alternatives
> > twice?
> 
> These are slightly different: a value of t ("Enable in all major modes")
> says to enable everywhere, while a t inside a list ("All major modes")
> says to enable in modes that were not mentioned earlier in the list (so
> putting t in the end of the list means "otherwise, enable").  Similarly
> for the "none" alternatives: a value of nil ("Don't enable...") means we
> never enable the minor mode, while the effect of a nil inside the list
> is relative to the previous elements, and means "otherwise, don't".
> Does that make sense?

It might make sense, if we change the labels to say what you tell
above.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 26 Apr 2024 11:14:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 26 07:14:18 2024
Received: from localhost ([127.0.0.1]:34096 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0JWy-0007yk-T9
	for submit <at> debbugs.gnu.org; Fri, 26 Apr 2024 07:14:18 -0400
Received: from mail.eshelyaron.com ([107.175.124.16]:35080 helo=eshelyaron.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1s0JWh-0007v9-2Y
 for 70589 <at> debbugs.gnu.org; Fri, 26 Apr 2024 07:14:05 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1714130020;
 bh=B/l38vMeVfZJtqAKiCNS4Y3U+tOQy/EF5PlwPBVibwY=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=vVho7ZWZvndcxco8RNHPNtEjC0hYnx4RHYfehbixQMmflhWLQF78gSOPJcelX0uz2
 TNArS/MW7C4PYX4if/DIO2iM5tF/YamddbudtYzUxS8dsfXf5vM6qW9HDA7a7pyeoC
 i/GysjdpqL6IoEXPQLJmc8cx8CnnDqPWC1+qArj7ZDd8PuT92xnAgvh1rRkznD9vGK
 Y7Abirdds3veyVnpLnOssRh/+ZFyawNPC+F0Tho5P3OVLdW1gWEsPdOqCcrb2f2Zc1
 Mz5irhPJPCfbc3on+N+1BX+78JFrYicmZZja5zFjQcX9LG6PVzrvjAUF1knDNwpALx
 WrSaotwD7N2RQ==
From: Eshel Yaron <me@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated
 '*-modes' options
In-Reply-To: <86frv8z8zc.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 26 Apr
 2024 13:58:15 +0300")
References: <m11q6sihcw.fsf@HIDDEN> <86frv8z8zc.fsf@HIDDEN>
Date: Fri, 26 Apr 2024 13:13:37 +0200
Message-ID: <m1mspggyvy.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 70589
Cc: 70589 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

Eli Zaretskii <eliz@HIDDEN> writes:

>> Date: Fri, 26 Apr 2024 11:49:19 +0200
>> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
>>
>> --- a/lisp/emacs-lisp/easy-mmode.el
>> +++ b/lisp/emacs-lisp/easy-mmode.el
>> @@ -580,7 +580,19 @@ define-globalized-minor-mode
>>  and nil means \"don't use\".  There's an implicit nil at the end of the
>>  list."
>>                        mode)
>> -             :type '(repeat sexp)
>> +             :type '(choice (const :tag "Enable in all major modes" t)
>> +                            (const :tag "Don't enable in any major mode" nil)
>> +                            (repeat :tag "Only enable in"
>> +                                    (choice
>> +                                     (const :tag "All major modes" t)
>> +                                     (const :tag "No major mode" nil)
>> +                                     (symbol :value fundamental-mode
>> +                                             :tag "Specific major mode")
>> +                                     (cons :tag "Exclude modes"
>> +                                           (const :tag "Exclude..." not)
>> +                                           (repeat
>> +                                            (symbol :value fundamental-mode
>> +                                                    :tag "Major mode"))))))
>
> Why does it make sense to have the "all" and "none" alternatives
> twice?

These are slightly different: a value of t ("Enable in all major modes")
says to enable everywhere, while a t inside a list ("All major modes")
says to enable in modes that were not mentioned earlier in the list (so
putting t in the end of the list means "otherwise, enable").  Similarly
for the "none" alternatives: a value of nil ("Don't enable...") means we
never enable the minor mode, while the effect of a nil inside the list
is relative to the previous elements, and means "otherwise, don't".
Does that make sense?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 26 Apr 2024 10:58:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 26 06:58:55 2024
Received: from localhost ([127.0.0.1]:34060 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0JI1-00054J-Bj
	for submit <at> debbugs.gnu.org; Fri, 26 Apr 2024 06:58:54 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:57660)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s0JHs-00051c-U4
 for 70589 <at> debbugs.gnu.org; Fri, 26 Apr 2024 06:58:45 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s0JHV-0007XV-A5; Fri, 26 Apr 2024 06:58:17 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=thu0HyoJx9ws8m1+R9f/NncDzaB0O+wapSjK0zeMn3A=; b=ax8WwdnhmIBn
 +cv+hQ04G8zk7UteHMkv7Km4BPKSe12KtDH3nEMHZ2tRQljTmTSISfSm8QDOW+b3Aep2w2vhxuQew
 G4qeYltVYjB3IMNU58EOh3mpt6qgD/ZI3zXqpgA4P8MudVms+LJTPHrjtxF23NKfWv1eSj6mMhrnv
 YMfzsvSu05aevTKkaR/6rm4M2piCGUSDrYnh7qFE0CDz7kK9DBrOeauypo8oy0tApRLzVa4XDvsko
 WkEjf6HssFLvIEvoeUd/zhOBudPiu9CfYs55saSyQAUikfWdy/rCZy4jqs0bheBPCFM6zR6Y3dz+w
 5LzA6J/hveikpJcQlEABwg==;
Date: Fri, 26 Apr 2024 13:58:15 +0300
Message-Id: <86frv8z8zc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Eshel Yaron <me@HIDDEN>
In-Reply-To: <m11q6sihcw.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated '*-modes'
 options
References: <m11q6sihcw.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70589
Cc: 70589 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Fri, 26 Apr 2024 11:49:19 +0200
> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> --- a/lisp/emacs-lisp/easy-mmode.el
> +++ b/lisp/emacs-lisp/easy-mmode.el
> @@ -580,7 +580,19 @@ define-globalized-minor-mode
>  and nil means \"don't use\".  There's an implicit nil at the end of the
>  list."
>                        mode)
> -             :type '(repeat sexp)
> +             :type '(choice (const :tag "Enable in all major modes" t)
> +                            (const :tag "Don't enable in any major mode" nil)
> +                            (repeat :tag "Only enable in"
> +                                    (choice
> +                                     (const :tag "All major modes" t)
> +                                     (const :tag "No major mode" nil)
> +                                     (symbol :value fundamental-mode
> +                                             :tag "Specific major mode")
> +                                     (cons :tag "Exclude modes"
> +                                           (const :tag "Exclude..." not)
> +                                           (repeat
> +                                            (symbol :value fundamental-mode
> +                                                    :tag "Major mode"))))))

Why does it make sense to have the "all" and "none" alternatives
twice?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.

Message received at 70589 <at> debbugs.gnu.org:


Received: (at 70589) by debbugs.gnu.org; 26 Apr 2024 10:57:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 26 06:57:37 2024
Received: from localhost ([127.0.0.1]:34055 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0JGm-0004nq-5x
	for submit <at> debbugs.gnu.org; Fri, 26 Apr 2024 06:57:37 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:43164)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s0JGe-0004iX-9M
 for 70589 <at> debbugs.gnu.org; Fri, 26 Apr 2024 06:57:27 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s0JGE-0007Jb-8J; Fri, 26 Apr 2024 06:56:59 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=hxvN8YpHHuvWEpPNPIYoz6ljJ/Gw95flEQbVeZMkk94=; b=DVD+wE2+1Uaw
 NqRRZEzXHc1KJZTqT9+hbz1TOuhT/UPk5i1r53qb+tq6GDI0L6Qe4dkxPFCmb/IgyBOyC8c5zT+sF
 RqeyNE84FAgI89t/SpAJHYzXN9rtSea5/BUdpJJyqFq9z5yCgqyKZ1DZmvgF81t0VAa3En6xbuBh5
 eQMLR1b6cF2jBuiX/Dub4KFo//wo7dTL7K+slOv/2v6ejhcmbVwkl/GIhUQABLZ07rXl9UbdQxyOh
 UUQxATpq9JlEXUQDvcii8kFZRBW8u9s8Hp6IL+AqVx376J92OUm71ev6Sx2iFQmm5bfn47zroG1SD
 +qR8gsUXoLMCvL14F4yeZA==;
Date: Fri, 26 Apr 2024 13:56:50 +0300
Message-Id: <86h6foz91p.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Eshel Yaron <me@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <m11q6sihcw.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#70589: [PATCH] Refine the Custom type of generated '*-modes'
 options
References: <m11q6sihcw.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70589
Cc: 70589 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Fri, 26 Apr 2024 11:49:19 +0200
> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> This makes it easier for users to customize generated '*-modes' options,
> such as 'global-completion-preview-modes', via the Custom interface.

This kind of discussion is not useful with Stefan (CC'ed) on board.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Apr 2024 09:49:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 26 05:49:54 2024
Received: from localhost ([127.0.0.1]:33974 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0IDJ-0007p6-Ma
	for submit <at> debbugs.gnu.org; Fri, 26 Apr 2024 05:49:54 -0400
Received: from lists.gnu.org ([2001:470:142::17]:54776)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1s0IDF-0007n8-Gt
 for submit <at> debbugs.gnu.org; Fri, 26 Apr 2024 05:49:51 -0400
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 <me@HIDDEN>) id 1s0ICr-0002ie-3c
 for bug-gnu-emacs@HIDDEN; Fri, 26 Apr 2024 05:49:25 -0400
Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1s0ICo-0005R4-IH
 for bug-gnu-emacs@HIDDEN; Fri, 26 Apr 2024 05:49:23 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1714124961;
 bh=zJqGB4lffmcB1Eg0fefX2MjJOms29zCFRTehDj2OsZY=;
 h=From:To:Subject:Date:From;
 b=EaYbY571ySYkqSHQF+Ugl5yjrxtSbgdqxfRLymTQ+NnYf3pvDQ3opEBj6PROaf0dX
 NI23jWio1DsONqAFtH+GroJeIdwPmDfM87AQB4Q6gI1q/s5qxEUWiQmz172MErQoUq
 i2c9v+GjpN3NoqmtQyYfnzPHrgVAhzb0mh1LHPcC06nMD+qUUYD8MfsbSnWPYZV5rV
 ayAIhxl/IIc+UTRz534kYihliOAAQx8VwAUjvs+L7VEo4iSH5KP59PkABiOU/ZJ1NX
 0LIJNM5sRKyzikt1kG1dTjR2XHSzBPMu3EmWVAoyuhRAnTF4MgPNdYXIw+/bMhZRgl
 GdGoEaGBd/DCA==
From: Eshel Yaron <me@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Refine the Custom type of generated '*-modes' options
X-Hashcash: 1:20:240426:bug-gnu-emacs@HIDDEN::84No6f6dN5JKp0gz:5FgF
Date: Fri, 26 Apr 2024 11:49:19 +0200
Message-ID: <m11q6sihcw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@HIDDEN;
 helo=eshelyaron.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, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

--=-=-=
Content-Type: text/plain

Tags: patch

This makes it easier for users to customize generated '*-modes' options,
such as 'global-completion-preview-modes', via the Custom interface.


--=-=-=
Content-Type: text/patch
Content-Disposition: attachment;
 filename=0001-Refine-the-Custom-type-of-generated-modes-options.patch

From f81f30895dd1e54684ed3bd66a49ea76dd9e5cf7 Mon Sep 17 00:00:00 2001
From: Eshel Yaron <me@HIDDEN>
Date: Fri, 26 Apr 2024 11:43:29 +0200
Subject: [PATCH] Refine the Custom type of generated '*-modes' options

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Refine the Custom type of the '*-modes' option, generated when
this macro is given a ':predicate' argument.
---
 lisp/emacs-lisp/easy-mmode.el | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index eaad9646985..72509a24241 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -580,7 +580,19 @@ define-globalized-minor-mode
 and nil means \"don't use\".  There's an implicit nil at the end of the
 list."
                       mode)
-             :type '(repeat sexp)
+             :type '(choice (const :tag "Enable in all major modes" t)
+                            (const :tag "Don't enable in any major mode" nil)
+                            (repeat :tag "Only enable in"
+                                    (choice
+                                     (const :tag "All major modes" t)
+                                     (const :tag "No major mode" nil)
+                                     (symbol :value fundamental-mode
+                                             :tag "Specific major mode")
+                                     (cons :tag "Exclude modes"
+                                           (const :tag "Exclude..." not)
+                                           (repeat
+                                            (symbol :value fundamental-mode
+                                                    :tag "Major mode"))))))
              ,@group))
 
        ;; Autoloading define-globalized-minor-mode autoloads everything
-- 
2.44.0


--=-=-=--




Acknowledgement sent to Eshel Yaron <me@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#70589; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 28 Apr 2024 19:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.