Questions tagged [completing-read]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
12 views

Selecting a directory like counsel-find-file

I would like to write a function that would prompt the user to select a directory, using an UI like that presented by counsel-find-file. The starting directory should be an arbitrary directory passed ...
0
votes
1answer
30 views

User input - How to use predefined list

While there are org-templates creating entire bullet points with content, what I am looking for is a simple user query (similar to read-string) where the user can use a pre-defined list of words/...
0
votes
1answer
25 views

Close completing-read dialog before continuing

I've written an elisp script to automate the process of taking screenshots. The script uses maim and imgur.sh. Not really important however. Here is the code: ;;; ../../.local/share/git/dotArch/....
2
votes
1answer
36 views

How to prompt user for tags and use the result in a org-ql-search function?

Is there a way to read tags with completion from the user in the same way read-number or read-string allows? I would like to have a custom function defined where I ask the user for a tag (or list of ...
0
votes
1answer
91 views

How to use ivy to navigate named locations of a buffer?

Given a list of (point-number . title-text), how can ivy be used to show this in a list in ivy? I have code which uses completing-read to do this (see link). This can use ivy since it extends ...
0
votes
0answers
17 views

How to include buffer-file-name in completing-read [duplicate]

I can use completing-read to choose from several items like this: (completing-read "Complete a foo: " '(("apple" 1) ("barfoo" 2) ("elk" 3) ("foobar2" 4)) ;; collection of choices nil t ) But the ...
2
votes
1answer
210 views

How to tell Ivy to use completing-read-default for specific command? (org-tags-view, in particular)

Ivy (+swiper +counsel) is very cool and I use it constantly for an ever growing number of tasks. But there are some cases in which the requirements of a certain completion task defeats Ivy's logic. ...
2
votes
3answers
126 views

How can I ask a user to choose from a list of options, while showing her a long list with extra metadata?

I'm writing a package which connects to a remote server for a game. I want to show the list of players, along with their score, and let the player choose one of the players. I thought of using ...
2
votes
1answer
74 views

Read a sentence with completion for words from a collection

Suppose we have a collection of descriptions like this: ("procedural" "functional" "high-level" "low-level" "statically-scoped" "dynamically-scoped") Suppose that we have a database of programming ...
0
votes
2answers
118 views

Using thing-at-point as initial input for bookmark-jump with bookmark+ and helm mode

I am using bookmark+ and helm mode. Debugging a large Fortran code base, I have created some bookmarks that has the same name as some of the Fortran subroutines. Now, I would like to put the cursor ...
3
votes
1answer
173 views

Accept unmatched input in completing-read when using helm

In helm, when executing following code: (let ((things (list "a" "aa" "aaaa"))) (completing-read "Thing: " things)) ... how can I exit the minibuffer and return "aaa"?
1
vote
2answers
325 views

Using ido completion for selecting a repository for magit

I like to use ido for completing file paths and helm for all other things. I have tried setting magit-completing-read-function to magit-ido-completing-read. This doesn't change magit-status behaviour ...
2
votes
1answer
18 views

How can I modify the prompt of another command?

How can I modify the prompt of another interactive command without copy-pasting too much? Can I override only the interactive form?
3
votes
3answers
685 views

How can I create custom menu prompts in elisp?

I have two elisp functions: $ cat ~/myelisp/myoptions.el (defun get-my-name (arg) "Prompt user to enter a string, with input history support." (interactive (list (read-string "Enter your ...
0
votes
1answer
114 views

defun completion and region

Is it possible to write a function with completion that act on region? A mix of: (defun function-style (style) (interactive (list (completing-read "Style: " styles-list))) ... And (...
3
votes
1answer
251 views

Completing read a directory or an element from a list

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 ...
0
votes
1answer
81 views

Complete using match in middle of string - work with pop-up list?

I'm trying to use auto-complete to match in the middle of a string (after the characters ::). I'd like to typing a then hit tab and have the list of candidates appear 'in full' e.g. fruit::apples, ...
1
vote
1answer
277 views

Configure helm--completing-read-default to pick the top match

I have the variable completing-read-function set to helm--completing-read-default. When an external package invokes completing-read, this gives helm-based completion. However, the default item picked ...