Daniel Brockman <[EMAIL PROTECTED]> writes:
> [EMAIL PROTECTED] (Daniel Jensen) writes:
>
>> I wrote earlier that `I' completion would be too much to
>> type, but I'm not so sure about that anymore. I forgot
>> that RET completes and exits. You would type `I c RET'
>> and `I a RET'; not too bad.
>
> Cool. Let's do that, then. That'll save us from having to
> argue about what track type should go on what key, and it'll
> save users from having to remember it.
I wrote an `I' command:
(defvar bongo-insertion-commands
'(("file" . bongo-insert-file)
("tree" . bongo-insert-directory-tree)
("directory" . bongo-insert-directory)
("uri" . bongo-insert-uri)
("cd" . bongo-insert-cd)
("action" . bongo-insert-action)
("playlist" . bongo-insert-playlist-contents))
"An alist of insertion commands for `bongo-insertion-dispatcher'.")
;;; `bongo-insert' is a shorter name, and perhaps better?
;;; it is marked as obsolete in bongo.el.
(defun bongo-insertion-dispatcher ()
"Insert an item into the current Bongo buffer.
Dispatches to other specialized insertion commands. For a list
of possible items and commands, see `bongo-insertion-commands'."
(interactive)
(let ((command (cdr (assoc (completing-read "Insert: "
bongo-insertion-commands nil t)
bongo-insertion-commands))))
(and command (call-interactively command))))
_______________________________________________
bongo-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/bongo-devel