Posts

Showing posts from November 20, 2011

Emacs 24.0.91.1 for Windows; Crash on linum-mode

Steps to reproduce:Download the emacs at Source alpha.gnu.orgAfter install, cd to the “bin” dir, start it like this ./emacs.exe -QType 【Alt+x linum-mode Enter】. Emacs crashes.Thanks to Jon Snader for discussion.

Time Magazine 2001 December 5, Covers

Image
Time Mag 2001-12-05 covers

keyboards porn: Kineses freestyle, Goldtouch, Typematrix, ergo 4000

Spent about 10 hours keyboard geeking again. Several major updates in the following pages. Addition of some 15 glorious photos of keyboards and their layouts.Ergonomic Keyboards GalleryMore Fancy Ergonomic KeyboardsErgonomic Split KeyboardsMaltron Keyboard

Emacs: Insert Brackets by Pair

Perm URL with updates: http://xahlee.org/emacs/emacs_insert_brackets_by_pair.htmlSome emacs commands that lets you insert brackets in pairs always. (defuninsert-bracket-pair (leftBracket rightBracket) "Insert a matching bracket and place the cursor between them." (interactive) (when (region-active-p) (delete-region (region-beginning) (region-end) ) ) (insert leftBracket rightBracket) (backward-char 1) ) (defuninsert-pair-paren () (interactive) (insert-bracket-pair "("")") ) (defuninsert-pair-brace () (interactive) (insert-bracket-pair "{""}") ) (defuninsert-pair-bracket () (interactive) (insert-bracket-pair "[""]") ) (defuninsert-pair-single-angle-quote () (interactive) (insert-bracket-pair "‹""›") ) (defuninsert-pair-double-angle-quote () (interactive) (insert-bracket-pair "«""»") ) (defuninsert-pair-double-curly-quote () (interactive) (insert-bracket-pair &quo…

Dragon flags

Image
Air Wales airplane tailDragon Flags

gencdo

Image
gencdo (meaning: gentle cherishing doll)2 persons i like to thank.

Gorean (sex slaves) in Real Life

post removed because it might violate Google's ad program policy. See here instead: http://xahlee.org/sex/gorean_in_real_life.html

the μTRON Keyboard

Image
“μTRON Keyboard” img srcfor detail, see: http://xahlee.org/kbd/uTRON_keyboard.html

Emacs Lisp Example: wrap-html-tag

