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.
312
questions
2
votes
0
answers
47
views
How to display function docstrings on mouse hover in *Completions* buffer
In Emacs, when I use M-x followed by typing the beginning of a function name and then press TAB, I get the *Completions* buffer showing a list of possible function candidates for completion.
I would ...
0
votes
0
answers
25
views
How to get corfu-popupinfo working with ESS[R]?
company-quickhelp provides short documentation for arguments in ESS. I read that corfu-popupinfo should be equivalent, but it doesn't seem to be working out of box. When I type in aov(for and press C-...
1
vote
0
answers
42
views
explanation for the unexpected completion behavior in minibuffer?
It is self-explanatory in the screenshots below. As an example, typing sgf does not show the all file names containing sgf? It only shows the candidate file name starting with sgf:
Instead, typing an ...
1
vote
1
answer
39
views
Tab-completion in Minibuffer underlines and uses only current input, even if partial completion is shown
I've installed emacs 30.0.60 on Android.
Tab-completion in the minibuffer for file names and for commands does not work as I am used to it with emacs -Q.
Assume, there exists a file name ~/notes.org ...
0
votes
0
answers
29
views
Can cape-dabbrev be made to skip buffers of certain modes?
cape-dabbrev is part of cape. It lets you autocomplete based on the content of other buffers. This is great when all of my buffers are text files, but it's a problem when one of the buffers is ...
0
votes
0
answers
32
views
Yasnippet returns Wrong type argument: listp
After inserting the snippet I'm able to type the function name.
But after tabbing to args, I get the error Wrong type argument: listp on typing
Is it python-args-to-docstring failing at it's job?
I've ...
0
votes
1
answer
47
views
Can cape be disabled on a mode basis?
I love using cape in text mode, but I cannot figure out how to stop it from activating in programming modes. Is it possible to either only enable it in certain modes or to disable it in specific modes?...
0
votes
1
answer
26
views
How to stop replacing prefix with item in company backend?
I want to write backend for company-mode. I have this example:
(require 'company)
(require 'cl-lib)
(defun backend-name (command &optional arg &rest ignored)
(interactive (list 'interactive)...
1
vote
1
answer
89
views
Prevent `lsp` + `company` from losing completion after dot + symbol
In many languages . is specially treated, so e.g. after typing a foo. a user expects a completion for methods available from foo.
That works with company as well, however after foo. triggered a ...
1
vote
1
answer
80
views
In `*shell*` buffer, how do to configure `TAB` key to behave vertically like `Vertico` does for `find-file` etc?
I have Vertico configured in my Emacs 28.2 running on Linux, along with Orderless as follows:
;; Enable vertico:
(use-package vertico
:ensure t
:init
(vertico-mode))
;; Enable orderless:
(use-...
1
vote
2
answers
102
views
orderless doesn't handle spaces when searching for completions
I'm trying orderless and using the basic configuration from the github page, I'm not seeing the expected behavior when using spaces: the github page suggests that, with the suggested basic ...
0
votes
1
answer
45
views
company-mode: static sources overwrites LSP
I had a short experience with emacs a few years ago (spacemacs), and now I want to get back to it seriously. Within literally 3 days, I built my own config that turned regular emacs into a full-...
1
vote
0
answers
36
views
org-mode completions within latex fragment
Problem
In org-mode 9.6.6 when not in a LaTeX fragment, inserting \ and invoking completion-at-point produces a multitude of LaTeX completions.
Doing the same thing when in a LaTeX fragment, I would ...
2
votes
2
answers
158
views
LaTeX equation numbers with Emacs
Equation labels in the .tex document are \label{eq:3}, e.g., which is (7) on the output pdf-document (say); \eqref{eq:3} references this equation.
Typing <C-x-o> at point (| in the following ...
0
votes
0
answers
51
views
How to use completion-style in execute-extended-command in slime-mode?
I'm trying to use fuzzy completion all over emacs.
I added this line to my init.el file (setq completion-styles '(initials flex)) which seems to have worked for opening project files.
It works on M-x ...
0
votes
1
answer
228
views
`completion-at-point-functions` and filesystem path completion
I want to use filesystem path completion in programming modes and their derivatives. To do so, I attempted to add the following code to my init.el:
(add-hook 'prog-mode-hook
(lambda ()
...
0
votes
0
answers
21
views
Tab-completion in order to access org-roam ecosystem
I'm looking to access an .org note at a specific heading, in such a way that tab completion is available. Is there any such thing? usage example: <command> microeconomics <tab-completed-...
0
votes
1
answer
58
views
Disable bash-completion mode in `shell-command`
How can I disable the bash-completion like mode in the shell-command mini-buffer?
E.g. with M-! and then git diff > <tab>, emacs shows a list of branches while I expect filename expansion. ...
1
vote
2
answers
150
views
ESS R: how to get TAB-completion when editing .R-files?
When editing an .R-file I see that ess-r-mode is on ("ESS[R]" in the status line). If an R session is opened in another buffer, I see that inferior-ess-r-mode is on there ("iESS [R:1]&...
0
votes
1
answer
88
views
Autopair parenthesis with cdlatex
I'm trying to write my configuration for the first time and I am facing the problem with cdlatex completion of parenthesis conflicting with tools like autopairs. What happens is that, inside a TeX ...
0
votes
0
answers
61
views
Vertico command similar to ido-fallback-command
In there a vertico command command that causes vertico-find-file
(not sure of the name, I mean the behavior of file finding during vertico's take over of find-file)
to drop back to the normal emacs ...
2
votes
1
answer
123
views
RefTeX reftex-citation not showing all entries and takes preceding word as argument
After initial setting up emacs with AuCTeX and RefTeX everything worked fine.
may not be the problem, see edit below
Now, for a porject I tried setting up RefTeX to work with markdown-mode with this ...
0
votes
2
answers
49
views
How to troubleshoot: `other-buffer` suddenly begins to ignore some buffers
With increasing frequency, my Emacs session's function other-buffer begins to malfunction.
Specifically, at some point, and for no reason I can discern, other-buffer stops "seeing" some ...
1
vote
2
answers
128
views
Filter out command completions with specific prefixes
I am using command completions, and would like to 'filter' out certain built-in packages. For example, typing "text";
In these completions, I would like to filter out/hide the entries that ...
0
votes
1
answer
60
views
Function with two completing-read [closed]
I want a function designed to accept two completing-read calls, one to set nstruc that holds either "Glyph" or "Command", and actm that holds either "alpha α" or "...
1
vote
2
answers
198
views
suppress a completion candidate, or configure the sorting of completion results?
When I do M-x bury, my completion setup (I use fido-mode, along with vertico and marginalia), produces these results:
1/95 M-x bury
rmail-bury ...
bury-buffer ...
unbury-buffer ...
(etc etc etc)
I ...
1
vote
1
answer
61
views
`completion` In Declare Form Not Working
Why is this function:
(defun shyn/func ()
(declare (completion (lambda (symbol current-buffer)
nil)))
(interactive))
still listed by pressing M-x TAB in buffer *scratch*?
...
1
vote
0
answers
64
views
Effect of `modes` In Declare Form [duplicate]
13.14 The declare Form:
(modes MODES)
Specify that this command is meant to be applicable for MODES only.
What is the practical effect of (modes ...) in declare form?
I find that I can still call ...
0
votes
1
answer
81
views
Prevent completion of the empty string
I would like to prevent completions to the empty string in python and in inferior-python-mode.
To explain a bit better - when the prompt or the string is empty, there are no completions proposed. When ...
3
votes
1
answer
294
views
python-shell-completion-complete-or-indent (Tab, in an inferior python mode shell) completes "__PYTHON_EL_eval_file"
On Emacs 29, Python 3.11.3, IPython 8.13.2
A strange behavior seems to have recently started. When opening a python shell with run-python and then python-shell-send-buffer or python-shell-send-file ...
0
votes
1
answer
88
views
Interactively switchable completion tables
I'm looking for a completion-mode that let the user select the completion-table to use interactively.
So, for example, instead of applying all functions in completion-at-point-functions, apply only ...
3
votes
1
answer
181
views
async functions in completion at point functions?
in my library, i have completion backends that i add to completion-at-point-functions as per the docs, but my completion candidates are fetched from a server with an http request. the call is very ...
1
vote
1
answer
234
views
Difference between dynamic completion and hippie expand
I've been starting to use dynamic completion with icicle-support in Emacs (command icicle-complete with dynamic-completion-mode on), but now I've stumbled over hippie-expand and it sounds like they ...
2
votes
2
answers
280
views
Is it possible to automate completions?
Continued from this post:
(setq completions '("~/org/test-file-1.org" "~/org/test-file-2.org")) ; C-x C-e
(defun mybar()
(newline-and-indent)
(insert-file-contents (completing-read ...
3
votes
1
answer
90
views
Hide Completions Matching Against Regexp
12.6 Tips for Defining Variables Robustly:
‘prefix--…’
: The variable is intended for internal use and is defined in the file prefix.el.
‘…-internal’
: The variable is intended for internal use and ...
1
vote
1
answer
32
views
insert-char completion says no matches, but inserts character anyway?
I'm using C-x 8 RET to insert a Unicode character. I enter the hex value -- for example, 201c -- and the minibuffer says "no matches". But if I just hit enter, the expected left double quote ...
1
vote
0
answers
116
views
How to trigger completion using company mode and tide?
I use tide for editing TypeScript files with default setup from documentation using company mode. I was just watching a tutorial about Prisma (TypeScript ORM) that uses VS Code and shows an available ...
4
votes
1
answer
67
views
Display completion options from top to bottom in alphabetical order?
Completion are currently listed in alphabetical order as
a b c
d e f
With alphabetical order going from left to right.
How can I can change this to.
a c e
b d f
With alphabetical order going from ...
-1
votes
2
answers
47
views
interactively prompt for a list (or regex) rather than just a single item
I have a function to kill buffers matching a given regex:
;; Like kill-matching-buffers, but doesn't prompt every time.
;; TODO: get this to use vertico
(defun kill-matching-buffers-just-do-it ()
&...
0
votes
1
answer
202
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
vote
0
answers
35
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
71
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
103
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 ...
0
votes
1
answer
637
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 ...
0
votes
1
answer
96
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 ...
5
votes
2
answers
575
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
vote
1
answer
257
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 ...
0
votes
1
answer
73
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 ...
1
vote
1
answer
309
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-...
0
votes
2
answers
88
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 ...