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: dmitry@gutov.dev, Philip Kaludercic <philipk@posteo.net>,
	60338@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#60338: [PATCH] Add option to present server changes as diffs
Date: Fri, 1 Sep 2023 22:19:50 +0100	[thread overview]
Message-ID: <CALDnm50TfGEi7-Oc4_tNWCwtXWii_vxP+tjjbBEBymtO8yqo-w@mail.gmail.com> (raw)
In-Reply-To: <m1zg25d2ck.fsf@eshelyaron.com>

On Fri, Sep 1, 2023 at 10:13 PM Eshel Yaron <me@eshelyaron.com> wrote:
>
> João Távora <joaotavora@gmail.com> writes:
>
> > I've finally pushed this to master, after working on mostly on the user
> > confirmation logic.  I deprecated `eglot-confirm-server-initiated-edits'
> > (had crap semantics anyway) and replaced it with a shiny new
> > 'eglot-confirm-server-edits', with a simpler name but much more powerful
> > (see its docstring).
> >
> [...]
> >
> > Please have a look, give it some testing, and tell me if I missed
> > anything.
>
> Great stuff!  One issue I came across is with unsaved buffers.

I'm fixing that as we speak.  I'll read your recipe later, but
I'm 90% sure it's the same stuff I've been trying to fix for
most of today.

> Lastly, I have an improvement suggestion for the `:type` of
> `eglot-confirm-server-edits` to make it nicer to deal with via Custom:
>
> diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
> index 8d95019c3ed..afb99e4b9ca 100644
> --- a/lisp/progmodes/eglot.el
> +++ b/lisp/progmodes/eglot.el
> @@ -413,12 +413,17 @@ eglot-confirm-server-edits
>  `eglot-code-actions', `eglot-code-action-quickfix', etc.  ACTION
>  is one of the symbols described above.  The value `t' for COMMAND
>  is accepted and its ACTION is the default value."
> -  :type '(choice (const :tag "Use diff" diff)
> +  :type (let ((basic-choices
> +               '((const :tag "Use diff" diff)
>                   (const :tag "Summarize and prompt" summary)
>                   (const :tag "Maybe use diff" maybe-diff)
>                   (const :tag "Maybe summarize and prompt" maybe-summary)
> -                 (const :tag "Don't confirm" nil)
> -                 (alist :tag "Per-command alist")))
> +                 (const :tag "Don't confirm" nil))))
> +          `(choice ,@basic-choices
> +                   (alist :tag "Per-command alist"
> +                          :key-type (choice (function :tag "Command")
> +                                            (const :tag "Default" t))
> +                          :value-type (choice . ,basic-choices)))))
>
>  (defcustom eglot-extend-to-xref nil
>    "If non-nil, activate Eglot in cross-referenced non-project files."

I'll look at this bit, too.   I looks sane, and I'm glad I found a custom.el
expert to call on :-)

João





  reply	other threads:[~2023-09-01 21:19 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-26 13:42 bug#60338: [PATCH] Add option to present server changes as diffs Philip Kaludercic
2022-12-29  0:01 ` Yuan Fu
2022-12-29 14:28   ` Philip Kaludercic
2022-12-29 14:36     ` João Távora
2022-12-29 14:39       ` Philip Kaludercic
2022-12-30 13:13         ` João Távora
2022-12-30 15:09           ` Philip Kaludercic
2023-01-04 20:56             ` Felician Nemeth
2023-06-09  7:55               ` Philip Kaludercic
2023-06-11 21:33 ` Philip Kaludercic
2023-06-12 11:56   ` Eli Zaretskii
2023-06-12 12:35     ` Philip Kaludercic
2023-06-12 12:52       ` Eli Zaretskii
2023-06-12 13:29         ` Philip Kaludercic
2023-06-12 13:41           ` Eli Zaretskii
2023-06-13 21:34             ` Philip Kaludercic
2023-06-14  6:00               ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-14 11:27                 ` Philip Kaludercic
2023-06-18 11:38                   ` Philip Kaludercic
2023-06-18 15:18                     ` João Távora
2023-06-18 22:37                       ` João Távora
2023-06-24 16:53                       ` Philip Kaludercic
2023-09-01  0:06                         ` João Távora
2023-09-01  5:18                           ` Philip Kaludercic
2023-09-01 21:12                           ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-01 21:19                             ` João Távora [this message]
2023-09-01 22:01                             ` João Távora
2023-09-02  6:13                               ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-02  9:55                                 ` João Távora
2023-09-07  1:00                                   ` Dmitry Gutov
2023-09-07  6:28                                     ` Juri Linkov
2023-09-07 12:41                                       ` Dmitry Gutov
2023-09-07 12:45                                       ` Dmitry Gutov

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=CALDnm50TfGEi7-Oc4_tNWCwtXWii_vxP+tjjbBEBymtO8yqo-w@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=60338@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --cc=eliz@gnu.org \
    --cc=me@eshelyaron.com \
    --cc=philipk@posteo.net \
    /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.