turn off underline for hyperlinks

Perm url with updates: http://xahlee.org/js/hyperlinks_and_underline.html

Hyperlinks and Underline

Xah Lee, 2010-06-14

Today, i decided to change the css on my site so that links are not underlined.

I'm in the old school of thought that interface should be simple, and not change much. The default rendering of hyperlink with underline is established tradition since the first web browser in the early 1990s. It gives user a consistent recognition of links, everywhere.

Though, the underline rendering got problems. When many words are hyperlinks in a sentence, underline makes them less readable and obtrusive. As i write more and more and create more and more links, i become more aware of this problem.

After surveying 20 other popular websites, i find that they all do not use underline. Examples are: apple msn yahoo youtube amazon wikipedia time times npr... In fact, it would be hard to find a site that still use underline for links. (there are few exceptions. Typically, pages with simple layout or format still use underline. For example, google search, and some amazon.com pages.)

In browsing websites in the past 5 year, i don't remember ever got confused about where or which are links. I think this has been the accepted practice since perhaps 2005.

When the web begin, underline might be a good decision because there are not that much text, and no graphics, no css, no sites for news, shopping, stocks quotes, gaming, forums, social networks, youtube, etc. The only content is just about plain academic text and embeded simple images. But with today's web since about early 2000s, rendering underline to hyperlinks is not appropriate, since there are too much text in diverse and complex layouts (e.g. newspaper multi-column; menus; tabs, login boxes, drop downs, pop up snapshots ...). Underline all active links makes it unreadable.

Here's the css code to turn underline off. Underline will show only with mouse hover.

a:visited, a:link {text-decoration:none}
a:link:hover, a:visited:hover {text-decoration:underline}

keyboard geeking

Perm url with updates: http://xahlee.org/comp/blog.html

Spent about 8 hours in the past 2 days keyboard geeking again. Reworked several of my articles on keyboards, recheck links, read a bunch more reviews and history, watched many videos, thinking about the design, etc. Ah, the joy of keyboard geeking. I'm probably among the top 100 keyboard freaks in the world.

Many articles now has a independent page, separated from large articles. They are:

The overall index of all keyboard related articles is at: All About Keyboards, Keyboard Layouts, Shortcuts, Macros.

The Last Kind Word Blues (Geeshie Wiley)

Perm url with updates: http://xahlee.org/Periodic_dosage_dir/sanga_pemci/the_last_kind_word_blues_Geeshie_Wiley.html

The Last Kind Word Blues (Geeshie Wiley)

Xah Lee, 2010-06-12

“Last Kind Word Blues” (1930) by Geeshie Wiley. What a incredibly beautiful song. The song makes me cry.

Title: Last Kind Word Blues
Singer: Geeshie Wiley
Lyrics: ?
Music: ?
Date: 1930
(lyrics below not complete or fully correct)

The last kind word I heard my daddy say 
Lord the last kind word I heard my daddy say

