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 19:26:35 +0300 Message-ID: <83v9khs5s4.fsf@gnu.org> References: <83a71ttn0b.fsf@gnu.org> 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="109782"; 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 18:27:28 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 1jdyts-000ST8-Av for ged-emacs-devel@m.gmane-mx.org; Wed, 27 May 2020 18:27:28 +0200 Original-Received: from localhost ([::1]:34626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdytr-0001G4-Dy for ged-emacs-devel@m.gmane-mx.org; Wed, 27 May 2020 12:27:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdytG-0000b9-0Z for emacs-devel@gnu.org; Wed, 27 May 2020 12:26:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39678) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdytF-0008TC-NZ; Wed, 27 May 2020 12:26:49 -0400 Original-Received: from [176.228.60.248] (port=2979 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jdytC-00039T-Ir; Wed, 27 May 2020 12:26:47 -0400 In-Reply-To: (message from Yuan Fu on Wed, 27 May 2020 11:48:35 -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:251510 Archived-At: > From: Yuan Fu > Date: Wed, 27 May 2020 11:48:35 -0400 > Cc: emacs-devel > > > 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. > > I think both approach are equally appropriate. And the tab-based one aligns more closely to word processors. If we want to gradually add WYSIWYG editor features, and enable Emacs to edit rich text, this is an unavoidable feature. TABs in Emacs use columns, so their resolution is more coarse. Therefore, they fit this job less well, because they cannot handle variable-pitch fonts. > I just wrote a (very rough) proof-of-concept patch—it’s much easier than I thought. With the patch you can do something like > > (put-text-property (region-beginning) (region-end) > 'pixel-tab-stop-list '(70 140 210 280 350 420)) This is not TAB stops, this is a new text property that does the same job as :align-to. Why invent a new property when we already have an existing one that does the same?