From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: make project--find-in-file generic, add interactive filename to project-find-file Date: Fri, 29 Jan 2016 05:18:29 +0300 Message-ID: <56AACBF5.3040502@yandex.ru> References: <86wpqu8qf9.fsf@stephe-leake.org> <56A9DDA8.9080504@yandex.ru> <86si1i813n.fsf@stephe-leake.org> <86k2mu7yki.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1454033925 25178 80.91.229.3 (29 Jan 2016 02:18:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Jan 2016 02:18:45 +0000 (UTC) Cc: emacs-devel To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 29 03:18:41 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aOye0-00071T-Ln for ged-emacs-devel@m.gmane.org; Fri, 29 Jan 2016 03:18:40 +0100 Original-Received: from localhost ([::1]:59422 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOydz-0006Rh-Vq for ged-emacs-devel@m.gmane.org; Thu, 28 Jan 2016 21:18:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOydw-0006Rb-Lo for emacs-devel@gnu.org; Thu, 28 Jan 2016 21:18:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOydr-0000xu-NL for emacs-devel@gnu.org; Thu, 28 Jan 2016 21:18:36 -0500 Original-Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]:36860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOydr-0000xl-Fw for emacs-devel@gnu.org; Thu, 28 Jan 2016 21:18:31 -0500 Original-Received: by mail-lf0-x22f.google.com with SMTP id 78so372928lfy.3 for ; Thu, 28 Jan 2016 18:18:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=jCqAcut2Jj9AYRzVwktx/k/7qruyz6fmZhM71irVUkU=; b=xA6s7/LUQRbFazMZOiYUAL18JLqPtSprvYnURJ6dBTF153f2ngtjUCKMqbMhSuxoqg HDp33bGEnJADO1jRx61B4/4Mia9ybe0gCdhDsTU9EikyvkBRdN27IVYYiH+4mL0Z6WWK rhsv+9LrG71U3NEE2sjg7oAvNiAHO5F91czscOcS2xZqS7NF+WvXKG9il6keA+ofczdw 72fwIhl5SEHqnZpz50ck8B7rlpooIFo+i1dYxpjl7+auAatUbs9lO6cvalj3pewPJHrE h1Jycouj4dtNDLPKDbHXAI9vKRuHqhpAinbZWcP39M/1yENe8GhDTniiwKQrIh9YfIMk c/Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=jCqAcut2Jj9AYRzVwktx/k/7qruyz6fmZhM71irVUkU=; b=a9Hfcz7oH98epQtFJXVyv1fPDclvoQyQeOZXVC+xE6jRQqoSDuDhXoM8s9IhG1cgJU pN04b1/ncEDg+PBMt4rpSL03DmTxuM5lnE8HruaR4WxRk+MawbFrq2Q1K7DKyiRf8n9U Q8FnQWxyD3KT/xSmllIN/ENzinQqXO6kdoatPi8d/gqobt+pQ4uFd6RWgc/X/SZZIVyA PGij+8uULxzyT/LcdvEdOjfVdBLTiqHMxOZS0Lg6a4rWpy3pxnGKQIBBLE79tGasq1kj sZU/HiFqNGr7YPpmxfbsoHZ7NVqc7EddfQySqtn2eUoiZPNHqPWiZJcqkRfKXhMpO2PM HAGg== X-Gm-Message-State: AG10YOQK0do6wlJFu8UNJoGhk8LE7CMrqfcKEE4fX8Pjhijra4EKI25xPvWwl0Ye1gAkDQ== X-Received: by 10.25.168.133 with SMTP id r127mr1890896lfe.134.1454033910769; Thu, 28 Jan 2016 18:18:30 -0800 (PST) Original-Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id aa9sm1763440lbc.16.2016.01.28.18.18.29 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Jan 2016 18:18:29 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 In-Reply-To: <86k2mu7yki.fsf@stephe-leake.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:198973 Archived-At: On 01/28/2016 02:06 PM, Stephen Leake wrote: > That works nicely; new patch attached. Please install, with the following adjustments: > +(cl-defgeneric project--file-completion-table (_project _dirs) Let's call it project-file-completion-table (no double-dash). A private generic function is an oxymoron. Should this table also include directories, BTW? That shouldn't make a difference in performance, and then we could add a project-dired command. Or just open Dired from project-find-file if the input is a directory (directories are files, too). > + "Return a completion table for files in directories DIRS in PROJECT. > +If non-nil, DIRS is a list of absolute directories; it should be some > +subset of the project roots and external roots. If nil, the backend > +uses all the directories it knows about. Why should we allow DIRS to be nil, and ask all backends to deal with that? Nobody passes nil to it. Out default implementation doesn't handle nil there. > +PROJECT is used to find the project ignores and other project meta-data." > + ) Why not put the default implementation here? There's no need for the separate cl-defmethod declaration.