If I die, if I die in the German War 
I want you to send my body, send it to my mother-in-law
If I get killed, if I get killed, please don't bury my soul
I (p'fer) just leave me out, let the buzzards eat me whole

When you see me comin', look 'cross the rich man's field 
If I don't bring you flour, I'll bring you bolted meal

I went to the depot, I looked up at the sign 
Cry some train don't come, there'll be some walkin' done

My momma told me, just before she died 
Lord, (since the dawn, I thought you'd be so wise)
(I brought you a piece of ?)

The Mississippi River, you know it's deep and wide 
I can stand right here, see my (babe?) (face?) from the other side

What you do to me baby, it never gets out of me 
I mean I'll see you, after I cross the deep blue sea

I first heard of the song from biographic movie of Robert Crumb. See: Art of Robert Crumb.

need Mac contributors for ErgoEmacs

a call for Mac contributors for ErgoEmacs.

Hi all, we need contributor to build a mac binary of ErgoEmacs that runs out of the box on the Mac.

Just now, i made some comments in one of our bug: http://code.google.com/p/ergoemacs/issues/detail?id=71

which lead me to think about building a binary version of ErgoEmacs for the Mac.

However, my mac is PPC based that's 4 years old and is no longer supported hardware by Apple, and the OS X it's running is 10.4, also 2 versions behind the current. So, dev on the mac for me is becoming a problem.

However, my mac is running the full ErgoEmac package daily. So, there shouldn't be any problem running ErgoEmacs on the mac.

if you are on a mac, and is familiar with some elisp, we'd appreciate your help!


Xah ∑ http://xahlee.org/

The Idiocy of Hacker Keyboards

Perm url with updates: http://xahlee.org/emacs/keyboards_hacker_idiocy.html

The Idiocy of Hacker Keyboards

Xah Lee, 2010-06-12

This page is a review on several often talked about computer keyboards among programers.

Spend few hours keyboard geeking again.

Das Keyboard

das keyboard2

The Das Keyboard. image source

The Das Keyboard. Famous for being a keyboard with no key labels.

Good as a novelty, nothing else.

How much to pay to impress friends? $129!

How did this keyboard came about? According to the official site daskeyboard.com, the programer and company founder Daniel Guermeur, wanted to learn touch typing. The first thing is to get rid of the key labels, and the rest is history. Quote:

In 2005, in a personal quest to improve his own typing speed and accuracy, Metadot Corporation founder and self-proclaimed “Uber Geek” Daniel Guermeur asked to have a totally blank keyboard created. To his surprise, his typing speed doubled after just a few weeks of use.

As many friends and colleagues who tested the keyboard were mesmerized and wanted one, the business potential became obvious, and Das Keyboard was born.

For the first few years, the maker of this keyboard really doesn't make any model with key labels. But since about 2008, they started to make one with labels. The reason seems obvious. Without labels, you might sell 1 for every ten thousand programers. But with labels, your sales potential immediately increases by 100 or 1000.

Also, they introduced the spring based mechanism so that you get a good tactile feedback, similar to those Model M keyboard geeks often talk about.

However, i've seen one youtube video that shows the guy's Das keyboard's click-clack mechanism had a problem. That is, once you press a key, it clicks, but for some keys, while it is down and you put some more pressure, it goes another different click, WRONG! Not sure if that's just a single case of defective device, or defective design. Watch this, this is funny:

Das Keyboard double-click problem

Happy Hacking Keyboard

The Happy Hacking Keyboard. The worst keyboard possible. No function keys, less modifier keys, no number keypad, no home/end/PageUp/PageDown keys. A earlier model does not even have arrow keys.

happy hacking keyboard lite2

The Happy Hacking keyboard, model lite 2. image source

So, when you need to press F1, now you need to press 2 keys, by holding Fn then press 1. Hacker Progress?

So, perhaps it has small physical dimension merit? Well, there are many keyboards with full-sized-keys but similar in overall physical dimension yet with full function keys and dedicated PageUp PageDown keys.

Like other weird keyboards, this one has some kinda hacker association, and is often reviewed on geek sites. Occasionally, you see programers on the web claiming how they love this keyboard.

Why would such a bad keyboard gets talked about? Probably due to the name “happy hacking”, and the ostensible removal of the Windows logo label. A effect of marketing. Like some art things, that are useless, nobody buys, but everybody knows. If you own one, you can brag about it.

I got curious on this keyboard's history. Apparently, it's made by PFU Systems, and the website states: “a Fujitsu company”, of Japan. Quote:

PFU Systems, Inc. is the U.S. subsidiary of PFU Ltd. of Japan.

That somewhat makes it understandable. If you have visited Japan, you'll notice that everything comes in a miniatured size. Cars, roads, furnitures, office equipments, rice bowels, ...

Cost? About $70.

Happy Hacking Keyboard

Optimus Maximus Keyboard

Optimus Maximus keyboard. A keyboard with the feature of having a display on each key.

optimus maximus 01w

Optimus Maximus keyboard. image source

The display are not just simplistic LEDs. They can even display video. Each key features a 48x48 pixels display, updated 10 times per second.

Effectively, the key labels are dynamic and can change, great if you are a heavy key macros user (programer and gamer). Unfortunately, there are many practical problems. Not ergonomic.

The official site has a Flash app keyboard toy you can play with. At artlebedev.com

How much? $1800. It is art.

Model M keyboard

Model M keyboard, made famous in early 1990s with IBM's PS/2 personal computer.

model M keyboard

Model M Keyboard.

I happen to have used it for a few months in 1990. What people love about this keyboard is its superior tactile feedback. It is spring mechanics based, so that, when you put pressure on a key, after a certain point, =click!=, it sucks you down. That means, you get a clean, precise, feel whether the key is pressed. A draw back is that it is rather loud. The sound came from its spring based mechanics. It's crispy and precise. Many modern, rubber dome based keyboards are also loud, due to bad design.

Unicomp owns the rights to the design of this key action, and currently makes modern version of keyboard with this mechanism. You can buy it at: http://pckeyboards.stores.yahoo.net/keyboards.html

Here's a interview with unicomp guy Mr Muyskens npr.org.

I think it is really nice, would want it, but due to the fact that it is not ergonomic keyboard, i can't use.

Price: ~$70.

My Favorite Keyboard

My favorite keyboard in my now 20 years of daily computer using, are Microsoft's Natural Ergonomic 4000 and Comfort Curve 2000. Both i currently use. Another one i think i would love but actually never used, is the Kinesis Contoured Keyboard.


Emacs Why line-move-visual

Perm url with updates: http://xahlee.org/emacs/emacs_line_move_visual.html

Emacs Why line-move-visual

Xah Lee, 2010-06-09

This page discuess a new feature in emacs 23.1, that pressing down the arrow key moves cursor by a visual line, not by EOL (end of line character), controlled by the variable line-move-visual.

Mark Crispin, inventor of the IMAP protocol (email), one of the earliest user of emacs (before Richard Stallman), posted a message on newsgroup comp.emacs, aggresively attacking a emacs 23.1 change about how the key C-n or arrow keys move lines. The thread is here: groups.google.com/group/comp.emacs.

In his opinion, emacs should not change this fundamental behavior. Here are some of my responses in the thread, summarizing why i think it is a good change.

Problem of longline-mode

On Jun 4, 6:39 am, brendan.hal...@ul.ie (Brendan Halpin) wrote:

Attempted thread-jack: why use visual-line-mode instead of longlines-mode?

longlines-mode has serious bugs, i believe still so even i haven't used it since emacs 23.1 a year or 2 ago.

Basically, whenever large chunk of text is inserted or removed in a buffer (either manually, or sometimes automatically by commands such as patch and version control etc), then the text will be screwed up... missing parts or something i forgot.

I filed a bug report about it, and noticed that there are more than 1 bug reports of it in emacs bug track. If i recall correctly, the situation is that it's hard to fix, because longlines-mode was a hack for lack of visual line move, and i think it is done by basically just inserting line-breaks in the background but display and save it otherwise. (i haven't actually looked at the code though)

The visual line move feature is a critical feature in emacs. Before emacs 23, there are a few packages or code that tries to introduce the visual line move feature (see emacswiki), and longlines-mode is one of them. However, because it is such a fundamental feature, it is hard for a 3rd-party elisp package to get it correct. They all have major problems...

I think Emacs 23.2's move by visual line feature is great because:

  • It fixed a frequently asked feature. (e.g. i think ALL editors/IDEs after mid 1990s, move by visual line )
  • It fixed a issue that 3rd party elisp packages cannot address well.

Btw, who actually coded the visual line mode? I can't find the info. I like to document it in my emacs pages.

Why line-move-visual is Great

Personally, i find moving by visual line is not just a good feature, but a critical one, with consequences that effect the evolution of language design and thinking, long term. The hard-coded lines is fundamentally introduced by unix and C gang, and brain damaged a whole generation of coders.

I've written about 7 essays addressing this point in the past 10 years. Each of is written in a different context, but they essentially discuss the same thing. That is, the importance of separating appearance/formatting from semantic or logical structure.

Here's a synapses on how each article relates to the line move visual issue.

Flame War with Mark Crispin

hi Mark Crispin,

Mark Crispin wrote:

This is why UNIX and C accomplish things.  They were based upon accomplishing something useful rather than promoting an ideology.

maybe you shouldn't use emacs? Emacs is main part of GNU's Not Unix, and the whole lisp culture and thinking is contrary to unix and C.

It sounds like Microsoft Word is more suitable for the sort of work that you do. Perhaps you ought to use Word instead of seeking to make emacs become more like Word.

speaking of Microsoft Word, i wait for dinosaurs like u to die. The question is, can we recruit enough new generation of coders to emacs fast enough before emacs extinguishes.



Mark Crispin wrote:

emacs predates GNU by several years.

I was there at emacs' creation, and I used its predecessors.  I had only a very minor role in its software development, but I had an influence on the design of some of the basic commands (I remember, although RMS may have forgotten).

am curious, if you know Daniel Weinreb, and who used emacs first. Am curious just to satisfy a fun quote, about who can claim being the oldest emacs user.

Daniel wrote: «Nobody has been using Emacs longer than I have (I was one of the original beta-testers. I refer here to the original Emacs, written in ITS TECO for the DEC 10.) »

Source, 2008-06-01 on comp.emacs

I see you also have a Wikipedia entry, at http://en.wikipedia.org/wiki/Mark_Crispin.


Mark Crispin wrote:

> > speaking of Microsoft Word, i wait for dinosaurs like u to die.
> You seem to have some serious psychological problems.
> > The
> > question is, can we recruit enough new generation of coders to emacs
> > fast enough before emacs extinguishes.
> If emacs "extinguishes", it will because it no longer provides a benefit
> that overcomes its demerits.
> There are many word processors, most of which perform that task quite a
> bit better than emacs.  emacs provides a particular benefit, and fills a
> niche that is not served by word processors.
> The world is not made a better place by undermining that benefit in order
> to transform emacs from a superior text editor to an inferior word
> processor.

the question is what is superior and inferior.

for example, in this thread, i consider that the move by screen line as a new feature is absolutely good. You disagree, but didn't seems to provide counter to the reasons i gave. You started to cite about me wanting emacs to become Microsoft Word.

I respect your recognized contribution to humanity as a computer programer. However, not sure if you are aware, that i've argued with well known emacs and lisp old timers for the past 10 years

for examples:

You can try also to search newsgroup archive on Richard Fateman, Richard Gabriel, Kent Pitman, on my conversation with them in comp.lang.lisp.

The point being, doesn't matter how famous or how expert one is about particular subject, he can always be wrong, and statically, they are often quite wrong about many of their opinionated views outside the very narrow field they have expertise a single human animal can possibly achieve, as documented in history. (this counts in for example some big mouthers who's got strong opinion on everything once they got a Nobel) Also, they tend to be more wrong when they are old, usually happens when it is long past the years they were recognized for.

