all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Eshel Yaron <me@eshelyaron.com>
Cc: Spencer Baugh <sbaugh@janestreet.com>, emacs-devel@gnu.org
Subject: Re: Adding fix suggestions to Flymake diagnostics
Date: Mon, 27 May 2024 23:03:24 +0100	[thread overview]
Message-ID: <CALDnm53j7mvJDMkdTEfn6sR_c0pS-orHJ2GCH6eXpXad82hvog@mail.gmail.com> (raw)
In-Reply-To: <m1cyp7rw5i.fsf@dazzs-mbp.kpn>

On Mon, May 27, 2024 at 6:40 PM Eshel Yaron <me@eshelyaron.com> wrote:

> More or less, yes.  Except the overlay property wouldn't be keymap but
> something that just holds a function that produces the fix suggestion,

Overlays are for storing overlay known properties,  if you want to attach
arbitrary metadata to a diagnostic, I'd use the its `data` field.

> And again, I'm not especially interested in simplifying Eglot: that can
> be a nice bonus, but it's fine IMO if Eglot ends up keeping its code
> while also working with the standard API.

That's a shame, but your call. Eglot will have no more code to do the
same it already does.  I hope you've gotten my input of how I'd do it,
you're free to do it as you wish and I'm free to ignore it.

> > I just note that newlibrary.el _will_ have to know about
> > "edit-producing diagnostics", which means knowing about edits, or at
> > least a way to apply them.  It will likely have to require
> > 'refactor.el', which is where the "edit" format will live, and call on
> > it to present and eventually apply those edits.
> >
> > In fact, in my mind, newlibrary.el is so short that there's little
> > reason it shouldn't just be a small section of refactor.el.
>
> Right.  We also needs to know about Flymake diagnostics and their
> overlays, though, so the same argument suggests putting it in Flymake,
> as I did in my draft implementation :)

It's not a symmetrical situation.  It's quite different to use the
longstanding battle-tested, 4-major-version-old concept of "diagnostic"
in a new library and taiting a longstanding stable library with a
duplicated, brittle,  untested new concept that is completely foreign
to its genesis.



  reply	other threads:[~2024-05-27 22:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-26 13:37 Adding fix suggestions to Flymake diagnostics Eshel Yaron
2024-05-26 14:38 ` João Távora
2024-05-26 15:56   ` Eshel Yaron
2024-05-26 20:24     ` João Távora
2024-05-27 12:15       ` Eshel Yaron
2024-05-27 14:02         ` João Távora
2024-05-27 17:40           ` Eshel Yaron
2024-05-27 22:03             ` João Távora [this message]
2024-05-31  7:15               ` Eshel Yaron
2024-05-31  8:55                 ` João Távora
2024-06-03 18:10                   ` Eshel Yaron

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=CALDnm53j7mvJDMkdTEfn6sR_c0pS-orHJ2GCH6eXpXad82hvog@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=me@eshelyaron.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 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.