On Mon, 08 Apr 2013 19:43:51 +0100, Nobody wrote: > On Sun, 07 Apr 2013 01:30:45 +0000, Steven D'Aprano wrote: > >> Am I the only one here who has used a typewriter? >> >> Tab stops were set manually, to a physical distance into the page, >> using a mechanical stop. This long predates the "rule" that tab stops >> are every 8 characters. > > And your point is? > > Typewriters don't have a tab "character". The information regarding tab > stops is conveyed out-of-band from the typist to the typewriter, and > doesn't need to persist beyond the time taken to type the document.
Both text editors and typewriters encode information about tab settings out of band. Editors encode that information in some combination of program configuration, command-line switches, environment variables, and embedded mode lines in the document itself. Typewriters encode that information in the typists' memory, or failing that, in the actual physical space left on the page. That's a difference that makes no difference. My point is that there were well-established semantics for what a tab should do, and the "8 character tab" is not that. Pressing the tab key on a keyboard while entering text ought to instruct the editor to advance to a specified tab stop capable of being set anywhere on the page. Word processors use that model: the word processor stores the positions of the tab stops out of band, usually in the "paragraph formatting" or "style sheet", but in principle they could keep the position of the tab stops global to the document or even global to the application. Good text editors also support this model. Some versions of Vim, for example, include a feature called "variable tabstops". Emacs includes a variable called tab-stop-list which can set variable tab stops[1]. Even the Linux command "less" supports variable width tabs, with the -x option. In case you think this is only for Unix editors, the Windows "Boxer Text Editor" also supports variable tab stops. There may, or may not be, good reasons for an eight character default setting for tab stops. But eight characters is not, and never has been, the One True Way of setting tab stops. [1] Although what happens when you press the tab key in Emacs is so complicated that only three people in the world have ever understood it fully. The first is Richard Stallman, then second is dead, and the third has gone mad. -- Steven -- http://mail.python.org/mailman/listinfo/python-list
