Xah Emacs Blog Archive 2010-06
interview with Eric Ludlam (CEDET) By Dirk-Jan C Binnema. At emacs-fu.blogspot.com
Thanks to John Kumpf for donation!
Please subscribe, and YOU, donate! Or, please link from your blog. Thank you for YOUR support!
In dired and Bookmark, you can use mouse click to open a file. But ibuffer, it marks the file instead. Here's how to fix it. Put the following in your emacs init file:
(defun xah-ibuffer-keys () "Modify keymaps used by `ibuffer'." (local-set-key (kbd "<down-mouse-1>") 'ibuffer-visit-buffer-other-window) ) (add-hook 'ibuffer-hook 'xah-ibuffer-keys)
Select the above code, then
eval-region, or restart emacs.
This will make the mouse click open the file into a split pane. What
if you want to open the file without splitting the window? Hint: find
out the function name for opening the file in ibuffer. (use
Created the emacs manual mirror, with better CSS and HTML, at http://xahlee.org/emacs_manual/emacs/index.html.
The emacs manual is pretty bad today. Too much fat. See: Problems of Emacs Manual.
There are about 690 pages. If i spend 30 min to edit 5 pages a day, that'll take 138 days, or 4.6 months. Maybe that's what i'll do. That will be 69 hours of work.
If you like to support the site, please paylpal donate (to xah @ xahlee.org), and i'll send you my complete tutorial, plus emacs and elisp manuals. Link is also much appreciated. Thanks.
Am thinking of starting a emacs community. Please read here
and post comment to let me know what you think.
PS thanks to Steven Mitchell for donation!
Difference Between Emacs's “(getenv PATH)” and “exec-path”.
Emacs: Abbrev Mode
Using Emacs's “Dired Plus” Mode (very nice package!)
A survey of efficient keyboard layouts: Alternative Keyboard Layouts.
Also, thanks to Xavier Gomes Pinho's message that is a result of a lot study, ErgoEmacs Keybinding will support the “br-navito” layout (for Portuguese) soon.
Another little underused tip.
Emacs: Batch Rename Files
Little very useful tip i think is underused.
Press Alt+/ to expand a word that is already in the buffer. Type that again to switch to the next possibility.
Suppose your are coding in Python. You have defined your own function “getStringInFile”. Now, when you need to type that again, just type “ge” then press Alt+/. If the word is not you want, press that again.
You can see all available choices by pressing Ctrl+Alt+/.
I used emacs daily since 1998, but didn't learn this command until about 2008.
Got this email last week:
I read much, but don't post. I've been aware of you for years. (Emacs user since it was written in (gasp) Teco. 1977? Probably.)
I just got saved by your valuable article "The Confusion of Emacs's Keystroke Representation." Thank you.
About ten times per day recently, I've solved problems and learned things from your tutorials. Thank you, (great emphasis) for writing them and making them available.
I became curious about you and so I read a lot of xahlee.org.
I read fast, read alot.
You are famous, I see, as I recall, for being a troll. I do not understand (for some reason) how your "giving" side (xahlee.org seriously helpful articles) and your "poking at the morons" side live in the same guy, but my not knowing is okay.
I relate to a lot of the feelings you write, too. I should thank you for those writings, too, but that's one of my weird areas. I'm not going to do it now.
It made my day. (and thanks again Eirikur.)
Also, started to collect some nice words about my emacs work. See: Testimonial on Xah Emacs Tutorial. Thank you all very much, and many who have helped me before.
This page Emacs: Change Minor Mode Keys hit reddit.
Tip for elisp coders. Often, while still writing your program and
in the debugging process, you might put
(mesage myStr) to print some variables. However,
if your “myStr” happens to contain “%” char such as in URL, then
you'll get a mysterious error “Not enough arguments for format
string”. Took me some time to trace a bug to this extraneous debug line. So:
;; don't do this (message myStr) ;; do this (message "%s" myStr)
Also, you know about
apropos-command 【Ctrl+h a】 right? Useful to find the command you want. However, remember that it only list commands, not functions. When you are looking for the function you want, you can do a Ctrl+u first, so that
apropos-command will also list functions.
Created a ErgoEmacs online forum invitation, like this:
|Join ErgoEmacs's Discussion Forum!|
If you are a ErgoEmacs user, please join. You can subscribe with abridged or digest format with 1 email per day. Many webfeed are available at http://groups.google.com/group/ergoemacs/feeds
If you like ErgoEmacs, please place the following on your website or blog to spread ErgoEmacs.
<table border="0"> <tr><td> Join <a href="http://ErgoEmacs.org/">ErgoEmacs</a>'s <a href="http://groups.google.com/group/ergoemacs">Discussion Forum</a>! </td></tr> <tr><td> <form action="http://groups.google.com/group/ergoemacs/boxsubscribe"> Email: <input type="text" name="email"> <input type="submit" name="sub" value="Subscribe"> </form> </td></tr> <tr><td style="vertical-align:middle"> <img src="http://groups.google.com/intl/en/images/logos/groups_logo_sm.gif" height="30" width="140" alt="Google Groups"> </td></tr> </table>
My left hand is whacked. No pain yet, but something is getting seriously wrong …. Added the latest happening of my hand health saga to the bottom of: Programer Hand Health: vi Esc Key Syndrome.
Elisp: Read File Content as String
After now 11th year of living in emacs daily, i discovered the utility of the mouse!
In dired, you can just click about to browse files. Same for Bookmark. The exception is ibuffer. Pity.
I'll try to use the mouse more often. Discovered this because recently am typing too much and is becoming a problem.
Previously, we've covered Single Command to Delete Whole Line and How to Copy/Cut Current Line. But what if you want to select the current line with a single command? Very short, like this:
(transient-mark-mode 1) (defun select-current-line () "Select the current line" (interactive) (end-of-line) ; move to end of line (set-mark (line-beginning-position)))
This is added to Emacs Lisp Examples, check it out for other useful examples.
Transform HTML Tags with Emacs Lisp (elisp tutorial)
PS: Thanks to Roland Renaud, Sungmin Cho, for Donations.
there are several twitter modes for emacs.
Here's the top 10 most popular pages of the past month. The top one has 58 unique page views per day, on average. The last one has 29.
- 1. Emacs Basics Tips
- 2. Emacs: How to Define Keys
- 3. Emacs Lisp Basics
- 4. Emacs: Unicode Tutorial
- 5. ErgoEmacs Keybinding
- 6. Emacs and Shell Tips (Bash, cmd.exe, PowerShell)
- 7. Emacs: Find Replace Text in Directory
- 8. Emacs 23.1 Features (released 2009-07)
- 9. Why Emacs Keys are Painful
- 10. Emacs: Regex Tutorial
The time spent on each page is about 3 to 4 minutes.
Ever wonder what are the top 30 most frequently used emacs lisp functions? If you are just beginner elisp programer, you probably want to know these well. See: Emacs Lisp Function Frequency.
PS thanks to Kristian Hellquist for donation!
Created a snippet set for emacs lisp coding. Currently covering 105 elisp functions. Download at: Emacs Lisp Yasnippet Templates [ elisp_idiom_templates.html ] .
A new version of the ErgoEmacs Keybinding is out.
The new version is 5.3.4. New is a Swedish layout, and also the window splitting keys have changed for the ergonomically better. See the included “_HISTORY.txt” file for more detailed release notes. Thanks to Kristian Hellquist for the Swedish layout.
Also thanks to many who have voiced support.
Emacs: Xah Replace Pairs, xah-replace-pairs.el (elisp tutorial + package)
Left Wrist Motion Pain; vi Esc Syndrome (essay)
Emacs: Escape Quotes Command
Re-wrote the following tutorials:
Printing in Emacs Lisp (tutorial)
Emacs Manual Sucks by Examples. (commentary)
Emacs: How to define Super/Hyper Keys. (tutorial)
Emacs: Have You Read Emacs Manual?. (commentary)
Outline mode (org-mode) is nice, but i never took the time to learn the details. Have been using it simply by just knowing the star header syntax and Tab or Shift Tab to show/hide headings. Today, i took the time and learned the basics keyboard shortcuts for creating and moving branches. Fantastic. Added to Emacs: Outline, org-mode.
There's glasses-mode, a minor mode, bundled in at least emacs 22.2. It will display “camelCase” words like this “camel-Case”. Note: it only display it that way, the text is actually not changed. (via gnu.emacs.help post by Tim X)
This tip is added to: Emacs Basics Tips.
Complete re-write: Elisp: google-earth Command. It was written when i just started learning elisp in 2006. Now much better.
Added a section to How to Avoid Emacs Pinky, at the bottom.
In the past few days, been working on my site that heavily involves emacs lisp scripts i've written.
First is a update to my kml files. See: Google Earth KML Validation Fuckup. This involves also updating my script for generating kml files, see: Elisp: google-earth Command. Then, i created a collection of links to kml files. See: Google Earth Files. This is done by modifying my elisp script that generate Wikipedia links. See: Generate a Web Links Report with Emacs Lisp.
Google Earth today is amazing. You can see photos of any street of all major cities around the world, most with panoramic display. [see Google Earth Geography 101]
How to Quickly Switch Fonts in Emacs (tutorial)
GNU Emacs Development Inefficiency (commentary)
ErgoEmacs mentioned in news.ycombinator.com.
What's the difference between library, package, features? And what's the difference between load-file, load, require, autoload? See: Emacs Lisp's Library System.
GUI Makes People Dumb?
Thanks to YOO for a major correction.
Want the cursor movement to stop between camelCaseLetters? Use “global-subword-mode” or “subword-mode”, available in emacs 23.2. (Thanks to Deniz Dogan for the tip.)
This tip is added to: Emacs Basics Tips.
GNU Emacs and XEmacs Schism, by Ben Wing
Well Known Emacs People With Hand Injuries
Emacs Form Feed ^L
Emacs Switching to Guile Scheme Lisp? (commentary)
Emacs byte compile incompability on 23.1 vs 23.2
A new version of bbcode-mode. Also a new version of xub Unicode Browser mode.
Played with Unicode too much in the past 2 days, and now wrote a new mode today: xub Unicode Browser mode for Emacs.
Emacs cua-mode Problems. (commentary; emacs modernization)
Arrows in Unicode.
Text Editor's Cursor Movement Behavior (emacs, vi, Notepad++) (commentary; essay; question)
Keyboard Hardware's Influence on Keyboard Shortcut Design (How Emacs and vi keys came to be).
Spend 8 hours rewrote the article: Creating Keyboard Layout in Mac OS X. Also, created a system wide ErgoEmacs keybinding for OS X and Bash, for both Qwerty and Dvorak layout. Download at: http://code.google.com/p/ergoemacs/source/browse/#git%2Fextra. (Thanks to Brendan Miller for the initial work on Bash binding)
Also, wrote another article: What's NKRO, N-key Rollover? .
A few new articles i wrote in the past few days on keyboarding that might be of interest to emacs users.
- Kinesis Advantage2 Keyboard Review
- The Idiocy of Hacker Keyboards
- Keyboard Shortcut vs Launch Buttons
Emacs Why line-move-visual (essay; newsgroup flame)
Some notes on: Emacs nxml-mode Fontification Changes.
Elisp: Functions on Line (elisp tips)
ErgoEmacs 1.8.1 for Windows is out! This one is based on the shiny new Emacs 23.2. [see Emacs 23.2 Features (released 2010-05)] Check it out! Download at: googlecode.com ErgoEmacs 1.8.1 Setup.exe. (Thanks to David Capello for the C coding on Windows.)
Emacs 23.2 Features (released 2010-05)