From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pjb@informatimago.com (Pascal J. Bourguignon) Newsgroups: gmane.emacs.help Subject: Re: complete list of keybindings Date: Wed, 12 Aug 2009 01:17:51 +0200 Organization: Informatimago Message-ID: <87ws5a2b4w.fsf@galatea.local> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250034141 3393 80.91.229.12 (11 Aug 2009 23:42:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Aug 2009 23:42:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 12 01:42:14 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mb0yq-0006pA-PV for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Aug 2009 01:42:13 +0200 Original-Received: from localhost ([127.0.0.1]:35419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mb0yp-0001or-4L for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Aug 2009 19:42:11 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 63 Original-X-Trace: individual.net Sc9+qhrc+QqsSUJaxW4YfwlRnIeQQzKu8X9tXxxt7iIIVQU0Zb Cancel-Lock: sha1:YzJlYmM4ZmY5MTJkY2ZhZDUzZjcyZTkxOTU0NzA3YjdjMjRhOWRkYQ== sha1:Zr1aMtA5R6aSRoxIY48AnhWP+hw= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin) Original-Xref: news.stanford.edu gnu.emacs.help:171890 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67065 Archived-At: Brendan Miller 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__