From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: What's your favourite *under_publicized* editing feature ofEmacs? Date: Tue, 22 Feb 2011 06:49:14 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <1578157c-17a0-41ea-9420-9330f68b10fe@glegroupsg2000goo.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1298389254 30074 80.91.229.12 (22 Feb 2011 15:40:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Feb 2011 15:40:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 22 16:40:50 2011 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.69) (envelope-from ) id 1PruM0-00010P-JP for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Feb 2011 16:40:44 +0100 Original-Received: from localhost ([127.0.0.1]:53453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PruLu-0001JU-Ie for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Feb 2011 10:40:38 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!l22g2000pre.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs,comp.lang.lisp Original-Lines: 227 Original-NNTP-Posting-Host: 76.126.112.84 Original-X-Trace: posting.google.com 1298386155 10564 127.0.0.1 (22 Feb 2011 14:49:15 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 22 Feb 2011 14:49:15 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l22g2000pre.googlegroups.com; posting-host=76.126.112.84; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13, gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:185165 comp.emacs:101074 comp.lang.lisp:299815 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:79327 Archived-At: On Jan 28, 10:25=C2=A0am, "Drew Adams" wrote: > > Or use what is already there since 23.1: > > runs the command kmacro-start-macro-or-insert-counter... > > runs the command kmacro-end-or-call-macro... > > It's unfortunate however that two repeatable keys were wasted for these d= efault > bindings. =C2=A0Repeatable keys are better reserved for operations that y= ou want to > easily repeat by just holding down a key or chord. > > Yes, you can use `f4' for both ending a macro definition and executing th= e > macro, and the latter operation is repeatable. =C2=A0Still, it is better = to use a > repeatable suffix on a prefix key for this, e.g. `C-x e e e...' (which yo= u can > already use as an alternative to `f4 f4 f4...'). =C2=A0Single repeatable = keys are a > valuable resource and should not be wasted. > > `f3' and `f4' also do not offer mnemonic help. > > Consider by contrast the keys bound to `kmacro-start-macro' and > `kmacro-end-macro': `C-x (' and `C-x )'. =C2=A0Those bindings were made d= ecades ago > (to the parents of the current commands: `start-kbd-macro' and `end-kbd-m= acro'). > They are mnemonic, visually indicating start and end, and they are not ea= sily > repeatable by holding keys down. =C2=A0Start/end have no need to be repea= table. totally agree with Drew Adam here. i also like add a point about why i think f3 f4 is bad. (maybe Drew agree too or maybe not) f3 and f4 is one of those easy-to-press keys: single key, big key, in easy-to-access positions. These type of keys are rare. (in the sense that you have some 10 times more commands you want to have easy key in emacs) in my quite painstaking research about all aspects of keyboard in the past few years, i came to this one single most important principle: most frequently used command needs to go to most easy to press key spots. all other keybinding considerations, such as ease-to-remember, logical placement with similar commands, are in comparsion almost unimportant. in this regard, f3 and f4 are bad keys for kmacro-start-macro and kmacro-end-macro. > In the past Emacs also used the similar keys `C-x [' and `C-x ]' for gene= rating > the corresponding Emacs-Lisp code while defining a keyboard macro. =C2=A0= I don't > recall whether those keys were in Gnu Emacs or some other Emacs from days= of > yore. =C2=A0The point is that here too mnemonic start/end keys were used,= and no > repeatable keys/chords were wasted gratuitously. =C2=A0(Yes, it is also t= rue that > natural pairs such as () [] \/ and <> are rare and should be used judicio= usly.) > > There was some discussion back in 2002 about wasting `f3' and `f4' for th= is. =C2=A0At > first (with no discussion AFAICT), `f7' and `f8' were implemented for it = - same > problems obviously. =C2=A0A user pointed out that function keys `f5' to `= f9' are > supposed to be reserved for users to bind, so the macro commands got move= d to > `f3' and `f4'. > > What was the main argument for binding kmacro commands to such keys? =C2= =A0"I need to > bind them to two adjacent function keys" and "it makes a nice interface t= o have > this on two function keys next to each other". =C2=A0Which is no reason a= t all (why > do they need to be adjacent? why do they need to be on function keys?). > > The other arguments given in support of wasting `f3|4' for this: (a) "I d= on't > see why we should hide an excellent feature like keyboard macros", (b) ke= ys like > `C-x (' are "way too cumbersome" for defining a macro, and (c) "I really = don't > understand why binding function keys by default is worth making a fuzz ab= out". > > (b) is the most misguided of these: you don't need a quick, repeatable ke= y just > to turn on/off keyboard recording. =C2=A0Use easily repeatable keys for r= epeatable > operations (incremental changes, cycling, etc.), and use keys that are a = bit > more cumbersome for one-off operations such as on/off, start/end. > > To their credit, Stefan and Miles argued against using function keys for = this, > but with no success. =C2=A0This was the last word, from RMS: > > "I think there is no harm in supporting F3 and F4 as well as > C-x (, C-x ) and C-x e and C-x C-k, if users like F3 and F4. > We could take a poll and ask them." > > AFAIK no poll was ever taken. > > Although Stefan's suggestion to use `C-x e e e...' to repeat macro execut= ion was > also implemented, `f3' and `f4' remain bound by default, and `C-x e e e..= .' took > a back seat in the doc (and consequently in practice, no doubt), seemingl= y as an > afterthought. =C2=A0There isn't even any mention of the `C-x e' option > `kmacro-call-repeat-key'. > > http://lists.gnu.org/archive/html/emacs-devel/2002-08/msg00760.html again, i agree with what Drew wrote above. i think the other oddity is F1 for help. Is that due to Windows influence? I think one of the F key should be execute-extended-command. PS offkey but i really love to remark: i use my own ErgoEmacs binding set of course, which completely remap all the primary keys based on command frequency. On top of that, i have over a hundred more personal emacs keyboard shortcuts, and a hundred more outside of emacs. (on Windows, that's AutoHotkey) Also note, sometime i read online (e.g. reddit, hackernews) that people remark that my use or teaching of emacs is like from Windoz Notebook newb. Actually, the first 6 years of my emacs using, from 1998 to 2004, is in plain old text terminals (not even XTerm), and absolutely traditional emacs keybinding. I even avoid adding anything to my =E2=80=9C.emacs=E2=80=9D. (have written amply a= bout this on my site or if one care to research past posts on the net) ... a bit more about keybinding. In the past 3 or so years, due to my obsession of keyboarding efficiency, by steps of piecemeal improvement of my emacs use by *practical* experiences (with emphasis on statistics and science basis as opposed to =E2=80=9Ci feel=E2=80=9D or anec= dotes), i realized that i've eliminated all keys that require multi-sequences. A few months ago, the last one to go was kill-rectangle =E3=80=90C-x r k=E3= =80=91 and string-rectangle =E3=80=90C-x r t=E3=80=91. They are now =E3=80=90C-8=E3=80= =91 and =E3=80=90C-9=E3=80=91. (actually, there are still exceptions. =CE=99 still haven't remapped =E3=80=90C-h f=E3=80=91, =E3=80=90C-h k=E3=80=91, which i use few times a h= our on average. Also, still use =E3=80=90C-x (=E3=80=91 and =E3=80=90C-x )=E3=80=91 perhaps few times a= week. Actually a few more.. especially mode specific that starts with =E3=80=90C-c=E3=80=91.) in the past 6 months, i started to wonder if vi's so-called =E2=80=9Cmodal= =E2=80=9D way is actually more efficient. Am certain of it now. I think it is un- avoidable that sometimes soon i'll be creating a ErgoEmacs-Viper mode, due to my keyboarding obsession. also, you know i live among tech geeker communities. The internet is my home. My life. And among tech geekers, y'know how harsh it is, that there's always someone who know more than you, and often not shy to show it. On the net, you often hear linux or emacs geeks brag about they keyboarding habits n setups, such as some ratpoison or haskell based tiling windows etc. (n they not shy to tell you about it, and tell you how you should do it this or that way with this or that tools) I tell you now, and you can quote me on this: i don't care what linux you on, what ratpoison you use, whot X11 xmodmap you've done, how extensive your customization is, how many years of emacs you've been using: my setup n system, is more efficient than you, by any means of scientific accessment. AND: i don't care if you are richard stallman or old time emacs dev. The total time i spend in emacs, in past 3 years, is more than you have. (if you think you can challenge that, first ask ur self if you LITERALLY spend 14 hours in front of the computer DAILY on average in the past 3 years, STATISTICALLY speaking. If not, forget it. If you have a family, forget it. If you watch TV, go out to dinner, or occasionally go to bar or social events such as movies or bar etc, forget it. If you work in a day job (with meetings, time spend on driving, etc), forget it. If you take shower daily, take time to cook diner, or go to gym, forget it. If you hang out with friends, or chat with room-mates, forget it. Now, if you are city hermit, a ascetic, a extreme weirdo, like me, then, possibly we can compare notes. Otherwise, you can forget about challenging me on things i say forcefully.) (the above paragraph speaks of last 3 years. But the pattern is about the same for past 20 years, just more severe in past 3.) with respect to emacs keybinding, emacs should completely ditch the C- x. Not by simply turn on cua-mode, but re-write the entire shit, axe the cua-mode hack. Stop the C-m C-i to Enter Tab equivalences. Support the 7 or so standard keys such as Open, Close, Copy, Paste. Re-design the whole major shortcut keys (e.g. cursor movement, text deletion.) (adopt my ErgoEmacs keybinding design if u want.) This will not only make emacs compatible to current standards (e.g. for those Windows newbs we love to hate), but also much more efficient for the most hard- core tech geekers (e.g. what u'd call =E2=80=9Chackers=E2=80=9D such as man= y here). for each point i made in this post, i have written a essay with hundreds words details. They are all on my website. I shall not make any links here. Also, a disclaimer: i claim exactly what i've written as they can be reasonably interpreted. With all the bragging, i do not claim, for example, that i know more elisp than many here, nor that i'm a better programer, etc. i guess it is old school netiquette that when flaming is over, one makes a note of it. But no, the bragging has only began! No U! It's Me! Xah =E2=88=91 http://xahlee.org/