unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: bird <sbaugh@catern.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Elijah G <eg642616@gmail.com>,
	Spencer Baugh <sbaugh@janestreet.com>,
	joaotavora@gmail.com, philipk@posteo.net, emacs-devel@gnu.org
Subject: Re: [PATCH] Flymake Support Indicator Errors in Margin
Date: Sun, 17 Mar 2024 16:44:15 +0000 (UTC)	[thread overview]
Message-ID: <87jzm0iza9.fsf@catern.com> (raw)
In-Reply-To: <864jd677qh.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Mar 2024 13:10:14 +0200")

Eli Zaretskii <eliz@gnu.org> writes:
>> From: Elijah G <eg642616@gmail.com>
>> Date: Thu, 14 Mar 2024 09:35:33 -0600
>> Cc: João Távora <joaotavora@gmail.com>, 
>> 	philipk@posteo.net, emacs-devel@gnu.org
>> 
>> On Thu, Mar 14, 2024 at 5:05 AM Eli Zaretskii <eliz@gnu.org> wrote:
>> 
>> > > +(defcustom flymake-margin-indicators-string
>> > > +  `((error ,(if (char-displayable-p 8252)
>> > > +               "‼"
>> > > +             "!!")
>> > > +     compilation-error)
>> >
>> > When do you expect this value to be evaluated?
>> >
>> > In general, I wonder whether it would be simpler and wiser to use just
>> > "!!", and leave it to users to customize to "‼" if their displays
>> > support that.  (We can mention the possibility in the doc string.)
>> 
>> I implemented it in a similar way to how display-fill-column-indicator
>> does with display-fill-column-indicator-character, this since I expect
>> users to only set left-margin-width to 1, because if there is several
>> errors on the same line, the indicators will be displayed next to each
>> other and it could be confusing.
>> 
>> However I agree that it is better to change it to just "!!",
>> I fixed the patch and added a doc string for the possibility of including
>> non-ASCII characters.
>
> Spencer, any comments?

A few thoughts:

- I looked through packages in core which use fringes.  The only
  function which seems to also support margins is
  gdb-put-breakpoint-icon, which automatically uses margins instead of
  fringes to display a breakpoint icon if (display-images-p) is nil.

- The current version of Elijah's patch requires the user to explicitly
  configure left-margin-width (or right-margin-width) to non-zero if
  they want the indicators to appear; the margins are not automatically
  grown, unlike in gdb-put-breakpoint-icon.

- I'm not sure whether or why this is even desirable in a TTY.

  The indicators duplicate information that's already communicated by
  the face, so they're a minor benefit.  In a graphical frame, the
  indicators are basically "free" in terms of visual space, since they
  display in the fringe which already exists, so it's worth having them.

  But in a TTY, with the current patch, two columns of text in every
  flymake buffer will be devoted to displaying these indicators, whether
  they're currently needed or not.  That seems like too high a cost,
  unless I'm missing something.

- If it *is* desirable on a TTY, then the need to explicitly configure
  it is unfortunate.

- One alternative design could display the indicators in the first few
  columns of text, if that would otherwise be whitespace, to avoid
  wasting space for the margin.  I think I've seen other packages which
  display stuff in the whitespace in the first column.

- If it's just about making diagnostics more visible, there are various
  things we could do, like displaying an indicator inline with the text
  which has the diagnostic, or highlighting the entire line containing
  the diagnostic.

Elijah, could you say more about your setup?

- You mentioned you already have a left margin configured; what is
  displayed in that margin? Is it anything other than flymake/flycheck
  indicators?

- Do you have the margin automatically disappear if you aren't using
  flycheck in a buffer/if there are no flycheck errors in a buffer?

- Is there some reason that seeing the indicators is especially
  important for you?  Does it communicate information not already
  carried by the face?

- If you just want the diagnostics to be more visible, would customizing
  the face on the diagnostics help?  Or perhaps customizing
  flymake-show-diagnostics-at-end-of-line?



  reply	other threads:[~2024-03-17 16:44 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 23:18 [PATCH] Flymake Support Indicator Errors in Margin Elijah G
2024-03-12  9:24 ` Philip Kaludercic
2024-03-12 17:22   ` Elijah G
2024-03-13 12:18     ` Eli Zaretskii
2024-03-14  1:50       ` Elijah G
2024-03-14 11:05         ` Eli Zaretskii
2024-03-14 11:28           ` João Távora
2024-03-14 15:35           ` Elijah G
2024-03-16 11:10             ` Eli Zaretskii
2024-03-17 16:44               ` bird [this message]
2024-03-17 17:01                 ` Eli Zaretskii
2024-03-17 17:34                 ` Elijah G
2024-03-17 18:43                   ` bird
2024-03-17 19:21                     ` Elijah G
2024-03-25  1:46                       ` Elijah G
2024-03-27  0:13                         ` sbaugh
2024-03-27  0:36                           ` Elijah G
2024-03-27 21:29                           ` Elijah G
2024-03-28  6:01                             ` Eli Zaretskii
2024-03-28 17:34                               ` Elijah G
2024-04-06 11:36                                 ` Eli Zaretskii
2024-03-28  7:30                             ` Juri Linkov
2024-03-28 17:44                               ` Elijah G
2024-04-06 11:35                             ` Eli Zaretskii
2024-04-06 20:14                               ` Elijah G
2024-04-07  5:47                                 ` Eli Zaretskii
2024-04-07 17:20                                   ` Elijah G
2024-04-18  9:10                                     ` Eli Zaretskii
2024-03-19  7:03                   ` Augusto Stoffel
2024-03-17 17:49                 ` Elijah G
2024-03-19  7:04                   ` Augusto Stoffel

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87jzm0iza9.fsf@catern.com \
    --to=sbaugh@catern.com \
    --cc=eg642616@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=philipk@posteo.net \
    --cc=sbaugh@janestreet.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).