|
tty-format.el -- ANSI SGR and backspace overstriking: msg#00007emacs.sources
This is another idea I've had bouncing around and hadn't until now worked up properly. I struck a few text files with backspace overstriking (to make bold on a line printer) and some ANSI escapes (likewise) and wanted a nice way to view them, so this is a couple of format-alist entries to do that. I know ansi-color.el can apply overlays, but I made text properties so in theory you can cut and paste into another formatted document. Dunno quite how often that would arise though. The ansi would almost be a sensible format to save, perhaps with some marker sequence at the start of the file, but I suspect its time has passed. You'd have thought backspace overstriking definitely would have died with the printers it was for, yet it's still found in for instance the current debian groff meintro.txt documentation. The foo.txt below is a sample showing what happens on decode (if it hasn't been mangled by the mail). M-x format-decode-buffer ansi-sgr and/or M-x format-decode-buffer backspace-overstrike The `tty-format-guess' function is my best idea to automate detection of this sort of thing. Far from ideal, but works ok in practice.
gnu-emacs-sources mailing list gnu-emacs-sources@xxxxxxx http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | squeeze.el v. 0.0.2: 00007, paul . huff |
|---|---|
| Next by Date: | completion-ui -- new release: 00007, Toby Cubitt |
| Previous by Thread: | squeeze.el v. 0.0.2i: 00007, paul . huff |
| Next by Thread: | completion-ui -- new release: 00007, Toby Cubitt |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |