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.help Subject: Re: project.el project-find-files and symlinks Date: Mon, 24 May 2021 04:01:42 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17107"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 To: Juris Bune , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 24 03:02:38 2021 Return-path: Envelope-to: geh-help-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 1lkyzN-0004Ge-GJ for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 24 May 2021 03:02:37 +0200 Original-Received: from localhost ([::1]:39010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkyzM-0000eO-Gx for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 23 May 2021 21:02:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkyya-0000dU-3z for help-gnu-emacs@gnu.org; Sun, 23 May 2021 21:01:48 -0400 Original-Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:44910) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkyyX-0006pj-Bv for help-gnu-emacs@gnu.org; Sun, 23 May 2021 21:01:47 -0400 Original-Received: by mail-ed1-x52b.google.com with SMTP id t15so29956510edr.11 for ; Sun, 23 May 2021 18:01:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+1oh8glTh9i9x/MTDIfgP8NpCOeRIIm7OQfygMyIXFQ=; b=fcDYUIsDxfXDcL41+E9TD5dLNlYyacPBeo/xambHDv8bczSx7aEveEqTpJEsEia7u6 N+6ouQL3VT5/cERohZ6++6DvgPNomHnFes2NC36/pV+8qN60+a8opTZJgVDkp+xEaX9E OyV6x+Kd9ysnQm3adjAg4/ZRzhfWv39yaCk/67FNTvaH2my2ucrSY8fpbw7Pjlv42EFv 7BDzJbLfZ1Ap/AQci0BqcN8OV7Jcg+YOokK4Zb7ge1Yl73FjCrZC2Uu5U9CyMLpOlO/m GJUyW+APB3y5dTP4zmq0qpP1tjePtNNRx9LGhmU+cCnm1yYgML4gfc/S2FCDYDWrJZoO +8XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+1oh8glTh9i9x/MTDIfgP8NpCOeRIIm7OQfygMyIXFQ=; b=E3tDscSqAMTICIX+v7hvvZgyzL9mYpVC1n2nQdFvnQn5ORrmVca1xGKKyyoUUhpDyu 4mAp+eFLlff78lpqvBMruL80EZD6MZVWYHixxgjf6GNPLhdjFmIwt7iF3qg8AZflkmAP qEhSdOlbexZtrS1q243GBKN85xR0QzwPNDYDF483bpOhvsLy2Ye4PLs6qWnXMuB0x7VW tzKKcmb2MVco/jVIa8CrQWhMxa9jJSJugph5Uv6tAQV87ghB4CY2dQh9vzkWrG3IL957 mAgNLHputnbrcUQ6yNKFc+HMAMQiY4CrujAZPE2H1Um8NY9zEh7TkwX+62LdfDywnE96 hWwA== X-Gm-Message-State: AOAM532SiiAFI3QhNdyGWZuFWnE8LwMGooopD0rxUuVD+GgJzMwpMSvS fgB9GY+qlHRAmDIDdCxRsdLZs2oXT08= X-Google-Smtp-Source: ABdhPJzFX3vvogGdtccTYgVuxH3n+4T5jvMtIN7Lc4x4TUhQcxqb+6dpqONos+pPcQcdyl5Po2n3tQ== X-Received: by 2002:a50:fb0f:: with SMTP id d15mr23139878edq.343.1621818103795; Sun, 23 May 2021 18:01:43 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id u14sm8844996edy.47.2021.05.23.18.01.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 23 May 2021 18:01:43 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=raaahh@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130152 Archived-At: Hi! On 21.05.2021 14:57, Juris Bune wrote: > Hello! > > I've been using emacs for few months now and slowly building up my skill and knowledge of ecosystem. It has been great so far. > > Recently I started using project.el (v0.6) and found one annoying thing - project-find-files does not include file symlinks. I understand that it is due to fact that under the hood it uses GNU find and current implementation of project--files-in-directory has a somewhat hard-coded values for find flags. > To solve my case I would add "-L" option appropriately to have find utility list also symlinks. Unfortunately this is not configurable without (as I understand) changing package.el. Are there any other options? You can try out a patch like diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index eab60756c8..616c6f8d32 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -297,7 +297,7 @@ project--files-in-directory ;; expanded and not left for the shell command ;; to interpret. (localdir (file-name-unquote (file-local-name (expand-file-name dir)))) - (command (format "%s -H %s %s -type f %s -print0" + (command (format "%s -H -L %s %s -type f %s -print0" find-program (shell-quote-argument (directory-file-name localdir)) ; Bug#48471 and see if you like the effect. I'm not sure how to make it better configurable, though. The current literal that's used looks like "%s -H -L %s %s -type f %s -print0" ...and that's not something a random user will know how to change safely. It's also very find-specific. I suppose you'd also want the project-vc backend (e.g. in Git repos) to follow symlinks as well? I also wonder whether there have been any discussions in the past about adding -L to grep-find-template. > Also, would it be somehow possible to make project.el use fd instead of find? People have asked about this before. Please read: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44210#26 ...and email to the bug address if you'd like to contribute to that discussion.