From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Emacs command frequencies: [was: emacs-w3m question] Date: Tue, 11 Nov 2008 21:46:21 +0000 Message-ID: <20081111214621.GB1459@muc.de> References: <74160b46-e541-436a-a776-c8bd53d6cd55@o4g2000pra.googlegroups.com> <1f28a20e-0c9f-4478-a85c-27ae40ed7fc9@v16g2000prc.googlegroups.com> <4d476218-bd76-4d41-8a12-1428dfba9e9b@s9g2000prg.googlegroups.com> <1226211980.88912@nntp.acecape.com> <7a377b0d-9a02-4cd9-947a-8f04676fad8c@z28g2000prd.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Q68bSM7Ycu6FN28Q" Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1226439603 22059 80.91.229.12 (11 Nov 2008 21:40:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Nov 2008 21:40:03 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Xah Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 11 22:41:03 2008 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 1L00yg-0006ZR-9Y for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Nov 2008 22:40:55 +0100 Original-Received: from localhost ([127.0.0.1]:34024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L00xO-0005yW-64 for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Nov 2008 16:39:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L00st-0004mm-3l for help-gnu-emacs@gnu.org; Tue, 11 Nov 2008 16:34:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L00sq-0004ju-6M for help-gnu-emacs@gnu.org; Tue, 11 Nov 2008 16:34:49 -0500 Original-Received: from [199.232.76.173] (port=54963 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L00sp-0004ja-6d for help-gnu-emacs@gnu.org; Tue, 11 Nov 2008 16:34:47 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:4873 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L00so-0001yN-CP for help-gnu-emacs@gnu.org; Tue, 11 Nov 2008 16:34:46 -0500 Original-Received: (qmail 98022 invoked by uid 3782); 11 Nov 2008 21:34:39 -0000 Original-Received: from acm.muc.de (pD9E51E0D.dip.t-dialin.net [217.229.30.13]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Tue, 11 Nov 2008 22:34:37 +0100 Original-Received: (qmail 12408 invoked by uid 1000); 11 Nov 2008 21:46:21 -0000 Content-Disposition: inline In-Reply-To: <7a377b0d-9a02-4cd9-947a-8f04676fad8c@z28g2000prd.googlegroups.com> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 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:59667 Archived-At: --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi, Xah! On Mon, Nov 10, 2008 at 02:38:24PM -0800, Xah wrote: > also note, when i did research on emacs command frequency, one > surprising result is that a programer types shortcuts more than he > actually type letters. Not _quite_ true from my afternoon session! See below, or the attached file. I was into a heavy edebugging session (the utility recorded hardly any of these commands; presumably, edebug nullified the hook, somehow), and writing a log of this activity at the same time. However, I used frame switching commands 114 times, putting them into fifth place. This quite surprised me. > Of my Emacs Commands Frequency study, 37% of key strokes involves data > entry (that is, calling the commands ???self-insert-command??? and > ???newline??? (pressing return), while the rest 63% are calling all other > commands. This seems counter-intuitive, because one might think typing > should probably be the bulk of activity and moving cursor and deleting > text or other commands are only done few times per minute. You should perhaps include `newline-and-indent' (C-j) in this category too. > If we consider commands invoked by the Backspace key as data entry > too, then 40% are data entry, while 60% are editing commands. Still > surprising. Going one step further, if we consider the next group of > most used commands of moving the cursor by the smallest unit (i.e. > previous-line (C-p), next-line (C-n), backward-char (C-b), forward- > char (C-f) (also invoked by the arrow keys)) as part of data entry, > then, 64% are ???data entry??? and 36% are other command calls. > This data suggests that better shortcut placement is more important > than better placement of letter keys for programing. > » > -------------------- > if you are interested to find out your own pattern of emacs command > use, you can try the lisp file at the bottom of this page: > http://xahlee.org/emacs/command-frequency.html > If you can send me your result, that'll be great. > Alan, you are very welcome to send me your result too. Thanks! Please see the attached file. > Xah -- Alan Mackenzie (Nuremberg, Germany). --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="Alan_Mackenzie_command-frequencies.txt" 1680 53.00% self-insert-command 256 8.08% forward-char 182 5.74% next-line 140 4.42% previous-line 89 2.81% backward-char 43 1.36% scrolldown-6n 42 1.32% delete-backward-char 38 1.20% backward-kill-word 38 1.20% (lambda nil Switch to frame F2 (interactive) (select-frame-acm-no 1)) 37 1.17% previous-history-element 36 1.14% c-show-syntactic-information 32 1.01% (lambda nil Switch to frame F3 (interactive) (select-frame-acm-no 2)) 31 0.98% minibuffer-complete 29 0.91% (lambda nil Switch to frame F1 (interactive) (select-frame-acm-no 0)) 25 0.79% isearch-printing-char 23 0.73% scrollup-6n 21 0.66% execute-extended-command 18 0.57% previous-line-6n 18 0.57% newline 17 0.54% delete-char 16 0.50% forward-word 16 0.50% new-para-paren-list-o 15 0.47% set-mark-command 15 0.47% end-of-line 13 0.41% acm-text-mode-fixme 12 0.38% other-window 12 0.38% switch-to-buffer 11 0.35% scroll-down 11 0.35% save-buffer 11 0.35% next-line-6n 10 0.32% top-level 10 0.32% imenu 10 0.32% eval-expression 10 0.32% kill-buffer 8 0.25% find-alternate-file 8 0.25% kill-line 8 0.25% fill-paragraph 8 0.25% isearch-repeat-forward 7 0.22% isearch-repeat-backward 7 0.22% undo 6 0.19% do-one-test 6 0.19% occur 6 0.19% load-cc-version 5 0.16% back-to-indentation 4 0.13% goto-line 4 0.13% find-file-other-window 4 0.13% (lambda nil Switch to frame F5 (interactive) (select-frame-acm-no 4)) 4 0.13% scrollup-n 4 0.13% compile-defun 4 0.13% (lambda nil Switch to frame F4 (interactive) (select-frame-acm-no 3)) 4 0.13% eval-defun 4 0.13% edebug-continue-mode 4 0.13% emphasise-line 4 0.13% switch-to-buffer-other-window 4 0.13% yank 4 0.13% end-of-buffer 3 0.09% widen 3 0.09% narrow-to-defun 3 0.09% lisp-complete-symbol 3 0.09% c++-mode 3 0.09% delete-other-windows 3 0.09% isearch-delete-char 3 0.09% kill-ring-save 2 0.06% ediff-buffers 2 0.06% next-history-element 2 0.06% defun-name 2 0.06% (lambda nil Switch to frame F8 (interactive) (select-frame-acm-no 7)) 2 0.06% (lambda nil Switch to frame F7 (interactive) (select-frame-acm-no 6)) 2 0.06% (lambda nil Switch to frame F6 (interactive) (select-frame-acm-no 5)) 2 0.06% kill-sentence 2 0.06% load-file 2 0.06% byte-compile-file 2 0.06% lisp-indent-line 2 0.06% backward-word 2 0.06% kill-word 2 0.06% next-error 2 0.06% isearch-other-meta-char 2 0.06% isearch-forward 2 0.06% edebug-goto-here 2 0.06% move-beginning-of-line 2 0.06% mark-sexp 2 0.06% acm-text-mode-back-to-bug-label 1 0.03% (lambda nil Switch to frame F9 (interactive) (select-frame-acm-no 8)) 1 0.03% ediff-quit 1 0.03% minibuffer-complete-and-exit 1 0.03% beginning-of-defun 1 0.03% scroll-up 1 0.03% narrow-to-region 1 0.03% move-end-of-line 1 0.03% exchange-point-and-mark 1 0.03% delete-blank-lines 1 0.03% kill-paragraph 1 0.03% c-version 1 0.03% isearch-yank-word-or-char 1 0.03% isearch-backward 1 0.03% ignore 1 0.03% delete-horizontal-space 1 0.03% backward-kill-sexp 1 0.03% toggle-read-only 1 0.03% kill-sexp 1 0.03% eval-buffer 1 0.03% Info-nth-menu-item 1 0.03% Info-follow-nearest-node 1 0.03% isearch-exit 1 0.03% beginning-of-buffer 1 0.03% just-one-space 1 0.03% list-buffers 1 0.03% beginning-of-line 1 0.03% command-frequency-mode --Q68bSM7Ycu6FN28Q--