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
0 answers
16 views

Code Completion with Eglot and C#

I'm trying to figure out why nothing seems to work with eglot and C#;). I find that it only prints namespace does not exist no matter what I try, as if it's the only thing it can print. Here's a ...
0 votes
1 answer
32 views

Vertico: why are some files not displayed in the minibuffer?

I have noticed that, using vertico, some files are not displayed in the minibuffer by default when executing find-file, and I'm not sure to understand why. Say that I have three files in a given ...
  • 1,084
1 vote
0 answers
23 views

Configure Emacs to Respect Windows File Attributes?

Is it possible to configure Emacs under Windows to respect the 'hidden' and 'system' NTFS file attributes for example by filtering out these files during selection of filename completion candidates in ...
0 votes
1 answer
36 views

Disable environment variable substitution with $ in find-file

When using find-file, list-directory and other commands, if one types a $ a minibuffer completion appears with a list of currently set environment variables. I have no idea where this is coded, the ...
0 votes
1 answer
24 views

Emacs + Slime + slime-fuzzy-completions-mode: Emacs opens completions buffer and switches to that buffer... How to prevent this?

In a Common Lisp REPL buffer using Slime, I am using slime-fuzzy-completions-mode to complete symbols when pressing . Upon doing so, Emacs opens a new buffer (in same frame) and presents possible ...
  • 3
0 votes
0 answers
25 views

using emacs + eglot + pascal-language-server + company-mode

My stack is the following: i use eglot as an lsp client i use company-mode for completion i use pascal-language-server which i packaged myself, so this could be the issue I got the same stack ...
0 votes
1 answer
118 views

Orderless in completion-styles

Have seen that completion-styles now includes orderless. Does this mean that there is no need to install orderless in emacs, or do I still have to install it? This is from looking at the code where ...
  • 15
0 votes
1 answer
14 views

spacemacs/dired-aux rename file to similar name without ivy/counsel trying to rename to same file name

In spacemacs I find that two ways to get a new copy of a file with a slightly different filename both suffer from the same completion problem: C-x C-w (write-file) dired-aux's dired-do-rename (bound ...
3 votes
2 answers
198 views

completing-read, search also in annotations

Can someone please tell me how can I force completing-read to search not only in the displayed rows, but also within annotations? Consider a trivial example such as this: (let* ((coll '(("...
  • 1,143
1 vote
1 answer
43 views

Make fido-mode remember which command I chose

I've been happy to replace smex with fido-mode in emacs 28, as fido-mode generally has much nicer behavior. However, one thing that I miss from smex is that smex would remember which strings ...
  • 1,512
0 votes
1 answer
57 views

Table of loaded minibuffer completions

I would like to make a table that shows what minibuffer completion frameworks have been loaded from icomplete, icomplete-vertical, ivy, vertico and helm. As well as the minibuffer completion ...
  • 89
0 votes
1 answer
39 views

Minibuffer completion

I am getting confused about minibuffer completion. I can see icomplete and ivy. For icomplete, there are two main displays, horizontal display (default icomplete) and vertical display (icomplete-...
  • 89
0 votes
0 answers
15 views

How to determine relevant completion-category

I am switching to a consult/vertico based workflow, and I understand that the way to configure completion styles per command is by completion-category-overrides. This makes sense and some commands ...
  • 11
0 votes
2 answers
22 views

Going through possible completions with the keyboard

I am using M-x galaxy TAB to display minibuffer commands. I get a temporary Completions buffer that says Click on a completion to select it. The above means that I cannot complete or go through the ...
  • 51
0 votes
0 answers
13 views

Completing long words but inserting shortened version

Company mode can help me with completing long words. But I also want to be able to write a shortened version of a word without requiring me to use any keybinding command after writing a word. For ...
  • 425
0 votes
0 answers
43 views

When using company and lsp, why does the placeholder text sometimes not get replaced?

In a buffer in c-mode with the following content (with point after retu), pressing enter completes to return expression;. int main(int argc, char** argv) { retu } Point is now at the beginning of ...
  • 143
0 votes
2 answers
58 views

flex and initials with completion-styles

I am using completion-styles and cannot decipher the difference between flex and initials.
  • 425
1 vote
1 answer
33 views

Unexpected dabbrev-expand forward completion behavior

Given a buffer containing a abc with point immediately following the first a, ↓ a abc if I perform forward completion with (dabbrev-expand -1), it produces the result I would expect: ↓ abc abc ...
  • 1,888
0 votes
1 answer
24 views

Variable set to t as setting to REQUIRE-MATCH

How can I use a variable mustmatch set to t that is used as the setting for REQUIRE-MATCH? (completing-read prompt 'read-file-name-internal pred mustmatch insdef 'file-name-history default-filename)...
  • 425
0 votes
1 answer
28 views

Keys for use during `completing-read`

Am having difficulty finding information about the keys that can be used during completing-read.
  • 425
0 votes
1 answer
43 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 ...
  • 103
1 vote
1 answer
458 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" ...
0 votes
0 answers
46 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 ...
  • 261
0 votes
0 answers
50 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 ...
0 votes
1 answer
22 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 ...
0 votes
0 answers
149 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/...
  • 101
0 votes
0 answers
35 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-...
  • 446
2 votes
2 answers
110 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 ...
0 votes
1 answer
90 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-...
1 vote
1 answer
462 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 ...
  • 113
1 vote
0 answers
152 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 ...
  • 113
1 vote
1 answer
44 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-...
  • 1,143
1 vote
0 answers
35 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. ...
  • 11
1 vote
1 answer
217 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 ...
1 vote
2 answers
469 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, ...
1 vote
0 answers
23 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 ...
  • 53
1 vote
2 answers
187 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-...
  • 4,127
1 vote
0 answers
129 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 ...
  • 1,135
0 votes
1 answer
623 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. ...
2 votes
0 answers
93 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-...
1 vote
0 answers
22 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 ...
  • 467
2 votes
1 answer
167 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 ...
  • 123
1 vote
0 answers
48 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 ...
1 vote
1 answer
744 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 ...
2 votes
1 answer
108 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 ...
  • 494
0 votes
1 answer
30 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 ...
1 vote
1 answer
201 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 ...
  • 346
2 votes
1 answer
298 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 ...
1 vote
1 answer
483 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 ...
1 vote
1 answer
248 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: &...

1
2 3 4 5 6