Posts

Showing posts from August 9, 2009

How to use and setup Emacs's whitespace-mode

Image
perm url with update: http://xahlee.org/emacs/whitespace-mode.html.How to use and setup Emacs's whitespace-modeXah Lee, 2009-08-14This pages tells you how to setup emacs's whitespace-mode, and how to use it.Emacs 23 has this whitespace-mode feature. It renders spaces, tabs, newlines characters with a visible glyph.This feature is useful for working with “tab separated values” (CSV) that's a common format for importing/exporting address books or spreadsheets. It's also important in whitespace-significant langs such as Python.Type “Alt+x whitespace-mode” to toggle it on and off. Type “Alt+x global-whitespace-mode” to toggle it globally. There is also whitespace-newline-mode and global-whitespace-newline-mode. They only show newline chars.The default rendering of whitespace-mode, pretty unreadable. Different placement and mix of whitespaces are rendered with different colors. Also, long lines are colored dark purple. (download whitespace_sample_file.txt) How to clean whi…

A Exhibition Of Tech Geekers Incompetence: Emacs whitespace-mode

perm url with updates: http://xahlee.org/UnixResource_dir/writ/emacs_whitespace-mode_problems.htmlA Exhibition Of Tech Geekers Incompetence: Emacs whitespace-modeXah Lee, 2009-08-13Just wanted to express some frustration with whitespace-mode.Emacs 23, just released, has this whitespace-mode feature. It renders spaces, tabs, newlines characters with a visible glyph. This feature, is in Microsoft Word since about 1992.This feature is important in practical ways. For example, when you work with “tab separated line” files (CVS) that's a common format for importing/exporting address books or spreadsheets. It's also important in whitespace-significant langs such as Python. Or, in text processing when placement of space and tabs matters in the output.All i wanted, is to make Space and Tab and Newline chars visible.However, the emacs whitespace-mode does much more than that. It is designed for tech geeking control freaks to tune every aspect of white space in his source code. The mode…