From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: project--completing-read-strict breaks ada-mode project completion table Date: Wed, 8 May 2019 01:35:46 +0300 Message-ID: References: <20180922154639.23195.66360@vcs0.savannah.gnu.org> <54108dbc-9d12-06ff-3f1d-151118e9b234@yandex.ru> <4e729d1e-bb31-455f-fd44-e99ae5a6b9fa@yandex.ru> <86zhs5r9lr.fsf_-_@stephe-leake.org> <08de4d90-d678-0524-9356-f9a3515bf0c4@yandex.ru> <86a7k2rabi.fsf@stephe-leake.org> <86sgxso27d.fsf@stephe-leake.org> <69076784-83cb-5cc7-be39-fea990b8535e@yandex.ru> <861s55n6wk.fsf@stephe-leake.org> <86lg2swg14.fsf@stephe-leake.org> <86wom5vlki.fsf@stephe-leake.org> <86sgwpuk2q.fsf@stephe-leake.org> <86imv99982.fsf@stephe-leake.org> <865zqq7bbn.fsf@stephe-leake.org> <861s1a6t3t.fsf@stephe-leake.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="130429"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 Cc: Stefan Monnier To: Stephen Leake , emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 08 00:36:04 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hO8gs-000XjX-Il for ged-emacs-devel@m.gmane.org; Wed, 08 May 2019 00:36:02 +0200 Original-Received: from localhost ([127.0.0.1]:55635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO8gr-00009a-7N for ged-emacs-devel@m.gmane.org; Tue, 07 May 2019 18:36:01 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO8gh-00007r-VO for emacs-devel@gnu.org; Tue, 07 May 2019 18:35:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hO8gh-00083I-10 for emacs-devel@gnu.org; Tue, 07 May 2019 18:35:51 -0400 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:39498) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hO8gg-0007yp-Qm for emacs-devel@gnu.org; Tue, 07 May 2019 18:35:50 -0400 Original-Received: by mail-wm1-x334.google.com with SMTP id n25so582446wmk.4 for ; Tue, 07 May 2019 15:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=iPVgzUsEa0YfMS1hN5x8pUhx4Z9bfs6S7V/NAz+sxXc=; b=fWOCfZ0rf3qpwEy3OYvrUoPQXDwgBchKwW4RfAwr/Lw/2Yyn7BmHU5vE9dM9fotHQe UWH65Kc8PSgFQWHUzJ21ObOJ80VO3V03ycOfvInTC2uWC6DNSXugxe4mEpHmt8dlccpD dGajX6mGFRAUTv/wLQCklKnUuQMzvkckpfq2MCKauG6T09xqX3Y0Zew6I6N/Ya7p2qtq QSo+tpd8zzUiLZ6fd8fv+e2LHKxq66Ner7Yh0NaHdzEejeXRx9K+LwqkfBnpLOeg1l+Q ouaBP3q8Cz8poS8cd3dOgY5PvCNHHk22nV/vlUbPbvKIG8wams2KC0QYAUkVFKCxTgHd YaZg== 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:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=iPVgzUsEa0YfMS1hN5x8pUhx4Z9bfs6S7V/NAz+sxXc=; b=k0dqKFbTYKxTUZwS2wlZwHO1Yos/55gtQTWuJpTbcXrSyHhaYTBtR9ofW66yLKFl+u WLizHr0YN5wIeRKOzLXRACDtxIcw4PcZ0F4UA9dE9qIBFbu6gtcobVXcIh8vkPV08NFs 6098nd1i0ub7tSuOSGeWHqLyaZVFodMcp1CKbFPcENG6I5ZkBoCGUjPMYfZ7qN68b23V vS451f77jkOb0P74yL9LPUlZ+d0r1iETfzPj/CIqkiv1nQ0n5aK6duI6ifp0wmwww2sI 6vOKzWKwghuPoat5h/V0FBQYyjKuIA7XoQda2B6SNHG6QYJY00ohUuvZ5onl582aoqo/ dxnQ== X-Gm-Message-State: APjAAAX173pgotnAeR5ptcu6nxyiJPqzG23fvTCHO7yLLg7wRGGvU0E7 HTm4KqCLKtA9L1pkIajDv7U= X-Google-Smtp-Source: APXvYqz+u7DW3OA+Y/hoT3G9uhX74eP2nG/BsG367dYUM3302uIwXUjZfFWQZy+QqadmMrQe/ebJRA== X-Received: by 2002:a7b:c3c3:: with SMTP id t3mr497927wmj.88.1557268549088; Tue, 07 May 2019 15:35:49 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id v184sm328499wma.6.2019.05.07.15.35.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 May 2019 15:35:48 -0700 (PDT) In-Reply-To: <861s1a6t3t.fsf@stephe-leake.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::334 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236265 Archived-At: On 07.05.2019 21:02, Stephen Leake wrote: > This works well for my use cases. I'm glad. > It would be slightly more efficient if `project-find-file-read-fn' took > an 'all-files' arg instead of 'collection' (which is a completion-table > function); I have to do '(all-completions "" collection predicate)' to > get the files list to pass to uniq-file-uniquify. I would like to, really. > The downside of that is other read-file-from-list functions might have > to duplicate 'project-file--completion-table' as well. Until we have > another example of this, we can't tell which design is better. The real reason I went with this approach is so that the no-decorator option would also work and use the same completion category. I.e. (setq project-find-file-read-fn project--completing-read-strict) would still work, except without hiding the common parent directory. If project-find-file-read-fn is passed a flat list of files (which I would personally prefer, for clarity), the "bare" option would still have to be a wrapper that creates a completion table just for the sake of passing the appropriate category to completing-read. > The difference in startup time is not noticeable, so I can live with it. all-completions is pretty fast. I would prefer the cleanest possible design here, though. Paging Dr. Monnier. Stefan, what would you choose? > One nit; 'project-file--completion-table' would be better spelled > 'project--file-completion-table'. > > Similarly for 'project-find-file--read-cpd-relative' Yes, thank you. It's a proof-of-concept patch for now, I'll make the spelling edits later.