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.
306
questions
1
vote
2
answers
32
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
34
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
25
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
1
answer
117
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
33
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
86
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
13
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
33
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
70
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
46
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
44
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
75
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
35
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
83
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
0
answers
16
views
Org mode keyword completion with pcomplete showing uppercase and lowercase duplicates
Invoking complete-symbol after #+ in an Org buffer uses pcomplete to display the following completion candidates list:
ORG:
org:
BIND:
bind:
DATE:
date:
etc.
I would like to remove the duplication of ...
0
votes
1
answer
57
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
123
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 ...
0
votes
0
answers
58
views
Abbrevs with Skeletons no longer expanding
I've mashed together my own form of "snippets" in Emacs with Skeletons and Abbrevs. I updated the exact macro for generating both the abbrev and skeleton function, but now abbrevs never ...
1
vote
1
answer
59
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
67
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
217
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
0
answers
39
views
Code completion candidates displayed in minibuffer
How can I get the completion candidates to be displayed in the minibuffer (see e.g. here https://tuhdo.github.io/static/c-ide/semantic-boost-demo.gif) instead of being displayed at the cursor? The ...
0
votes
1
answer
73
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 ...
2
votes
1
answer
138
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
146
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 ...
0
votes
0
answers
21
views
crux-rename-file-and-buffer, ivy-immediate-done
When I use crux-rename-file-and-buffer and there is a similar name, I have trouble disregarding the ambiguous auto-completion suggestions.
I have C-M-j bound to ivy-immediate-done and I think this ...
1
vote
2
answers
211
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
87
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
29
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
98
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
62
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
41
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
143
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
25
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
54
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
74
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
521
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
59
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
424
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
198
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
71
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 ...
0
votes
1
answer
207
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
72
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 ...
0
votes
0
answers
156
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 ...
2
votes
2
answers
166
views
flex and initials with completion-styles
I am using completion-styles and cannot decipher the difference between flex and initials.
1
vote
1
answer
47
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
...
0
votes
1
answer
38
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)...
0
votes
1
answer
44
views
Keys for use during `completing-read`
Am having difficulty finding information about the keys that can be used during completing-read.
0
votes
1
answer
48
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 ...