From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#25152: 25.1; Customize: errors for `restricted-sexp' in `repeat' Date: Fri, 23 Oct 2020 09:47:15 -0700 (PDT) Message-ID: <3a76061b-efa8-41b3-9baf-e3297a79b847@default> References: <45d48716-1ac9-4cb3-9c64-042dddee4e77@default> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22139"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 25152@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 23 18:51:36 2020 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 1kW0Hw-0005di-ED for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Oct 2020 18:51:36 +0200 Original-Received: from localhost ([::1]:57242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kW0Hv-0000wZ-FA for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Oct 2020 12:51:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kW0GR-0007iw-13 for bug-gnu-emacs@gnu.org; Fri, 23 Oct 2020 12:50:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46552) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kW0GQ-0003vb-Jp for bug-gnu-emacs@gnu.org; Fri, 23 Oct 2020 12:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kW0GQ-0007es-IL for bug-gnu-emacs@gnu.org; Fri, 23 Oct 2020 12:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Oct 2020 16:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 25152-submit@debbugs.gnu.org id=B25152.160347176929385 (code B ref 25152); Fri, 23 Oct 2020 16:50:02 +0000 Original-Received: (at 25152) by debbugs.gnu.org; 23 Oct 2020 16:49:29 +0000 Original-Received: from localhost ([127.0.0.1]:58097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW0Fs-0007ds-Vt for submit@debbugs.gnu.org; Fri, 23 Oct 2020 12:49:29 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:53596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW0Fo-0007da-PU for 25152@debbugs.gnu.org; Fri, 23 Oct 2020 12:49:27 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09NGAJ2b007233; Fri, 23 Oct 2020 16:49:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=0hHDOLHXgJFla/OHJhjj3JgsiLnqNP0/PfSm5ug5wHI=; b=pOS0O41QdBJ9NPv8UP94Hlwehja17PDgKfQiXfqGXemlEPwVm+hGzhccKmENmHLGRTq8 5TCYH8m7NVdrW74x+e0NQcwRUY0FyNidsa4rHpe9JtYNqrHtqv8z3Dviap6njaxsFeBe Wk+XGlYx9hFaoI+MhtFYUGpX7R099z8BPYHl0P7qH93njs/VH3exLHhOKdgOqM+DRTzc vuDA/29jZ1FiHxrJnFXbWIk/IJ2h2Hpi81JJ2OEVPzFulm8GwrmNnahCR7ySBjtbRYnz Nx76YlY9ZHiwP4e5IGxbQuYJpq/NSTAlt9TKNelSGLO8Mbao1SAmXTuSAXXa4TWzeo/2 cQ== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 34ak16vfb7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Oct 2020 16:49:18 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09NGAEcJ118302; Fri, 23 Oct 2020 16:47:18 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 348a6rx7df-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Oct 2020 16:47:18 +0000 Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 09NGlGRI020198; Fri, 23 Oct 2020 16:47:17 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5056.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9782 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=999 bulkscore=0 spamscore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010230107 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9782 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 phishscore=0 priorityscore=1501 clxscore=1011 malwarescore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010230107 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" Xref: news.gmane.io gmane.emacs.bugs:191384 Archived-At: > Coming back to this, perhaps a good place to warn about a bad default val= ue is where we find it for the first time.=C2=A0 So I attach a patch that m= akes the restricted-sexp widget warn (but not error out) if the internal va= lue is not a string. > When the user clicks the INS button, the following warning pops up: > Warning (widget-bad-default-value):=20 > A widget of type restricted-sexp has a bad default value. > value: nil > match function: widget-restricted-sexp-match > match-alternatives: (functionp) > > which I hope conveys good enough information to fix the mistake. > > I made it just a warning, because this mistake doesn't always result in > a messed up buffer.=C2=A0 But it can be changed to an error, of course. I may have forgotten some of what this is about. If so, please ignore... If the problem is the default value then it's not up to a user to fix it, and most users won't know how to deal with such a warning (or error). They can expect warnings and errors about their own behavior, but not messages about some problem with the defcustom definition. If the problem can't be detected before a user tries to customize, then maybe, when she does, the warning should make it very clear that the _default_ value is a mismatch and advise the user to report a bug to the library author. IOW make clear that it's not about the user doing something wrong (and don't prevent the user from continuing to customize to a valid value). Make it very clear that the problem is with the maintainer of the code, and suggest that the user report the problem. And give the user some detailed info that can be copied in a report to the library maintainer. Does this make sense, or am I missing something?