All Questions
23,976
questions
0
votes
0
answers
3
views
Given a melpa/elpa package, find other elpa/melpa libraries that depend on it
I am trying to use oauth2.el for some local shenanigans and would like to see how others are using it. Is there a way I can query elpa/melpa for dependencies to this (or any other package)?
0
votes
0
answers
10
views
Turn directory to file in dired
I often make the mistake of creating a directory instead of a file in Dired (by hitting +). I then have to delete it and recreate the file, with the same name.
Sometimes, I tried to edit the d file ...
0
votes
1
answer
11
views
How to use a Template for creating YaSnippet snippets
I want to have a way, to efficiently create new YaSnippet-snippets. YaSnippet has the functionality, that via pressing C-c C-n one can create a new snippet. However, the empty new snippet is very ...
0
votes
0
answers
10
views
Can't remap left windows key to super in Windows 10
OS: Windows 10 Pro, version 1909.
GNU Emacs 27.2 (build 1, x86_64-w64-mingw32) of 2021-03-26.
On the keyboard I have a Windows key on the left between fn and Alt. I open Emacs, then click: Ctrl+h k ...
1
vote
1
answer
19
views
Simple keyboard macro to jump to \begin{document} regardless of current location in file
If you are in the preamble of a TeX document you can do C-s \begin{document} or C-r \begin{document} if you are in the body of the document. It would useful to have a simple, all-purpose macro (say, M-...
0
votes
1
answer
26
views
Can I change default location of .emacs.d folder?
Emacs 28.1
By default folder .emacs.d location on my home folder. Smt like this:
/home/alex/.emacs.d/
But I need to change to another location to e.g:
/home/alexeij/dev/.emacs.d/
Is it possible?
0
votes
1
answer
11
views
Updating closed drawers on save safely
I have a function I wrote that edits a file's PROPERTIES drawer on save and, if it finds the "MODIFIED" field it updates it with the current time. This works great as long as the drawer is ...
0
votes
1
answer
18
views
How can I preview image in html file?
Is there a package to preview an image inserted in the html tag <img src="path-to-image"/> when hovering the tag with the mouse ?
-3
votes
0
answers
28
views
Matching ple in middle of word and replacing with letter p
The following function replaces character sequences for the cases of prefixes and suffixes. I would also like to handle the case of matches that occur medially within a word (e.g. insert p' for ...
0
votes
1
answer
44
views
A one-line org code block
I want to have python snippets in org thus:
#+begin_PYT
def foo(x):
# Some python code
#+end_PYT
where PYT is a latex environment for python code using (say) listings.
The problem is that while org ...
0
votes
0
answers
24
views
how to turn off special character?
I am pretty new to emacs. does anyone how to turn off special character, such as 渘 ?
I tried to search online but no luck.
emacs 28
0
votes
0
answers
15
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
1
answer
14
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
2
answers
35
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
19
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
10
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
20
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
36
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
5
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
32
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
37
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
11
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
16
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
258
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
20
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
22
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
27
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
21
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
12
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
42
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
56
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
242
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
15
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
20
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
1
answer
11
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
16
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 ...