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
11
votes
3answers
5k views

filename completion using company-mode

I enabled company using the following commands in my init.el: (require 'company) (add-hook 'after-init-hook 'global-company-mode) However I'm not getting filename completion, although there is some ...
2
votes
0answers
67 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-...
5
votes
1answer
1k views

Tab completion in minibuffer: case insensitive

When the minibuffer offers tab completion, how can I make that case-insensitive? Preferably a global setting that makes any completion – a filename, a command, ido, etc. – obey that setting.
0
votes
0answers
9 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-...
0
votes
1answer
43 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. ...
0
votes
0answers
25 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 ...
0
votes
1answer
149 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&...
0
votes
1answer
111 views

Configure the delay before window showing command completions is shown

When I start entering a command and pause, this helpful window pops up at the bottom: When I don't pause, it doesn't show up. But sometimes, it takes more time to complete a command that I know, e....
0
votes
0answers
43 views

Autocomplete for Go in emacs with LSP + gopls

Following up on https://stackoverflow.com/questions/50668619/autocomplete-in-golang-in-emacs, which is now over 3 years old, but technology has evolved. I did a lot of reading on what's the latest ...
0
votes
1answer
43 views

Completing underscored words without making _ a word character

I would like to use evil-complete-previous (or whatever) to complete strings_such_as_this, which is by default not possible. It is possible after (modify-syntax-entry ?_ "w"), but this has the ...
0
votes
0answers
26 views

How to prevent eshell from hijacking `*` after <TAB>

I start Emacs 27.1 with emacs -Q, invoke eshell, and then type ls foo<TAB>. I have many things starting with foobar in my directory, so it completes to foobar. So far, so good. In bash, I can ...
0
votes
1answer
133 views

Can icomplete mode be enabled selectively, only for certain commands?

I'd like to use icomplete-mode for certain commands, but not for everything. Is there a way to enable it for just a list of commands I specify?
2
votes
0answers
46 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 ...
1
vote
0answers
12 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 ...
1
vote
1answer
26 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 ...
0
votes
1answer
167 views

How to refresh dabbrev candidates displayed by company after each save

I've been using Ivy Irony Company for some time and it works great on all libraries I included in my C++ program so far, but I've noticed Ivy rarely auto-completes my user defined classes, objects, ...
1
vote
0answers
36 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 ...
2
votes
1answer
741 views

Prevent bash-completion adding an extra space when the word is incomplete

When using Emacs shell with the auto-completion feature enabled, I notice that whenever I perform typing and auto-completing a command, Emacs shell always adds an extra space after the first word. I ...
1
vote
1answer
70 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
1answer
467 views

How to directly complete org-mode tags with helm?

When using org-set-tags in org-mode headings, the somewhat clunky *Org tags* selection buffer is shown by default. I always press tab in order to switch to helm-mode-org-set-tags, which lets me choose ...
0
votes
1answer
24 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 ...
2
votes
1answer
39 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 ...
2
votes
2answers
74 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 ...
1
vote
1answer
52 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 ...
1
vote
2answers
66 views

Autocomplete files/paths while typing in any mode or fundamental mode, like bash does at prompt

After opening up an empty file named ~/work/aback using emacsclient -nw ... . I type in ~/huTAB in the body of the file. how can I get autocompletion candidates shown? In this case, any files/...
1
vote
1answer
91 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 ...
2
votes
1answer
374 views

company doesn't pop up completion list automatically

I'm trying to get company mode to automatically trigger the pop-up with a list of possible completion. Unless I'm doing this wrong this is not the default behaviour? Current I have to run M-x company-...
0
votes
0answers
20 views

Automatic insertion of the parameters of a function as placeholders when auto-completing

I am kind of new to Emacs, in the sense that I never used for serious development. I was trying to build a configuration in order to start a larger C++ project, and there is one point in particular ...
0
votes
1answer
33 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 ...
1
vote
1answer
107 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
1answer
67 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: &...
0
votes
0answers
36 views

TAB doesn't indent just pops up completion list

When I enter a new line and with the cursor auto indented due to electric-indent-mode, I see indent-cycles (x) in the modeline, so I hit TAB to cycle the indentation to where I want the cursor to be ...
0
votes
0answers
9 views

Recover selected/highlighted key, val or cons before RET in completing-read

I have completing-read set to show me a plist. I want to do something without RETURNING (completing the function). E.g..: (defun fancy-mode-call-buffer () "List buffers to switch." (...
2
votes
0answers
638 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-...
0
votes
0answers
46 views

Overlapping problem with company suggestions in doom-emacs

I'm having an overlapping problem of suggestions with my company configuration for org-roam in doom-emacs This is the piece of code for my backends in config.el (set-company-backend! '(org-mode ...
1
vote
2answers
35 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-...
0
votes
1answer
203 views

Why do I have two completions when editing python file?

As in the picture, when I editing python file, there are two completions. Why is that? Thank you very much. Following are my init.el related to elpy and completion: (elpy-enable) ;;(setq elpy-rpc-...
2
votes
0answers
23 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 ...
0
votes
0answers
23 views

Code completion for structure with preprocessor selection statement

I'm using Rtags and Irony as backends for company. They work but with some glitches. For example, given this code segment: #include <stdio.h> #include <signal.h> int main() { struct ...
4
votes
2answers
91 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 ...
6
votes
3answers
584 views

How to turn off autocompletion for numbers (and numbers only) in company-mode in spacemacs

When typing a number in spacemacs all kind of numbers are being suggested. I can autocomplete them with enter. I like this behaviour in the case I'm typing words (made up of letters). But I don't want ...
1
vote
0answers
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-...
1
vote
2answers
210 views

How to change the company complete backend based on the current syntax?

I would like to have natural language completion (company-ispell for e.g.) but only when editing comments. How should the company back-end be swapped out when editing commensts?
1
vote
0answers
27 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 ...
1
vote
1answer
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 ...
0
votes
1answer
137 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 ...
2
votes
2answers
67 views

Ignore both uppercase and lowercase versions of the extensions listed in completion-ignored-extensions

How can I get Emacs to ignore, say, both .pdf and .PDF files without listing both ".pdf" and ".PDF" in completion-ignored-extensions?
1
vote
0answers
41 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 ...
1
vote
1answer
84 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&...
1
vote
0answers
37 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 ...

1
2 3 4 5