all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Need Help defining customizable objects
@ 2012-06-13 17:18 Philippe M. Coatmeur
  2012-06-13 21:48 ` Drew Adams
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe M. Coatmeur @ 2012-06-13 17:18 UTC (permalink / raw)
  To: help-gnu-emacs

Hi ; I need to setup a customizable system where the user can insert,
delete and set a series of "accounts", one account being a (editable)
name, and a fixed-size (5) list of key-values, and only the value
would be editable.

I did my homework, read the manual and related pages
(http://original.jamesthornton.com/emacs/elisp/chapter/elisp_14.html)
and been playing with custom definitions all morning but so far I
could only muster this :

(defcustom mail-bug-accounts '(("host" "")
                  ("port" "")
                  ("box" "")
                  ("icon" ""))
  "Alist of mail-bug-accounts."
  :type '(alist :value-type (repeat string))
  :group 'mail-bug)

But this produces this :

Hide Mail Bug Accounts:
INS DEL Key: "host"
            Repeat:
            INS DEL String: 
            INS
INS DEL Key: "port"
            Repeat:
            INS DEL String: 
            INS
INS DEL Key: "box"
            Repeat:
            INS DEL String: 
            INS
INS DEL Key: "icon"
            Repeat:
            INS DEL String: 
            INS
INS
    State : STANDARD.
   Alist of mail-bug-accounts
Groups: Mail Bug

A list where the user can insert, delete and set key-values, but not
accounts, so basically it's the opposite of what I want. Also the keys
are called "keys", when I'd like to name them.

How can I produce a (editable : ins, del, set) list of (non-fully-editable)
lists?

Bonus question : Once the user sets a few of those "account" objects,
how will they be sorted, and is there a way to sort them ?

Philippe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-13 21:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-13 17:18 Need Help defining customizable objects Philippe M. Coatmeur
2012-06-13 21:48 ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.