Xah Emacs Blog Archive 2013-02 to 2013-02

hot keyboard news! Logitech now also makes mechanical keyboard. Buy at amazon

logitech g710plus keyboard
Logitech Mechanical Keyboard for programers

This is the best straight form mechanical keyboard for programers. See the review for my reasons why.

emacs dired tip: hiding some files

learned a new command. In dired, Alt+x dired-do-kill-linesk】 to hide marked files. Amazing. Using dired for over a decade and didn't know this command. This is useful when you Alt+x find-dired to show all subdirs when you want to do dired-do-query-replace-regexp, but some files you don't want to work on.

new to emacs? onto

updated. List of Keyboards with Mechanical Switch

Ducky keyboard and KeyBoardCheer keyboard!

discovered that the Ducky keyboard from Taiwan makes real quality keyboards. Check out their website. I don't think you can easily buy it in USA though. But you might be able to buy from the company's site via oversea shipping. (KBC is also quality.)

ducky channel girls 01
KBC Poker Keyboard, Ducky Keyboard

this gonna be a keyboard week. Lots updates, all about keyboards.

i'll also have lots to say about my new-found-love the Truly Ergonomic Computer Keyboard (TECP). I'll be telling you my experience in adopting the new physical layout.

there are lots new keyboards out there too, including from hushhush and hushhush, won't tell till i write it out.

also, exclusive news, that i'll be writing the firmware for TECP, and tell you how you can help, or sources, etc. For now, just run and buy TECP first. ☺

if you just subscribed to my emacs blog, there's lots existing articles. Do browse around for many tips. After blogging about emacs for 5 years, most generic tips are covered. A good tip is to browse one article a day.

there are still lots of elisp areas i haven't covered and need to learn myself. For example: font system, text overlay, window/frame/buffer manipulation, deep understanding of keymap system, process manipulation, networking, minor mode, lisp macros, comprehensive coverage of emacs's completion system, …, i'll gradually do so in the future. So far, the one elisp area i think i pretty much covered is writing interactive or batch text processing commands/scripts. This is probably the most useful.

also, i am starting to do ask emacs Tuesday again. I found that usually i won't be able to answer questions satisfactorily, because the questions are diverse, and usually not about using emacs or elisp, but rather about best modes for xyz or how to make xyz mode do abc. In anycase, i think it's still good to have ask/answer sessions. So, on every Tuesday, you can ask me on any social network, and i'll try my best to answer.

also, again, if you haven't gotten my tutorial, do buy it, as it'll help me really churn out the deeper elisp parts, and create more useful packages (they are all in ErgoEmacs project repo). Only $5 bucks.

Keyboarding: the Effect of Mechanical Key Switches on You

Programing Challenge: Replace String Pairs

should be fun. This problem started in elisp for me few years ago. Over the years, tried several elisp approaches… but overall i was stung twice. Few weeks ago, found a bug in my code. Rewrote it with a new algorithm thinking it's much better, but bang, another bug. That is, incorrect behavior.

Now i think i have a good solution, but still has certain limitations. So, am posting this as a fun coding problem, pulling on the talent pool.

am posting this as a general programing problem, not specific to emacs lisp. I do have a elisp solution, but can be easily translated to any other lang.

Programing Language Design: Why Lisp Macro Sucks (YMMV very much!)

another keyboard post.

I don't think this is for emacs users, but a fun funky keyboard, with mechanical keys (Cherry MX Black).

Levetron Mech Gaming Keyboard

it uses Cherry MX Black, which is linear but require more force to press. I've tried Cherry MX Black, didn't like it at all.

there's a interesting bit about gaming keyboards. For gaming, many don't like any “click” in key press, because imagine pressing the fire button. You need to press it fast repeatedly, so clicky may not be good.

so, ALMOST ALL gaming keyboards, mechanical switch or not, are designed with linear feel.

in particular, all of Logitech's gaming keyboards (which do not use mechanical switch)

i've tried Logitech keyboard, don't like the key feel at all.

another interesting bit about gaming keyboard is that they are actually the vanguard of keyboard tech. 6 to 20 extra function keys, robust and easy-to-use software for on-the-fly key recording, onboard memory (no need to diddle with AutoHotkey or whatnot xmodmap, wmctrl, xdotool), backlighting, built-in display, all from gaming keyboards.

also, many gaming keyboards do have mechanical keys. I think most uses the Cherry MX Black, but some uses Blue (which is most clicky), or Brown (which is kinda standard for typing). 〔►see Guide to Keyboard Key Switch Mechanisms

update on the Happy Hacking keyboard. I love it not. But you might. Just drew the layout diagram of Happy Hacking Keyboard in SVG. The Idiocy of the Happy Hacking Keyboard

PS if you gonna buy it, buy it from my amazon link!

One of the major developer of xemacs was Ben Wing. He also suffered from severe RSI.

I was not able to find any info about him before, but a friend helped today.

See his linkedin profile at Celebrity Programers with Repetitive Strain Injury

lisp logo latte art
lisp logo latte art. by Yuko Honda of http://geeklatte.com/. (image source, ©)

perm url Lisp Logo Latte Art

just annotated Matz's talk, with links, photos, comments, history. Ruby Creator Matz on How Emacs Changed My Life

xkcd comics workflow emacs
“every change breaks someone's workflow” http://xkcd.com/1172/

updated. Ruby Creator Matz on How Emacs Changed My Life

Emacs Lisp: Python 2to3 Wrapper

Emacs Power Challenge!

another Emacs Power Challenge from jcs. These “emacs golf” problems, seemingly trivial and irrelevant in real world, but is often the most fun way to horn your skills and learn new tricks, which will then burn into your muscle memory and increase your emacs power. Check it out.

