All Questions
26,600
questions
0
votes
0
answers
41
views
dired-sidebar not working
My dired-sidebar no longer works. For the commands dired-sidebar-toggle-sidebar and dired-sidebar-show-sidebar they both give:
Wrong type argument: stringp, (Git "~/")
Anyone know the ...
2
votes
1
answer
54
views
AUCTeX: Some general macros/command missing from auto-completion/macro insertion
While further trying to set up a Latex environment in emacs I stumbled over a "problem" with macro-completion which I don't understand right now.
When writing Latex code the usual way to ...
1
vote
2
answers
50
views
How to set "nojoinspaces" in evil mode
In vim, you can :set nojoinspaces to prevent J from adding a space when joining lines that end in a period. How do I set this in evil mode? I'm using Doom emacs, if that is relevant.
1
vote
1
answer
112
views
Function to replace strings from region and save result in kill-ring
I'm almost completely ignorant in elisp, but I'd like to have a function that does the following:
Takes a string from (a) a region, if one is selected, or (b) user prompt, if a region is not selected....
0
votes
1
answer
83
views
Why is my code indented differently in Emacs than in a Web browser?
Emacs displays the code snippet as shown below.
<header>
<nav>
<ul>
<li>About</li>
<li>Code review</li>
<li&...
0
votes
1
answer
27
views
How can I write a function to modify the word before or after the cursor?
I have written the following function to shorten a string:
(defun shorten-hash ()
"Shorten string (forward or backwards) to eight characters;
particularly for shortening hashes"
(...
0
votes
1
answer
25
views
Why can I write one function to work on words before *and* after the cursor?
I have written the following function to shorten a string, which is useful particularly when shortening commit hashes:
(defun shorten-hash ()
"Shorten string (forward or backwards) to eight ...
0
votes
1
answer
41
views
Conversion from html to org-mode error: *** Eval error *** Wrong type argument: listp, " "
I tried to build a small converter which will traverse the dom-tree and output its org-mode equivalent but I faced a *** Eval error *** Wrong type argument: listp, " " error means the ...
0
votes
1
answer
44
views
Remove gray horizontal line between titlebar with material theme on Mac OS X
I show in the image below a screenshot using Emacs 29.1 on Mac OS X with the material theme and the https://github.com/d12frosted/homebrew-emacs-plus port. You can see that there's a gray line drawn ...
1
vote
1
answer
82
views
Add parsing of latex-style .el file to LaTeX-hook using AUCTeX
I did some online research (e.g. here) but couldn't figure out how to solve the following problem so far (of course, I might have overlooked something since the whole emacs community is new to me).
...
0
votes
1
answer
31
views
Different outputs from minor-mode depending on major-mode
My minor-mode is inserting text in the current buffer. I want the default format of the text to be different depending on what major-mode the buffer is in, and to allow the user to override this ...
0
votes
0
answers
40
views
Key sequences that are translated to ESC
I understand from the FAQ that Escape is supposed to be the same as C-[: https://www.gnu.org/software/emacs/manual/html_node/efaq/Basic-keys.html
However, I could rebind C-[ without any problems ...
0
votes
1
answer
26
views
How to make gdb show locals buffer in a different window?
Using gdb in emacs, gdb shows the source code to the right of the gdb prompt.
According to the documentation, I can do M-x gdb-display-locals-buffer which displays the local variables.
However, when I ...
0
votes
1
answer
29
views
Hide org-mode nodes with priorities below a threshold
Is it possible to hide org-mode nodes with set priorities below a threshold?
My use case is:
I have a bunch of large org-mode files with lots of nodes in each of them, complex nested hierarchies and I ...
0
votes
1
answer
127
views
How to set rust-analyzer.linkedProjects with eglot?
My project structure is like this:
-- Project Root
- .git
- rusttools
- Cargo.toml
- src
- main.rs
When I open main.rs in Emacs, eglot complains:
[eglot] Server reports (type=1): ...
1
vote
1
answer
88
views
How to save a register with a dired buffer?
I'm new to Emacs. I saw that you could have registers with special files.
I really like that feature, and I was wondering if I could get the same functionality with a Dired buffer.
For example, the ...
0
votes
1
answer
56
views
How to use multiple tree-sitter parsers in buffer
How does one use local treesit parsers/multiple parsers to fontify different regions in a buffer? I haven't been able to find any tree-sitter modes that are currently using local parsers to see how ...
0
votes
2
answers
34
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 ...
2
votes
2
answers
100
views
Rebinding RET without rebinding <kp-enter>
My Emacs translates C-m as RET like here: https://stackoverflow.com/questions/7235381/unbind-c-m-from-ret. I'd like to use C-m though, and I have a multilevel keyboard-layout in which <kp-enter> ...
0
votes
0
answers
49
views
emacs jupyter gives *invalid read syntax* error in org mode
am trying to execute a simple code block in org mode
* a simple trial
#+begin_src jupyter :session py :async no
x = 'foo'
y = 'xbar'
x + ' ' + y
#+end_src
I get the following error
Code block ...
2
votes
1
answer
74
views
Doom Emacs does not correctly render the colors on ssh terminal
What happened?
This is a problem that I was never able to solve and I
always try to switch on another editor when I am coding on my remote machine.
However, I think that I solution should be somewhere ...
3
votes
1
answer
124
views
dired - view file in other window?
Is there some way to have two windows open with a dired buffer in one and a file view of current file in the other?
v loads the file into the dired buffer.
o loads the file into the other window but ...
0
votes
0
answers
30
views
install pdf-tools without sudo
I have installed (a working version of (doom)) Emacs on a remote linux cluster (via conda) for which I do not have sudo access, my question is:
how can I install pdf-tools?
Thanks
Assume I can install ...
0
votes
1
answer
44
views
Indentation not being followed on TypeScript/TSX
I have problem with the indentation in JSX/TSX files, I'm not sure how to describe it but the thing is that it does not follow the indentation on the file, please take a look the gif below:
After ...
0
votes
0
answers
21
views
Modify spell-fu to exclude words starting with a capital letter that are not at the start of a sentence
I am using Doom Emacs with the spell-fu package for spellchecking. I would like to modify spell-fu to ignore words that start with a capital letter and are not at the start of a sentence.
For example, ...
0
votes
1
answer
49
views
Changing key binding definitions
I read somewhere that emacs v29.1 has changed the way that you can define key bindings...
ie previously you would write:-
(global-set-key (kbd "<f2>") 'save-buffer)
now you can write:-...
1
vote
0
answers
48
views
??? showing in Agenda instead of file name
I have several .org file and typically have them all open in Emacs at the same time. Recently, my agenda started showing one of those file names as "???" instead of the actual filename--...
1
vote
0
answers
55
views
Programmatically use org-tags-view to search in current subtree
I am looking for a way to programmatically search for headings in the current subtree. More specifically, I have a vocabulary file, in which I store words I need to learn. Each word is a subtree in ...
0
votes
0
answers
65
views
Executing commands from a buffer
Following instructions here:-
https://www.emacswiki.org/emacs/ExecuteExternalCommand
which says:
Using the whole buffer
If you are programming using an interpreted language, such as Perl or Python, ...
1
vote
2
answers
54
views
How can bookmarks file be synced if it's not constantly reloaded?
If I create a bookmark on one platform, then try to use that bookmark on another platform, and if the bookmarks file isn't reloaded, then that new bookmark isn't available.
How can I make sure my ...
0
votes
0
answers
13
views
How to define a new org-babel-execute function for a new major mode?
I want to be able to run code in org mode using the major mode defined in the nand2tetris package. How can I write an org-babel-execute function to do this?
1
vote
1
answer
37
views
Use 'mapcar' to build a hooks list; "wrong-type-argument listp lambda"
How can I write a mapping (e.g. a mapcar expression) to build the list for a use-package :hook clause?
I'm attempting to build the list in this :hook expression:
(use-package eglot
:hook (
(...
0
votes
1
answer
42
views
Mixing org-mode export backends
How can I export to a single file using several backends for different
parts of the org file? Specifically, when exporting an org file with
a specific backend, I want to be able to export some ...
1
vote
1
answer
67
views
Getting started with version control
I have read
https://www.emacswiki.org/emacs/VersionControl
https://www.emacswiki.org/emacs/RevisionControlSystem
but I'm missing something...
What is the starting point?
What do I need to install, if ...
0
votes
0
answers
15
views
Parse elfeed's entry cl-struct
I'm trying to display notifications using elfeed's hook and alert. This works:
(add-hook 'elfeed-new-entry-hook
(lambda (entry)
(alert (prin1-to-string (elfeed-entry-content ...
0
votes
1
answer
36
views
What is org-capture trying to write to my init.el file?
My init.el is symlinked by NixOS, so that means it's write protected.
For some reason, after org-capture, Emacs tries to write to this file.
I'm not sure I understand what it's trying to write?;)
...
1
vote
0
answers
55
views
How edit .org file in text mode
Is there any way to temporarily change the mode of org files to be able to edit them as ordinary text files?
3
votes
2
answers
385
views
Why can't I use `defconst` to define a new rx?
I want to define a new rx to use within another rx definition, like so:
(defconst my-word
(rx (or word "*")))
(defconst my-regex
(rx (1+ my-word)))
However, this code returns the ...
0
votes
1
answer
23
views
Define new comment style with string literals rather than characters
I am trying to define another comment style, similar to what we can do with modify-syntax-entry:
(modify-syntax-entry ?/ ". 124b")
(modify-syntax-entry ?* ". 23")
(modify-syntax-...
0
votes
1
answer
48
views
Define command that executes several functions
I apologize for this question, for which I know an elementary answer exists that I can't find for the life of me. I would simply like to define a command that executes several functions sequentially. ...
0
votes
1
answer
30
views
Use rx to highlight a specific group in a match [duplicate]
I am trying to write a major mode for a language, and I am working on the syntax highlighter. I am using rx with some success, however I need to highlight the following pattern:
`somemacro(args...)`
...
0
votes
1
answer
19
views
Can literal prefixes be privileged in counsel-find-file ordering?
After many years of living in vanilla Emacs, I am playing with souping things up a bit, and trying out ivy/counsel.
I'm finding the experience of counsel-find-file a bit jarring, because it does not ...
0
votes
0
answers
41
views
Emacs shell exits after executing a cygwin command
Windows, Emacs 27.2.
I execute fairly simple cygwin commands from an Emacs shell - first tried unzip then backed up to test ls - and the shell exits. Why?
1
vote
2
answers
49
views
Using different line length for comment blocks
I am setting the fill column (80) to specify the maximum width of a line before it should be automatically wrapped or broken into multiple lines.
Although this setting is useful for ensuring ...
0
votes
0
answers
13
views
Upgraded emacs and now there's extra whitespace around latex equations using org-latex-preview
This is inside a docstring in a python script, using org-preview-latex:
After rendering:
The whitespace goes away if I run convert -trim ltximg/org-ltximg_60b58ddb1d181ad22bd828dd88e5039cf2e80a89....
0
votes
1
answer
26
views
can org-refile-targets match headings *without* a given tag?
I can configure org-refile-targets to match headings in an org file with a certain tag. Can I do an arbitrary tag match? I'm interested in headings without a certain tag.
(For example, I'd like to ...
0
votes
0
answers
15
views
Org-mode: Adding Attributes and Captions to Babel Table Results
Given the following org-mode file:
#+TITLE: Tests
#+LATEX_HEADER: \usepackage[outputdir=build]{minted}
* Export Configuration
#+name: Configuration
#+begin_src emacs-lisp :results silent :exports ...
0
votes
1
answer
22
views
Disable code autocompletion in JS files
For some reason, my Emacs started autocompleting code. I have noticed this in both web-mode and rjsx-mode. For example, if I type <button></ it will autocomplete it to <button></...
0
votes
2
answers
33
views
Interfering with org beamer outline export
I have the following org file:
#+TITLE: Some title
#+OPTIONS: H:2
#+latex_class: beamer
* Section 1
** Frame 1
* Section 2
** Frame 2
After org-exporting I obtain the .tex, which includes
% ...
1
vote
1
answer
54
views
How to open external rust documentation (rust-analyzer.openDocs) from Emacs?
According to the changelog, Rust-Analyzer has a command openDocs since 2020. It should open the documentation for the symbol under the cursor.
How could I call this from emacs? I'm using eglot and ...