From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Support paragraph-local tab stops Date: Wed, 27 May 2020 18:29:08 +0300 Message-ID: <83a71ttn0b.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="102663"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 27 17:29:49 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jdy05-000QcJ-Go for ged-emacs-devel@m.gmane-mx.org; Wed, 27 May 2020 17:29:49 +0200 Original-Received: from localhost ([::1]:51426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdy04-0001Sz-E8 for ged-emacs-devel@m.gmane-mx.org; Wed, 27 May 2020 11:29:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdxzc-00012y-Nj for emacs-devel@gnu.org; Wed, 27 May 2020 11:29:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38288) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdxzc-00049j-Ec; Wed, 27 May 2020 11:29:20 -0400 Original-Received: from [176.228.60.248] (port=3446 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jdxzb-0005N9-NL; Wed, 27 May 2020 11:29:20 -0400 In-Reply-To: (message from Yuan Fu on Tue, 26 May 2020 19:26:01 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251505 Archived-At: > From: Yuan Fu > Date: Tue, 26 May 2020 19:26:01 -0400 > > 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? IMO, TAB stops are not the right tool for the job here. You need to use the :align-to display property, which allows to align text with pixel granularity.