A little elisp command, useful if you do a lot HTML coding. (defunwrap-html-tag (tagName &optional className ξid) "Add a HTML tag to beginning and ending of current word or text selection. If tagName is empty or nil, use “span”. If className is empty or nil, don't add any class attribute. If ξid is empty or nil, don't add id attribute." (interactive "sEnter tag name: sEnter class: sEnter id:") (let (bds p1 p2 inputText outputText) (setq bds (get-selection-or-unit 'word)) (setq inputText (elt bds 0) ) (setq p1 (elt bds 1) ) (setq p2 (elt bds 2) ) (setq outputText (concat "<" (if (or (equal tagName nil) (string= tagName "")) "span" tagName) (if (or (equal ξid nil) (string= ξid "")) "" (concat " id=\"" ξid "\"")) (if (or (equal className nil) (string-equal className "")) "" (concat " c…

Cute Girls Singing Adele's Rolling in the Deep

Image
Perm url with updates: http://xahlee.org/music/rolling_in_the_deep.htmlA very cute young girl, singing Adele's Rolling In The Deep. Watch the ending 10 seconds. It's called precocious.Vazquez Sounds, Adele - Rolling In The Deep (Cover)Vazquez is a family group. Very nice.Following is another cute girl, singing in a cappella style. (A cappella means: without instrumental accompaniment.) To be able to sing in a cappella style means you gotta have voice talent. She's also flirtatious.Ariana Grande, sining Rolling in The Deep.Following is a all-girl, family group (they are all sisters).Cimorelli - Rolling in the DeepThere's one thing about all these girls. There's one thing in common: they all have a good, loving, supportive family. If you grew up in a fucked up family, you won't have such good natured smile or body languages.Here's Adele singing it.Adele - Rolling In The DeepLousy flat song. Mundane lyrics. Dull music video.Lana Del Rey - Video GamesDusty Spri…

thank you from Xah Lee

I want to write a quick Thank You to those of you who read my emacs blog, and also to many who have donated.Reminder: it's preferred that you post questions as comments to my blog or website, because it gets seen by many, also better for my blog because people can see interaction. My email is often flooded, though i try to reply to all.Also thank you for those who have donated, or bought my emacs tutorial. I haven't had a chance to update my Donor List. There is one person, Aigerim, who bought my entire website (for offline reading) for $100. Thank you Aigerim so much!Am writing this quickly, been wanting to write it for a couple of weeks now. Wanted to mention all names but big plan always results in no action.I want to thank those who retweeted my emacs tutorials, linked to my site, those who commented on my articles, or exchanged emails, and also those on Facebook and g+. I'm not much a social person, not much into chitchat, and don't like to follow marketing strate…

Ergonomic Keyboards: Microsoft 4000 vs Natural Elite

Image
Yesterday, people on Hacker News site are discussing ergonomic keyboards. (Source news.ycombinator.com) Seems all are recommending the Microsoft Natural Ergonomic Keyboard 4000 (review).I also love that keyboard. Used it for 2 years. Unfortunately, the stiff Spacebar is causing me hand problems. I spend 2 days trying to fix the spacebar. First by trying to remove the metal bar underneath, then tried to bend the metal, then tried to put lubricant in the key hole, then tried lengthen the poke, then tried to break the metal bar holder, then tried to trim the cylinder-poke's sides, then file it, and eventually cutting it out altogether. Ends up with a broken spacebar and nothing worked. (by the way, there's a blog on the web trying to tell you how to fix it. They don't work. It should be fixable though, if you are a tinkerer and lots tools and odd spare parts for spontaneous invention.) So i've switched back to Microsoft's earlier ergonomic model.By the way, i've r…

Gor on Kindle

The Gor fictions are now in Kindle. Raiders of Gor By John Norma. amazonGoreans in Second LifeGorean Panther Girls Moondance RitualArt of War - MLT Style

The Fantom Language, and a Scathing Review of Scala

There are endless languages. Just discovered Fantom (programming language).Also, there's this scathing review of Scala by someone who seems to be a Java platform expert.Scala feels like EJB 2, and other thoughts (2011-11-22) By Stephen Colebourne. @ Source blog.joda.orgΙ don't know Java platform well, not having worked in the industry for many years, but i tend to agree with him on his views.Proliferation of Computing Languages

should i split the blog?

I really like to split my blog here to programing and none-tech. The programing topics would be: emacs, web dev, computer language thoughts, keyboards, etc. The none-tech would be art, literature, politics, random, etc.Last year i did a poll, many think i shouldn't. But i think that many none-tech friends get annoyed by the so many emacs posts, which they have little idea what it is, while many emacs fans would get annoyed by my random music videos, art pictures, etc.So, what do you think? vote on the right.2011-12-22 Poll ResultShould this blog be split into programing topics vs none-tech topics?Yes. 17 (70%)No 7 (29%)

Cute Chick Showing Fancy Linux Desktop

Image
Incredibly cute chick, gives us a tour of fancy animated desktop on linux.“Ubuntu Linux Themes” demo by a cute chick.

Emacs Lisp Command: curly-quotes-to-emacs-function-tag

Perm URL with updates: http://xahlee.org/emacs/elisp_curly-quotes-to-emacs-function-tag.htmlIn my emacs tutorial, i want to put HTML markup on elisp functions. For example, if i've written: <p>Call “sort-lines” to sort.</p> I want it to be like this: <p>Call <varclass="εf">sort-lines</var> to sort.</p> This way, i can write a Javascript that pops up documentation when mouse hovers on the function name.I already have 300 HTML files of emacs/lisp tutorial. How to fix them?One way is to write a elisp script that go thru all files. Another way is to write a interactive command that can be used on a case-by-case basis. I experimented with both, and decided to use the latter approach.Here's the command: (defuncurly-quotes-to-emacs-function-tag (p1 p2) "Replace “word” to HTML markup for elisp function in text selection or current buffer (respects `narrow-to-region'). For example, the text: <p>Call “sort-lines” to sort.&…

Review of ErgoEmacs by Joseph Buchignani

Joseph Buchignani wrote a review of ErgoEmacs, at: Source www.cyborganize.org. Check it out!Besides some praises, he also listed several items he believed to be bad. He made many excellent points. Some of his points are due to him being a experienced emacs user, but some are still good points. I think we will follow up about half of his points in next release. Here's a list that is now fixed:math-symbol-input-mode (alias of xmsi-mode) will be off by default. Also, a menu will be added to toggle it.Dired recursive load problem will be fixed as he described.For org-mode, the only customization in ErgoEmacs is (add-hook 'org-mode-hook 'soft-wrap-lines). What the soft-wrap-lines function do is to set “truncate-lines” to false and “word-wrap” to true. Otherwise, long lines will disappear into the right window border. Am not sure this is a good thing. Has newer org-mode changed this behavior?Also, emacs 24 beta is out, and people are saying it's pretty stable. So, next rele…

emacs command update: toggle-line-spacing

Updated a function “toggle-line-spacing” for emacs 24, at How to Set Emacs's User Interface to Modern Conventions. Thanks to Ivan Kozik for the tip.

Screen Size Comparison

emacs updates: insert-random-uuid, backward-close-bracket

Last week, we discussed how to write a elisp to generat UUID. Christopher Wellons provided a excellent implementation involving random info from emacs, then calling md5. See bottom at: Emacs Lisp Exercise: insert-random-uuid.For those of you using backward-close-bracket and forward-close-bracket, there's a bug that's been fixed. The bug is this: it misses some brackets because there's some typo in the regex in the code, it contained extra space. Get updated code at: Emacs: Commands and Keys to Navigate Brackets.

Old Long “s”: ſ and etymology of the integral sign ∫

Old Variant Form of the Letter “s” ſ and etymology of the integral sign ∫. See http://wordy-english.blogspot.com/2011/11/lingustics-old-variant-form-of-letter-s.html

Inconsistency of Emacs Text-Searching Features

Few days ago, i wrote a tutorial on emacs text-searching commands. See: Emacs: Searching for Text in Files (grep, find). There are lots of them: {list-matching-lines, grep, rgrep, lgrep, grep-find, find-dired, dired-do-search, …}. However, they are inconsistent.list-matching-lines (alias of occur) is implemented with elisp, while the others rely on unix utils {find, grep}.The interface also isn't consistent. e.g. grep and grep-find (alias find-grep) both directly prompt you to enter unix command in one shot. But find-dired, rgrep, lgrep, do several prompts asking for: {search string, file extension, directory}. (though, they still require user to be familiar with the unix commands. e.g. When “find-dired” promps “Run find (with args):”, you have to give -name "*html" or -type f etc.)People who are not unix sys admin or unix programer won't be able to search a folder. The unix find/grep parameters are quite complex, and emacs documentation doesn't try to explain …

FOSS Infighting: My License is Holier Than Yours

On www.emacswiki.org, there's this fact mentioned:The [emacs lisp] manual has license GFDL and thus the DFSG (Debian Free Software Guidelines) don't consider it free.Ain't it bizarre? FSF's GNU Emacs, the mothership of all Free Software, and Debian Linux, the mothership of hacker linux, originally with support of Richard Stallman, have come to this quarrel.Such quarrel are quite severe and wide-spread among open source communities. BSD's antagonistic forks, GNU vs MIT/BSD/Unices, Emacs vs XEmacs, Free Software vs Open Source, the KDE vs Gnome, GNU vs Linux, Firefox logo vs Debian, the rise and fall and rise and fall of Java as “free” (aka the Java Trap), OpenOffice vs LibreOffice, Richard Stallman vs Linus Torvalds, Richard Stallman vs Eric Raymond, Richard Stallman vs everybody else, …Ideologies, ideologies!These tech geekers are supposed to be the ethics gods of humanity, peace, freedom, et al, in reality, they are just scumbags like most human animals on earth, …

Emacs Lisp Example: title-case-string-region-or-line

Perm URL with updates: http://xahlee.org/emacs/elisp_title_case_text.htmlThis page shows you how to write a emacs lisp command to change letter case by title convention.In English writing, the title follows a particular convention of capitalization. For example, it should be “A Tale of Two Cities”, not “A Tale Of Two Cities”.I think this is rather a silly convention. For a while, i experimented by simply following a logically simpler style, of capitalizing the first letter of all words. (➲ The Writing Style on XahLee.org) But after a while, i find it rather jarring.Part of the reason is that it's new, thus it will get some used to. This i expected. However, the other thing that turns out is that, the capitalization has subtle function for emphasis. For example, “Kung Fu versus Karate” seems better than “Kung Fu Versus Karate”.It's rather cumbersome to manually capitalize words following this convention. So, i wrote a emacs command. Here's the code: (defuntitle-case-string-…