From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Variable pitch text filling Date: Thu, 02 Dec 2021 19:53:36 +0200 Message-ID: <83ee6uao67.fsf@gnu.org> References: <87ilwft1ph.fsf@gnus.org> <87lf19r7uv.fsf@gnus.org> <83tufxy7f0.fsf@gnu.org> <83o865xuf3.fsf@gnu.org> <87v90b136m.fsf@gnus.org> <83tufvukjj.fsf@gnu.org> <875ysbxal0.fsf@gnus.org> <83h7bvugxm.fsf@gnu.org> <87sfvessx6.fsf@gnus.org> <87wnkp9c3t.fsf@gnus.org> <87ee6wanra.fsf@gnus.org> <83r1awse4k.fsf@gnu.org> <87sfvc8kdw.fsf@gnus.org> <83czmgs7t1.fsf@gnu.org> <87k0go8ios.fsf@gnus.org> <83bl20s2dp.fsf@gnu.org> <87wnkojmny.fsf@gnus.org> <837dcos1oy.fsf@gnu.org> <87o860jm27.fsf@gnus.org> <831r2ws0jf.fsf@gnu.org> <87fsrcjkik.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19354"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen , "Feng Shu" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 02 18:56:06 2021 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 1msqJR-0004on-Tr for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Dec 2021 18:56:06 +0100 Original-Received: from localhost ([::1]:58830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msqJP-0007uf-Sp for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Dec 2021 12:56:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msqHG-00055M-BH for emacs-devel@gnu.org; Thu, 02 Dec 2021 12:53:50 -0500 Original-Received: from [2001:470:142:3::e] (port=54518 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msqHF-00058Y-Mq; Thu, 02 Dec 2021 12:53:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=YM+2lXLWCIMw8AVD/LHUS3gRNuYyhmJhZ9stp6QkSUc=; b=aTZvDopc211r UH83gUoC9u2iV6+tw89Lsi+dPhmj7aLk2pxhDRtxhRfarL55pTubLu3CoRNIcg191dMfyMm1+POGP VdSLj0GbrGhZf7TQ5Nf9JDRGcwCBLx9fn9qDm/A554uQkcr+eiSXX9AjFW4tbR8UpKYQPq9kG/qdB GvfjLDPW+QVCUjV68LPtb+bOikDGxye4Qy4RCp8ap2ZRCuuRbtEsi6YxZbj9NUrQEEalNnVonex6z HF+vV/xiUhAG8V9MROGGBsUpAiokR+F/flGHG0FUQh7UC1/+Nbd9Ce4WROnEh7v5gUj3otJ6bnmdO XxBnsFxNHmvYF4wAAp6nKA==; Original-Received: from [87.69.77.57] (port=1627 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msqHF-0006hj-Ck; Thu, 02 Dec 2021 12:53:49 -0500 In-Reply-To: <87fsrcjkik.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 01 Dec 2021 18:35:31 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:280771 Archived-At: > From: Lars Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Wed, 01 Dec 2021 18:35:31 +0100 > > Eli Zaretskii writes: > > >> 1) Be able to specify a min width based on a "standard" char width (for > >> "-" in the mode line, for instance) > >> > >> 2) A specific pixel width (for justification, for instance) > >> > >> 3) The integral multiple (i.e., "grid") > > > > 1) is for mode line, and is satisfied with min-width display spec > > (which needs to be fixed, perhaps, see bug#52183). > > 2) is for pixel-resolution justification, and will be satisfied by a > > new kind of display spec. > > 3) will should be per-buffer (or globally), and will be satisfied by a new > > buffer-local variable. > > > > Is something missing? > > Yes. > > 1) is difficult to achieve, because we haven't implemented a recursive > `min-width'. To do so it possible, but finicky, since we have to look > far ahead in the buffer to see whether a new min-width spec ends the > current one, or starts a new recursive one. I'd rather not do that, > because it'd be ugly and weird. > > So all three of these should be a new kind of text property. In > addition, 3) should also be a buffer-local variable in addition to being > a text property. (The text property is useful if you have a monospace > table in a buffer, but there may be other text in the buffer that you > don't want to quantise.) I've now implemented the "variable" part of 3). To try it, set the new variable align-columns-display (suggestions for a better name are welcome) to a non-nil value. I'd like our CJK users to try this and tell if they like the results, before implementing also the text-property part of the feature, as that is significantly more complex to code. Note: there's currently a heuristic in the code I installed, meant to detect fixed-pitch fonts (the above feature only affects fixed-pitch faces). In the long run, we probably should extend 'struct font' to have this flag readily available, so there should be no need for that heuristic.