bongo-patches
[Top][All Lists]
Advanced

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

[bongo-patches] Change seek mode key bindings (as once discussed on the


From: Daniel Brockman
Subject: [bongo-patches] Change seek mode key bindings (as once discussed on the mailing list)
Date: Fri, 27 Apr 2007 01:10:53 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

Change seek mode key bindings (as once discussed on the
mailing list).

diff -rN -u old-bongo/bongo.el new-bongo/bongo.el
--- old-bongo/bongo.el  2007-04-27 01:10:48.000000000 +0200
+++ new-bongo/bongo.el  2007-04-27 01:10:48.000000000 +0200
@@ -6871,31 +6871,63 @@
     (kill-buffer bongo-seek-buffer)
     (setq bongo-seek-buffer nil)))
 
+(defun bongo-seek-forward-3 (&optional n)
+  "Seek 3 N seconds forward in the currently playing track."
+  (interactive "p")
+  (bongo-seek-forward (* 3 (or n 1))))
+
+(defun bongo-seek-backward-3 (&optional n)
+  "Seek 3 N seconds backward in the currently playing track."
+  (interactive "p")
+  (bongo-seek-backward (* 3 (or n 1))))
+
+(defun bongo-seek-forward-10 (&optional n)
+  "Seek 10 N seconds forward in the currently playing track."
+  (interactive "p")
+  (bongo-seek-forward (* 10 (or n 1))))
+
+(defun bongo-seek-backward-10 (&optional n)
+  "Seek 10 N seconds backward in the currently playing track."
+  (interactive "p")
+  (bongo-seek-backward (* 10 (or n 1))))
+
+(defun bongo-seek-forward-60 (&optional n)
+  "Seek N minutes forward in the currently playing track."
+  (interactive "p")
+  (bongo-seek-forward (* 60 (or n 1))))
+
+(defun bongo-seek-backward-60 (&optional n)
+  "Seek N minutes backward in the currently playing track."
+  (interactive "p")
+  (bongo-seek-backward (* 60 (or n 1))))
+
 (defvar bongo-seek-mode-map
-  (let ((map (make-sparse-keymap))
-        (backward-more (lambda (n)
-                         (interactive "p")
-                         (bongo-seek-backward (* n 10))))
-        (forward-more (lambda (n)
-                        (interactive "p")
-                        (bongo-seek-forward (* n 10)))))
+  (let ((map (make-sparse-keymap)))
     (suppress-keymap map)
-    (define-key map "b" 'bongo-seek-backward)
-    (define-key map "f" 'bongo-seek-forward)
     (define-key map "\C-b" 'bongo-seek-backward)
     (define-key map "\C-f" 'bongo-seek-forward)
-    (define-key map "\M-b" backward-more)
-    (define-key map "\M-f" forward-more)
-    (define-key map [left] 'bongo-seek-backward)
-    (define-key map [right] 'bongo-seek-forward)
-    (define-key map [(control left)] backward-more)
-    (define-key map [(control right)] forward-more)
-    (define-key map [(meta left)] backward-more)
-    (define-key map [(meta right)] forward-more)
-    ;; XXX: This does not work in the electric command loop,
-    ;;      because it rebinds the normal editing keys:
-    ;;
-    ;;         (define-key map "t" 'bongo-seek-to)
+    (define-key map "B" 'bongo-seek-backward)
+    (define-key map "F" 'bongo-seek-forward)
+    (define-key map "b" 'bongo-seek-backward-3)
+    (define-key map "f" 'bongo-seek-forward-3)
+    (define-key map [left] 'bongo-seek-backward-3)
+    (define-key map [right] 'bongo-seek-forward-3)
+    (define-key map "\M-b" 'bongo-seek-backward-10)
+    (define-key map "\M-f" 'bongo-seek-forward-10)
+    (define-key map [(control left)] 'bongo-seek-backward-10)
+    (define-key map [(control right)] 'bongo-seek-forward-10)
+    (define-key map [(meta left)] 'bongo-seek-backward-10)
+    (define-key map [(meta right)] 'bongo-seek-forward-10)
+    (define-key map [up] 'bongo-seek-forward-10)
+    (define-key map [down] 'bongo-seek-backward-10)
+    (define-key map [(control up)] 'bongo-seek-forward-60)
+    (define-key map [(control down)] 'bongo-seek-backward-60)
+    (define-key map [(meta up)] 'bongo-seek-forward-60)
+    (define-key map [(meta down)] 'bongo-seek-backward-60)
+    (define-key map "\M-\C-b" 'bongo-seek-backward-60)
+    (define-key map "\M-\C-f" 'bongo-seek-forward-60) 
+    (define-key map [(control meta left)] 'bongo-seek-backward-60)
+    (define-key map [(control meta right)] 'bongo-seek-forward-60)
     (define-key map "a" 'bongo-replay-current)
     (define-key map "e" 'bongo-play-next)
     (define-key map "\C-a" 'bongo-replay-current)
@@ -6904,12 +6936,6 @@
     (define-key map [end] 'bongo-play-next)
     (define-key map "p" 'bongo-play-previous)
     (define-key map "n" 'bongo-play-next)
-    (define-key map "\C-p" 'bongo-play-previous)
-    (define-key map "\C-n" 'bongo-play-next)
-    (define-key map [up] forward-more)
-    (define-key map [down] backward-more)
-    (define-key map "\M-p" 'bongo-play-previous)
-    (define-key map "\M-n" 'bongo-play-next)
     (define-key map " " 'bongo-pause/resume)
     (define-key map "\C-c\C-a" 'bongo-replay-current)
     (define-key map "\C-c\C-i" 'bongo-perform-next-action)
@@ -6918,7 +6944,6 @@
     (define-key map "\C-c\C-r" 'bongo-play-random)
     (define-key map "\C-c\C-s" 'bongo-start/stop)
     (define-key map "l" 'bongo-seek-redisplay)
-    (define-key map "g" 'bongo-seek-quit)
     (define-key map "\C-g" 'bongo-seek-quit)
     (define-key map "\C-m" 'bongo-seek-quit)
     (define-key map "q" 'bongo-seek-quit)
diff -rN -u old-bongo/NEWS new-bongo/NEWS
--- old-bongo/NEWS      2007-04-27 01:10:48.000000000 +0200
+++ new-bongo/NEWS      2007-04-27 01:10:48.000000000 +0200
@@ -1,6 +1,20 @@
 Bongo NEWS file listing user-visible changes.
 This file is in the public domain.
 
+April 27, 2007
+
+ * The keys in seek mode have changed a little.  It used to
+   be that `f' and `b' each sought one second, while `M-f'
+   and `M-b' sought ten seconds.  Here are the new keys:
+
+    - One second: `C-f', `C-b', `F', `B'
+    - Three seconds: `f', `b', `<left>', `<right>'
+    - Ten seconds: `M-f', `M-b', `M-<left>', `M-<right>'
+    - One minute: `C-M-f', `C-M-b'
+
+   Some other keys in this keymap changed as well, but I
+   don't think any of it is worth mentioning.
+
 April 26, 2007
 
  * Playback progress is now shown directly in the playlist
-- 
Daniel Brockman <address@hidden>

reply via email to

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