So, here, we have a argument about a issue of emacs. We disagree.

I have writen quite a few criticisms of emacs in the past. They are documented here: http://xahlee.org/emacs/emacs_modernization.html.

Often with suggested solution and sometimes code.

It is my firm belief, that each of my claim or reasons of suggestion can be verified in some scientific way by most reasonable judgments.

to argue, first let's be precise what we are arguing about. Here's few points:

• emacs 23's introduction of line-move-visual feature is good (or bad).

• emacs 23's default of line-move-visual t good (or bad)

• the very concep of move by screen line is good (or bad).

You may disagree with all of them. But to be fruitful in our debate, lets pick just one of the topic, and we can argue about it rationally.

please don't just claim about how it is like Microsoft Word. That's not a good argument. Because, for example, i can then retort that you are a dinosaur.

also, don't just say that people are getting dumb. Older people, may it be grandpa or college professors, tend to say that a lot, but it is usually uttered as a sigh of life without much basis. Part of it is simply because people get old and they envy the young. Generally speaking, newer generation are smarter, healthier, more informed, throughout history.

The good old days, my ass. LOL.

Btw, i'm 42. Not exactly the young thing you want to grab.

Am happy to have become acquainted with you. However, i'm sorry i'm not the typical normal people when it comes to human animal relationships and argument resolution. You started a aggressive bitching about a issue i care about, then throw the typical “Microsoft Word” slur when i gave a list of essays i've written in the past 10 years that reason about why i think it is a good feature.


