~ruther/guix-local

8331913389eb9fa42e13f2555c049232a014151d — Cayetano Santos 8 months ago a3c9537
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 <liliana.prikler@gmail.com>
3 files changed, 6 insertions(+), 33 deletions(-)

M gnu/local.mk
M gnu/packages/emacs-xyz.scm
D gnu/packages/patches/emacs-eglot-x-fix-apply-text-edits.patch
M gnu/local.mk => gnu/local.mk +0 -1
@@ 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	\

M gnu/packages/emacs-xyz.scm => gnu/packages/emacs-xyz.scm +6 -9
@@ 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

D gnu/packages/patches/emacs-eglot-x-fix-apply-text-edits.patch => gnu/packages/patches/emacs-eglot-x-fix-apply-text-edits.patch +0 -23
@@ 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".