[OS X Emacs] tabs in text files

Doug McNutt douglist at macnauchtan.com
Wed Sep 22 19:36:17 EDT 2010


At 23:56 +0100 9/22/10, Nick Rothwell wrote:
>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).

I'm just a lurker here but I really want to find an editor that works like a typewriter - or an 026 IBM keypunch -  that I used in the 60's.

Typewriters have tab stops on the back which you can set by pulling them up. There is no requirement for even spacing of, say, 8 characters.  The 026 does the same thing with a punched card that is pre-punched for the tab stops you want. Columns 6, 7 and 72 were ever so familiar for FORTRAN folks.

I work regularly with tab separated data that comes from non-computer sources. Tektronix oscilloscopes and numerically controlled machinery, for instance. I like to produce assembly listings that have one character wide columns for error flags and address columns and instruction columns that really need variable widths to fit on a screen. Think about a file that contains full names in column 1 and fixed width data in columns to the right such as date of birth and account number. The software that reads the file must have a single tab with no spaces after the name column. How can I display and work with that in a programming editor?

I really need my typewriter-like tabs! And I'd really like them to work with proportionally spaced fonts.

One can do that in a word processor if you can avoid saving files destined for a compiler or assembler in HTML or RTF. Nisus once did that with all formatting in the resource fork but it lost the ability with OS neXt. Nisus would even word wrap an assembly comment field after the last tab so that it appeared lined up with the last tab on the next line.

The last time I tried emacs there were no typewriter tab stops. It only allowed selection of a constant width for all columns in a file. Has that changed?  BBedit does the same thing. gedit on Ubuntu doesn't do it right either but I do have the source for that if I could ever get it to compile.  Sigh.

-- 

Applescript syntax is like English spelling:
Roughly, though not thoroughly, thought through.



More information about the MacOSX-Emacs mailing list