all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philippe M. Coatmeur <philippe.coatmeur@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Need Help defining customizable objects
Date: Wed, 13 Jun 2012 17:18:30 +0000	[thread overview]
Message-ID: <lzr4tjdtax.wl%philippe.coatmeur@gmail.com> (raw)

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



             reply	other threads:[~2012-06-13 17:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13 17:18 Philippe M. Coatmeur [this message]
2012-06-13 21:48 ` Need Help defining customizable objects Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=lzr4tjdtax.wl%philippe.coatmeur@gmail.com \
    --to=philippe.coatmeur@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.