From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Specifying plist requirements in defcustom? Date: Wed, 15 Oct 2008 07:50:24 -0700 Message-ID: <006f01c92ed5$5b49e150$0200a8c0@us.oracle.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1224082285 5793 80.91.229.12 (15 Oct 2008 14:51:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2008 14:51:25 +0000 (UTC) To: "'jrwats'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 15 16:52:25 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kq7j8-0002YY-8i for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Oct 2008 16:51:54 +0200 Original-Received: from localhost ([127.0.0.1]:39441 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kq7i0-00070F-JE for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Oct 2008 10:50:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kq7hh-000706-Qx for help-gnu-emacs@gnu.org; Wed, 15 Oct 2008 10:50:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kq7he-0006zi-9J for help-gnu-emacs@gnu.org; Wed, 15 Oct 2008 10:50:24 -0400 Original-Received: from [199.232.76.173] (port=37508 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kq7he-0006zf-32 for help-gnu-emacs@gnu.org; Wed, 15 Oct 2008 10:50:22 -0400 Original-Received: from agminet01.oracle.com ([141.146.126.228]:61850) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kq7hd-00024g-MU for help-gnu-emacs@gnu.org; Wed, 15 Oct 2008 10:50:21 -0400 Original-Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.186.110]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m9FEoGLC001645; Wed, 15 Oct 2008 09:50:17 -0500 Original-Received: from acsmt707.oracle.com (acsmt707.oracle.com [141.146.40.85]) by rgmgw1.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m9FEoFww023205; Wed, 15 Oct 2008 08:50:15 -0600 Original-Received: from dradamslap1 (/24.23.165.218) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 15 Oct 2008 07:50:15 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Acku1B62vhiAK5V2Qpicdc8lDKyiRAAAImnQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58803 Archived-At: > > (defcustom corext-enlistments nil > > =A0 "..." > > =A0 :type > > =A0 '(repeat > > =A0 =A0 (restricted-sexp > > =A0 =A0 =A0:match-alternatives > > =A0 =A0 =A0((lambda (x) (and (symbolp x) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(let ((pl = (symbol-plist x))) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(and (plist-get = pl 'branch) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = (plist-get pl 'drive) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = (plist-get pl 'path))))))))) > > > From what I could tell, this worked, but I was also to have a user- > friendly customization interface when a user, say, clicked customoize > corext-enlistments. I'd like a prompt for the symbol-name, and the > individual property list values: branch, drive, and path. It seems > that to acheive something like this, I'd need to just make them > alists.... You'll have to extend Customize to get that, AFAIK. Or write your own = command to customize this particular option. Customize doesn't really guide you = with prompts and such. Customize could use a little more guidance, especially = for complex structures such as this one. There are a lot of ways in which Customize could be improved, but no one = seems to want to work on it. Many Emacs developers have, I think, written it = off as being either (1) superfluous (~real Emacs users don't use Customize~, = meaning that they don't use it) or (2) too difficult/bothersome (the Customize = code is hard to follow). No flames please - that's just one person's impression.