From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#57418: 28.1; Projects not saved when vc-handled-backends is nil Date: Fri, 26 Aug 2022 07:46:06 +0000 Message-ID: <87edx3o3b5.fsf@posteo.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23279"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57418@debbugs.gnu.org To: Louis-Guillaume Gagnon Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 26 09:47:47 2022 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 1oRU4A-0005t2-VV for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Aug 2022 09:47:47 +0200 Original-Received: from localhost ([::1]:58208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRU49-0004CS-9Y for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Aug 2022 03:47:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRU3S-0003rv-U7 for bug-gnu-emacs@gnu.org; Fri, 26 Aug 2022 03:47:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRU3S-0003JD-Kk for bug-gnu-emacs@gnu.org; Fri, 26 Aug 2022 03:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oRU3S-0005pI-BZ for bug-gnu-emacs@gnu.org; Fri, 26 Aug 2022 03:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Aug 2022 07:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57418 X-GNU-PR-Package: emacs Original-Received: via spool by 57418-submit@debbugs.gnu.org id=B57418.166149997622333 (code B ref 57418); Fri, 26 Aug 2022 07:47:02 +0000 Original-Received: (at 57418) by debbugs.gnu.org; 26 Aug 2022 07:46:16 +0000 Original-Received: from localhost ([127.0.0.1]:51949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRU2h-0005o8-TU for submit@debbugs.gnu.org; Fri, 26 Aug 2022 03:46:16 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:48477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRU2f-0005nt-Kz for 57418@debbugs.gnu.org; Fri, 26 Aug 2022 03:46:14 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 97F3F240106 for <57418@debbugs.gnu.org>; Fri, 26 Aug 2022 09:46:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1661499967; bh=6nB1/vg+40leO973H1ac4YffWwLQtem+p/HRglhX+Bw=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=ptf4buo3wieHkbRIWq+vNAHJA7tFgwQw7RoMSnOylgiO3WhWdESnNbJkiAh6i4g8k icgjGp464PbwaUeJSLJyG2EV9HnyUjx6tApfo0vX6nNo6MflXWv5QwxQ+IbVlNNJm3 nqbTxX0ajrslFRlfN16j/ANru0VogDc2igeklG+rtbnPnm9RPjqUV3g32p+oBqRXsU VhKLBlGbyOgqBvhz5ICzwIx8JlMgvBq3KbVsVrQW2C/1hGzwVgI1xhxbNOo8x7tt7r KmJ/APa9/HPyToM+Kp2p+7oXeL7Pyis1YA95qXotoQ8PddCp80vuh2wCClJBi3nInU X1+YqUZJUa12Q== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MDX2Q5d64z9rxN; Fri, 26 Aug 2022 09:46:06 +0200 (CEST) In-Reply-To: (Louis-Guillaume Gagnon's message of "Thu, 25 Aug 2022 20:35:55 +0000") Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB 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" Xref: news.gmane.io gmane.emacs.bugs:240786 Archived-At: Louis-Guillaume Gagnon writes: > > Good day, > > I've recently been migrating from projectile to the built-in > project.el. Since then, one major annoyance is that the projects are > never saved into project-list-file, so I have to re-enter the projects' > paths everytime I make a query. > > I have narrowed it down to vc-handled-backends being set to nil in my > init-file. If it's left at its default, it works as expected. I could > just leave the variable at its default but (iirc) it's part of a bunch > of optimizations I made to speedup my TRAMP setup, so I'm reluctant to > do that.=C2=A0 And just to be perfectly clear, the rest of project mode s= eemingly > works as expected if that variable is nil, it's just the projects are > not saved. > > Steps to reproduce from emacs -Q: > > + (setq 'vc-handled-backends nil) > > + Use project.el to find a file in any project not in your > project-list-file, e.g. with C-x p p > > + Open your project-list-file, "/.emacs.d/projects" in my case > > Expected result: The recently opened project is listed > Actual result: The recently opened project is *not* listed This is to be expected, as by default `project-find-functions' only includes one function that uses and relies on VC. If it were just this, I would therefore not consider this to be a bug. Does anything else work? `project-find-file', `project-shell', `project-compile', ...? What might be worth doing is issuing a warning if `project-try-vc' (the default project-finding-function) is invoked while VC is effectively disabled. You could try solving this by either adding your own alternative to `project-try-vc' (e.g. if you just use Git, then this --8<---------------cut here---------------start------------->8--- (defun project-try-git (dir) "Find a super-directory of DIR containing a root file." (let ((repo (locate-dominating-file dir ".git"))) (and repo (list 'git dir)))) (cl-defmethod project-root ((project (head git))) "Return the root of a explicit PROJECT." (cadr project )) (with-eval-after-load 'project (add-hook 'project-find-functions #'project-try-git)) --8<---------------cut here---------------end--------------->8--- might be enough, but still be optimised a bit more). Another idea might be to just disable VC for Tramp, or rather just some Tramp connections?=20 > Thanks in advance, > L-G