All Questions
23,965
questions
0
votes
0
answers
2
views
Emacs on MacOS 12.5+: Commands failed with 127
I recently started working at a company that mandates we all use MacOS. I have installed emacs and would like to use my config, which leverages visual-regexp-steroids.el, but I am receiving an OS ...
0
votes
0
answers
6
views
How to: make speedbar just expand a directory while staying in current view, instead of 'opening' directory
I love using speedbar (specificall I use sr-speedbar) but I'm having a hard time configuring it to my liking.
One thing I'd like to be able to do, is set it so that there's an "anchor" ...
0
votes
1
answer
13
views
Replacing words using multiple rules
This function is supposed to replace matches with a shortened version using multiple rules rather than just a single one. For the word counter, coun gets replaced by k, resulting in the shortened ...
0
votes
0
answers
16
views
org-mode structure templates only someone works
I want to use structure templates with tab but only: <c <e <q <v work.
(with emacs -Q no templates work)
(emacs 27.1, org-mode 9.3; debian 11)
my org-mode settings:
(require 'org)
(setq ...
0
votes
0
answers
7
views
How to disable `tree-sitter-hl-mode` for `org-mode`/`markdown-mode` code blocks?
My tree-sitter setting is
;; Tree-sitter highlight
;; Base framework, syntax highlighting.
(use-package tree-sitter
:diminish (tree-sitter-mode)
:hook ((after-init . global-tree-sitter-mode)
...
0
votes
0
answers
15
views
Executing mit-scheme blocks in org-mode
Using doom emacs
in my packages.el:
(package! slime)
(package! geiser)
(package! geiser-mit)
(package! scheme)
in my config.el:
(setq geiser-active-implementations '(mit))
(org-babel-do-load-...
0
votes
0
answers
33
views
How to delete a hypenated word in emacs?
How am i able to delete a hypenated word in emacs?
aoeu-aoeu test test for example. I know ESC-d, but it only deletes the first aoeu, but it should delete
aoeu-aoeu
0
votes
1
answer
4
views
How can I emulate the eclipse jdt open type action in emacs lsp-java?
In eclipse jdt, there's the open-type command, which opens a window and you start typing the name of a type. While typing, the list of candidates are shown in that window is filtered dynamically and ...
0
votes
0
answers
6
views
Sort completions for find-file by mtime with fido/icomplete
With emacs 28, I'm trying to replace various uses ido/smex with the new fido-vertical-mode. However, one feature of ido that I like is this package ido-sort-mtime-mode that lets you sort files by ...
0
votes
2
answers
31
views
Binding functions associated with package names to H-x
The following function constructed by @dalanicolai has been adapted in a way that allows a user to automatically select a function affix name galaxy, protoc or typex, which is then bound to H-x.
What ...
1
vote
2
answers
32
views
Simple and fast way to show interactive functions associated with a package
I am using M-x protoc to show me the interactive functions provided by the package protoc. Is it possible to have a shortcut for displaying protoc related functions without having to write protoc TAB ...
0
votes
1
answer
12
views
How can I prevent URL to open in the external browser when enter used in org-mode
I am using emacs inside the terminal. In org-mode when the cursor on top of a hyperlink and I press enter the URL opens in the default browser.
* hello
[[www.google.com]] // cursor is on the `google`...
0
votes
1
answer
10
views
Evaluate elisp in Bookmarks File
Is there a reasonable way to evaluate elisp within a bookmarks file in Emacs?
For example, I bookmark all of my typical remote file paths and am in the middle of trying to get a dynamic IP address set ...
0
votes
1
answer
14
views
project-find-file completion and navigation
I am learning to use project-find-file. I know there are better alternatives in melpa, but I would like to learn the "out of the box" functionality.
When I do project-find-file, start typing ...
0
votes
0
answers
12
views
Grouping and backref with rx
I have the following insert command that replaces ple from the median of words with the letter p. When I execute the command I am getting emacs error complaining about the use of the function seq. ...
2
votes
4
answers
254
views
How to list all the keybindings with the same prefix key?
How to list all keybindings that have same prefix?
For example, M-g M-g is bound to goto-line.
How to list all the keybindings that have the prefix M-g?
0
votes
1
answer
17
views
indent-region does not respect my c-mode style
This is my C style:
(defconst mira-c-style
'((c-basic-offset . 4)
(indent-tabs-mode . nil)
(tab-width . 7)
(c-comment-only-line-offset . (0 . 0))
(c-lineup-C-comments . 0)
(c-...
0
votes
1
answer
20
views
`buffer-face-mode` does not work with custom fontset
I can not change family and size of a custom fontset in buffer-face-mode. Below is the minimal test config
(create-fontset-from-fontset-spec
(font-xlfd-name (font-spec :registry "fontset-mine&...
0
votes
2
answers
31
views
How do I "escape" a subscript or superscript in Auctex?
Let's say I write a subscript inside a math environment like \(a_p\). Auctex conveniently, and by default creates a pair {} and puts the cursor inside of it so I don't have to bother putting them ...
0
votes
1
answer
25
views
How to switch to cc-mode programatically (from elisp code)
In my lisp code, I need to switch to cc-mode, do something and back to original mode (text mode). How to do that ?
-1
votes
0
answers
10
views
Replacing character sequences inside a word
I want to replace a sequence of character sequences (e.g. ple) when they occur medially in a word (e.g. in word complementary).
Have constructed the regex string "[A-Za-z]+ple[A-Za-z]+".
But ...
-1
votes
0
answers
18
views
Matching character sequences medially in words
I want to match the character sequence ple within a word (but not if it occurs at the beginning or at the end).
For the beginning I can use \\<ple; for the end I use ple\\>.
But what about ...
0
votes
1
answer
10
views
python linting not working with eglot
System:
Mac OS 12.5
Emacs 28.1 from homebrew
Python 3.9.13 using a virtual env
python-lsp-server
For some reason my linting, with error highlighting is not working with Python using eglot.
In the ...
-2
votes
2
answers
41
views
Using rx to modify end of word
I am inserting the letter l for words ending in ley, ily, and ly. This means that family would be modified to faml.
The code works when using the regexp string \\(ley\\|ily\\|ly\\)\\>, but am not ...
0
votes
0
answers
12
views
format old file to org-indent-mode
I want to convert file created without (org-indent-mode) to (org-indent-mode) format. Mostly it's additional 2,3,4 spaces. I was trying to fix it with string-replace. But maybe somebody have better ...
0
votes
1
answer
26
views
Using rx to insert word replacement
Been working on replacing regexps with the equivalent rx command, but the expression for rx is not producing the same result I get with the regexp. For the word counter, the regexp expression gives ...
0
votes
1
answer
48
views
how to configure rst2pdf link to emacs
It's a while that a try to use emacs for compiling .rst as .pdf
I made numerous proof, the last thing that came to mind is:
how to be sure that emacs knows where rst2pdf is, i mean in wich directory. ...
1
vote
2
answers
241
views
Why is my C-. keystroke getting captured?
I have a strange problem that I've observed using GNU Emacs 28.1 on gnome + arch linux. I have a commands bound in my .emacs to C-, and C-., which I wrote a long time ago to jog up and down the buffer....
0
votes
2
answers
32
views
Emacs 29 docstring single quote escaping rules, compiler level event?
I've seen the following warning from the Emacs 29 compiler:
In s-format:
s.el:614:2: Warning: docstring has wrong usage of unescaped single quotes (use
\= or different quoting)
I haven't been ...
0
votes
0
answers
14
views
Scheme to write shortened words according to certain rules
I want to modify words according no certain rules.
Here is a small example with three rules
a) Insert k for words with initial cog, col, com, con, cor, coun, cum.
(insert (replace-regexp-in-string &...
0
votes
0
answers
26
views
Replacing single prefix from word
I want to omit the beginning of words starting with some (e.g. something changed to thing).
This is the way I am doing it
(insert (replace-regexp-in-string "\\<\\(some\\)" "" ...
0
votes
1
answer
33
views
Omit the beginning of words
I want to omit the beginning of words starting with some (i.e. something is changed to thing) using the expression
(insert (replace-regexp-in-string "\\<\\some\\" "" word))
But ...
-1
votes
1
answer
22
views
Regex replacement on final endings of words
I would like to replace the final ly, ily, ley of words with the letter l.
So that I get the following changes to words
nearly changed to nearl
family changed to faml
valley changed to vall
0
votes
1
answer
19
views
Inserting letter for words with initial letter sequence
I would like to introduce the letter k for words with initial cog, col, com, con, cor, coun, and cum using an elisp command defined in my init file.
That is
"cognize" changed to "knize&...
0
votes
0
answers
6
views
How to make org-cite export multiple citations enclosed in one pair of brackets?
When I have multiple org-cite citations like this:
As described by [cite:@ref1;@ref2;@ref3]
My configuration exports with multiple bracketed numbers like this:
As described by [1], [2], [3]
But ...
0
votes
1
answer
16
views
emacs opens unwantedly with some git commands
I have a very strange problem that I cannot work out. Emacs opens if I run some git commands such as git log, git branch, git show. Some git commands behave normally and do not open emacs, such as git ...
1
vote
1
answer
26
views
How do write a function/macro to wrap arbitrary interactive function?
I'm trying to write a function/macro to wrap arbitrary interactive function with some pre- and post- processing. Those processing does not involve the arguments of the interactive function.
For ...
0
votes
0
answers
15
views
How to let AuCTeX automatically detect tcolorbox-environments
When I create a new environment via the \newenvironment-Command, Auctex automatically detects it and when I type C-c C-e the new environment is suggested and when I chose it, it asks for the right ...
0
votes
1
answer
24
views
Using query-replace-regex to partially replace
I'm struggling with the basics of query-replace-regex after reading the manual.
I'm trying to replace lots of citations formatted like this:
#123213213, foo bar
to
#123213213\, foo bar
the numbers ...
-4
votes
0
answers
16
views
Changing word endings with a different letter
I want to change a word ending with ever with v by calling an elisp function. What can I do?
That is
"whenever" to "wnv"
"whoever" to "hov"
"however" ...
0
votes
0
answers
12
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 ...
0
votes
2
answers
32
views
Does enabling by default a custom input method have any side effect on the default method?
I added these to my init.el:
(use-package org
:ensure nil
:hook (org-mode . (lambda ()
(org-indent-mode)
(variable-pitch-mode -1)
(...
0
votes
0
answers
9
views
Docstring explaining how to use interactive function with completing-read
I want to write a docstring that explains how completing-read works, but cannot find a good description on how one can move from one option to another.
0
votes
0
answers
5
views
How can I use 'transients' in 'magit' to enable case-insensitive search?
I got it working a year ago, then my machine died. I've been unable to figure out the interface to transient.
When I view the levels (green and red, with numbers in them), I hit '-i' but see an error '...
0
votes
0
answers
28
views
Org capture template with org-store-link
I would like to create an org-capture template such that when I select it with org-capture (which is mapped to C-c c for me), I want the capture template to ask me for the description and URL of a ...
0
votes
0
answers
18
views
How to open serial-port with root privileges
When I try to open /dev/ttyUSB0 with serial-term, following error shows:
Opening serial port: Permission denied, /dev/ttyUSB0
I know I can add my user to a group that has access to /dev/tty*. ...
0
votes
1
answer
32
views
keep org-mode comments on export
I am drafting a document in org. Because I will have some coauthors, I will have to switch to LaTeX at some point. I am usually putting a very short description of the paragraph on top:
# why do we ...
0
votes
1
answer
23
views
How to associate pdf file extension with pdf-tools?
I'm using GNU/Guix as my operating system and have had pdf-tools installed for several years. During that time whenever I opened a PDF file (e.g. by clicking on an org-mode link or selecting one with ...
0
votes
1
answer
31
views
Adding alternative for a face or face name
I am using this function interactively, where the string from completing-read is passed to intern to convert it into a symbol suitable for describe-face.
Currently, I want to handle the non-...
0
votes
0
answers
9
views
Switching to and from shortened words with completion
Have been using abbrev to convert words to shortened versions. Whilst I can go from a full word to a shortened version, I cannot go the other way round, because of the punctuation limitation of ...