all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* complete list of keybindings
@ 2009-08-11 22:54 Brendan Miller
  2009-08-11 23:08 ` Lennart Borgman
  2009-08-11 23:11 ` Drew Adams
  0 siblings, 2 replies; 8+ messages in thread
From: Brendan Miller @ 2009-08-11 22:54 UTC (permalink / raw)
  To: help-gnu-emacs

Is there a complete list of keybindings somewhere, or a way to force
emacs to give me a discription of every keybinding currently active?

There's a lot of different partial lists online, but I want a complete list.




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

* Re: complete list of keybindings
  2009-08-11 22:54 Brendan Miller
@ 2009-08-11 23:08 ` Lennart Borgman
  2009-08-11 23:11 ` Drew Adams
  1 sibling, 0 replies; 8+ messages in thread
From: Lennart Borgman @ 2009-08-11 23:08 UTC (permalink / raw)
  To: Brendan Miller; +Cc: help-gnu-emacs

All the lists on line must be for a specific situation in Emacs. None
of them is necessarily valid for your Emacs. They could be valid for
an emacs started with "emacs -Q" but then they should say so and
explain that, at least if they want to be helpful.

But inside Emacs you can get a list valid for you. Try

   f1 b

And please complain about it if you do not understand it. It is
supposed to be helpful, but I myself does not think it is very good.
(You can send a bug report for this. That is the accepted way.)



On Wed, Aug 12, 2009 at 12:54 AM, Brendan Miller<catphive@catphive.net> wrote:
> Is there a complete list of keybindings somewhere, or a way to force
> emacs to give me a discription of every keybinding currently active?
>
> There's a lot of different partial lists online, but I want a complete list.
>
>
>




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

* RE: complete list of keybindings
  2009-08-11 22:54 Brendan Miller
  2009-08-11 23:08 ` Lennart Borgman
@ 2009-08-11 23:11 ` Drew Adams
  1 sibling, 0 replies; 8+ messages in thread
From: Drew Adams @ 2009-08-11 23:11 UTC (permalink / raw)
  To: 'Brendan Miller', help-gnu-emacs

> Is there a complete list of keybindings somewhere, or a way to force
> emacs to give me a discription of every keybinding currently active?
> 
> There's a lot of different partial lists online, but I want a 
> complete list.

Do you mean across all possible Emacs modes? No. (That way lies madness...)

But you can see all of the keybindings current at any given time (e.g. in any
mode), by just hitting `C-h b' (describe-bindings).

Well, almost all - menu items are excluded. But everything else is there,
including mouse-button bindings.





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

* Re: complete list of keybindings
       [not found] <mailman.4425.1250031270.2239.help-gnu-emacs@gnu.org>
@ 2009-08-11 23:17 ` Pascal J. Bourguignon
  2009-08-11 23:47   ` Lennart Borgman
       [not found]   ` <mailman.4430.1250034465.2239.help-gnu-emacs@gnu.org>
  2009-08-12  5:30 ` Teemu Likonen
  1 sibling, 2 replies; 8+ messages in thread
From: Pascal J. Bourguignon @ 2009-08-11 23:17 UTC (permalink / raw)
  To: help-gnu-emacs

Brendan Miller <catphive@catphive.net> writes:

> Is there a complete list of keybindings somewhere, or a way to force
> emacs to give me a discription of every keybinding currently active?
>
> There's a lot of different partial lists online, but I want a complete list.

You will have to build the complete list yourself, because it is
different for each user.  You may change the key bindings at will.

And even, the following code is not entirely correct, since it doesn't
take into account the various modes, which may overload the same key
chords.


(defmacro rloop (clauses &rest body)
  (if (null clauses)
      `(progn ,@body)
      `(loop ,@(car clauses) do (rloop ,(cdr clauses) ,@body))))

(defun all-bindings ()
  (interactive)
  (message "all-bindings: wait a few seconds please...")
  (let ((data
         (with-output-to-string
             (let ((bindings '()))
               (rloop ((for C in '("" "C-"))       ; Control
                       (for M in '("" "M-"))       ; Meta
                       (for A in '("" "A-"))       ; Alt
                       (for S in '("" "S-"))       ; Shift
                       (for H in '("" "H-"))       ; Hyper
                       (for s in '("" "s-"))       ; super
                       (for x from 32 to 127))
                      (let* ((k (format "%s%s%s%s%s%s%c" C M A S H s x))
                             (key (ignore-errors (read-kbd-macro k))))
                        (when key
                          (push
                           (list k
                                 (format "%-12s  %-12s  %S\n" k key
                                         (or
                                          ;; (string-key-binding key)
                                          ;; What is this string-key-binding?
                                          (key-binding key))))
                           bindings))))
               (dolist (item
                         (sort bindings
                               (lambda (a b)
                                 (or (< (length (first a))
                                        (length (first b)))
                                     (and (= (length (first a))
                                             (length (first b)))
                                          (string< (first a)
                                                   (first b)))))))
                 (princ (second item)))))))  
    (switch-to-buffer (format "Keybindings in %s" (buffer-name)))
    (erase-buffer)
    (insert data)
    (goto-char (point-min))
    (values)))


-- 
__Pascal Bourguignon__


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

* Re: complete list of keybindings
  2009-08-11 23:17 ` complete list of keybindings Pascal J. Bourguignon
