From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: Little help with defcustom Date: Mon, 9 Nov 2020 19:35:20 +0300 Message-ID: References: <87pn4mps0g.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33549"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0 (3d08634) (2020-11-07) Cc: help-gnu-emacs@gnu.org To: Joost Kremers Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 09 17:37:51 2020 Return-path: Envelope-to: geh-help-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 1kcAAw-0008dS-Sv for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 09 Nov 2020 17:37:50 +0100 Original-Received: from localhost ([::1]:45354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcAAv-0004dI-U4 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 09 Nov 2020 11:37:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcA94-0002ej-Uv for help-gnu-emacs@gnu.org; Mon, 09 Nov 2020 11:35:54 -0500 Original-Received: from static.rcdrun.com ([95.85.24.50]:37851) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcA93-00049N-8T for help-gnu-emacs@gnu.org; Mon, 09 Nov 2020 11:35:54 -0500 Original-Received: from localhost ([::ffff:197.157.34.177]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002C0006.000000005FA96FE7.00005EC8; Mon, 09 Nov 2020 16:35:51 +0000 Content-Disposition: inline In-Reply-To: <87pn4mps0g.fsf@fastmail.fm> Received-SPF: pass client-ip=95.85.24.50; envelope-from=bugs@gnu.support; helo=static.rcdrun.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/09 11:35:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125136 Archived-At: * Joost Kremers [2020-11-09 16:48]: > On Mon, Nov 09 2020, Jean Louis wrote: > > I need little help with defcustom. I would like to define defcustom > > structure for: > > > > Multiple inserts INS DEL: > > > > - Server name > > - Host name > > - User name > > - Password > > - Port number (integer up to 65535) > > - Activated (boolean) :type '(repeat (list :tag "Dynamical User Sets" (string :tag " Server") (string :tag "Set name") (string :tag " Node ID")))) Thank you. I have succeeded randomly with the above. I know that is not best style of programming (too nicely said) and I do read documentation but I do not read enough. I see that to achieve best formatting I have to pad with spaces those strings. Is there maybe better way? > Other than that, it's hard to give you any specific advice because > you're not saying what you're having trouble with. Have you looked > at the documentation (info "(elisp) Customization")? There are also > tons of defcustoms in the Emacs source, so you could take a user > option in a Customize buffer that looks like what you want and then > check out how it's defined. Before sending email I have read documentation and I searching similar example to what I was thinking should be similar. And did not finish searching examples. Most similar example was for accounts set in jabber.el XMPP chat client. Is there a way to make sure that field is not empty?