All Questions
26,288
questions
0
votes
0
answers
29
views
Using Gnus + Gmail with Oauth2
I'm looking to use gmail with gnus, however my work has disabled app passwords, so the only way to connect to gmail is through oauth2 which is how I've done it with for example aerc mail.
I'm trying ...
0
votes
1
answer
20
views
How to tell tramp to not ask me about autosave on local directory?
Sometimes, when I edit a file with tramp, it asks me:
"Autosave file on local temporary directory, do you want to continue?(yes or no)"
I want to continue in any case. How can I disable this ...
0
votes
1
answer
19
views
How do I interpolate elisp variables in org-mode option headers?
I want to achieve something like this:
#+latex_header: \input{${PUT_SOME_ELISP_VALUE_HERE}night_beamer_common1.tex}
0
votes
1
answer
27
views
Third-party function overrides my customized variable and my mode hook
In the spacemace python layer, the following function overrides my customizations for the variable company-minimum-prefix-length
python layer
(defun python/post-init-company ()
;; backend specific
...
1
vote
2
answers
45
views
Make "M-x repeat" Ignore Movement Commands
Is there a standard way to make M-x repeat ignore movement commands or does it require custom elisp?
I read a [Mastering Emacs blog post about repeating commands][1] and immediately started using &...
3
votes
1
answer
31
views
Strange behaviour involving `display` property
I noticed a rather peculiar behavior when using the display property (using emacs 28.2). I tried to boil things down to a minimal example: The code
(defun finsert ()
(insert (propertize ".&...
0
votes
1
answer
22
views
set the correct major mode for script files based on interpreter
I want to make a function that will set the correct major mode based on the interpreter used for a script.
I don't want to include extensions in my scripts (because that can be annoying if making cli ...
0
votes
0
answers
9
views
List Adaptive Fill Keeps Growing for Lists in Olivetti Mode
I'm having trouble with my org lists. They seem to have an ever increasing amount of adaptive-fill as I nest them deeper and deeper.
A picture of the problem is below. These are all single lines in ...
0
votes
0
answers
26
views
Enable citation in doom emacs org-mode
I am unable to make citations work in my doom emacs installation, from the manual it is not clear which changes I need to add to the config.
What I want:
#+bibliography: notebook.bib
This is text with ...
1
vote
0
answers
24
views
In Org mode, what is the priority order for a file's initial visibility?
Three things control an Org mode file's Initial Visibility: a heading's VISIBILITY property, the file's #+STARTUP: line, and the org-startup-folded variable.
In terms of priority, I've always assumed ...
1
vote
1
answer
62
views
Warning: Lisp directory '~/.emacs.d/site-lisp': No such file or directory
I set the environment variable EMACSLOADPATH to change Emacs load-path this way:
mkdir ~/.emacs.d/site-lisp/
export EMACSLOADPATH="$(
emacs \
-Q --batch \
--eval '(princ user-emacs-...
0
votes
1
answer
33
views
Splitting use-package declarations in literate config
Trying to clean up my configuration and make it more readable, but also
reduce load time from current time of about 13 seconds down to < 10.
Suppose I have a large use-package macro for a package ...
0
votes
0
answers
8
views
Question on modifying Helm's search (helm-ag or similar tools)
I'd like to do the following when I search
- find symbol in a project
- add restrictions (options)
- to narrow to files that matches a pattern (--include)
- to narrow to files that doesn't ...
0
votes
1
answer
21
views
How to Stop Mouse Click in Echo Area from Opening Message Buffer?
Clicking the echo area causes Emacs to switch to the *Messages* buffer.
I hate this behavior, because the only time I click the echo area is on accident, whereupon it wastes time and breaks train of ...
0
votes
1
answer
34
views
let* equivalent for interactive
I'd like to call a series of completing-read prompts via interactive, where every prompt after the first takes the previous result as its only argument.
(defun make-prompt ()
(completing-read "...
0
votes
1
answer
31
views
keybinding which will respect minor mode override
I am trying evil mode and want to keep emacs's C-k when in insert mode.
C-k is kill-line
but when smartparens-mode is on, it's
sp-kill-hybrid-sexp
So I can't just bind C-k to kill-line in evil-insert-...
1
vote
0
answers
35
views
evil, end of line in elisp mode, is hard to execute eval-last-sexp
(setq a "3")
If I want to evaluate the line, I'd go to the end of line and do (eval-last-sexp)
But in evil mode, the last sexp is "3" not the expression.
I can go to the next line ...
0
votes
1
answer
25
views
Push to GitHub via Magit retrieves error: "error in process sentinel: Symbol’s function definition is void: compat-assoc" but works. How to fix it?
I am using Magit in my Emacs. This is my config file.
I have been using this package for a long time without issues. Recently, some weird error messages started to appear. After pressing to push a ...
0
votes
1
answer
25
views
replace nth-match of a regexp in a string
I'm looking for a function that can replace the nth-match in a string.
Here's an example. 2 is the index of the nth-match, [0-9]+ is the regular expression to search. foo is the replacement and "...
0
votes
0
answers
16
views
perl-mode brace indentation
How can I get perl-mode to indent:
func({
foo => 'bar',
});
as
func({
foo => 'bar',
});
without switching to cperl-mode?
1
vote
1
answer
116
views
language specific tree-sitter major mode wont show up
I'm using GNU Emacs 29.1 and have installed the tree-sitter haskell grammar: libtree-sitter-haskell.so via treesit-install-language-grammar but somehow haskell-ts-mode wont show up as a major mode ...
0
votes
0
answers
19
views
make smartparens not to override python bindings
with smartparens turned on, C-M-a becomes sp-backward-down-sexp
I think python-mode's beginning-of-defun is more useful.
How I can setup so that
python-mode's keybinding is not overriden by ...
0
votes
0
answers
31
views
why does emacs open an empty buffer named "BLANK" on startup?
When I start emacs, it opens an empty buffer named BLANK. I have no idea where this comes from and would like to not have it there, since there's nothing in it and it clutters up the buffer list.
I do ...
0
votes
1
answer
19
views
Creating custom minor mode with keybindings
I've written my first custom elisp function for dealing with the output from grep.
(defun open-at-grep ()
(interactive)
(let ((thisline (buffer-substring-no-properties (line-beginning-position) (...
0
votes
1
answer
20
views
Flyspell and/or ispell + hunspell: Quirk for contraction words (shouldn't, isn't etc. getting flagged)
When setting up my spell-checking with flyspell and hunspell, contractions such as shouldn't and isn't are getting flagged:
I believe it's not (entirely) the dictionary's issue (en_GB) as when I type ...
1
vote
1
answer
29
views
remove (sub)item from menu-bar
Any way to remove an item from menu bar quickly/easily?
For example, I want to remove About GNU:
It's a little annoying to dive into the value of keymap.
Moreover, you need to know the keymap name ...
2
votes
1
answer
42
views
How to make `electric-pair-mode` always generate matching delimiters &parens in html/sgml/mhtml modes?
When I type a single {, it will auto insert right }
But when I type a { again, it won't auto insert right }
How can I set up electric-pair-mode so that it always generates matching delimiters and ...
0
votes
0
answers
14
views
consult.el: annotation of abbrev symbols in completion buffer not working as expected
I have created a bunch of abbreviations for long account names in beancount-mode. The abbrevs are pretty volatile in my short term memory, so I thought of using consult--read to help display the ...
0
votes
1
answer
27
views
smartparens, remove wrapping parens and contents
How can I go from
((equal arg '(4))
(setq current-prefix-arg nil)
(spacemacs/helm-files-smart-do-search)
)
to here
(setq current-prefix-arg nil)
(spacemacs/...
0
votes
1
answer
14
views
smartparens, how to copy unbalanced () code blocks?
(defun ek/search-set-directory ()
....
)
Suppose I copy the first line which is not balanced,
then smartparen won't allow me to add ).
I can add it by using C-q )
Wonder if there's a better ...
1
vote
0
answers
36
views
How to get `comint` modes work with long lines?
When I paste a long (not that long) line in inferior-python-mode, the buffer sucks. For example,
"[{\"inputs\":[{\"internalType\":\"contract I_StarkwareContract\",\&...
0
votes
1
answer
36
views
prevent emacs deleting ")"
I don't want to turn off entire smartparens or similar mode
((([cursor]))
When I type ) at cursor location I expect it to be
((()))
but it becomes
((())
How to find out which mode is causing it?
0
votes
1
answer
33
views
Exporting disjoint parts of Org document with marks
I am interested in exporting disjoint sections of my Org document via setting marks, as I find them most convenient. I am aware of the :export and :noexport tags, but seeing as how I have to ...
0
votes
2
answers
47
views
Auto completion popup opens with zero character match in Inferior Python mode (comint repl)
When I enter an IPython repl via python-start-or-switch-repl, I get annoying auto completion behavior where the completions popup opens with zero characters entered. If I type one character and erase ...
0
votes
0
answers
24
views
How to turn on `read-only-mode` when running a command in `comint` buffers and turn off it when the command is finished?
I'd like to prevent all user inputs when a command is running in comint-like buffers (created by shell, run-python etc.) by enabling read-only-mode when I hit enter to run the command and disabling it ...
0
votes
1
answer
32
views
How does startup.el work (on Debian 12)
I'm using the emacs/stable,stable,now 1:28.2+1-15 Debian package with Doom and am trying to change startup behavior. I made backups of startup.el.gz and startup.elc located at /usr/share/emacs/28.2/...
0
votes
1
answer
35
views
Error in converting org file to md file: Unknown "nil" back-end: Aborting export
I'm trying to export simple org file to md format using command below:
emacs --batch myLanes.org --eval "(progn (require 'org) (org-export-as 'md))" > myLanes.md
I'm getting the error:
...
2
votes
1
answer
33
views
Is there a way to display echo area message over mode line?
Currently it looks like
But this is a bit annoying - as the echo messages changes between single line and multi-lines, the mode-line is moving up and down.
I know I can truncate the message to make ...
2
votes
2
answers
109
views
How do you sort tokens within a line
Sorting lines in Emacs is fairly straightforward with sort-lines.
However, how do I sort within a line? For example: John Ringo Paul George -> George John Paul Ringo
1
vote
0
answers
35
views
How To Tangle Org Src Code Block Under Conditions
I'm using .org files to keep track of my system configuration across different machines and I want certain code blocks to be tangled only if certain conditions are met.
Let's say I have something like ...
0
votes
0
answers
21
views
Displaying a rendered content of .org file into the terminal
I got a zsh script which do some work for me. Somewhere in the body of that script I'd like to have nicely rendered .org file displayed, and my zsh script to continue further. In sudo code something ...
0
votes
1
answer
26
views
Tide mode: how do I get it to stop running tide-format-before-save?
I'm at my utter wit's end with this hell-plugin lmao. I've tried (remove-hook 'before-save-hook 'tide-format-before-save t), and it doesn't work. How do I remove tide-format-before-save from the ...
1
vote
1
answer
28
views
Configuring dedicated directory for lock files and auto save files on MS-Windows
How do I configure a dedicated location for lock files and auto-save files that works on MS-Windows, GNU/Linux, and macOS? I'm using GNU Emacs 28.2
The following works on GNU/Linux but not on MS-...
0
votes
0
answers
28
views
flycheck thinks functions defined in a macro are not defined
i use a define-request macro to make it easier to define lots of requests to a REST API. each one returns a defun, the request function.
flycheck is unable to discover the existence of these functions....
0
votes
0
answers
62
views
New Frame function fails to size the new frame correctly and prints a Gtk-CRITICAL message. Is this the return of an old bug?
I am using Emacs 29.1. After upgrading Linux to Ubuntu 23.04 the emacs create new frame function (C-x 5 2) seems broken.
What happens: when I create a new frame, it shows up so tiny (15x7) that the ...
1
vote
1
answer
35
views
function needed to replace short, static list of keywords
In my workflow I copy emails into an orgmode file. I'd like to have head of the email formatted. In english emails (just as an explanation) I'd like to have *To:* instead of To:, because orgmode then ...
0
votes
0
answers
19
views
Find out what created the window?
dap mode keeps creating unwanted window, I'd like to prevent it but can't find a way
I can think of setting a breakpoint on window-creation.
But there seems to be a lot of those split window functions....
0
votes
1
answer
33
views
How can I prevent projectiles from being removed?
Sometimes a network mount point is temporarily unavailable. If I use projectile during these times, projectiles gets removed.
How can I prevent that?;)
1
vote
1
answer
134
views
Where to find all elisp functions?
I’m working on this tutorial and it uses functions such as,
search-forward, goto-char, save-excursion etc.
Is there a place where all functions are listed?
If I search for search-forward I find this ...
0
votes
1
answer
31
views
Problem with UTF-8 characters in magit buffers
I have my Emacs working in a manjaro (based on arch linux) and the languaage set catalan.
It is working well, but I had a problem with dired buffers showing weird symbols and solved adding this ...