all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ergus <spacibba@aol.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: highlight-indent-guides in display engine
Date: Fri, 12 Jul 2019 12:36:09 +0200	[thread overview]
Message-ID: <20190712103609.jy7hfy6zorxwls3a@Ergus> (raw)
In-Reply-To: <20190712095841.qn5rlgxxgqjllz4k@Ergus>

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 <spacibba@aol.com>
>>>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?



  reply	other threads:[~2019-07-12 10:36 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-06 21:17 highlight-indent-guides in display engine Ergus
2019-07-07 15:04 ` Eli Zaretskii
2019-07-11 19:06   ` Ergus
2019-07-11 19:15     ` Eli Zaretskii
2019-07-12  0:21       ` Ergus
2019-07-12  6:57         ` Eli Zaretskii
2019-07-12  9:58           ` Ergus
2019-07-12 10:36             ` Ergus [this message]
2019-07-12 13:45             ` Eli Zaretskii
2019-07-12 18:51               ` Ergus
2019-07-12 19:35                 ` Drew Adams
2019-07-13  6:59                 ` Eli Zaretskii
2019-07-13  8:32                   ` Joost Kremers
2019-07-13  8:38                     ` Eli Zaretskii
2019-07-13 21:37                       ` Joost Kremers
2019-07-14  5:37                         ` Eli Zaretskii
2019-07-15  5:44                           ` Joost Kremers
2019-07-14 12:56                         ` Ergus
2019-07-15 12:58                           ` Stefan Monnier
2019-07-15 14:11                             ` Ergus
2019-07-15 14:49                               ` Stefan Monnier
2019-07-15 17:10                                 ` Ergus
2019-07-15 18:43                                   ` Stefan Monnier
2019-07-16  8:06                                     ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2019-07-07 17:50 Keith David Bershatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190712103609.jy7hfy6zorxwls3a@Ergus \
    --to=spacibba@aol.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.