From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#60956: 27.2; project-try-vc considers every nonempty directory a root when vc-handled-backends is nil Date: Fri, 20 Jan 2023 14:14:15 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------dsUZT5aYQCS8p2MFVBFtN4Ww" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14134"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 To: Jason Orendorff , 60956@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 20 13:15:19 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pIqIh-0003O4-1I for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Jan 2023 13:15:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIqIT-0005Qm-BT; Fri, 20 Jan 2023 07:15:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIqIR-0005QY-6N for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 07:15:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIqIQ-0005yh-Em for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 07:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pIqIP-0004BX-T0 for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 07:15:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jan 2023 12:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60956 X-GNU-PR-Package: emacs Original-Received: via spool by 60956-submit@debbugs.gnu.org id=B60956.167421686616027 (code B ref 60956); Fri, 20 Jan 2023 12:15:01 +0000 Original-Received: (at 60956) by debbugs.gnu.org; 20 Jan 2023 12:14:26 +0000 Original-Received: from localhost ([127.0.0.1]:45770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIqHq-0004AQ-7c for submit@debbugs.gnu.org; Fri, 20 Jan 2023 07:14:26 -0500 Original-Received: from mail-wm1-f50.google.com ([209.85.128.50]:33576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIqHn-0004AC-Vb for 60956@debbugs.gnu.org; Fri, 20 Jan 2023 07:14:24 -0500 Original-Received: by mail-wm1-f50.google.com with SMTP id iv8-20020a05600c548800b003db04a0a46bso1059556wmb.0 for <60956@debbugs.gnu.org>; Fri, 20 Jan 2023 04:14:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:sender:from:to:cc:subject:date :message-id:reply-to; bh=lp1f7zcBMmeJdwokWX1qnUq8+Ox2jzD9vxH42ErXKbM=; b=otrK9JsoCEVM0hVckrSiPRGFXXFVgQuq8ySbFf5BbCp6ncQrmz2nZ5pFzXdT+zJhur CbMuOt3WyGANuQPfdUeNBFeiFXXOt3NVBTXGrNEFWF1Aa+UQWxhSa5TPEvuxv0HbkFwQ zlzg4/5SeCcQIyfS1LUgjUh++ipvpSEFFnvTh2VpCCkQ7cY2xXiMV/iAfkXJ1k44qlfI 0vey+lTAZ7/EStcTLuoeT91o6UQmPXkLLCLL4CinpLBhX38RrLDdvu9NpGir6lToV0px +xLeN3t0YZGVxxQNjbL/Vyfpc2ti+7SDLhGWXM6ZX8wzu2Mm4wU+bdKNebXcGVBoDD5h LaMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lp1f7zcBMmeJdwokWX1qnUq8+Ox2jzD9vxH42ErXKbM=; b=fjSxYVY3L5GSnUGYQvojXY374OuFebYBoa4Os2eqT/ZXqzldrvLhhVxxn5LvqqooIJ T8SEr0bgjapPg3nkQQxxoetNkPntvHkyIn7IHWlNXM/HtRJTOlaQXEUSl10VDb2nMR9S ftQCABpCHgg+M8qfXiYneQaNV6vF2nLDXWHzriVXsjE/ViChAHugKAMbj9+9rGhKvggV QWg0LJa6md4mjBnxCY+PGJgWZ5DxSLouofsmgmnddlygfLNJq2zbbH10+AYpDABOf7i0 Lt5pktYB9t4isf86Iea96O26+Jc0rYQInXqDGDHxZVkjzRh/Gkhm1aCEmr+AFQ3XJc7b c5QQ== X-Gm-Message-State: AFqh2kp84GBPYY4KknxCWbWL4EchDc2tOD/UY2dbTkFEXhO0bijBuPhc b2qeqvI1PRr6SE6TJjIBNbA= X-Google-Smtp-Source: AMrXdXtqPgOFd89meaw/fJKLT9A5R0prEEwAXZzsssEXQc/3EFhhVTpI/0r+RJAQ1lnZCdbETajnYg== X-Received: by 2002:a05:600c:4928:b0:3cf:a41d:844b with SMTP id f40-20020a05600c492800b003cfa41d844bmr13340859wmp.5.1674216857973; Fri, 20 Jan 2023 04:14:17 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id h13-20020a05600c2cad00b003cfa622a18asm2442244wmc.3.2023.01.20.04.14.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Jan 2023 04:14:16 -0800 (PST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253767 Archived-At: This is a multi-part message in MIME format. --------------dsUZT5aYQCS8p2MFVBFtN4Ww Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi! On 20/01/2023 00:45, Jason Orendorff wrote: > I observed that `eglot' would happily start dozens of language server > processes, but each one of them only seemed to know about a tiny > fraction of my code. I tracked this down and found a minor bug in > project.el. > > In `project-try-vc', when `vc-handled-backends' is nil, the value of > `marker-re' computed here: > > https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/project.el?id=207901457c018d94b1ce9e13a897d8241b1f3af2#n516 > > is the empty string. > > If no vc backends are enabled, no directory should be treated as a vc > root. But the empty regexp matches everything, so *all* directories are > treated as vc roots. > > Consequently, `eglot' spawned a lot of processes, because it starts one > per project. > > The workaround is to set `vc-handled-backends' to any other value. (I > suppose I configured it to nil long ago, when working in a huge > Mercurial repository. Back then, commonplace hg commands in that repo > were unreasonably slow.) Thank you for this report. Please try the attached patch. --------------dsUZT5aYQCS8p2MFVBFtN4Ww Content-Type: text/x-patch; charset=UTF-8; name="project-marker-wildcard.diff" Content-Disposition: attachment; filename="project-marker-wildcard.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvcHJvZ21vZGVzL3Byb2plY3QuZWwgYi9saXNwL3Byb2dtb2Rl cy9wcm9qZWN0LmVsCmluZGV4IGRjODdjYjhlMTVkLi40YTJjYTQ1ZTYzMyAxMDA2NDQKLS0t IGEvbGlzcC9wcm9nbW9kZXMvcHJvamVjdC5lbAorKysgYi9saXNwL3Byb2dtb2Rlcy9wcm9q ZWN0LmVsCkBAIC01MTQsMTEgKzUxNCwxNCBAQCBwcm9qZWN0LXRyeS12YwogICAgICAgICAg ICAgICAgIChsYW1iZGEgKGIpIChhc3NvYy1kZWZhdWx0IGIgYmFja2VuZC1tYXJrZXJzLWFs aXN0KSkKICAgICAgICAgICAgICAgICB2Yy1oYW5kbGVkLWJhY2tlbmRzKSkpCiAgICAgICAg ICAgICAgKG1hcmtlci1yZQotICAgICAgICAgICAgICAobWFwY29uY2F0Ci0gICAgICAgICAg ICAgICAobGFtYmRhIChtKSAoZm9ybWF0ICJcXCglc1xcKSIgKHdpbGRjYXJkLXRvLXJlZ2V4 cCBtKSkpCi0gICAgICAgICAgICAgICAoYXBwZW5kIGJhY2tlbmQtbWFya2VycwotICAgICAg ICAgICAgICAgICAgICAgICAocHJvamVjdC0tdmFsdWUtaW4tZGlyICdwcm9qZWN0LXZjLWV4 dHJhLXJvb3QtbWFya2VycyBkaXIpKQotICAgICAgICAgICAgICAgIlxcfCIpKQorICAgICAg ICAgICAgICAoY29uY2F0CisgICAgICAgICAgICAgICAiXFxgIgorICAgICAgICAgICAgICAg KG1hcGNvbmNhdAorICAgICAgICAgICAgICAgIChsYW1iZGEgKG0pIChmb3JtYXQgIlxcKCVz XFwpIiAod2lsZGNhcmQtdG8tcmVnZXhwIG0pKSkKKyAgICAgICAgICAgICAgICAoYXBwZW5k IGJhY2tlbmQtbWFya2VycworICAgICAgICAgICAgICAgICAgICAgICAgKHByb2plY3QtLXZh bHVlLWluLWRpciAncHJvamVjdC12Yy1leHRyYS1yb290LW1hcmtlcnMgZGlyKSkKKyAgICAg ICAgICAgICAgICAiXFx8IikKKyAgICAgICAgICAgICAgICJcXCciKSkKICAgICAgICAgICAg ICAobG9jYXRlLWRvbWluYXRpbmctc3RvcC1kaXItcmVnZXhwCiAgICAgICAgICAgICAgIChv ciB2Yy1pZ25vcmUtZGlyLXJlZ2V4cCBsb2NhdGUtZG9taW5hdGluZy1zdG9wLWRpci1yZWdl eHApKQogICAgICAgICAgICAgIGxhc3QtbWF0Y2hlcwo= --------------dsUZT5aYQCS8p2MFVBFtN4Ww--