[OS X Emacs] tabs in text files

Nick Rothwell nick at cassiel.com
Wed Sep 22 18:56:08 EDT 2010


On 22 Sep 2010, at 23:32, Jean-Christophe Helary wrote:

> The file is a "standard" .txt file encoded in utf-8.

.txt files get opened in text mode. In text mode TAB calls "indent-relative", which tabs past whitespace on the previous line (to align word input with words on that line).

Meta-I will do tab-to-tab-stop, which will get you proper tabs (at least, if the tab stops are set up appropriately, which by default is at intervals of eight spaces: in that regard, tab emulates "real" tabs as found on a typewriter).

Try an eval of:

	(setq indent-line-function 'tab-to-tab-stop)

to get this effect (in all buffers).

> I mean trivial as in "how can Aquamacs be made to behave like all the other standards Mac editors of the box" ?

In its defence, Emacs predates the Mac. (GNU Emacs development kicked off about the same time as the Mac shipped.)

	-- N.


Nick Rothwell / Cassiel.com Limited
www.cassiel.com
soundcloud.com/cassiel
www.last.fm/music/cassiel
www.linkedin.com/in/cassiel
www.loadbang.net




More information about the MacOSX-Emacs mailing list