help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prompt for files with given extensions


From: Robert Thorpe
Subject: Re: Prompt for files with given extensions
Date: Thu, 12 Feb 2015 02:41:21 +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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]