all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Thorpe <rt@robertthorpeconsulting.com>
To: Robin Neatherway <robin.neatherway@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Prompt for files with given extensions
Date: Thu, 12 Feb 2015 02:41:21 +0000	[thread overview]
Message-ID: <87386bkg1a.fsf@robertthorpeconsulting.com> (raw)
In-Reply-To: <CALhoy233rv6b4P+Cnzx2PZTyFuC-SEQdL5u2JTHjbcMq3695sA@mail.gmail.com> (message from Robin Neatherway on Wed, 11 Feb 2015 10:17:50 +0000)

Robin Neatherway <robin.neatherway@gmail.com> 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



      parent reply	other threads:[~2015-02-12  2:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-11 10:17 Prompt for files with given extensions Robin Neatherway
2015-02-11 15:00 ` Drew Adams
2015-02-11 15:35 ` Michael Heerdegen
2015-02-16 10:47   ` Robin Neatherway
2015-02-12  2:41 ` Robert Thorpe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87386bkg1a.fsf@robertthorpeconsulting.com \
    --to=rt@robertthorpeconsulting.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=robin.neatherway@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.