EmacsGolf Challenge 2 By Jon Snader. At http://irreal.org/blog/?p=1712

updated. Emacs Lisp Wrapper for Perl/Python/Ruby Scripts

you can use emacs lisp as a command line script just like Ruby, Python, Perl. Here's how to: Emacs Lisp: Get Command Line Arguments.

𝔉𝔬𝔯 𝔞 𝔩𝔦𝔱𝔱𝔩𝔢 𝔣𝔲𝔫 𝔱𝔬𝔡𝔞𝔶, 𝔦 𝔴𝔯𝔬𝔱𝔢 “𝔯𝔢𝔭𝔩𝔞𝔠𝔢-𝔩𝔞𝔱𝔦𝔫-𝔞𝔩𝔭𝔥𝔞𝔟𝔢𝔱-𝔱𝔬-𝔤𝔬𝔱𝔥𝔦𝔠”. 𝔗𝔥𝔦𝔰 𝔴𝔦𝔩𝔩 𝔯𝔢𝔭𝔩𝔞𝔠𝔢 𝔞𝔩𝔩 𝔈𝔫𝔤𝔩𝔦𝔰𝔥 𝔞𝔩𝔭𝔥𝔞𝔟𝔢𝔱 𝔟𝔶 𝔊𝔬𝔱𝔥𝔦𝔠 𝔳𝔢𝔯𝔰𝔦𝔬𝔫 (𝔞𝔨𝔞 𝔅𝔩𝔞𝔠𝔨𝔩𝔢𝔱𝔱𝔢𝔯, 𝔉𝔯𝔞𝔨𝔱𝔲𝔯) 𝔱𝔥𝔞𝔱'𝔰 𝔞𝔳𝔞𝔦𝔩𝔞𝔟𝔩𝔢 𝔦𝔫 𝔘𝔫𝔦𝔠𝔬𝔡𝔢 𝔞𝔰 𝔠𝔥𝔞𝔯𝔞𝔠𝔱𝔢𝔯𝔰. ℌ𝔢𝔯𝔢'𝔰 𝔱𝔥𝔢 𝔠𝔬𝔡𝔢. 𝔗𝔥𝔬𝔲 𝔖𝔥𝔞𝔩𝔱 𝔘𝔰𝔢 𝔈𝔪𝔞𝔠𝔰 𝔏𝔦𝔰𝔭 Convert Latin Alphabet to Gothic

for Linux users. Emacs: Sync Copy/Paste Clipboards with Linux X11

tangential to emacs. aspell's Dismal Vocabulary Size

bottom line: add words to your aspell.

might be useful to emacsers. In Linux, sync X11 primary selection with clipboard, so you can copy/paste by both mouth and hand in unison. Linux: Commands Related to GUI Apps

also note, in emacs 24, a change is made to how emacs handle X11 copy/paste mechanism, so its more compatible with the rest Linux apps. see: Emacs 24.1 New Features (released 2012-06)

Control Key and Capslock Key Positions in Old Keyboards

Emacs: Clean Empty Lines

when doing git push to github in shell inside emacs, it prints the password you typed.

Username for 'https://github.com': xahlee
Password for 'https://xahlee@github.com': 123456

not sure who to blame here.

normally, typed password isn't shown in the clear. But am not sure how emacs detect that. Anyone knows?

every now and then, people will ask what's the best keyboard for emacs. I thought i'll start a article dedicated to that. Best Keyboard for Emacs

updated. Why Emacs's Keyboard Shortcuts are Painful

geek vs non geek repetitive tasks
geek vs non-geek repetitive tasks

you can run emacs lisp as executable script from command line, just like other languages.

Emacs Lisp Idioms for Text Processing in Batch Style

Emacs Lisp: Get universal-argument

emacs golf at Irreal

jcs over at Irreal is thinking of starting a blog or website dedicated to “emacs golf”. I submitted a problem and Jon wrote about it.

See: 〔 A First Emacs Challenge By Jon Snader. At http://irreal.org/blog/?p=1689

What approach would you take?

Emacs Lisp: Command to Extract URL

emacs: ido-mode open file tricks

learned a new trick in ido-mode. When Alt+x ido-find-file, you can use and to go to prev/next subdir. Here's a summary.

not sure what's ido-mode? See:

Emacs on Linux vs Windows

if you work between Microsoft Windows and Linux, this might be interesting to you. Linux: Speed Comparison: Linux Perl vs Cygwin Perl vs Strawberry Perl vs ext4 vs NTFS. (The Price You Pay for Layers and Emulations)

emacs on Microsoft Windows is much inferior when compared to Linux version. Here's quick list.

We try to fixed many of these in ErgoEmacs, but still, many just can't be fixed.

elisp tip. You can call apropos-value to search a string in emacs variables.

more update. Emacs: Move Cursor to Bracket/Quote If you have used the functions there in your init, you might want to update too.

Emacs users typically spit on mouse. Still, you need a mouse or similar device, because it is the best device for browsing web, or manipulating 3D objects. What interesting ones do you use?

Updated. Best Trackball Mouse

learned that the ⌘ command key and ❖ Window are really identical in keyboard hardware. They send out the same scancode. Similarly, ⌥ option and Alt are identical. Updated: Difference Between Apple and PC keyboards

Just send off new version of emacs tutorial. Thank you for support.

If you like it, please tell friends.

If you bought my tutorial but isn't on the mailing list, please email me (xah@xahlee.org). Or, if you want to be taken off the list, just reply with “unsubscribe”. It'll be send out at most once a month.

If you haven't bought, buy it here: Buy Xah Emacs Tutorial. Ask me if you have questions.

updated. How to Avoid the Emacs Pinky Problem