bongo-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bongo-patches] Add `bongo-insert-special' bound to `I' (original patch


From: Daniel Brockman
Subject: [bongo-patches] Add `bongo-insert-special' bound to `I' (original patch by Daniel Jensen)
Date: Wed, 04 Apr 2007 16:45:15 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

2007-04-04  Daniel Brockman  <address@hidden>

        Add `bongo-insert-special' bound to `I' (original
        patch by Daniel Jensen).

diff -rN -u old-bongo/bongo.el new-bongo/bongo.el
--- old-bongo/bongo.el  2007-04-04 16:45:09.000000000 +0200
+++ new-bongo/bongo.el  2007-04-04 16:45:09.000000000 +0200
@@ -6911,6 +6911,26 @@
   (with-bongo-buffer
     (bongo-insert-line 'bongo-action action)))
 
+(defvar bongo-insertion-command-alist
+  '(("Action" . bongo-insert-action)
+    ("CD tracks" . bongo-insert-cd)
+    ("Directory" . bongo-insert-directory)
+    ("Directory tree" . bongo-insert-directory-tree)
+    ("File" . bongo-insert-file)
+    ("Playlist contents" . bongo-insert-playlist-contents)
+    ("URI" . bongo-insert-uri))
+  "Alist of insertion commands for `bongo-insert-special'.")
+
+(defun bongo-insert-special ()
+  "Prompt for something to insert into the current Bongo buffer.
+See `bongo-insertion-command-alist'."
+  (interactive)
+  (call-interactively
+   (cdr (assoc (let ((completion-ignore-case t))
+                 (completing-read "Insert: "
+                                  bongo-insertion-command-alist nil t))
+               bongo-insertion-command-alist))))
+
 
 ;;;; Drag-and-drop support
 
@@ -8303,6 +8323,7 @@
     (define-key map "iu" 'bongo-insert-uri)
     (define-key map "il" 'bongo-insert-playlist-contents)
     (define-key map "iC" 'bongo-insert-cd)
+    (define-key map "I" 'bongo-insert-special)
     (define-key map "e" 'bongo-append-enqueue)
     (define-key map "E" 'bongo-insert-enqueue)
     (define-key map "t" 'bongo-transpose-forward)
-- 
Daniel Brockman <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]