From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Fill column indicator functionality Date: Fri, 15 Mar 2019 16:12:30 +0200 Message-ID: <83y35gz0oh.fsf@gnu.org> References: <20190309132207.w2ho3j6p5on6fyzw@Ergus> <838sxo87gc.fsf@gnu.org> <20190311104814.kp2nv6arv47hcykz@Ergus> <83y35l4ee0.fsf@gnu.org> <20190312152928.73o4b5fk4paz7wm5@Ergus> <834l883w15.fsf@gnu.org> <20190312192017.fkfd4h5gsbdue5q3@Ergus> <83imwm3fxf.fsf@gnu.org> <20190313200225.dpqrw7xthkj47fqw@Ergus> <83bm2e35a1.fsf@gnu.org> <20190314030224.l5zseslncw3xc5ox@Ergus> <835zsm2c2s.fsf@gnu.org> <303612d8-e691-f753-84c9-f462d88262b6@gmail.com> <83d0ms1to4.fsf@gnu.org> <234b0a33-65e5-5170-47ce-c0eaab762aef@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="72303"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 15 15:37:06 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4nxK-000IkK-1v for ged-emacs-devel@m.gmane.org; Fri, 15 Mar 2019 15:37:06 +0100 Original-Received: from localhost ([127.0.0.1]:56343 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4nxI-0004vL-U1 for ged-emacs-devel@m.gmane.org; Fri, 15 Mar 2019 10:37:05 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4nZv-0001tF-0G for emacs-devel@gnu.org; Fri, 15 Mar 2019 10:12:58 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4nZu-0002qK-QL; Fri, 15 Mar 2019 10:12:54 -0400 Original-Received: from [176.228.60.248] (port=1194 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h4nZr-0004AI-Fw; Fri, 15 Mar 2019 10:12:53 -0400 In-reply-to: <234b0a33-65e5-5170-47ce-c0eaab762aef@gmail.com> (message from =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel on Fri, 15 Mar 2019 08:44:20 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234160 Archived-At: > Cc: emacs-devel@gnu.org > From: Clément Pit-Claudel > Date: Fri, 15 Mar 2019 08:44:20 -0400 > > On 15/03/2019 03.30, Eli Zaretskii wrote: > > Does this answer your question? > > It does, thanks. It's a very thorough answer. Thanks for taking the time, Eli! > > > The continuous line idea does have one advantage: it seamlessly > > supports lines of variable height. But that use case is rare, and I > > think we will be able to support them with the glyph-based > > implementation as well. > > This was actually going to be my follow-up question :) I see lines of variable height in many of most of my Emacs mode, through a combination of factors: > > - Font switches due to symbols picked by prettify-symbols-mode not being available in my main programming font > - Variable-pitch fonts being used by AucTeX for section and paragraph titles > - Varying font sizes to indicate nesting depth in Org-mode > - Changing line spacing to separate top-level items in org-mode Does the fci mode support those use cases? > Is there actually a good way to support all this? Maybe using a very thin space and a face with a :background on it would do. Or maybe it will be possible to put a 'display (space …) property on the line character so that it displays as a 1-px wide line? You are thinking in terms of a Lisp program, but we are talking about something the display engine itself does. E.g., setting display properties from inside the display engine is a non-starter, because users don't expect such properties to appear without their say-so. But yes, we have several methods of scaling display elements which could be used to solve these use cases. I just don't think we should block the feature until they are fixed. However important are the use cases you enumerated, they are not the majority in Emacs, right? > Also, as a second follow-up question: we already have code to draw boxes around characters; would it be hard to extend that code to allow customization of which sides to draw? Alternatively, would it be hard to add a vertical strike-through face property? (I've used horizontal strike-through as a way to display horizontal lines in the past) I'm not sure where are you going with this. Yes, Emacs is capable of drawing horizontal and vertical lines of specified pixel-width, but the issue here is not whether we can do it, the issue is how to do that in a way that fits as much as possible the current basic design and implementation of the display engine. Otherwise, the job becomes so large that we probably won't have this feature any time soon. Specifically, drawing a "vertical strike-through" still doesn't solve the problem with the height of the line, because the glyph we will "strike through" will still need to have a suitable height, right? You need to realize that on its highest level, the display engine manipulates glyphs (and there are several kinds of them). All the decorations that are not glyphs can be drawn only in places where glyphs can never appear. In a nutshell (and this is admittedly an over-simplification), the display engine can display and/or lay out anything that we can present/represent as a glyph, but that's all it can do.