From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#41572: 28.0.50; [PATCH] Support plain project marked with file .emacs-project Date: Sun, 10 Oct 2021 19:47:37 +0300 Organization: LINKOV.NET Message-ID: <87v925f6ee.fsf@mail.linkov.net> References: <87ftb92u8q.fsf@thornhill.no> <0ab90cf2-eab2-6fea-6698-4164d7753cd7@yandex.ru> <87d06ck2b0.fsf@thornhill.no> <2fbe5d5d-03a1-212b-9dd7-4723e168ad06@yandex.ru> <5EpzudgjedeKADsX4_Tq-2WtNm3XKXmZjnEI7Y1lmw-Pcn_KrzKPD1o31Ele0JOIrZ1ITDdeQrOsJTHfGVPJlzyLhmqjxP3rmVVzou8KEBo=@thornhill.no> <2a70c748-e250-2f96-5d74-712b6d71e8be@yandex.ru> <871riitzch.fsf@gnus.org> <87zgrq2ctj.fsf@mail.linkov.net> <7cf254bf-a7e4-0121-3d0c-3a1b5dfabe0b@yandex.ru> <87r1d0at40.fsf@mail.linkov.net> <87wnmr793j.fsf@mail.linkov.net> <878rz6wrdp.fsf@mail.linkov.net> <9a74b6ac-14f4-c5f9-8d7e-91c1595d8a02@yandex.ru> <87wnmppdmr.fsf@mail.linkov.net> <966ef00b-fc7a-cd52-5fd8-600842797f65@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3069"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Zhu Zihao , Lars Ingebrigtsen , Theodor Thornhill , 41572@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 10 19:34:17 2021 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 1mZciG-0000b1-Ex for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Oct 2021 19:34:16 +0200 Original-Received: from localhost ([::1]:49728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZciF-0004CX-86 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Oct 2021 13:34:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZci3-00047l-4E for bug-gnu-emacs@gnu.org; Sun, 10 Oct 2021 13:34:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44236) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mZci2-0004mK-SW for bug-gnu-emacs@gnu.org; Sun, 10 Oct 2021 13:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mZci2-0001qq-Ok for bug-gnu-emacs@gnu.org; Sun, 10 Oct 2021 13:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Oct 2021 17:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41572 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 41572-submit@debbugs.gnu.org id=B41572.16338871947001 (code B ref 41572); Sun, 10 Oct 2021 17:34:02 +0000 Original-Received: (at 41572) by debbugs.gnu.org; 10 Oct 2021 17:33:14 +0000 Original-Received: from localhost ([127.0.0.1]:55768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZchG-0001ol-2g for submit@debbugs.gnu.org; Sun, 10 Oct 2021 13:33:14 -0400 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:48239) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZchB-0001oQ-Qx for 41572@debbugs.gnu.org; Sun, 10 Oct 2021 13:33:10 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 9FA2B240005; Sun, 10 Oct 2021 17:33:00 +0000 (UTC) In-Reply-To: <966ef00b-fc7a-cd52-5fd8-600842797f65@yandex.ru> (Dmitry Gutov's message of "Thu, 7 Oct 2021 16:41:23 +0300") 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:216816 Archived-At: >> Then maybe the backend could be named 'project-file' >> since a special file defines the project root. > > That's a little more meaningful, though too close to > 'project-files'. 'project-markered' or 'project-markerfile' would probably > be less ambiguous. In 'project-filemarker' I misread "filemarker" as "filmmaker" :-) Another possible name would be "fileroot". > Suppose somebody puts it before 'vc' to use if for a purpose we did not > design it for: make sure that some subproject 'foo' in their monorepo is > considered a separate project. 'foo/Makefile' exists, so they add > "Makefile" to project-fallback-markers, and it kind of seems to work. There are two contradictory needs: 1. When a marker list contains both ".dir-locals.el" and "Makefile", it should ignore Makefile files in vc-based project subdirs, e.g. emacs/lisp/Makefile, etc. 2. OTOH, I often type 'C-x p g' to search all gems of the same ruby version in e.g. ~/.rbenv/versions/2.7.4/lib/ruby/gems But it finds ~/.rbenv/.git and tries to search all ruby versions. I could manually add .dir-locals.el only to a particular version's subdir. But how to override ~/.rbenv/.git? Maybe by changing the order of backends in project-find-functions? Then the fallback won't be the last backend anymore. Also the backend priorities will be changed globally for all other projects, and 'C-x p g' in emacs/lisp will find emacs/lisp/Makefile to override emacs/.git.