unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Elijah G <eg642616@gmail.com>
Cc: sbaugh@catern.com, sbaugh@janestreet.com, philipk@posteo.net,
	emacs-devel@gnu.org, luangruo@yahoo.com
Subject: Re: [PATCH] Flymake Support Indicator Errors in Margin
Date: Sat, 06 Apr 2024 14:35:51 +0300	[thread overview]
Message-ID: <86edbi3eqw.fsf@gnu.org> (raw)
In-Reply-To: <CACnP4N+r6aoGOjSHxJAEfT6+jY7bEWYkw7UeRx6iy-w0D+39Ag@mail.gmail.com> (message from Elijah G on Wed, 27 Mar 2024 15:29:28 -0600)

> From: Elijah G <eg642616@gmail.com>
> Date: Wed, 27 Mar 2024 15:29:28 -0600
> Cc: Eli Zaretskii <eliz@gnu.org>, Spencer Baugh <sbaugh@janestreet.com>, philipk@posteo.net, 
> 	emacs-devel@gnu.org, Po Lu <luangruo@yahoo.com>
> 
> I've now updated the patch to allow auto resize margins and using margins
> when it's in terminal frames.

Thanks, I think this is almost ready to be installed; see a few minor
comments below.

> Sadly I couldn't find anything for detecting HDiPI frames, so the user
> must have to configure it.

I don't think Emacs should second-guess the user in this matter: let
the user decide whether the fringes are too narrow for these
indicators.

> +(defcustom flymake-indicator-type (if (display-graphic-p)
> +                                      'fringes
> +                                    'margins)
> +  "Indicate which indicator type to use for display errors.
> +
> +The value can be nil (dont indicate errors but just highlight them),
                         ^^^^
"don't"

> +(defcustom flymake-margin-indicators-string
> +  '((error "!!" compilation-error)
> +    (warning "!" compilation-warning)
> +    (note "!" compilation-info))
> +  "Strings used for margins indicators.
> +The value of each list may be a list of 3 elements where specifies the
> +error type, its string to use and its face,
               ^^^^^^^^^^
"the string"

> +or a list of 2 elements specifying only the error type and its string.
                                                          ^^^^^^^^^^^^^^
"and the corresponding string"

> +Indicators can be an ASCII or non-ASCII string.

This sentence is redundant, so I suggest to remove it.  The ASCII vs
non-ASCII issue is only relevant for the default value; users can do
whatever they want when they customize the option.

> +(defcustom flymake-autoresize-margins t
> +  "If non-nil automatically resize margin-width.
                ^
Comma is missing there.  Also, how about telling what triggers
the resizing?

> +Only if `flymake-indicator-type' is set to margins."
   ^^^^^^^
"Only relevant if..."

> +(defvar-local flymake-original-margin-width nil
> +  "Store original margin width")

Should this be an internal variable (named flymake--original-margin-width)?
Also, please consider telling in the doc string when is the width restored.

> +(defun flymake--resize-margins (&optional og-width)
> +  "Resize current window margins according `flymake-margin-indicator-position'.
                                    ^^^^^^^^^
"according to"

> +Return to original margin width if OG-WIDTH is non-nil."

Suggest to rename OG-WIDTH to ORIG-WIDTH.

Last, but not least: please mention this change (and the new user
options) in NEWS and in the Flymake manual.



  parent reply	other threads:[~2024-04-06 11:35 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
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 [this message]
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=86edbi3eqw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=eg642616@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=philipk@posteo.net \
    --cc=sbaugh@catern.com \
    --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).