From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juris Newsgroups: gmane.emacs.help Subject: Re: project.el project-find-files and symlinks Date: Sat, 12 Jun 2021 21:10:17 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39065"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 12 20:26:01 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 1ls8KW-000A18-UJ for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 12 Jun 2021 20:26:01 +0200 Original-Received: from localhost ([::1]:46568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ls8KV-0003Bp-Vf for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 12 Jun 2021 14:25:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ls8K0-0003Bd-HA for help-gnu-emacs@gnu.org; Sat, 12 Jun 2021 14:25:28 -0400 Original-Received: from mail-oln040092075011.outbound.protection.outlook.com ([40.92.75.11]:14656 helo=EUR04-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ls8Jy-0007x8-0a for help-gnu-emacs@gnu.org; Sat, 12 Jun 2021 14:25:28 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=geG8VnSQMtDMXYeku7quKp2tEmUrhtZl3yNF1f2XiwLU+4G88Ci/c0T/RMP6a7Yy4jO7L0R1yCELg1dCxZZ9Dw0G3s4AFjEK6Jl5MSBrbXhly0/og8JExPNVKc1tAxvEFJ2UHlNwY63Zh5cq3fHpWjqr8EwcEqjwilnHv6WjVDrAu+UttAzlmQzpF+qf1lowLPTD3y/KLShdj9RhdyO8ZdhWMIi57ULGioCk0T6a/yzZakHNSUeNV1scxHygOupUAhDT1THJSnTvThhxwC4vpUAotZ0+xRoA+Z6BkU4An36ixmM+aitj8ldA1gnS4zwDzXPkseuVjpgFea4Q6apBhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=edfSJt2YW5mW7yASl5KRoqQqZBSbjxdHgBx8Llf6sJo=; b=dhQD2GXP3wFX0fdCPfohaFDvZGaVTVPZrL11/uRcvapDa8vnFquYPx5TEYgyC4tQpfY3ksDU2phKiB8wuBOYCU2vPcRxlHY21FVuCFqv2K94AkctLXRx2Age0wguUtz5IuOIuLA8j8MqUeQHSZsmyuwvSp8Cn+S4IftzO+y/PYGyDGe/CUshK3r927MEvTTqfZUNA1FaT23jHt4OpZvYcaHVHS3wXqI6R+0BxplbNRKXLwoBptf+9oh87l+pwXI1iEnMisjqFNYCVwql5geXqnlDsA2CQi16rkieGklypjLK9JY8dC00FV4whgt+dlKd7FktNy8Rnrmf2RiI6nFVXw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=edfSJt2YW5mW7yASl5KRoqQqZBSbjxdHgBx8Llf6sJo=; b=BmMOQTjZ2uy7Jvd9S1ayW1EyxXLHXUVOM9zZOJlSLUqzAlR+QqVDv0zQkIPzqwLFV2sMRrwbTwAMDbr9XtH1i+RWfkRSzfJwc38IIhtVbLMH0sj/t5F5XNnhGAaRKrgLy+zBKL7x9f6C59gB9VMvcU1nLMrlQyJKp41oAhm9qV1dWsXHT0Jg5XNNj24lzfTQ0pta834EGUDRG2Fpxz0TTDBEkdmeE8pGKE7PwnvHTwUJi9gNqKPCfYxwj/UREwICqfzLsdtvUKSu60oMMavo0IcjPZLuLdRD3ip5WGjE21Af9bRWZkH7ODS+JvkoSG07JtiSR9piBf4LhlGkuhr3Uw== Original-Received: from DB3EUR04FT015.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::4d) by DB3EUR04HT155.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::363) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21; Sat, 12 Jun 2021 18:10:20 +0000 Original-Received: from HE1PR0802MB2377.eurprd08.prod.outlook.com (2a01:111:e400:7e0c::4d) by DB3EUR04FT015.mail.protection.outlook.com (2a01:111:e400:7e0c::453) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Sat, 12 Jun 2021 18:10:19 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:7B5D5193500C6FA52D0CCE06AAE27942400D317F0B121891583834E35B7FD131; UpperCasedChecksum:4C0B646F51E54DE4AF923D49A58BB2B827C36AEBD6169CA1996FD332808E634E; SizeAsReceived:8738; Count:47 Original-Received: from HE1PR0802MB2377.eurprd08.prod.outlook.com ([fe80::fc66:9ac9:67f6:cb92]) by HE1PR0802MB2377.eurprd08.prod.outlook.com ([fe80::fc66:9ac9:67f6:cb92%6]) with mapi id 15.20.4219.024; Sat, 12 Jun 2021 18:10:19 +0000 In-Reply-To: Content-Language: en-GB-large X-TMN: [LyDPTilojOrQBDYYzbiwiv+zPMWjoPMt] X-ClientProxiedBy: AS8PR04CA0005.eurprd04.prod.outlook.com (2603:10a6:20b:310::10) To HE1PR0802MB2377.eurprd08.prod.outlook.com (2603:10a6:3:c9::12) X-Microsoft-Original-Message-ID: X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from [10.0.1.163] (80.232.163.241) by AS8PR04CA0005.eurprd04.prod.outlook.com (2603:10a6:20b:310::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.20 via Frontend Transport; Sat, 12 Jun 2021 18:10:18 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 98090e09-5d87-448f-e6fb-08d92dcd5654 X-MS-TrafficTypeDiagnostic: DB3EUR04HT155: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jOQZjfD84EKK/KGzgENHoY5y7aQXM9HpPrzZi+UbEHH9lFTQ/BcgS5SHLJMXpD9cxOFbLFJPc31Stg4RL5Lozf7zpLWCPF1Nb4rYnYiPGoJyk1XCoHQxvgP5ugkjeGy6Jut766BrkW0nledizI1RoLls24N36s8G6azAdEwd19SHYe+a0f0vt7lETv2y+RUp3V1F110Oxlq4dNuBWIj6UjSr1ZSRWzl9+XumDogLo28CjVOly3aYwyc6NaWm+3BGmTLEndJwnRCNgRi8MVWmdu4Fj+JO+h1daAJDsjd9DOXCbLQZVsDbdw5s/E0ju2ycnfkIzpKGmggKMW59FPt2F9xCRw2woCZLBn2/kDdGDZKRG9fXC6ylBCo2docmfCRDXsTy/eb2kyf9XOwEZiDf1mBECWsfYLd3pdt8fKaWb2fDdPsPoqlOwbF9koXAQs6bgOHkxZ/qgOpdqUNyl40KDP93YuccV9CAuqe8SxsBvxY= X-MS-Exchange-AntiSpam-MessageData: 3HsKa7v6O7zy/yOF5WmIakZNvGYdehSNMWVrUrYYw8L9eb6r4MNTi6V5LntWNTtbo9Lev+pptRMQY9KOHR8kCv0IuxI89h49TSHg95M0TVh9Ujpcbkmo1KVXl9itoMxwt0nuww1MSQFRSx3FF5fn0w== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98090e09-5d87-448f-e6fb-08d92dcd5654 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2021 18:10:19.3494 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB3EUR04FT015.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3EUR04HT155 Received-SPF: pass client-ip=40.92.75.11; envelope-from=juris788999344@outlook.com; helo=EUR04-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: 19 X-Spam_score: 1.9 X-Spam_bar: + X-Spam_report: (1.9 / 5.0 requ) BAYES_05=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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:130784 Archived-At: Hi! On 24.05.21 04:01, Dmitry Gutov wrote: > 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. Thanks for the tip Dmitry, I did try this and it does solve my complaint. The downside being that I have to manage a patches project.el and track upstream changes manually. Surely some easy configuration would be a welcome change but, I also understand your stance. > > I suppose you'd also want the project-vc backend (e.g. in Git repos) to > follow symlinks as well? Hmmm, that would be yes. > > 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. Thanks again! Juris