All Questions
21,045
questions
1
vote
1answer
42 views
How to make a thin red cursor
This is a newbie question.
I'd like to have a red cursor with a width of 4. This code doesn't work:
(setf cursor-type '(bar . 4))
(set-cursor-color "#FF0000")
how can i correct this to ...
0
votes
0answers
11 views
How can I reset the source code of an Emacs package to its original state?
Suppose I have installed company-0.9.13, which other packages depend on (mostly third-party company completion backends). I unwisely edited company-mode's source code directly in the ~/.emacs.d/elpa/...
0
votes
0answers
15 views
How do customize the display of time ranges in org-mode?
In org mode, I can customize the display of times like this:
(setq org-display-custom-times t)
(setq org-time-stamp-custom-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a %I:%M %p>...
0
votes
0answers
25 views
How to find the file-system location of a package?
Packages on my system are installed to ~/.config/emacs/elpa,although I assume it's possible to configure where packages are located.
How can I programmatically find the file-path for a package name (...
0
votes
0answers
11 views
mu4e conversation view: Left right alignment like in whatsapp
Is it possible to show the emails of one person in mu4e-conversation view indented by a defined amount of whitespace/tabs to get a view similar to what you know from some messenger apps like whatsapp:
0
votes
0answers
4 views
How to skip address and greetings in mu4e-conversation-mode?
Consider an email like:
Dear Ben,
[Body]
Best regards
John
If I read email in mu4e conversation mode I find the address (e.g. "Dear Ben," and the greetings "Best regards..." ...
1
vote
2answers
33 views
How to make the current window display the buffer it was displaying before the current one?
For example, imagine I have two windows and three buffers. Both windows are displaying buffer 1 and I do the following,
in window 1, switch to buffer 2;
in window 2, switch to buffer 3, then to ...
0
votes
0answers
54 views
Recommended Emacs for ORG-Mode (vanilla, emacs plus, doom, spacemacs)? Getting Things Done (GTD) Method?
This is just a general question in relation to emacs and it's specific use for ORG mode.
I have always been miserable at planning and organization in daily life (keeping TODO list, general time ...
0
votes
0answers
18 views
call custom url schemes on mac from emacs
One of the nice things that MacOS allows one to do is to have applications with their own custom URL schemes. So, for example, the system automation tool hammerspoon defines its own url scheme to run ...
0
votes
0answers
21 views
How to remove spurious whitespace in `org-add-note` LOGBOOK drawer
When using org-add-note (C-c C-z) in Org, I'm unable to automatically remove whitespace that is inserted when finalizing the note and the text is filed into the LOGBOOK drawer. global-whitespace-...
0
votes
1answer
27 views
How can I display very large SVG files using `image-mode`?
I'm trying to use Emacs to visualise very large UML diagrams created by PlantUML [1]. In PNG form these diagrams have over 20000x1300 - in fact, the reason why I moved from PNG to SVG for their ...
6
votes
1answer
233 views
How to make sure no global variables have been created in a piece of lisp code?
I am writing some lisp code and I would like it not to mess with the global variables in the system. I am therefore being very careful to only use variables within the scope of the let special form.
...
0
votes
0answers
18 views
Swap TAB and Escape in all modes including evil
Escape is too far away on modern keyboards and Tab could be easily typed as Ctrl+i in terminal applications. So I found it convenient to replace them in my alacritty terminal key bindings. I am used ...
0
votes
0answers
7 views
How to update (merge) rcp in el-get?
I don't understand how pull request are working.
I want to merge a rcp in el-get so I made a pull request
https://github.com/dimitri/el-get/pull/2825
but, until now, the code I unchanged.
Is there ...
0
votes
0answers
10 views
Is it possible to use rgrep with compact output?
I am using following code from the elpy’s readthedocs.
(defun elpy-goto-definition-or-rgrep ()
"Go to the definition of the symbol at point, if found. Otherwise, run `elpy-rgrep-symbol'."
...
0
votes
1answer
26 views
How to restart elpy if it is not launch?
I am working with python using Emacs 26.3. My goal is to jump to definition of the function and jump back, for that I am using https://github.com/jacktasia/dumb-jump, which runs elpy-goto-definition ...
0
votes
1answer
32 views
Italics not shown in block quotes in orgmode
In my blockquotes in org-mode, the fontification does not pick up on italics. I have looked at this question and answer that says it was fixed several years ago, but my issue persists.
I have tried ...
0
votes
0answers
5 views
Change er/mark-method-call() - based on regex - to include square and curly braces
This is a function definition from expand-region.el, which does not accept new Issues.
It looks at (), but not at [] or {}. How to change it to include other pairs too?
(defun er/mark-method-call ()
...
0
votes
1answer
29 views
How can I remove whitespace in HTML?
I would like to be able to go from this:
<label for="exampleInputEmail1" class="form-label">Phone number</label>
<input type="text" class="form-...
0
votes
0answers
37 views
Disable `icomplete` with Emacs `find-file`
I have been experimenting with various completion frameworks in Emacs. I am currently using consult together with icomplete. I like the way things are working for me but I would like to disable ...
1
vote
1answer
24 views
The list-buffers command. How to make the 'Buffer' column sort case-insensitively, when click on it?
C-x C-b is normally bound to the list-buffers command.
The resulting buffer has various columns, which are CRM, Buffer, Size, Mode, and File.
When I can click on the Buffer column-header, it will ...
4
votes
1answer
34 views
Deleting a file with name that already exists in Trash
I use delete-by-moving-to-trash to move deleted files and folders into trash instead of deleting them. However, if the file or folder with the same name is already in Trash I get an error file already ...
0
votes
0answers
40 views
How to unbind the key for a specific map?
I use org, smartparens and use-package altogether. Sometimes I need to delete a heading and its subheadings. Without smartparens package I use the C-k key and it allows me to delete the heading itself ...
0
votes
0answers
29 views
From stock Emacs to Emacs Doom - Issues with Key Bindings and de-activating Evil-mode - ORG-MODE use
I have migrated to emacs-Doom and wish to keep the emacs vanilla key-bindings. I also use emacs exclusively for org-mode
I have amended the init.el file to remove the evil and removed any attributes ...
0
votes
1answer
30 views
org-mode delete all checked items
I use org-mode for my shopping lists and I would like to be able to remove all checked items in one action.
i.e.
[X] cotton buds
[ ] cordial
[X] milk
[X] sugar
In the list above remove all the lines ...
0
votes
0answers
18 views
Trying to get Doom to be available anywhere using vi
I am slowly getting used to emacs and have tinkered with my init.el in my ~.emacs.d/ directory.
I now have the doom distribution of emacs and have it installed in a new ~.emacs2.d/ directory as .emacs....
3
votes
2answers
50 views
Emacs script to indent files from the command line
I am trying to create an Emacs script that indents HTML files from the command line. This is what I have so far:
#!/usr/bin/env -S emacs --script
(require 'web-mode)
(indent-region (point-min) (point-...
0
votes
1answer
32 views
How to color specific keywords in python-mode?
My goal is to color specific keywords as function definition such as log in Python-mode to a spefic color or color of functions.
Example, pattern for log("...."): coloring only log.
from ...
3
votes
3answers
231 views
When is it better to use the backquote, `(…), and when to use (list …)?
The docstring for quote says,
Quoting should be reserved for constants that will never be modified by side-effects, unless you like self-modifying code.
Are there cases in which it is the best ...
1
vote
0answers
37 views
Workaround bug#45038: 27.1; blank display
My setup: Emacs 27.1 under Ubuntu 20.04 from Kevin Kelley's PPA, and configured to use ligatures with the JetBrains Mono fonts, as described here.
I experiencing Bug#45038 27.1; blank display, or ...
0
votes
1answer
31 views
Clear console output on *R* buffers when using ESS
I have this kbd in my init.el
(global-set-key (kbd "C-l") 'comint-clear-buffer)
When I use Emacs-ess mode fro programming in R, I use this kbd to clear the R output buffer, this is usually ...
0
votes
0answers
34 views
+100
Emphasize text snippets in source blocks
If one sets org-src-fontify-natively to t org source blocks are fontified according to the associated major-mode. That is fine.
But, is it possible to emphasize text snippets within the source blocks, ...
1
vote
1answer
25 views
What are these underlines shown for whitespace at the end of some lines?
The following screenshot shows Emacs 26.3 (GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.14) of 2020-03-26, modified by Debian) editing a Markdown file:
Note that on some lines of ...
0
votes
0answers
21 views
How can i activate emacs-binding in doom emacs?
I am using doom emacs. But I want traditional emacs key binding. I've heard several people that emacs key binding becomes way of life and if somebody takes my key binding away, I cant express myself.
...
0
votes
0answers
18 views
Search on org-mode tags directory-wide?
I have a large set of my own tags that I've added to org-tag-alist that I use liberally to tag headings throughout my org files. I would like to search throughout my org directory (recursively) on a ...
0
votes
1answer
29 views
Access Table data from from elisp using headline ID
I have a bunch of recipes under different headline, and each have an ingredient list specified as a table.
I would like to access that table as an list in a src block using the headline id, same as if ...
2
votes
2answers
20 views
Sort lines omitting a prefix of a certain length?
Many of my python files have an import section that looks like this:
from datetime import datetime, timedelta
from typing import Callable
import numpy as np
import pandas as pd
I'd like to sort ...
1
vote
1answer
40 views
How to type superscript Roman numeral in Emacs, e.g., by using TeX input method?
One can type normal Roman numerals by using C-x 8 RET. For example, to type â…¢ one use C-x 8 RET 2162 RET. Furthermore, one can type superscript numbers, English letters and Greek ones by using the TeX ...
0
votes
1answer
40 views
Issue with macro and `buffer-name`
I want to write a macro that makes a diffpdf before and after some changes in my LaTeX file (that would be compiled twice by pdflatex).
I tried:
(defmacro with-diffpdf-after-changes (&rest body)
...
0
votes
0answers
13 views
Format links or dates context sensitive in org-mode headings?
In org-mode I use headings with different font sizes decreasing with the # in org-level-#.
In the following Examples, the font size is in brackets and size 5 > size 4 etc.
Example:
* Heading lvl 1 ...
0
votes
1answer
49 views
Creating a new text file in a directory using org-capture
Following this response: Org-Mode - How do I create a new file with org-capture https://stackoverflow.com/questions/11902620/org-mode-how-do-i-create-a-new-file-with-org-capture?
I am trying to make ...
0
votes
1answer
22 views
How to create a function to lauch org-capture with a selected template?
Let's say my capture template is bound to 't':
(defun my/captureTemplate ()
(interactive)
(org-capture "r")
This won't work as it will show me the whole list of potential templates to ...
0
votes
0answers
12 views
Send string to a fully functional REPL in Emacs on Windows?
Summary. Is there a way to get fully functional REPLs on Windows running in Emacs. I want to avoid the maintenance burden associated with comint.
Long version. In many cases I dislike how the built-...
0
votes
1answer
28 views
Tramp/Emacs 27 freeze on Mac
I'm facing a major issue with Tramp and Emacs 27.1 on a Mac (10.15.7), which makes it almost impossible to work on remote files ...
As soon as I start to type a SSH or SCP based URL in the mini buffer ...
1
vote
0answers
38 views
How can I make sure I can stop a long operation in emacs?
I have a lisp function which performs a transformation on a buffer. It's usually quick, but sometimes it's very slow when the buffer is big.
I can see it's working, because it prints out its progress ...
0
votes
1answer
36 views
How to append some behavior to a command?
How do I string together functions and actions in a key binding.
Say I want to make a binding that does comment-dwim and then appends "TODO: " to achieve /* TODO: */ in C.
(global-set-key (...
0
votes
1answer
25 views
Locking an org-timer into the mode-line
Context. I frequently use
org-mode timers
The org-mode clock (which just displays the clock in the org-mode mode-line)
A custom "target time" clock, which shows a point in time (either a ...
0
votes
1answer
23 views
Where to place org-agenda-files sexp
I have this
(setq org-agenda-files (directory-files-recursively "~/Dropbox/org/journal/" "\\.org$"))
but I don't know where to place it in order to make sure that on the event of ...
1
vote
1answer
38 views
How to duplicate text but increment a numeric part of a name?
Say that I have rect1 one and I'll multiply it 3 times by yanking.
let rect1 = Rectangle {
width: 10,
height: 40,
}
let rect1 = Rectangle {
width: 10,
height: 40,
}
...
0
votes
1answer
22 views
How add specifc string(ex: TODO) along with a comment character for a specifc mode?
Based on specific mode, by using a keybinding I want to add a TODO string that is preceded by an unique comment character. For example, (org-mode is exception since ** does not stands for comment and ...