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, 08 Mar 2019 22:06:41 +0200 Message-ID: <83y35p871q.fsf@gnu.org> References: <20190205184720.nd43dg5ho47dhqfe@Ergus> <83tvhgsxvm.fsf@gnu.org> <20190206222524.zic6idgs2vkglg7h@Ergus> <8736p0nznz.fsf@tcd.ie> <837eebsmaj.fsf@gnu.org> <87sgwvco1l.fsf@Ergus.i-did-not-set--mail-host-address--so-tickle-me> <83r2cel3qf.fsf@gnu.org> <20190211165636.ch5x4wb2ibdt2dzy@Ergus> <83ef8el03u.fsf@gnu.org> <20190308185744.a4vnfoab5wdvqyny@Ergus> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="229636"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 08 21:07:41 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 1h2LmN-000xbW-Iu for ged-emacs-devel@m.gmane.org; Fri, 08 Mar 2019 21:07:39 +0100 Original-Received: from localhost ([127.0.0.1]:49274 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2LmM-0004VH-Ho for ged-emacs-devel@m.gmane.org; Fri, 08 Mar 2019 15:07:38 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2Lli-0004Uz-EJ for emacs-devel@gnu.org; Fri, 08 Mar 2019 15:06:59 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2Lli-0005ZW-5G; Fri, 08 Mar 2019 15:06:58 -0500 Original-Received: from [176.228.60.248] (port=2147 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h2Llh-0005iK-JP; Fri, 08 Mar 2019 15:06:57 -0500 In-reply-to: <20190308185744.a4vnfoab5wdvqyny@Ergus> (message from Ergus on Fri, 8 Mar 2019 19:57:46 +0100) 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:233938 Archived-At: > Date: Fri, 8 Mar 2019 19:57:46 +0100 > From: Ergus > Cc: emacs-devel@gnu.org > > I have been playing with the display engine in order to try to implement > this functionality (at least a proof of concept). But after reading the > comments and the ~33E3 lines in xdisp.c there are more questions now > than answers. Feel free to ask the questions here. > The simplest approach I see is to add a '|' (or similar) in the desired > column in the "at_end_of_line:" label. But maybe there is a better > approach? You are on the right track. But I'd suggest to do this inside the function extend_face_to_end_of_line. It is called near that label, but you will see that it's called in several more places; I expect at least some of them to need the same changes. > My approach is somehow based on the display_line_numbers, but taking > into account that in this case the characters are always the same, maybe > there is a way to set them in the background and it will be simpler? Simpler than what? Can you tell what kind of complexity did you want to avoid? Display of line numbers needs to calculate the number of each screen line, and that of course is not needed in this case. You just need to calculate the width of a stretch glyph that will display as whitespace between the end of the line and the fill column. You will see that extend_face_to_end_of_line already does something similar in the case of R2L lines. > Is it there any documentation about this? Maybe, but to point you to it I need to understand what "this" means in this context. > specially the relations between the data structures? Which data structures? there are quite a few of them, so please be more specific. > because the it and the glyphs are very confusing. Feel free to ask any questions about these two, especially about what confuses you. > Any help please? I'm here to help. And thanks for working on this.