From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 28 22:24:12 2022 Received: (at submit) by debbugs.gnu.org; 29 Oct 2022 02:24:13 +0000 Received: from localhost ([127.0.0.1]:34663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oobW8-0002NC-IU for submit@debbugs.gnu.org; Fri, 28 Oct 2022 22:24:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:36046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oobW4-0002N1-2O for submit@debbugs.gnu.org; Fri, 28 Oct 2022 22:24:11 -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 ) id 1oobVz-0004fC-U9 for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2022 22:24:04 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oobVx-0006Pm-Oy for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2022 22:24:03 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C2BC1240026 for ; Sat, 29 Oct 2022 04:23:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667010239; bh=FXqJtXZEkvtFicWoIBBYsNJDtpDN/+QWsKPa5C8+TtI=; h=From:To:Subject:Date:From; b=j2SrrHhDipdzp0ysBAIxUXh/WduJYjQV5+IbGtc758My8k55IIYvaBFVHgbXzWe1a xQ4TfDW1A6tbcY9qHWrwyGPI/EbINxb3M/RLnlj49IX64pt8tdHy8rvlRr5Nfd0SWX f583zLG8K1ZQagY4i6M+AdOiaTkpiiPCXoV2h64PMtsq9vNLO2oiub4NcDar54Rvy2 X19PcxO2T1l6j1tvEQwWpViwrQKZcgHVnZEG2oKUtlpreOntKnF96mIhti6BVYzHop hTT3hAFGilEAaw9DM7RrDDCYBLTl0IiYGEy3XLgdwToe3tZBwlZYmRNdywD/oEIpc5 5zYIPesKgling== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mzjs81Fxsz9rxD for ; Sat, 29 Oct 2022 04:23:55 +0200 (CEST) From: Ihor Radchenko To: bug-gnu-emacs@gnu.org Subject: [WISH] Could *Help* buffers provide information about :type of defcustoms? Date: Sat, 29 Oct 2022 02:24:39 +0000 Message-ID: <87mt9fl63c.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, In Org, we have seen a number of reports when people tried to set custom variables via setq and used the values that are not recognized. Such issue commonly occurred when the allowed values were listed in :type specification, but not in the docstring. Indeed, one can update the docstring every time :type specification is changed/added. However, it would be nice if *Help* buffers automatically listed the allowed variable values according to :type specification. I propose the following: 1. If a defcustom contains :type keyword, *Help* can add auto-generated paragraph describing the allowed values: The variable can take the following values: - :: - :: ... - :: ... 2. The feature can be explicitly disabled by setting :type-doc nil. WDYT? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 12 15:45:18 2022 Received: (at control) by debbugs.gnu.org; 12 Nov 2022 20:45:18 +0000 Received: from localhost ([127.0.0.1]:49210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otxNO-0005yL-0Y for submit@debbugs.gnu.org; Sat, 12 Nov 2022 15:45:18 -0500 Received: from mail-ot1-f47.google.com ([209.85.210.47]:45737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otxNM-0005am-Be for control@debbugs.gnu.org; Sat, 12 Nov 2022 15:45:16 -0500 Received: by mail-ot1-f47.google.com with SMTP id 94-20020a9d0067000000b0066c8d13a33dso4619459ota.12 for ; Sat, 12 Nov 2022 12:45:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=JOoF9fYa1UTjE1e4m4dnFlQzISdQad5Zzi2HWreJPpQ=; b=cL+VuGKa3dY/BaXkeWMFkT6KgJZfIhFwxo/5Z4VoHL6XGmHwkufW/aJfdHSdDfhzXI 3sHUxL84B1to2o94iJh2VcMF9HgmVEU+QJiWjNA6A4vNhqgLfOC61YayvOUkk9Z4KJ8r JcwiywAcZG/4ED3xIloNPySUrL4NwQhgIXRdqYZkS8NuHNHTYqIxoT4ENyehA+5fCT7l X2YT3E+iJ1YT0J7uU0jzEWa2ksqL7gIOHwINyiFaRFh6vWMi3k9hifjLY1xipod6Ie01 J/cXR4hb+SCJ4cCIDvVVOv1wvr4PKQcKRpzQGa9a0Zpg9xxRRFJLolL9ofy29zMh0DCv HPDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=JOoF9fYa1UTjE1e4m4dnFlQzISdQad5Zzi2HWreJPpQ=; b=8LfDWMVPHNHokJW0r02uylWaMQlyHHpVXFfBPhSE1lpbvnj0h3zzRMAmwYZbHMslaf t0k+2vz4wETkGAo2kVaDvaIODU7DYFB1WnRAvl1WhqUD3Z6LLSKTAW6IlG5MjKwUt6/K y9yvAgHjvPxf0pOAZED4EJBHc/2JBZtprMmstiVYBZYLyra0SE9s/SOYC0Ej2i5H6q4G v4ojuQmnM8yI3XNH9G0ec/raK/vSAs+52/eDW55/PK4tjyHLB7xRExN5CCffexa2qJ4/ 6JMF2iNFO5oP3LRTE1aMClzV/X4QsoP27m6hTnyUncn5KJQnXqoJ3fzmDxeN+VqsWTnJ gVyQ== X-Gm-Message-State: ANoB5pnt/MeV/uLaG/PfWqJZml8EQzN4UYUC7AAh5sKqzG7iZd3gXi6e FNQ15YQrd0rb4ZKu02bqSHcq5bqHP0dOg9aEl6IKhHY/ X-Google-Smtp-Source: AA0mqf6Z29a6pMtc1aweC2kDYsUn3xbvckGljKWphKdZqU2yTEgk6GDY4nnxoEyIyAg8W+sUWnL1hBhX2Gw0eQ5PzJ4= X-Received: by 2002:a9d:4f10:0:b0:66c:5232:b9d1 with SMTP id d16-20020a9d4f10000000b0066c5232b9d1mr3729574otl.224.1668285910830; Sat, 12 Nov 2022 12:45:10 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 12 Nov 2022 12:45:10 -0800 From: Stefan Kangas X-Hashcash: 1:20:221112:control@debbugs.gnu.org::LBOAI8+QaBG8wBHt:5D0B MIME-Version: 1.0 Date: Sat, 12 Nov 2022 12:45:10 -0800 Message-ID: Subject: control message for bug #58854 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) severity 58854 wishlist quit From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 18 12:07:05 2023 Received: (at submit) by debbugs.gnu.org; 18 Feb 2023 17:07:05 +0000 Received: from localhost ([127.0.0.1]:44815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTQfw-00048L-8C for submit@debbugs.gnu.org; Sat, 18 Feb 2023 12:07:05 -0500 Received: from lists.gnu.org ([209.51.188.17]:54202) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTQIs-0003Sg-SV for submit@debbugs.gnu.org; Sat, 18 Feb 2023 11:43:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTQIs-0000Yn-Mn for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 11:43:14 -0500 Received: from latitanza.investici.org ([82.94.249.234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTQIq-00024H-Ag for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 11:43:14 -0500 Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4PJvch6T1czGp99; Sat, 18 Feb 2023 16:43:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anche.no; s=stigmate; t=1676738580; bh=R4Qni7aN17rSRAZqhjctcMNWtIy5VKpRHboIO6r0n0I=; h=From:To:Subject:In-Reply-To:References:Date:From; b=Lyr+6dpFjttqJYyutgTlvQKSaCydZbrkTAbre8Y7tqY93wKjYj8iFScUBm4R2rKEa tCs7NO9YQDhrdPaEftbmLpJFCE/9cHtfx/st4cQaQ/oWXV1bR5dbvAOVqk/MDx7pjf 6Ar3lBbE1rRskbktKyiz9o9Da3R+VYhom4mGW+gk= Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: yuuyin@grrlz.net) by localhost (Postfix) with ESMTPSA id 4PJvcg6dWpzGp2p; Sat, 18 Feb 2023 16:42:59 +0000 (UTC) From: Yuu Yin To: Ihor Radchenko , bug-gnu-emacs@gnu.org Subject: Re: [WISH] Could *Help* buffers provide information about :type of defcustoms? In-Reply-To: <87mt9fl63c.fsf@localhost> References: <87mt9fl63c.fsf@localhost> Date: Sat, 18 Feb 2023 13:42:48 -0300 Message-ID: <87cz66org7.fsf@anche.no> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=82.94.249.234; envelope-from=yuu@anche.no; helo=latitanza.investici.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 18 Feb 2023 12:07:03 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Ihor Radchenko writes: > Hi, > > In Org, we have seen a number of reports when people tried to set > custom variables via setq and used the values that are not recognized. > > Such issue commonly occurred when the allowed values were listed in > :type specification, but not in the docstring. > > Indeed, one can update the docstring every time :type specification is > changed/added. However, it would be nice if *Help* buffers automatically > listed the allowed variable values according to :type specification. > > I propose the following: > 1. If a defcustom contains :type keyword, *Help* can add auto-generated > paragraph describing the allowed values: > > The variable can take the following values: > - :: > - :: > ... > - :: > ... > 2. The feature can be explicitly disabled by setting :type-doc nil. > > WDYT? > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at Hi, Just to make it clear, `:tag' is as in `(const :tag "nofold: show all" nil)', as in a defcustom composite type, right. This seems like a simple feature to an experienced Elip programmer to implement, which in turn would add so much value. Fortunately `defcustom' provides the types, but users need to be explicitly aware of types to correctly use the variables, so adding that to *Help*, or `variable-describle`, would help a lot. Another wish of mine would be the minibuffer showing the types alongside the signature if feasible, so the user has instant feedback on the types. -- Yuu Yin