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#47799: 28.0.50; Default `project-files' implementation doesn't work with quoted filenames Date: Fri, 16 Apr 2021 04:08:38 +0300 Message-ID: References: <658a3e61-9511-5502-43de-8f591cec7387@yandex.ru> 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="36044"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cc: 47799@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 16 03:09:15 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 1lXCyx-0009H8-HA for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Apr 2021 03:09:15 +0200 Original-Received: from localhost ([::1]:37056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXCyw-0001Sx-3g for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Apr 2021 21:09:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXCyk-0001SS-W6 for bug-gnu-emacs@gnu.org; Thu, 15 Apr 2021 21:09:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56294) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXCyk-0003XX-JP for bug-gnu-emacs@gnu.org; Thu, 15 Apr 2021 21:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lXCyk-0007zv-B3 for bug-gnu-emacs@gnu.org; Thu, 15 Apr 2021 21:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Apr 2021 01:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47799 X-GNU-PR-Package: emacs Original-Received: via spool by 47799-submit@debbugs.gnu.org id=B47799.161853533130727 (code B ref 47799); Fri, 16 Apr 2021 01:09:02 +0000 Original-Received: (at 47799) by debbugs.gnu.org; 16 Apr 2021 01:08:51 +0000 Original-Received: from localhost ([127.0.0.1]:39607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXCyZ-0007zW-6J for submit@debbugs.gnu.org; Thu, 15 Apr 2021 21:08:51 -0400 Original-Received: from mail-wm1-f50.google.com ([209.85.128.50]:33718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXCyV-0007zH-2s for 47799@debbugs.gnu.org; Thu, 15 Apr 2021 21:08:49 -0400 Original-Received: by mail-wm1-f50.google.com with SMTP id q123-20020a1c43810000b029012c7d852459so4738142wma.0 for <47799@debbugs.gnu.org>; Thu, 15 Apr 2021 18:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=4/BC5C8S+Uko3Py1v9tcGkwyRf/iM6IX3N2Od+A9M7U=; b=I6/CULbnTn1IuWSsh+ld9Ouo6wE5YFZoPEAvTXwqWWv/KwypZn1qHpYPa0ZG8mup8z iNZBOhLMOEpB8n3qDkZsmEkp4RedObYMkSU8XXa0jHoTTqRzQcFU32FBf+RdHdaHWKL2 /sVuW4mq3Zl+4Q/07KdryVtx/DYKqtmokWKIyc/bLdnBLbAFekVBrgw+YWDlIK0jveC2 jw70thhDX8pX1yHqOWM1T+F4aakV7eeRRJQJ9+2mNU4bQsIAZgtxFLmGLeW3MqjFjand Dy+S2ofT36CBMZBSSb09GfmBEZrCKvPGoRY9+tQuGNIqBNUmQBJGpgTxBYktE5gvlZ4Q 1jQA== 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:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4/BC5C8S+Uko3Py1v9tcGkwyRf/iM6IX3N2Od+A9M7U=; b=EwwESXoM22Sha9W8oQ0M2burLnZR2O9v2z5LqBLdzTI+wBdOB+pVhmrkGX/68rqdKn FezvwUie3iZYgIrssRmpxwaGHw3Ji/35T5RaWLuF86kXOYdA+bZGqzA4GMVtlAIfPIE6 QgxoSL5mmiTj3Vvb3r3RkqsowcgS6W7BWHMviDg0jy0djchUZwjGyh/yrzrj+UQtwosm 9scHtt7xRcek9OG2E5FZBLzD0GOn8e/LptnkeBVCxFP52TVISmNR5IIiMG/sx+JlW0sK cjEJFXtEfZyO/zM+7jpqKc9qIhDzYn4Z3SnYFw+oGd9IzmPvaLEkQUVkT4Jq6I5HuLjI rW9A== X-Gm-Message-State: AOAM533n0O70B4DmDmNUBXzzaKezBNLX7Y7g7ynjRHg6zGz7owulTtWc n1RANwXgEYCVSIlosE9AXo0Y9XGYyjo= X-Google-Smtp-Source: ABdhPJybooZv6S+q0tqD274LYtKYGp5DGgzj5ELGiBSv76uuUeOfLQoKfqsJAARG1c17yX6/TgNwEA== X-Received: by 2002:a1c:771a:: with SMTP id t26mr5642357wmi.96.1618535321199; Thu, 15 Apr 2021 18:08:41 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id v8sm6835554wrt.71.2021.04.15.18.08.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Apr 2021 18:08:40 -0700 (PDT) In-Reply-To: Content-Language: en-US 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:204106 Archived-At: On 15.04.2021 19:44, Philipp Stephani wrote: > Am Do., 15. Apr. 2021 um 18:15 Uhr schrieb Dmitry Gutov : >> >> Hi Philipp, >> >> On 15.04.2021 16:43, Philipp Stephani wrote: >>> emacs -Q -batch -l project -eval '(print (project-files (quote (transient . "/:/"))))' >>> >>> ("find: ‘/:/’: No such file or directory >>> ") >>> >>> Note that the error message is listed as a file. >>> >>> 1. `project-files' should unquote local filenames before passing them to >>> `find'. >>> >>> 2. `project-files' should check for errors returned from `find'. >> >> Would you like to propose a patch? > > I've now pushed a minimal fix to this specific problem (commit > 157bfc1812c51a0a48162c71eadf7959f7de9ac6), but there are probably more > places that should get fixed, e.g. xref--find-ignores-arguments. > project--files-in-directory also still ignores any errors from the > find binary. Thank you. I've added error handling to project--files-in-directory in a follow-up commit. Regarding xref--find-ignores-arguments, it seems it would be economical to do the quoting on the value passed to it. See f955df1. Regarding your change, though, have you tried project-find-regexp in a "transient" project with a quoted root directory name? You've made project--files-in-directory quote the returned file names, but that list gets passed to xref-matches-in-files, which pipes them to find-grep in the end. I suppose xref-matches-in-files could use a step similar to (when remote-id ...) that is already there. A bit unfortunate for the users of large projects with quoted names, but not sure what else we could do.