From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: highlight-indent-guides in display engine Date: Fri, 12 Jul 2019 12:36:09 +0200 Message-ID: <20190712103609.jy7hfy6zorxwls3a@Ergus> References: <20190706211716.semd47fksgh66rug@Ergus> <83sgrh7uol.fsf@gnu.org> <20190711190651.b2kg64fg2ole2i5d@Ergus> <83zhlk2xiu.fsf@gnu.org> <20190712002127.6tm3scplu73syinp@Ergus> <83tvbr3fl7.fsf@gnu.org> <20190712095841.qn5rlgxxgqjllz4k@Ergus> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="24804"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 12 12:36:38 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.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlsuq-000673-0E for ged-emacs-devel@m.gmane.org; Fri, 12 Jul 2019 12:36:36 +0200 Original-Received: from localhost ([::1]:48068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlsuo-0006Z1-G7 for ged-emacs-devel@m.gmane.org; Fri, 12 Jul 2019 06:36:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35482) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlsuf-0006Ys-Us for emacs-devel@gnu.org; Fri, 12 Jul 2019 06:36:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlsue-0005dh-Jd for emacs-devel@gnu.org; Fri, 12 Jul 2019 06:36:25 -0400 Original-Received: from sonic310-57.consmr.mail.ir2.yahoo.com ([77.238.177.30]:43985) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hlsue-0005cI-AY for emacs-devel@gnu.org; Fri, 12 Jul 2019 06:36:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1562927782; bh=e3cD7difTvLCbtmFBWa+aON61TNBAqBcQ3WPS7QcCv4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=VxBVqz340vRtURyLrseYPvPvaU74ddY31JkTFkBSNmH8FnRqt9s+wHLj+jzNvcG/mBiuX42j4yYNbjEVuuBvtPXQmj74u2/eQAP8njtLmPtLh+xpCiW6dKLFmt9AnlsRy+5G4MDfSf8vQ05M4DuL5YQ2DoaeCQbtWezw8YHUIEhlhsykf3fYerZ+zCmhP57h7/gE3wYTC5qRv0c+y0XEVdHRauMVCY/aIEE1UQIwIJzemiAlKdXyCQtborNNlynebxseoe5svarlV1BUtdWJwEZ6V/+DtigN66UgI3+d6tL/Zh2ucxAHckrwJwLD/C7OnfmqEvTyKB8KERJd+OR21g== X-YMail-OSG: 7kEP_ewVM1ne8XARrQoC_5cPb1hBhvQ.vjua1aC951EncUMtmUfw_X80eUHdzNt BkcMKt_F00sXcBQQEDL.sJAcFfSM5JtHdhyynY4u4_uAGZJzAdXP040v1NNfZXkN8cLf3tOYFUoL gUwS9HSD6O5.pq8OZqY4HiH8gQwqvb_yj02_zrFVkNr7QwMBpvq3nOKUl_WznEzBdKR4KHRTIARg VAH5qCbvsT5PXFH8QOtmcW2OWEIfNhaMzSqH_PYyNJEUFRYbOC7Pdl4YLJ.9ujO5orPkS3UZpB9B 8fEynfYv8XJPxfxu29sQ92lgyskoTx1X4l8Dx_yckZ7Ls8AcywM0.g.tvBm.So_UinFlng1_BjYJ CzCna5m5wjmuoClFKngAPMbhpUB3082h8AHzNEeA0yy8ZH6AOwynpopIP8ree0NkDDXuYBtsqS_z JYME00h7LAcsML.a4sZhmLoc8FWULC3TauLlY6XnoxNpfg4x3QDx1xfBRg3WyLVRE8ri.YiJJVZi MJV7HVdAEQR_V5J__8J7HomTPpQtskwxyKI870zhHuUaNxutY56Z5Rpg4S0DA_cQlgbAjyZX0Qlk mKv.OHa76AAFuouRvAETeFOuRI4R2BIpqT7RisvBjKjWi1Mt3z.HAg31KvLbTmuIt.sG.muw3q7F Jsg24MaBryy3vWwMoc9S4UCbB8Beccuz6R479nebBHie5cX.vUULnfu1ACOlaDazA9qsViAIgS4M vt7Ob_vq.jqfW0TAVak2grzhtUV2w38GK02900v3cIROh_o0GryoyDbXxN1RTcRl.p3SSnknzmna Je_tc8EeEh8ErStL3HG.hYq5Ui2jFHbJqT1iZ5AHxs Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ir2.yahoo.com with HTTP; Fri, 12 Jul 2019 10:36:22 +0000 Original-Received: by smtp428.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID e518ee05974e0cb851f746b713d4b0ac; Fri, 12 Jul 2019 10:36:17 +0000 (UTC) Content-Disposition: inline In-Reply-To: <20190712095841.qn5rlgxxgqjllz4k@Ergus> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 77.238.177.30 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238519 Archived-At: On Fri, Jul 12, 2019 at 11:58:43AM +0200, Ergus wrote: >On Fri, Jul 12, 2019 at 09:57:24AM +0300, Eli Zaretskii wrote: >>>Date: Fri, 12 Jul 2019 02:21:27 +0200 >>>From: Ergus >>>Cc: emacs-devel@gnu.org >>> >>>>I don't think I understand: what do you mean by "add the indicator"? >>>>How would this indicator look like? >>>> >>>Maybe a vertical bar (like our previous column indicator) or a width >>>line. Or something customizable somehow. We just need to look around, >>>there are several alternatives. We must chose the one that fits better >>>and produces less complications for us. But provides the functionality >>>somehow. >>> >>>I don't thing how the indicator looks like may be a problem, but how >>>accurate or specific it behaves. >>> >>>I am just looking around and Geany adds some vertical points as the >>>indicator positions (every tab or every x spaces). But the spaces are >>>only "indicated" when used for the indentation.. >>> >>>Sublime behaves in the same way. But there is an option to highlight the >>>indicator only in the blocks around the current cursor. (As in the >>>attachement) >> >>I didn't receive any attachments with your message. >> >>>Athom on the other hand seems to behave as in the >>>highlight-indent-guides.el package: >>>https://atom.io/packages/indent-guide-improved >>> >>>With the animations and so on. Which seems to be the most complete >>>behavior, but less efficient. >> >>The animations and highlighting inside the current block should be in >>Lisp, not in the display code. If at all. >> >>>In all the cases I just see that they add the indicator based on the >>>characters between the beginning of the line and the indentation (first >>>non blank character) not looking at the previous lines. They ignore if >>>there is a previous line with wrong indentation or if the current line >>>adds 3 tabs more respecting to the previous one. >>> >>>So, implementing it in this way doesn't seems to be so complex right? >> >>So basically you are talking about displaying some special glyph at >>every tab stop inside leading whitespace of a line, or making each >>tab-stop width have a different background color? Yes, this should be >>possible to do in the display code. I just hope enough people will >>see this as sufficient, because if most current users of these >>packages won't switch, this new feature will not be worth its >>development, documentation, and maintenance effort. Maybe we should >>ask on Reddit first? > >Hi Eli: > >I think several people will prefer to have the whole functionalities and >options to customize (as usual in emacs if there is a feature that >solves N issues, then somebody will come asking for the N+1 option.) > >But in any case the minimal solution will be enough for a big number of >users if it compensates with performance. > >But I agree that we must ask in reddit. May you please add a reddit >poster about? Because as I don't use reddit very often, most users >ignore them. > >Thanks in advance, >Ergus > BTW: Thinking more about this, there is an important corner case with my simplistic solution: Lisp. While the simplest solution will work in most of the cases: the more popular languages (C, C++, Java, PHP, Python, Rust, Ruby, JavaScript), and others no so popular (Fortran, Lua, Assembler, Bash, Go) because their indentation is very regular; the lisp indentation is very different and irregular (As Emacs indents it, I don't know the rules it follows). So, the simplistic solution won't work at all for the Lisp (common-lisp, Scheme, Elisp) family and may be even a nuisance when writing Lisp :(. I don't find any other language family with the same issue, but probably there are other examples Any idea here? At least for the lisp case?