From 8331913389eb9fa42e13f2555c049232a014151d Mon Sep 17 00:00:00 2001 From: Cayetano Santos Date: Mon, 28 Jul 2025 21:47:24 +0200 Subject: [PATCH] gnu: emacs-eglot-x: Update to 0.6-0.8e872ef. * gnu/local.mk (dist_patch_DATA): Unregister it. * gnu/packages/patches/emacs-eglot-x-fix-apply-text-edits.patch: Delete file. * gnu/packages/emacs-xyz.scm (emacs-eglot-x): Update to 0.6-0.8e872ef. [version]: Use git-version. [source]: Remove patch. Change-Id: I7557ee5d66d53678a43835453b34d30d7287f8c7 Signed-off-by: Liliana Marie Prikler --- gnu/local.mk | 1 - gnu/packages/emacs-xyz.scm | 15 +++++------- .../emacs-eglot-x-fix-apply-text-edits.patch | 23 ------------------- 3 files changed, 6 insertions(+), 33 deletions(-) delete mode 100644 gnu/packages/patches/emacs-eglot-x-fix-apply-text-edits.patch diff --git a/gnu/local.mk b/gnu/local.mk index 953b1403bc3..0bc93651997 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1224,7 +1224,6 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-deferred-fix-number-of-arguments.patch \ %D%/packages/patches/emacs-elpy-dup-test-name.patch \ %D%/packages/patches/emacs-disable-jit-compilation.patch \ - %D%/packages/patches/emacs-eglot-x-fix-apply-text-edits.patch \ %D%/packages/patches/emacs-exec-path.patch \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ %D%/packages/patches/emacs-gnus-alias-reference-signature.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index ba6c9039746..ca4feff3832 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -23324,10 +23324,11 @@ one if it fails.") (define-public emacs-eglot-x ;; Not tagged. - (let ((commit "a09ab28cf01d7cbb223ad83fbbb694c5158c96b8")) + (let ((commit "8e872efd3d0b7779bde5b1e1d75c8e646a1f729f") + (revision "1")) (package (name "emacs-eglot-x") - (version "0.6") + (version (git-version "0.6" revision commit)) (source (origin (method git-fetch) (uri (git-reference @@ -23336,18 +23337,14 @@ one if it fails.") (file-name (git-file-name name version)) (sha256 (base32 - "0s17nv59gzgqgskid41lfacsqnzdiq2p3ds0vglcfqwypr3k898c")) - ;; Backporting an unreleased fix from - ;; https://github.com/nemethf/eglot-x/commit/354150c299e241df09c8b904b68177fd9b41fe0e - ;; Remove this patch once version 0.7 is released - (patches (search-patches "emacs-eglot-x-fix-apply-text-edits.patch")))) + "0s2p22w0b5a3b97x99qybhfgicvkzkcma6lfbi0nda54v25a8skb")))) (build-system emacs-build-system) (inputs (list emacs-eglot)) (home-page "https://github.com/nemethf/eglot-x") (synopsis "Protocol extensions for Eglot") (description - "This package adds support for some LSP extensions to @code{emacs-eglot}. -") + "This package adds support for some LSP extensions to +@code{emacs-eglot}.") (license license:gpl3+)))) (define-public emacs-eglot-booster diff --git a/gnu/packages/patches/emacs-eglot-x-fix-apply-text-edits.patch b/gnu/packages/patches/emacs-eglot-x-fix-apply-text-edits.patch deleted file mode 100644 index b9dcebded3c..00000000000 --- a/gnu/packages/patches/emacs-eglot-x-fix-apply-text-edits.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/eglot-x.el b/eglot-x.el -index a694f90..221822d 100644 ---- a/eglot-x.el -+++ b/eglot-x.el -@@ -659,10 +659,17 @@ (defun eglot-x--check-capability (&rest capabilities) - - ;;; Snippet TextEdit - --(defun eglot-x--apply-text-edits (edits &optional version) -+(defun eglot-x--apply-text-edits (edits &optional version silent) - "Apply EDITS for current buffer if at VERSION, or if it's nil. - This is almost a verbatim copy of `eglot--apply-text-edits', but - it handles the SnippetTextEdit format." -+ ;; NOTE: eglot--apply-text-edits changed a lot since this defun was -+ ;; imlemented. Additionally, rust-analyzer has changed as well. -+ ;; Now it only sends one SnippetTextEdit. Hence the implementation -+ ;; should be updated, but "if it ain't broke, don't fix it". And -+ ;; this whole extension is going to be obsoleted soon: -+ ;; https://github.com/microsoft/language-server-protocol/issues/724#issuecomment-1850413029 -+ - ;; This is quite rust-analyzer specific. It assumes there is at - ;; most one meaningful SnippetTextEdit and that can be identified by - ;; searching for "$0".