Emacs: Form Feed and Source Code Section Paging Commands.
New version of ErgoEmacs keybinding is out, at 5.3.9 . Major changes since 5.3.7 :
open-last-closed in ErgoEmacs keybinding package. This key follows browser convention. But won't work in Terminal.See 〔_HISTORY.txt〕 for full detail.
Download at: ErgoEmacs Keybinding.
Set Bash Shell Prompt to Color
David Capello created a new version of “command-frequency.el” now called “keyfreq.el”. See here for detail and download location:Emacs's Command Frequency.
Emacs vs Windows Notepad (rant)
Emacs Bug: 【C-u】 & (key-translation-map) disables “undo”.
See: Emacs Misc Bugs.
Emacs Undo and Emacs Cult Problem.
Complexity of software engineering: Emacs grep Problem in Windows.
Reminder: you can get all my emacs and elisp tutorial. Close to 300 HTML pages, each HTML page is about 1 to 5 printed pages. It comes in simple HTML+CSS, without web ads, banners, or JavaScript. See: What People Say about Xah's Emacs Tutorial.
Emacs Dired Bug: Delete File List Not Visible
See: Emacs Misc Bugs.
A recent article that should be here: Emacs Keybinding Rant & a Glimpse of Xah Lee's Life 2010 (essay)
New version of Emacs Unicode Math Symbols Input Mode (xmsi-mode) (for math symbol and Unicode input). This version added about 102 full width symbols. ⁖ “fw&” becomes “&”. (these chars probably not useful to most, but i use the fullwidth version of ampersand often to avoid encoding complexity in HTML) happy using.
See: HTML Entities, Ampersand, Unicode, Semantics ◇ Problems of Symbol Congestion in Computer Languages; ASCII Jam vs Unicode.
Emacs Lisp Batch Text processing: Grep Find Replace Variations
Emacs: Remapping Keys Using key-translation-map.
Discovered the command “display-time-world”. These days, when communicating with people around the world (in twitter, Skype, Second Life …), usually i need to know what time it is in their location. This command helps. Faster and more accurate than i can do mental calculation.
Am tired of using dictionary within emacs. See bottom of Emacs Dictionary Lookup for reasons.
Here's the complete solution to the asciify-word-or-selection problem. See bottom of Emacs Lisp: Asciify Unicode String (Zap Gremlins).
A Curious Look at GNU Emacs's 1000+ Default Keybinding
Update: How to Quickly Switch Fonts in Emacs
Emacs: some problems of slowdown (tabbar, font) (some report of my experiences)
Emacs Lisp: Asciify Unicode String (Zap Gremlins)
Discovered “artist-mode”. It's a mode that lets you draw ASCII pictures with the mouse. See: Emacs: manipulate Column Text, string-rectangle, ASCII-Art.
Much improved my code for “get-selection-or-unit”. Also, a “unit-at-cursor” function is created. This is separated out because sometimes you want to get the thing at point, without caring whether there's a text selection. For the code, see: Emacs Lisp: get-selection-or-unit.
refactoring my “.emacs”
Xah's log, stardate 2011-03-02T02:03:32-08:00.
Spent the past 5 hours refactoring elisp code in my .emacs. Not exactly thrilled. it's the kinda work that has no immediate benefit, but potentially disruptive. The software proverb goes: “if it ain't broken, don't fix it.”.
I'd say it's only half complete. But am tired of it at this (point). Actually, about every 4 months in past 4 years i spend several hours refactoring stuff there. (not counting the time adding stuff there) As the functions pile up, more time went into it. As my elisp kungfu increases, more is there to be refactored.
well, today, most work done is to replace “thing-at-point” by get-selection-or-unit. But alone the way, saw old code, and can't help to clean it.
Though, my strategy towards “.emacs” is still basically “don't bother unless you absolutely have to”. Organize Your “dot emacs” Init File in 5 Minutes.
sgml-delete-tag bug
See: Emacs Bugs.
Emacs Lisp: Find String Inside HTML Tag
I want a command to insert random strings, as a ID. So i wrote one:
(defun insert-random-string () "Insert a random alphanumerics string of length 5. The possible chars are 0 to 9, and a to z (lower case)." (interactive) (let (myCharset (possibleCharsCount 36)) (setq myCharset "1234567890abcdefghijklmnopqrstuvwxyz" ) (dotimes (ii 5) (insert (elt myCharset (random possibleCharsCount))) ) ) )
O emacs! ♥
Thanks to Teemu Likonen 〔tliko…@iki.fi〕 for a improvement.
See also: Emacs Lisp Examples ₁
Emacs Custom Keybinding to Enhance Productivity
If you explore Second Life, try Emacs LSL Mode (xlsl-mode) for Linden Scripting Language.
Reminder. If you like this blog, you might also enjoy my other programer related blogs:
Usually i don't repeat a article in more than one place, even if it's related to both.
Bad Advices from Programers about Typing & Keyboard (RSI)
Emacs Lisp Tutorial: List & Vector
Find/Replace is a central mechanism in text processing, especially in emacs. I took few hours to edit and re-organize several articles i've written that are all related to find/replace. Here's the re-organized index. It gives a much more clear view on what each article is about and how they relate to each other.
If you like them, please support the site. You can support by buying computer stuff from Amazon links here. USB drives, keyboard & mouse, iPad, mobile phones, laptops, DVDs, …. Or, you can get all my emacs and elisp tutorial. (See bottom of Xah Emacs Tutorial.) Or, you can support the site by a donation. Any amount counts. Thanks!
You can also ask emacs questions here: Ask Emacs.
A little avanced emacs lisp tip today. Emacs Lisp: Using thing-at-point.
ErgoEmacs version 1.9.2 binary for Windows is released. Download at ErgoEmacs 1.9.2 Setup.exe.
Thanks to David Capello for the build.
New version: Emacs Math Symbols Input Mode (xmsi-mode)
How to Write grep in Emacs Lisp (tutorial)
I'm creating a Ask Emacs page. There, you can ask all sort of questions about emacs or elisp.
Unicode 6 and Emacs 23.2 semi-Bug
See: Emacs Bugs.
Emacs Tip: Stop Org-Mode Opening File in Folded View
If you use org mode, you can set it to not open files in folded view. Put the following in your “.emacs”:
(setq org-startup-folded nil )
I find this useful because when i do interactive find/replace on multiple files, if the org mode files open in folded view, you won't be able to see what's being replaced.
If you prefer to open org mode files in folded view, one solution is to temporarily set the variable org-startup-folded to nil before you do find/replace in a dir. Just call “set-variable”.
Emacs Online Resources and Communities 2011
A great tutorial about eshell. Mastering Eshell By Mickey Petersen. @ www.masteringemacs.org…
See also: Emacs: What's eshell? “eshell” vs “shell” Difference?
Hauke Rehfeld send in this improved version of “fold”.
(defun fold (f x list) "Recursively applies (F i j) to LIST starting with X. For example, (fold F X '(1 2 3)) computes (F (F (F X 1) 2) 3)." (let ((li list) (x2 x)) (while li (setq x2 (funcall f x2 (pop li))) ) x2 ) )
This one improves upon on a primitive one i've written, which has problems if element in the list eval to nil. For some info and a practical example of using “fold”, See: Elisp Examples: symbol properties, set frame, font, fold, shell call. Thanks Hauke.
Xah Emacs Modes. (a list of emacs lisp code i've written. Your support also very much appreciated.)
About 3 months ago, i started to use the Caps Lock key for emacs “M-x”. That's fantastic. If you are on Windows, here's a util that can make it happen.
Download it at this page: System-wide ErgoEmacs Keybinding for Windows, Mac, Bash.
Useful for emacs users on Creating Keyboard Layout in Mac OS X.
Want to learn a new language in 2011? How about emacs lisp? 〔☛ What is Your Favorite Lisp〕
Instead of a new year's resolution, which often are forgotten after Jan, let's have a resolution just for January.
So, what about setting a short-term goal for learning emacs and elisp? What do you wish to learn in January? Answer these questions. Before you answer, try to have a realistic, low-key goal, that you actually would achieve after Jan. Some of the questions below is about emacs/lisp if you think that's something you'll find helpful.
• Is there a language you wish to learn in Jan?
• What are some things you always wanted to know about emacs/elisp?
• Is it a particular emacs setup that's bugging you for a while?
• Any particular mode, package, you wished to install or know more?
• Do you have a basic understanding of elisp?
• Is it some basic understanding of elisp you always wanted?
• What would be some practical things that would help in your job?
• How much time you can devote to learning (your choice of new language or elisp)? (i recommend no more than 30 min a day, but at least every other day. You must stick to this schedule)
• At the end of the month, what would be some things that can concretely measure your effort? (a small set of learning notes? A small program as a project?)
Post your answers below.
blog comments powered by Disqus