@ 2009-08-11 23:47   ` Lennart Borgman
       [not found]   ` <mailman.4430.1250034465.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Lennart Borgman @ 2009-08-11 23:47 UTC (permalink / raw)
  To: Pascal J. Bourguignon; +Cc: help-gnu-emacs

Does this really catch longer key bindings? And chars above 127?


> (defmacro rloop (clauses &rest body)
>  (if (null clauses)
>      `(progn ,@body)
>      `(loop ,@(car clauses) do (rloop ,(cdr clauses) ,@body))))
>
> (defun all-bindings ()
>  (interactive)
>  (message "all-bindings: wait a few seconds please...")
>  (let ((data
>         (with-output-to-string
>             (let ((bindings '()))
>               (rloop ((for C in '("" "C-"))       ; Control
>                       (for M in '("" "M-"))       ; Meta
>                       (for A in '("" "A-"))       ; Alt
>                       (for S in '("" "S-"))       ; Shift
>                       (for H in '("" "H-"))       ; Hyper
>                       (for s in '("" "s-"))       ; super
>                       (for x from 32 to 127))
>                      (let* ((k (format "%s%s%s%s%s%s%c" C M A S H s x))
>                             (key (ignore-errors (read-kbd-macro k))))
>                        (when key
>                          (push
>                           (list k
>                                 (format "%-12s  %-12s  %S\n" k key
>                                         (or
>                                          ;; (string-key-binding key)
>                                          ;; What is this string-key-binding?
>                                          (key-binding key))))
>                           bindings))))
>               (dolist (item
>                         (sort bindings
>                               (lambda (a b)
>                                 (or (< (length (first a))
>                                        (length (first b)))
>                                     (and (= (length (first a))
>                                             (length (first b)))
>                                          (string< (first a)
>                                                   (first b)))))))
>                 (princ (second item)))))))
>    (switch-to-buffer (format "Keybindings in %s" (buffer-name)))
>    (erase-buffer)
>    (insert data)
>    (goto-char (point-min))
>    (values)))
>
>
> --
> __Pascal Bourguignon__
>

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

* Re: complete list of keybindings
       [not found]   ` <mailman.4430.1250034465.2239.help-gnu-emacs@gnu.org>
@ 2009-08-12  2:12     ` Pascal J. Bourguignon
  0 siblings, 0 replies; 8+ messages in thread
From: Pascal J. Bourguignon @ 2009-08-12  2:12 UTC (permalink / raw)
  To: help-gnu-emacs

Lennart Borgman <lennart.borgman@gmail.com> writes:

> Does this really catch longer key bindings? 

No, for prefixes,  it just write the prefix handling function, or
print the keymap.  (that's why there's no specific processing for the
various mode variants).  You may improve it and send me a patch ;-)


> And chars above 127?

Read the source!

It says "to 127" right there!

Scanning the while unicode would be even slower.  Well, we could skip
inserting lines form unbound keys, this is where the time is spent
actually.


>> (defmacro rloop (clauses &rest body)
>>  (if (null clauses)
>>      `(progn ,@body)
>>      `(loop ,@(car clauses) do (rloop ,(cdr clauses) ,@body))))
>>
>> (defun all-bindings ()
>>  (interactive)
>>  (message "all-bindings: wait a few seconds please...")
>>  (let ((data
>>         (with-output-to-string
>>             (let ((bindings '()))
>>               (rloop ((for C in '("" "C-"))       ; Control
>>                       (for M in '("" "M-"))       ; Meta
>>                       (for A in '("" "A-"))       ; Alt
>>                       (for S in '("" "S-"))       ; Shift
>>                       (for H in '("" "H-"))       ; Hyper
>>                       (for s in '("" "s-"))       ; super
>>                       (for x from 32 to 127))
>>                      (let* ((k (format "%s%s%s%s%s%s%c" C M A S H s x))
>>                             (key (ignore-errors (read-kbd-macro k))))
>>                        (when key
>>                          (push
>>                           (list k
>>                                 (format "%-12s  %-12s  %S\n" k key
>>                                         (or
>>                                          ;; (string-key-binding key)
>>                                          ;; What is this string-key-binding?
>>                                          (key-binding key))))
>>                           bindings))))
>>               (dolist (item
>>                         (sort bindings
>>                               (lambda (a b)
>>                                 (or (< (length (first a))
>>                                        (length (first b)))
>>                                     (and (= (length (first a))
>>                                             (length (first b)))
>>                                          (string< (first a)
>>                                                   (first b)))))))
>>                 (princ (second item)))))))
>>    (switch-to-buffer (format "Keybindings in %s" (buffer-name)))
>>    (erase-buffer)
>>    (insert data)
>>    (goto-char (point-min))
>>    (values)))

-- 
__Pascal Bourguignon__


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

* Re: complete list of keybindings
       [not found] <mailman.4425.1250031270.2239.help-gnu-emacs@gnu.org>
  2009-08-11 23:17 ` complete list of keybindings Pascal J. Bourguignon
@ 2009-08-12  5:30 ` Teemu Likonen
  2009-08-13 22:29   ` Brendan Miller
  1 sibling, 1 reply; 8+ messages in thread
From: Teemu Likonen @ 2009-08-12  5:30 UTC (permalink / raw)
  To: help-gnu-emacs

On 2009-08-11 15:54 (-0700), Brendan Miller wrote:
> Is there a complete list of keybindings somewhere, or a way to force
> emacs to give me a discription of every keybinding currently active?
>
> There's a lot of different partial lists online, but I want a complete list.

Is "C-h b" partial or complete in your opinion? It gives the list of
keybindings which are active in the current buffer. Some bindings are
global and some are local to major mode (C-c C-<letter>, in particular).


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

* Re: complete list of keybindings
  2009-08-12  5:30 ` Teemu Likonen
@ 2009-08-13 22:29   ` Brendan Miller
  0 siblings, 0 replies; 8+ messages in thread
From: Brendan Miller @ 2009-08-13 22:29 UTC (permalink / raw)
  To: Teemu Likonen; +Cc: help-gnu-emacs

On Tue, Aug 11, 2009 at 10:30 PM, Teemu Likonen<tlikonen@iki.fi> wrote:
> Is "C-h b" partial or complete in your opinion? It gives the list of
> keybindings which are active in the current buffer. Some bindings are
> global and some are local to major mode (C-c C-<letter>, in particular).
>
Thanks, that's what I was looking for.




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

end of thread, other threads:[~2009-08-13 22:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.4425.1250031270.2239.help-gnu-emacs@gnu.org>
2009-08-11 23:17 ` complete list of keybindings Pascal J. Bourguignon
2009-08-11 23:47   ` Lennart Borgman
     [not found]   ` <mailman.4430.1250034465.2239.help-gnu-emacs@gnu.org>
2009-08-12  2:12     ` Pascal J. Bourguignon
2009-08-12  5:30 ` Teemu Likonen
2009-08-13 22:29   ` Brendan Miller
2009-08-11 22:54 Brendan Miller
2009-08-11 23:08 ` Lennart Borgman
2009-08-11 23:11 ` 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.