From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuu Yin via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58854: [WISH] Could *Help* buffers provide information about :type of defcustoms? Date: Sat, 18 Feb 2023 13:42:48 -0300 Message-ID: <87cz66org7.fsf@anche.no> References: <87mt9fl63c.fsf@localhost> Reply-To: Yuu Yin Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25606"; mail-complaints-to="usenet@ciao.gmane.io" To: yantar92@posteo.net, 58854@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 18 18:08:16 2023 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 1pTQh4-0006RL-Ps for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Feb 2023 18:08:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTQgv-0007MQ-8m; Sat, 18 Feb 2023 12:08:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTQgs-0007M9-51 for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 12:08:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pTQgr-0005QJ-SY for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 12:08:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pTQgr-00049p-OX for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 12:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuu Yin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Feb 2023 17:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58854 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Ihor Radchenko , bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167674002515898 (code B ref -1); Sat, 18 Feb 2023 17:08:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Feb 2023 17:07:05 +0000 Original-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 Original-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 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTQIs-0000Yn-Mn for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 11:43:14 -0500 Original-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 Original-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= Original-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) In-Reply-To: <87mt9fl63c.fsf@localhost> 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-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 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255977 Archived-At: 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