From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#56820: outline-minor-mode replacing the first character with an arrow Date: Thu, 08 Sep 2022 20:39:24 +0300 Organization: LINKOV.NET Message-ID: <86o7vplq9f.fsf@mail.linkov.net> References: <87ilngmaei.fsf@gnus.org> <86wnaojst4.fsf@mail.linkov.net> <86mtbfdqdj.fsf@mail.linkov.net> <83ilm3ko51.fsf@gnu.org> <86edwotx6n.fsf@mail.linkov.net> <83tu5kii23.fsf@gnu.org> <86mtbcqx5u.fsf@mail.linkov.net> <83r10oih91.fsf@gnu.org> <86mtbbuj55.fsf@mail.linkov.net> <83a67bggst.fsf@gnu.org> <86edwm7351.fsf@mail.linkov.net> <83h71ifeqo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9916"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: larsi@gnus.org, yilkalargawworkneh@gmail.com, 56820@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 08 19:43:16 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1oWLYZ-0002R4-SP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Sep 2022 19:43:15 +0200 Original-Received: from localhost ([::1]:50006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWLYY-0001en-RJ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Sep 2022 13:43:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWLYM-0001by-Cy for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2022 13:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43095) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWLYM-0004KV-3h for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2022 13:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWLYL-0001Lx-Vl for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2022 13:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Sep 2022 17:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56820 X-GNU-PR-Package: emacs Original-Received: via spool by 56820-submit@debbugs.gnu.org id=B56820.16626589385147 (code B ref 56820); Thu, 08 Sep 2022 17:43:01 +0000 Original-Received: (at 56820) by debbugs.gnu.org; 8 Sep 2022 17:42:18 +0000 Original-Received: from localhost ([127.0.0.1]:60027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWLXe-0001Kx-4u for submit@debbugs.gnu.org; Thu, 08 Sep 2022 13:42:18 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:47569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWLXN-0001Ju-Cp for 56820@debbugs.gnu.org; Thu, 08 Sep 2022 13:42:16 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 4D0652000C; Thu, 8 Sep 2022 17:41:53 +0000 (UTC) In-Reply-To: <83h71ifeqo.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 08 Sep 2022 11:32:31 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:241930 Archived-At: >> I counted ~100 occurrences of display_line_numbers in xdisp.c. >> So I guess display_outlines could be added based on code >> for display_line_numbers using the same strategy as >> tab_line was added based on header_line. >> >> If this is a good idea, I could look into doing this >> after finishing all already opened issues, probably >> around December. > > I don't think I understand what you mean by "same strategy" here, so I > cannot answer the question yet. > > Vdisplay_line_numbers is used in xdisp.c for several purposes: > > . adjust layout calculations for the space taken by line numbers > . disable some redisplay optimizations that cannot be used when line > numbers (especially relative numbers) are displayed > . produce and display the line numbers for relevant lines > > Which one(s) are "strategy" for the purpose of this discussion? The strategy is to reuse the existing code that adjusts layout calculations to display the line numbers, and to display outline arrows after line numbers. > I also don't think I understand which parts of the image you posted > you want to emulate. In addition to outline-style widgets for folding > and un-folding buffer text, the image shows vertical lines that > delineate code blocks. Those are shown in the same column as the > braces, and thus call for a different kind of implementation than the > line numbers. I guess you didn't mean those? I meant only outline arrows for folding and un-folding, not vertical lines for code blocks. I recall someone provided some patches to implement crosshairs, but maybe the existing display-fill-column-indicator-mode could be adapted to display vertical lines for code blocks.