LSL Problems: llEdgeOfWorld()

Perm url with updates: http://xahlee.org/sl/lsl_llEdgeOfWorld.html

LSL Problems: llEdgeOfWorld()

Get your Xah Particle Maker today!

Xah Lee, 2010-06-09

This page documents a bad design in LSL.

Another major LSL idiocy.

There's a LSL function llEdgeOfWorld. Used to detect if if you are near a sim edge. Here's a quote from The official documentation at Source:

integer llEdgeOfWorld( vector pos, vector dir );

Checks to see whether the border hit by dir from pos is the edge of the world (has no neighboring simulator)

Returns an integer that is a boolean.

Here's documentation from lslwiki.net, more precise, but same. Quote:

Returns TRUE if the line along the direction dir from the position pos hits the edge of the world in the current simulator. Returns FALSE if that line crosses into another simulator.

Simple enough. So, you think you can use this function, that if there's a neighboring sim, it returns true, else it returns false. WRONG!

For example, in following

llEdgeOfWorld( <128,128,0>, < 5, 0.0, 0.0>)

it checks 5 meters to the east of sim center. Clearly it's not sim edge, but it returns true. Here's the full code you can test:

// 2010-06-09
         if ( llEdgeOfWorld( <128,128,0>, < 5, 0.0, 0.0>))
             llOwnerSay( "llEdgeOfWorld returned true" );
         } else
             llOwnerSay( "llEdgeOfWorld returned false" );

The correct documentation should be like this:

Returns TRUE if the line from pos to pos+dir does crosses sim edge AND that the line do not pass at least 2 regions. Else, return FALSE.

Besides the incorrect documentation problem, the function is just idiotic. It should be as it is documented from the official site. So the problem is probably a sloppy implementation.

One can't imagine how simple things as this can get wrong. I doubt that the Linden Labs are filled with idiotic programers. Perhaps it is more caused by lack of time in startups.

Want to dash through walls?
Try Xah Tele-Dasher!

Emacs nxml-mode Fontification Changes

Perm url with updates: http://xahlee.org/emacs/emacs_23.2_nxml_fontification_changes.html

Emacs nxml-mode Fontification Changes

Xah Lee, 2010-06-06

Apparently, the fontification in nxml-mode changed in emacs 23.2 from 23.1.

In emacs 23.1, all tag names have font “function-name”, and attributes have “variable-name.”

