Does there exist an Emacs mode that replaces the contemporary interpretation of tabs (move to 8, 16, 24, .. or a multiple of some constant) with their original typewriter interpretation (set stops at 40, at 60, or at any fixed columns)?

Within text-mode or without, either is fine.

The objective is to easily enter dual-language texts, side-by-side. The following example highlights why resorting, say, to csv-mode is inadequate:

Stabat mater dolorósa         At the Cross her station keeping,
juxta Crucem lacrimósa,       At the Cross her station keeping, 
dum pendébat Fílius.          close to her Son to the last.

Cuius ánimam geméntem,        Through her heart, His sorrow sharing,
contristátam et doléntem      all His bitter anguish bearing,
pertransívit gládius.         now at length the sword has passed.

There is no way to set the separator within the file, and—excluding that one would change the default—it's a nuisance to select it at each edit.

I'm not seeking something as sophisticated as counting rhythms, nor something as simple as adjusting tab-width. It would be nice if it works for prose (paragraphs wrap around in columns 0-39 and also wrap around independently in columns 40-79) as well as for poetry (lines match strictly one-to-one), but support for just the latter (again, as in a typewriter) would be nice.

This appears to be the implementation behind indent-dwim in programming modes, or at least in c-mode and c++-mode. I haven't figured out why python-mode does not align comments vertically (some PEP mandated it?), but that's an altogether separate question.

1 Answer 1


Have you looked at Two-Column Editing which comes with Emacs?

Two-column mode lets you conveniently edit two side-by-side columns of text. It uses two side-by-side windows, each showing its own buffer.

Each column is in a separate buffer while editing your text. When you're done editing you merge the two buffers. You can also take existing two column text and "break" it into Two-Column mode's two-buffer paradigm, edit, and re-merge.

  • I'm still puzzled that C-x 6 2 had been at my fingertips (literally, by mistyping C-x 5 2) for so long and I never bothered to check it. After looking at the manual, I'm still unsure of the separator though. Suppose I'm editing a file by a hex-editor, what column separator character should I insert?
    – Calaf
    May 9, 2019 at 13:51
  • @Calaf: looks it depends on the text at point when you call C-x 6 s: "By default, the width is 1, so the column separator is the character before point."
    – npostavs
    May 12, 2019 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.