From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: Prompt for files with given extensions Date: Thu, 12 Feb 2015 02:41:21 +0000 Message-ID: <87386bkg1a.fsf@robertthorpeconsulting.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1423708910 2150 80.91.229.3 (12 Feb 2015 02:41:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Feb 2015 02:41:50 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Robin Neatherway Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 12 03:41:39 2015 Return-path: Envelope-to: geh-help-gnu-emacs@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 1YLjik-0004Jp-MK for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Feb 2015 03:41:38 +0100 Original-Received: from localhost ([::1]:47899 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLjik-0006YL-7j for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Feb 2015 21:41:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLjiZ-0006YG-1K for help-gnu-emacs@gnu.org; Wed, 11 Feb 2015 21:41:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLjiU-0002xZ-Pp for help-gnu-emacs@gnu.org; Wed, 11 Feb 2015 21:41:26 -0500 Original-Received: from outbound-smtp05.blacknight.com ([81.17.249.38]:47201) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLjiU-0002xO-Ky for help-gnu-emacs@gnu.org; Wed, 11 Feb 2015 21:41:22 -0500 Original-Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp05.blacknight.com (Postfix) with ESMTPS id 3295A98536 for ; Thu, 12 Feb 2015 02:41:22 +0000 (UTC) Original-Received: (qmail 13197 invoked from network); 12 Feb 2015 02:41:22 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.76.224.229]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 12 Feb 2015 02:41:22 -0000 In-Reply-To: (message from Robin Neatherway on Wed, 11 Feb 2015 10:17:50 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.38 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102660 Archived-At: Robin Neatherway writes: > I would like my function to prompt only for files with a given > extension. I have a source file, say foo.c, and would like to load the > corresponding test results file, say foo.results. However, if there > are multiple tests for foo.c, then they may have different filenames. > > At the moment I use `read-file-name` with `foo.results` as a default, > but I would like to filter the possible completions by file extension. > Is this possible? Another possibility is to get the user to choose using a dired buffer. E.g. (dired "~/foo/*.txt") BR, Robert Thorpe