In emacs 23.2, the fontification is more complex. Most tag names have the font property of “nxml-element-local-name”. Attributes have “nxml-attribute-local-name”. Attribute values has “nxml-attribute-value”. Double quotes has “nxml-attribute-value-delimiter”. The slash in “/>” is “nxml-tag-slash”. Angle brackets are “nxml-tag-delimiter”.

Normally you wouldn't notice this, but you would if you regularly use htmlize to turn a buffer into html code. Then, you'll see that that each font name gets turned into a span tag, and the 23.2's version is much more verbose.

Here's a example. Suppose you have this xml code:

   <content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<div class="img">
<img src="../creatures/i/Tarsius_Syrichta_250px.jpg" alt="Tarsius Syrichta 250px" width="250" height="375" />
<p class="cpt">Tarsier</p>
  <link rel="alternate" href="http://xahlee.org/creatures/tarsier.html"/>

here's what the htmlized version looks like in emacs 23.2:

 <span class="nxml-tag-delimiter">&lt;</span><span class="nxml-element-local-name">entry</span><span class="nxml-tag-delimiter">&gt;</span>
   <span class="nxml-tag-delimiter">&lt;</span><span class="nxml-element-local-name">title</span><span class="nxml-tag-delimiter">&gt;</span><span class="nxml-text">Tarsier</span><span class="nxml-tag-delimiter">&lt;</span><span class="nxml-tag-slash">/</span><span class="nxml-element-local-name">title</span><span class="nxml-tag-delimiter">&gt;</span>
   <span class="nxml-tag-delimiter">&lt;</span><span class="nxml-element-local-name">id</span><span class="nxml-tag-delimiter">&gt;</span><span class="nxml-text">tag:xahlee.org,2010-06-09:144817</span><span class="nxml-tag-delimiter">&lt;</span><span class="nxml-tag-slash">/</span><span class="nxml-element-local-name">id</span><span class="nxml-tag-delimiter">&gt;</span>
   <span class="nxml-tag-delimiter">&lt;</span><span class="nxml-element-local-name">updated</span><span class="nxml-tag-delimiter">&gt;</span><span class="nxml-text">2010-06-09T07:48:17-07:00</span><span class="nxml-tag-delimiter">&lt;</span><span class="nxml-tag-slash">/</span><span class="nxml-element-local-name">updated</span><span class="nxml-tag-delimiter">&gt;</span>
   <span class="nxml-tag-delimiter">&lt;</span><span class="nxml-element-local-name">summary</span><span class="nxml-tag-delimiter">&gt;</span><span class="nxml-text">photo</span><span class="nxml-tag-delimiter">&lt;</span><span class="nxml-tag-slash">/</span><span class="nxml-element-local-name">summary</span><span class="nxml-tag-delimiter">&gt;</span>
   <span class="nxml-tag-delimiter">&lt;</span><span class="nxml-element-local-name">content</span> <span class="nxml-attribute-local-name">type</span>=<span class="nxml-attribute-value-delimiter">"</span><span class="nxml-attribute-value">xhtml</span><span class="nxml-attribute-value-delimiter">"</span><span class="nxml-tag-delimiter">&gt;</span>
