unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Support paragraph-local tab stops
@ 2020-05-26 23:26 Yuan Fu
  2020-05-27  0:27 ` Yuan Fu
  2020-05-27 15:29 ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Yuan Fu @ 2020-05-26 23:26 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]

The motivation is variable pitch table in Emacs. Right now, although you can use tab stops to properly align a table, because the tabs stops are buffer-global, all the tables in a buffer has to share the same tab stop configurations. Then a good tab stop configuration for one table could mess up the alignment for another table. Let me explain:

In a word processor, if I have two tables. One with short headers, one with long headers. The image below shows the two tables and the blue arrows on the ruler represents the tab stops for the first table.



Here, the blue arrows show the tab stops of the second table:



As show above, the second table has longer tab stops since they have longer headers.

In Emacs, both table would have to use long tab stops, and the first table with short headers would waste a lot of space. In order to set proper tab stops, you have to go through the whole buffer and use the longest header for each column.

Word processors doesn’t have this problem because they have paragraph-local tab stops, so each table can have their own tabs stops. I wonder if Emacs can do the same. Can we add a text property that points to a list that specifies the tabs stops to use? Is that possible?

Yuan

[-- Attachment #2.1: Type: text/html, Size: 2123 bytes --]

[-- Attachment #2.2: Screen Shot 2020-05-26 at 7.15.31 PM.png --]
[-- Type: image/png, Size: 57934 bytes --]

[-- Attachment #2.3: Screen Shot 2020-05-26 at 7.17.23 PM.png --]
[-- Type: image/png, Size: 56909 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-27 16:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 23:26 Support paragraph-local tab stops Yuan Fu
2020-05-27  0:27 ` Yuan Fu
2020-05-27 15:29 ` Eli Zaretskii
2020-05-27 15:48   ` Yuan Fu
2020-05-27 16:26     ` Eli Zaretskii
2020-05-27 16:51       ` Yuan Fu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).