From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Sebastien Vauban" Newsgroups: gmane.emacs.help Subject: Re: Programmatically access all the possible values of a defcustom Date: Thu, 30 Jan 2014 11:17:31 +0100 Organization: Sebastien Vauban Message-ID: <86ha8lixj8.fsf@somewhere.org> References: <86fvo6jzx5.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1391077221 8664 80.91.229.3 (30 Jan 2014 10:20:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jan 2014 10:20:21 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Thu Jan 30 11:20:29 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W8ojP-0003qF-S1 for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jan 2014 11:20:23 +0100 Original-Received: from localhost ([::1]:47367 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8ojP-0007ui-Cb for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jan 2014 05:20:23 -0500 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Injection-Info: mx05.eternal-september.org; posting-host="402b34550bd938aa98825778083dce0e"; logging-data="19516"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.org"; posting-account="U2FsdGVkX18GJKvmJSNxvcU6K1mZmOYm" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Archive: encrypt Cancel-Lock: sha1:q39UABpGoz2SkjhvUhU9mVoeP2Y= sha1:Va+HgYeMs3LSpIxP++tjboBje24= X-Url: Under construction... Original-Xref: usenet.stanford.edu gnu.emacs.help:203520 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 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.org-mXXj517/zsQ@public.gmane.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:95790 Archived-At: Hi Nicolas, Nicolas Richard wrote: > "Sebastien Vauban" writes: >> Is there a possibility to programmatically access all the values that >> a defcustom can take? > > I guess it's in the plist associated to the symbol. Let's check: > (symbol-plist 'org-babel-load-languages) > > Ah ha! > > (get 'org-babel-load-languages 'custom-type) > => (alist :tag "Babel Languages" :key-type (choice (const :tag "Awk" awk) > (const :tag "C" C) (const :tag "R" R) (const :tag "Asymptote" asymptote) > (const :tag "Calc" calc) (const :tag "Clojure" clojure) (const :tag "CSS" css) > (const :tag "Ditaa" ditaa) (const :tag "Dot" dot) (const :tag "Emacs Lisp" > emacs-lisp) (const :tag "Fortran" fortran) ...) :value-type (boolean :tag > "Activate" :value t)) Thanks for putting me on track. Now, I'll have to play with the list to obtain what I really want: a string like... Awk, C, R, Asymptote, Calc, Clojure, CSS, Ditaa, Dot, Emacs Lisp, Fortran Best regards, Seb -- Sebastien Vauban