<span class="nxml-tag-delimiter">&lt;</span><span class="nxml-element-local-name">div</span> <span class="nxml-namespace-attribute-xmlns">xmlns</span>=<span class="nxml-namespace-attribute-value-delimiter">"</span><span class="nxml-namespace-attribute-value">http://www.w3.org/1999/xhtml</span><span class="nxml-namespace-attribute-value-delimiter">"</span><span class="nxml-tag-delimiter">&gt;</span>
<span class="nxml-tag-delimiter">&lt;</span><span class="nxml-element-local-name">div</span> <span class="nxml-attribute-local-name">class</span>=<span class="nxml-attribute-value-delimiter">"</span><span class="nxml-attribute-value">img</span><span class="nxml-attribute-value-delimiter">"</span><span class="nxml-tag-delimiter">&gt;</span>
<span class="nxml-tag-delimiter">&lt;</span><span class="nxml-element-local-name">img</span> <span class="nxml-attribute-local-name">src</span>=<span class="nxml-attribute-value-delimiter">"</span><span class="nxml-attribute-value">../creatures/i/Tarsius_Syrichta_250px.jpg</span><span class="nxml-attribute-value-delimiter">"</span> <span class="nxml-attribute-local-name">alt</span>=<span class="nxml-attribute-value-delimiter">"</span><span class="nxml-attribute-value">Tarsius Syrichta 250px</span><span class="nxml-attribute-value-delimiter">"</span> <span class="nxml-attribute-local-name">width</span>=<span class="nxml-attribute-value-delimiter">"</span><span class="nxml-attribute-value">250</span><span class="nxml-attribute-value-delimiter">"</span> <span class="nxml-attribute-local-name">height</span>=<span class="nxml-attribute-value-delimiter">"</span><span class="nxml-attribute-value">375</span><span class="nxml-attribute-value-delimiter">"</span> <span class="nxml-tag-slash">/</span><span class="nxml-tag-delimiter">&gt;</span>
<span class="nxml-tag-delimiter">&lt;</span><span class="nxml-element-local-name">p</span> <span class="nxml-attribute-local-name">class</span>=<span class="nxml-attribute-value-delimiter">"</span><span class="nxml-attribute-value">cpt</span><span class="nxml-attribute-value-delimiter">"</span><span class="nxml-tag-delimiter">&gt;</span><span class="nxml-text">Tarsier</span><span class="nxml-tag-delimiter">&lt;</span><span class="nxml-tag-slash">/</span><span class="nxml-element-local-name">p</span><span class="nxml-tag-delimiter">&gt;</span>
<span class="nxml-tag-delimiter">&lt;</span><span class="nxml-tag-slash">/</span><span class="nxml-element-local-name">div</span><span class="nxml-tag-delimiter">&gt;</span>
<span class="nxml-tag-delimiter">&lt;</span><span class="nxml-tag-slash">/</span><span class="nxml-element-local-name">div</span><span class="nxml-tag-delimiter">&gt;</span>
   <span class="nxml-tag-delimiter">&lt;</span><span class="nxml-tag-slash">/</span><span class="nxml-element-local-name">content</span><span class="nxml-tag-delimiter">&gt;</span>
  <span class="nxml-tag-delimiter">&lt;</span><span class="nxml-element-local-name">link</span> <span class="nxml-attribute-local-name">rel</span>=<span class="nxml-attribute-value-delimiter">"</span><span class="nxml-attribute-value">alternate</span><span class="nxml-attribute-value-delimiter">"</span> <span class="nxml-attribute-local-name">href</span>=<span class="nxml-attribute-value-delimiter">"</span><span class="nxml-attribute-value">http://xahlee.org/creatures/tarsier.html</span><span class="nxml-attribute-value-delimiter">"</span><span class="nxml-tag-slash">/</span><span class="nxml-tag-delimiter">&gt;</span>
 <span class="nxml-tag-delimiter">&lt;</span><span class="nxml-tag-slash">/</span><span class="nxml-element-local-name">entry</span><span class="nxml-tag-delimiter">&gt;</span>

The original is 492 chars, now it is 5627 chars, about 10 times.

Every left angle bracket “<” becomes:

<span class="nxml-tag-delimiter">&lt;</span>

Right angle bracket “>” becomes:

<span class="nxml-tag-delimiter">&gt;</span>

For every double quote, now it becomes:

<span class="nxml-attribute-value-delimiter">"</span>

and slash “/” in closing tags become:

<span class="nxml-tag-slash">/</span>

In emacs 23.1, the angle brackets are simply “&lt;” and “&gt;”, slash and double quote are left as is.

So, this means, if you have a lot xml tutorial web pages showing xml code in color, it'll become huge.

Though, over all i'm not sure this is a problem. The fontification in emacs simply improved by being more exact and elaborate. When you turn buffer fontification into html/css code, naturally you got this huge number of span tags, and that's just the design of html. But overall, the web today has video streaming all over, so few kilo bytes is normal, and doesn't take more time for browser to parse it than say loading a single image file.

If you look at any of the top site's html source code, most of them are not human readable since about mid 2000s.


All About Processing Lines in Emacs Lisp

Perm url with updates: http://xahlee.org/emacs/elisp_all_about_lines.html

All About Processing Lines in Emacs Lisp

Xah Lee, 2010-06-08

This page discuss issues about which emacs lisp functions to use for processing lines. e.g. move cursor to to end of line, to next line, grabbing the current line, etc. If you don't know elisp, first take a look at Emacs Lisp Basics.

In emacs, there are lots of ways to move or grab lines. In particular, in the first few years of my elisp experience, i find it confusing. Here are some functions or variables that are related to lines:

