I'm making some functions to interact with Mercurial. Many Mercurial commands take a repository as an argument, and that argument can be specified either by a path to the root of the repository or by a repo name. These repo names can be configured in the user's .hgrc
file, and it is easy to get a list of the names that are defined.
I'd like to make a completing read function that dynamically completes a path to a directory or an item from a list. I'd like it to work just like ido-read-directory-name
, but with the items from a list also offered as options.
I've been digging through the documentation, and also through mini_buffer.el
and ido.el
. The only hint I have so far is that I can override the variable read-file-name-function
, but it seems like I'd end up reimplementing a lot of functionality for dynamically completing directory names.
Does anyone have any guidance for me? Or perhaps an example?