From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: make project--find-in-file generic, add interactive filename to project-find-file Date: Thu, 28 Jan 2016 17:44:05 -0500 Message-ID: References: <86wpqu8qf9.fsf@stephe-leake.org> <56A9DDA8.9080504@yandex.ru> <86si1i813n.fsf@stephe-leake.org> <56A9EF4B.7020406@yandex.ru> <56AA6CCA.10103@yandex.ru> <56AA8698.9050805@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1454021089 31158 80.91.229.3 (28 Jan 2016 22:44:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jan 2016 22:44:49 +0000 (UTC) Cc: Stephen Leake , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 28 23:44:40 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 1aOvIr-0001C6-2f for ged-emacs-devel@m.gmane.org; Thu, 28 Jan 2016 23:44:37 +0100 Original-Received: from localhost ([::1]:58916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOvIq-0004dv-BC for ged-emacs-devel@m.gmane.org; Thu, 28 Jan 2016 17:44:36 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOvIZ-0004af-CP for emacs-devel@gnu.org; Thu, 28 Jan 2016 17:44:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOvIN-0002gU-5U for emacs-devel@gnu.org; Thu, 28 Jan 2016 17:44:12 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:3766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOvIN-0002gM-1H for emacs-devel@gnu.org; Thu, 28 Jan 2016 17:44:07 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AyFgA731xV/3+SCkxcgxCEAoVVu0CHSwQCAoE8OxIBAQEBAQEBgQpBBYNdAQEDAVYjBQsLDiYSFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0FjDCSZ4ZpjT+BRSOBZlWBWyCCeAEBAQ X-IPAS-Result: A0AyFgA731xV/3+SCkxcgxCEAoVVu0CHSwQCAoE8OxIBAQEBAQEBgQpBBYNdAQEDAVYjBQsLDiYSFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0FjDCSZ4ZpjT+BRSOBZlWBWyCCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="191813132" Original-Received: from 76-10-146-127.dsl.teksavvy.com (HELO pastel.home) ([76.10.146.127]) by ironport2-out.teksavvy.com with ESMTP; 28 Jan 2016 17:44:05 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 1C715602B9; Thu, 28 Jan 2016 17:44:05 -0500 (EST) In-Reply-To: <56AA8698.9050805@yandex.ru> (Dmitry Gutov's message of "Fri, 29 Jan 2016 00:22:32 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:198961 Archived-At: >> So, we want to check it only if it's actually returned. Sounds right. > I don't follow. > Do you mean returned by completing-read? Yes. The DEFAULT would used in 3 places, basically: - the prompt - M-n - RET And it'd be checked only in RET (basically, the RET case would behave similarly to `M-n RET'). > I'd prefer not to allow the user to input it as-is (we call > completing-read with REQUIRE-MATCH t). That's what I mean by "check". > If I pass filename-at-point as DEFAULT, I don't get either of these items. Not with completing-read, no. But the new function would do that (as well as change the calling convention so it'd be in charge of adding DEFAULT into the prompt). Stefan