unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Support paragraph-local tab stops
Date: Tue, 26 May 2020 19:26:01 -0400	[thread overview]
Message-ID: <EFF00C39-4AA4-4623-B20C-F297226D00BC@gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2020-05-26 23:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 23:26 Yuan Fu [this message]
2020-05-27  0:27 ` Support paragraph-local tab stops 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=EFF00C39-4AA4-4623-B20C-F297226D00BC@gmail.com \
    --to=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).