(search-forward "\n")
(search-backward "\n")
(thing-at-point 'line)

Do you know the differences? Also, there are issues such as:

  • Is a line defined by End Of Line (EOL) char or screen line?
  • When grabbing a line, does it includes the EOL?
  • What happens if the line is at end of buffer, or beginning?
  • Which is faster?

If you are not sure, this article helps.

Moving to Beginning/End of a Line

To move cursor to beginning or end of a line, use

(goto-char (line-beginning-position))
(goto-char (line-end-position))

These are written in C. So, they are much faster than other functions that are written in elisp.

They don't have problems when the line is at the beginning of buffer or end.

They work by EOL (end of line) character. That is, not screen line.

Do not use “(search-forward "\n")”. Because you'll have special cases if the line is at the end of buffer and doesn't have a EOL. It is also slower.

Do not use move-beginning-of-line or move-end-of-line. Because these are designed more for interactive use.

Moving to Previous/Next Line

To move by line, use

(forward-line 1)
(forward-line -1)

Do not use next-line or previous-line, because these are more for interactive use. Their behavior changes depending on the variable line-move-visual.

Grabbing the Current Line

To grab current line, use

(let (p1 p2 myLine)
  (setq p1 (line-beginning-position) )
  (setq p2 (line-end-position) )
  (setq myLine (buffer-substring-no-properties p1 p2))

Do not use “(thing-at-point 'line)”, because thing-at-point have problems when the line is at the end of buffer. Normally, thing-at-point will include the EOL char, but if the line is at the end of buffer, then it won't. So, if you use it, it makes you do extra work to detect special cases. Also, thing-at-point is complex elisp code and is slower.

Get All Lines In a File Into a List

See: How To Process A File Line By Line In Elisp.

Screen Lines

If you want to move cursor across lines as defined by the screen, you can use these.


line-move-visual is a variable that controls whether next-line and previous-line move by EOL or screen.


Note that in emacs buffer, all line endings are represented by “"\n"”.

So, if you need to use “(search-forward "\n")”, you don't have to worry about whether the file uses unix or Windows line endings.

See also: Emacs Line Return and Windows, Unix, Mac, All That ^M ^J ^L.

Thanks to Uday S Reddy and Alan Mackenzie for some tips.


PIMP (rap song) music video by 50 cent

Perm url with updates: http://xahlee.org/Periodic_dosage_dir/sanga_pemci/pimp_50_cent.html

P.I.M.P. (rap song) by 50 Cent

Xah Lee, 2010-06-07

P.I.M.P. (2003), a rap song by 50 cent.

This is a mastery of rap lyrics. It tells a story of pimping in a pimping style.

「• perms = “Incapacitation due to excessive alcohol consumption and/or use of controlled substances.” Source
I don't know what you heard about me
But a bitch can't get a dollar out of me
No Cadillac, no perms, you can't see
That I'm a motherfucking P I M P
「• Dolce & Gabana = These refer to luxury brands. See: Gucci, Fendi, Prada, BCBG, Burberry, Dolce & Gabbana. The BCBG may be French for bon chic bon genre, meaning “good style, good class”. 」
「• G = Gold?」
「• Ramada = A hotel chain. Ramada
Now shorty, she in the club, she dancing for dollars
She got a thing for that Gucci, that Fendi, that Prada
That BCBG, Burberry, Dolce & Gabana
She feed them fools fantasies, they pay her cause they wanna
I spit a little G man, and my game got her
A hour later, have that ass up in the Ramada
Them trick niggas in her ear saying they think about her
I got the bitch by the bar trying to get a drink up out her
She like my style, she like my smile, she like the way I talk
She from the country, think she like me cause I'm from New York
I ain't that nigga trying to holla cause I want some head
I'm that nigga trying to holla cause I want some bread
I could care less how she perform when she in the bed
Bitch hit that track, catch a date, and come and pay the kid
Look baby this is simple, you can't see
You fucking with me, you fucking with a P I M P
I'm bout my money you see, girl you can holla at me
If you fucking with me, I'm a P I M P
Not what you see on TV, no Cadillac, no greasy
Head full of hair, bitch I'm a P I M P
Come get money with me, if you curious to see
how it feels to be with a P I M P
Roll in the Benz with me, you could watch TV
From the backseat of my V, I'm a P I M P
Girl we could pop some champagne and we could have a ball
We could toast to the good life, girl we could have it all
We could really splurge girl, and tear up the mall
If ever you needed someone, I'm the one you should call
I'll be there to pick you up, if ever you should fall
If you got problems, I can solve'em, they big or they small
That other nigga you be with ain't bout shit
I'm your friend, your father, and confidant, BITCH
I told you fools before, I stay with the tools
I keep a Benz, some rims, and some jewels
I holla at a hoe til I got a bitch confused
She got on Payless, me I got on gator shoes
I'm shopping for chinchillas, in the summer they cheaper
Man this hoe you can have her, when I'm done I ain't gon keep her
Man, bitches come and go, every nigga pimpin know
You saying it's secret, but you ain't gotta keep it on the low
Bitch choose with me, I'll have you stripping in the street
Put my other hoes down, you get your ass beat
Now Nik my bottom bitch, she always come up with my bread
The last nigga she was with put stitches in her head
Get your hoe out of pocket, I'll put a charge on a bitch
Cause I need 4 TVs and AMGs for the six
Hoe make a pimp rich, I ain't paying bitch
Catch a date, suck a dick, shiiit, TRICK
Yeah, in Hollywoood they say there's no b'ness like show b'ness
In the hood they say, there's no b'ness like hoe b'ness ya know
They say I talk a lil fast, but if you listen a lil faster
I ain't got to slow down for you to catch up, BITCH

G-Unit Remix

A official remix of the song was made, with additional rapper Snoop Dogg, Lloyd Banks and Young Buck.

Here's the video of this remix. It contains nude women. This music video is slightly better than the one before.

The vid is directed by Chris Robinson (director).

One of the topless girl in the vid is Adriana Sage (b1980), and the Asian one may be Francine Dee. See her nude vid at: Source

In this remix, one verse in the original lyrics is removed, the one starting with “I told you fools before”, and is replaced by new verses from the other rappers. With respect to the lyrics itself, this change is not so good, because it removed parts of the stereotypical scene of pimping and the replacement lyrics is not as focused.

Here are the new verses (including spoken dialog.).

Pimp Pimp hurray! Pimp Pimp Hurray!
[Don Juan] I bring you the chosen one, Big Jefferey
[Snoop Dogg] Now this playa right here, he's different. He don't drive no cadilac
[Everyone] Whaaaaaaat?!
[Snoop Dogg] He don't got a perm.
[Everyone] Whaaaaaaat?!
[Snoop Dogg] Why should we let you in the Pimp Legion Of Doom?
[50 Cent] Man, whoever said progress was a slow process wasnt talkin about me. I'm P.I.M.P. PLUS, I got the magic stick.
G G G G G 'Mix
「• DPG = Dogg Pound Gangstaz, a rapper group associated with Snoop Dogg.」
[Bridge: Snoop Dogg]
F-I-F-T-Y C-E-N-T and S-N double O-P
Doggy style in ya mouth for the 2003
And y'all know I'm from the DPG
F-I-F-T-Y C-E-N-T and S-N double O-P
We internationally known and locally respected
(And you know you're just a P.I.M.P)
Now what you know about me
「• so you right? = not clear what the girls said here.」
「• chicks = most lyrics sites have “hoe” instead. “hoe” is slang for “whore”.」
「• bro's = most sites has “niggaz”」
「• ride = most sites say “niggaz”.」
「• bitches = clearly, Snoop didn't sung “bitches”, but something like “tricks”?」
「• crippin = seems “licking” to me. What does “cripping” mean?」
「• gators = Alligator shoes.」
[Snoop Dogg]
Yeah girl I got my Now and Later gators on
I'm bout to show you how my pimp hand is way strong
Your dead wrong if ya think that pimpin' gon' die
Twelve piece with a hundred chicks by my side
(so you right?)
I'm down with that boy Fifty like I down with blue
(We love you Snoop Dogg)
Yeah i love you too
G-U-N-I-Tizzy, fuckin' with me and the D-P-Gizzy
My bro's in New York know how Doggy get down
I got my rides in Queens, I got my bitches Uptown
I got my business in Manhattan, I ain't F'ing around
I got some butter pecan, Puerto Ricans from the Boogie Down (Down)
That's waitin' on me to return
So they can snatch these braids out and put my hair in a perm, word
They love it when I gets to crippin'
And spittin' this mag-ah-ni-ficent pimpin
[Lloyd Banks]
You need to switch over and ride with a star
It'll get you far
I'm a P I M P G-A-N-G-S-T-E-R
Yeah, I'm young, but I ain't dumb
Got some tricks, but I ain't one
I'm a guerrilla for scrilla, I trip you, you try to run
I let em' do as they please, as long as they get my cheese
Even if they gotta freeze, or if it's a hundred degrees
I keep em' on they knees, take a look under my sleeve
I ain't gotta give em' much, they happy with Mickey D's, PIMP
[Young Buc]
We keep it pimpin' in the South, you know how it go (Dirty, Dirty)
We drive old school white walls with mink clothes
I spin the G-Unit piece, and get em' dizzy
Man cough up your love, or you're girl comin' with me
When your neck and wrist glow, she already should know
That money make the world go round, so lets get mo'
Its time to show these playas how it should be done
You got pimp potential, you're might could be one, G-UNIT
「• tabarnak = can't find this ending dialog on the web... and i can't make out what they are.」
well the pimp can't say don't downy, crowny
freeze, freeze, freeze
Was this page useful? If so, please do donate $3, thank you donors!


ErgoEmacs 1.8.1 for Windows is out

Perm url with updates: http://xahlee.org/emacs/blog.html

ErgoEmacs 1.8.1 for Windows is out! This one is based on the shiny new Emacs 23.2. (See: Emacs 23.2 Features.) Check it out! Download at: googlecode.com ErgoEmacs 1.8.1 Setup.exe. (Thanks to David Capello for the C coding on Windows.)