From: João Távora Date: Tue, 13 Apr 2021 00:16:31 +0000 (+0100) Subject: Add a passing test demonstrating clangd + tramp works X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~145 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0d89dd73ff02bd0f70e2fcca0c2dcedf821faeb3;p=emacs.git Add a passing test demonstrating clangd + tramp works ... It works at least within the minimal, well-controlled reproducible settings of this test. Maybe if we knew something more about the setup of the user who submitted this report we would be able to concoct a failing test, but we don't. * eglot-tests.el (subr-x): Require it (eglot--make-file-or-dir): Return expanded file name. (eglot-tests--lsp-abiding-column-1): New helper. (eglot-lsp-abiding-column): Use it. (eglot--tramp-test): Fix `skip-unless` condition. (eglot--tramp-test-2): New test. GitHub-reference: per https://github.com/joaotavora/eglot/issues/667 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index cbde1b7a4c7..20f59956f81 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -25,7 +25,7 @@ ;;; Commentary: ;; Simply M-x eglot should be enough to get you started, but here's a -;; little info (see the accompanying README.md or the URL for more). + ;; little info (see the accompanying README.md or the URL for more). ;; ;; M-x eglot starts a server via a shell-command guessed from ;; `eglot-server-programs', using the current major-mode (for whatever @@ -2791,6 +2791,15 @@ If NOERROR, return predicate, else erroring function." if (file-directory-p f) append (eglot--files-recursively f) else collect (expand-file-name f)))) +(defun eglot--directories-recursively (&optional dir) + "Because `directory-files-recursively' isn't complete in 26.3." + (cons (setq dir (expand-file-name (or dir default-directory))) + (cl-loop with default-directory = dir + with completion-regexp-list = '("^[^.]") + for f in (file-name-all-completions "" dir) + if (file-directory-p f) append (eglot--files-recursively f) + else collect (expand-file-name f)))) + (defun eglot--directories-matched-by-globs (dir globs) "Discover subdirectories of DIR with files matched by one of GLOBS. Each element of GLOBS is either an uncompiled glob-string or a