emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 0d5036061b5: Skip Eglot test if using very old clangd


From: Robert Pluim
Subject: Re: master 0d5036061b5: Skip Eglot test if using very old clangd
Date: Wed, 22 Mar 2023 12:51:59 +0100

>>>>> On Wed, 22 Mar 2023 11:14:05 +0000, João Távora <joaotavora@gmail.com> 
>>>>> said:
    >> This doesnʼt care where 'version ' appears:
    >> 
    >> (defun eglot--clangd-version ()
    >> "Report on the clangd version used in various tests."
    >> (let ((version (shell-command-to-string "clangd --version")))
    >> (when (string-match "version[[:space:]]+\\([0-9.]*\\)"
    >> version)
    >> (match-string 1 version))))

    João> Looks good, can you push?

Done

    João> I wonder why this is so difficult
    João> to do with replace-regexp-in-string.

Itʼs because we donʼt have a 'really-match-everything' version of '.',
so you end up with

  (replace-regexp-in-string
   ".*version[[:space:]]+\\([0-9.]*\\)\\(.\\|[\n\r]\\)*" "\\1"
   (shell-command-to-string "clangd --version"))

which I personally donʼt like the look of.

Robert
-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]