Questions tagged [completion]

refers to TAB completions (or other keystroke shortcuts) to selecting the target element from a list of many. Often useful for menus, navigations, searching, jumping, folding, and other forms of "narrowing" the list of available choices.

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

Keys for use during `completing-read`

Am having difficulty finding information about the keys that can be used during completing-read.
user avatar
  • 105
0 votes
1 answer
37 views

Can I somehow code dynamic "macros" that calls elisp code when I type certain things in a text-mode (or org-mode) buffer?

Short version When I, in the middle of a text-mode or org-mode buffer, type a line that looks like this: >1d6 ... I want Emacs to generate a random number between 1 and 6, and insert it on the ...
user avatar
  • 103
1 vote
1 answer
63 views

Corfu autocompletion popups are not working with lsp-ltex

I can get autocompletion with corfu to work with txt files, but not when I enable lsp. Here is a MWE which I use as init.el. (setq straight-build-dir (format "build/%d%s%d" ...
user avatar
0 votes
0 answers
38 views

Form autocompletion for Emacs Lisp forms

Several approaches are available for symbol auto-completion with Emacs Lisp. Does Emacs also have completion functionality that, in IELM or in a buffer with Emacs Lisp code, provides form ...
user avatar
  • 241
0 votes
0 answers
28 views

How to begin debugging this: My minibuffer completion (Vertico) disappears visually when a running process outputs to any Shell buffer

I can't reproduce in emacs -Q, so it's hard to pin down the issue. I would like advice on how to begin debugging. The problem: If I am doing something like find-file and navigating interactively with ...
user avatar
0 votes
1 answer
12 views

Progressive filtering with tags

I don't know how to name this functionality that I want. I am sure it exists. So What I want to do is similar to when you apply "tags", output is shown. Then you can choose to apply more ...
user avatar
0 votes
0 answers
42 views

How do I set up intellisense-style completions for javascript using lsp-mode?

I've installed js-mode, js2-mode and lsp-mode. Acording to the docs for lsp-mode, once lsp-mode is running then intellisense-style completion should just work: https://emacs-lsp.github.io/lsp-mode/...
user avatar
  • 101
0 votes
0 answers
23 views

Getting weird completions in shell mode

I'm getting unexpected completion suggestions in shell mode using company. For instance: I have no idea why it's suggesting random DLL filenames here. This is in Linux Emacs built from master of 2022-...
user avatar
  • 406
2 votes
2 answers
69 views

Why does emacs recognize my wildcard with finding file but not with searching buffer?

In the linux terminal, i often use wildcards (*) as a shorter alternative to type in the whole file name: if the file is named foo-and-cats I just type in something like fo* in order to pull up the ...
user avatar
0 votes
1 answer
48 views

How do I skip minibuffer completion in `completing-read`?

In a function X that calls completing-read, I'd like to be able to call X and pass in a constant input without invoking the minibuffer. From the emacs manual, it seems I'm supposed to flet completing-...
user avatar
1 vote
1 answer
204 views

Completion for Emacs?

It's become a standard feature of most (all?) software the past decade or two to have predictive text completion. By predictive completion I mean, when you type into the url field of a web browser it ...
user avatar
1 vote
0 answers
81 views

Scrolling through rust-lsp suggestions is very slow. How to go about debugging this?

I'm trying to set up Emacs with rust-lsp ( following this guide). The suggestions from the rust-analyzer are being picked up as you can see in the screenshot. But when I attempt to scroll through them ...
user avatar
  • 113
1 vote
1 answer
37 views

Capturing "quit" in the completion prompt

I need to use completion prompt, but also capture the fact when the user hits <escape> or C-g. Here's an example: (let ((proj (completing-read "choose project:" projectile-known-...
user avatar
  • 1,083
1 vote
0 answers
31 views

How can I get Emacs 21-style file-name completion in GNU Emacs 25.1.1?

How can I make file-name completion in GNU Emacs 25.1.1 act like it did in version 21.x.x? There are a few things that bother me: The *Completions* buffer opens up in a custom fit-to-content window. ...
user avatar
  • 11
1 vote
1 answer
107 views

Insert path into buffer with vertico.el

I have recently switched from ivy to vertico for the file completion menu system (the new default in doom). Sometimes I want to insert the full path to a file into the current buffer (for example ...
user avatar
0 votes
2 answers
203 views

Minibuffer completion frameworks and interfaces

Emacs has a lot of different packages for minibuffer UI, search, and completion. Some of the packages I am aware of are Icicles, Ido, Ivy, Counsel, Swiper, Consult, Vertico, Selectrum, Orderless, ...
user avatar
1 vote
0 answers
19 views

How to show `*Completions*` buffer if input is successfully completed?

I imagine this is a simple question, but I have been unable to find an answer. C-x C-f, as you know, brings up a find file minibuffer. Entering a few characters afterward and pressing TAB will ...
user avatar
  • 33
1 vote
2 answers
139 views

Remove space autocomplete from M-x

Is there a way to disable space trigging autocomplete for M-x? It'd be nice to still have it, just not bound to space. I can get something like what I want with: (define-key minibuffer-local-...
user avatar
  • 3,885
1 vote
0 answers
72 views

How to speed up tramp with ivy

I use ivy for file and buffer completion. As soon as I have one (dired) buffer which gets its content via tramp from a (slow) remote server all buffer and file selection commands become very slow even ...
user avatar
  • 1,041
0 votes
1 answer
323 views

How does company mode work?

I am trying to set up a quasi-IDE experience on Emacs for C/++, and I installed the company package. However, it seems it doesn't work. For what I undersood, company by itself is only the front-end. ...
user avatar
0 votes
0 answers
57 views

anaconda-mode completion not working for python3 modules from pip3 and non-standard python3 modules from Debian repos

Using Spacemacs 0.300.0 develop on Debian 10.9 (stable). My python setup in .spacemacs: (python :variables python-backend 'anaconda) I also have the following in my user-config: (setq python-shell-...
user avatar
  • 1
0 votes
0 answers
57 views

Fill in the current candidate when reading file using icomplete-vertical-mode

From completion frameworks such as ivy and vertico I am used to being able to use / resp. TAB to select the highlighted choice when reading file names. This is similar to how RET completes that choice ...
user avatar
  • 24.3k
2 votes
0 answers
83 views

Why auto-completion does not work in this case?

In general, I am pretty happy with the tab-completion provided by Emacs. However, I would like to avoid situations like this one. While programming in Lisp with Slime and SBCL, I am doing a let-...
user avatar
1 vote
0 answers
17 views

Variant of read-regexp that shows matching string candidates upon TAB

I'm looking for an extension of read-regexp, that given an additional parameter of completion candidates, shows the matching subset of these candidates in the minibuffer, when tab is pressed. Similar ...
user avatar
  • 415
2 votes
1 answer
100 views

How can I use `TAB` with `M-x` to cycle through commands matching minibuffer input

I am finding completion in Emacs system to work similarly to bash completion, in the sense that upon pressing TAB, it presents the user with a list of possible options. However, I am looking for ...
user avatar
  • 123
1 vote
0 answers
42 views

improve ivy's completions

When I do M-x package install, (with a space between the words) I get: I'd like the "package-install" option to be prioritized over "package-menu-mark-install". What can I do to ...
user avatar
1 vote
1 answer
387 views

binding <tab> to company complete

I would like to always trigger company suggests. When I use: (global-set-key (kbd "<tab>") 'company-complete)) It breaks ivy's completion in the minibuffer. How can I prevent this? I ...
user avatar
2 votes
1 answer
74 views

C-x C-f TAB TAB: Find file completion list: how to highlight subdirectories?

Often I'd like to open a file in a subdirectory. But poor me, I can't remember the name. So when typing C-x C-f and then TAB TAB for the completion list, the list of all files in this directory is ...
user avatar
  • 474
0 votes
1 answer
29 views

How to hierarchically find available functions in the minibuffer with stock emacs

I accidentally pressed some keys and found a feature that looked really useful. It gave me the option to hierarchically select a command/function to run in the minibuffer. There was some explanatory ...
user avatar
1 vote
1 answer
146 views

How to turn on "helm-mode" for a specific function?

The context I've defined a big set of yasnippet snippets and sometimes I forget the shortcut for those snippets. I've found out recently that the function yas-insert-snippet can be used to insert a ...
user avatar
  • 286
2 votes
1 answer
187 views

Disable minor mode in specific major-modes or changing buffers (i.e. selectrum for prog-modes but not in shell)

This is similar to many other questions but nothing is leaping out.. I'm a fan of selectrum (similar to helm and ido I gather): e.g. hit M-x and start typing, it'll find matches and list them. I'd ...
user avatar
1 vote
1 answer
343 views

What is causing Emacs remote shell to be slow on completion?

So basically I am doing the following: Opening a dired buffer with tramp on a remote. Opening a shell on the remote (M-x shell) Then if I try for example to type any command such as ls -la the ...
user avatar
1 vote
1 answer
146 views

Use completing-read to call arbitrary function

How can one pass a list of (arbitrary) functions to completing-read and run the selected candidate? Something like this: (defun find/buffer () (interactive) (completing-read "Chose one: &...
user avatar
2 votes
0 answers
48 views

Markov matcher for dabbrev

While writing plain text (not code), I'd like a completion based on more context, an exmple would speak more so here it is: Given the following buffer (a preloaded big text corpus would make more ...
user avatar
3 votes
0 answers
910 views

Company: backend company-capf error

I'm using emacs-lsp with company-capf. While editing an elisp file, it works fine. However, once I run eval-buffer, I get the following error when trying to use completion: Company: backend company-...
user avatar
1 vote
2 answers
55 views

Completing read with must-match and cannot be null

The function completing-read permits the user to simply press the enter key without selecting a match against the list of valid choices: (let* ((completion-ignore-case t) (client (completing-...
user avatar
  • 17.7k
2 votes
1 answer
41 views

Multi-directory tab completion for find-file?

I am frequently diving through many layers of directory hierarchies (thanks, Java) to find files named like this… java/test/com/company/thing/test/testy/testier/testier/Tester.java The main issue ...
user avatar
0 votes
1 answer
44 views

How can helm be configured to return a nil result when the user cancels?

This function selects one of the items in projectile's project list, but when I cancel the select using Ctrl-G an item is still returned. Whatever candidate the selection is on is returned even if the ...
user avatar
  • 1,157
4 votes
2 answers
146 views

Display summary information on command when running Meta-x

Since I'm new to GNU Emacs (version 26.1 running on Debian Stable) I'd like to get some information when invoking a command using Meta-x. Currently I'm only able to see a list of possible completions ...
user avatar
  • 175
2 votes
2 answers
106 views

completion-ignored-filenames?

Is there a way to do ignore whole file names the same way as 'completion-ignored-extensions' ignores filename extensions? For example, I would like to blacklist __pycache__/, so that if the default ...
user avatar
  • 161
1 vote
0 answers
48 views

Completion modes are too intrusive. Is there an abstract API to fine tune usage per mode?

So I'm looking for coding technique / code organization to make completion system pluggable for particular my mode, choice shouldn't affect other modes or preferences. At the moment I use completing-...
user avatar
  • 3,132
1 vote
1 answer
190 views

Using company mode to complete sentence

As I understand, company mode can help complete the word, but not a sentence. I would like to complete a fragment of sentence. I would like to complete fragment e.g. "portal and hepatic doppler&...
user avatar
  • 523
1 vote
0 answers
29 views

How to define interactive function that will not auto-complete?

If I do this: (defun foo-bar-baz () (interactive) (message "foo-bar-baz")) And then M-x foo-baz RET (note no "bar") then completion matches foo-bar-baz and it executes. Is ...
user avatar
  • 123
1 vote
1 answer
29 views

Completion with help

I'm using completing-read to get an argument for an interactive command. The argument is a non-intuitive word (required for my application), so the completion list looks like this: Possible ...
user avatar
  • 123
0 votes
1 answer
205 views

Emacs company-css, where is the completion of css values?

Company-mode completion seems a little weak in emacs. Is it my configuration? Property completion seems simple enough: strong { color: red; /* <= color is the property */ } Where red is the ...
user avatar
1 vote
0 answers
63 views

Notmuch - configure preferences for address completion

When hitting TAB in notmuch to complete email addresses, I often get a long(ish) list of possible completions, forcing me to cycle through it looking for the correct one. Is there a way to order the ...
user avatar
1 vote
1 answer
156 views

Replace a character with a string as it is typed

I would like to do the following: activate some mode so that whenener I type the $ character in my buffer, it immediately gets replaced by <m>. Even better: when I type $ it puts <m></m&...
user avatar
  • 115
1 vote
0 answers
46 views

Custom keyword list for auto completion M-/?

I make use of M-/ for auto-completion. Is it possible to supply a custom list of frequently used keywords (e.g. for a niche programming language) to be loaded at Emacs startup? I could save the ...
user avatar
  • 143
1 vote
1 answer
56 views

How to disable "/" 's default behavior on the F interactive mode?

I use interactive mode with Ivy and Dired for interactively creating new files, like so: (evil-local-set-key 'normal (kbd "t") (lambda (file) (...
user avatar
1 vote
0 answers
67 views

Why is completion not working?

I have emacs installed on two machines, with both installs using a similar spacemacs config. On both, C-M-i is bound to the command complete-symbol. I am editing different org files on the machines, ...
user avatar

1
2 3 4 5 6