# All Questions

15,678 questions
76 views

### How to execute elisp commands

Related Question Hi, I want to give an elisp command which extracts the words between two arbitrary symbols. I searched google for elisp and the first item was emacs lisp, which I guess it means a ...
34 views

### detect unprintable glyph (aka “no font available”) programmatically

Sometimes a font or a font at a special fontsize does not support a unicode glyph. Then a placeholder (box with character number) is printed, see screenshot with selected line: How can I ...
46 views

### Problem with init

Windows 10/ emacs 27.0.50. I try to use <s with TAB to expand to a ‘src’ code block in org files. This doesn't work for me with my config. When I execute Emacs with -q (-no-init-file) and it ...
22 views

### Cannot run an after-save-hook with an async-shell

I have been trying to make auto-save compilation rules for my org files. I have tested the following functions in the interpreter: <!-- language: lang-lisp --> (defun async-shell-command-no-...
11 views

### Tag inheritance respecting mutual exclusivity in org mode

Is it possible to have tag inheritance respect mutually exclusive tag groups in org-mode? What I would like to do is set a default tag on a top-level entry, and override it with one of the other tags ...
40 views

### Sort lines in a string

Given I have a string that maybe came from a buffer, or a clipboard, or wherever; how do I sort-lines in it? Given that sort-lines only works with a region, I assume I have to put it to a temporary ...
9 views

### keymapp with kmacro keymaps

Why evals (keymapp 'kmacro-keymap) to t, and (keymapp 'kmacro-step-edit-map) to nil? Both look like ordinary keymaps to me.
81 views

### Letter in .org mode

.Org mode is very good in writing the outlined text . I use it routinely. But I have to fall back on wordpad or latex when I have to write a letter. Is there any available templates for letter using ...
88 views

### How do you make org-todo apply todo state change logging to all headings, when called from a function?

Description When calling org-todo from a function, e.g., via org-map-entries or search-forward (see example code below), then the todo state change logging is only applied to one matched heading. ...
340 views

28 views

### Spacemacs keyboard layout

coming from vim I'm new to emacs, spacemacs and lisp so I have some trouble understanding the steps in https://github.com/syl20bnr/spacemacs/pull/6308#issuecomment-225453730 for adding a new custom ...
38 views

### macOS-like look and behavior on Linux [closed]

I would like to get macOS-like look and behavior on Linux, e.g. global(app) menu, no border on the top of Emacs window etc. I don't care about fancy icons and themes, but these two features are key ...
51 views

### Save current location in Emacs tutorial

I am learning Emacs by doing built-in tutorial (C-h t). However, when I decide to take a break and exit the editor (C-x C-c) and then later rerun the tutorial the position when I finished before is ...
84 views

### Can you install Emacs temporarily for testing purposes like new versions and packages?

Is there a way I can install two versions of Emacs on the same machine ? The last time I tried installing versions 24 and 25 neither of the installations was working and the easiest solution was to ...
26 views

### Emacs stops displaying typing until focus moved out of and then back into editor window

I'm currently running RHEL 7.6 and whatever version of emacs comes with it (I don't have access to my system at the moment so can't provide the version number). Sometime in the last 2 weeks my sys ...
25 views

### Scroll bar area remains, blacked out, after launching with scroll-bar-mode disabled

I'm using Emacs in dwm window manager of suckless.org, with the following init.el: (menu-bar-mode 0) (scroll-bar-mode 0) (tool-bar-mode 0) When I launch Emacs, with the command \$ emacs, my scroll ...
19 views

### Recent files in Aquamacs

Aquamacs has the recent files (I assume recentf.el) turned on and it works. However I would like to alter (or at least add to) the list of exclusions in recentf-exclude. The list is set to two ...
21 views

### Why does projectile-compile-project call “go build ./…”?

I just started to use projectile. I use it with a go project. When I call projectile-compile-project, go build ./... runs, but after that there is no binary. The same happens when I call go build ./......
21 views

### Restoring windows with Desktop when running Emacs inside a terminal? [duplicate]

Maybe a silly question: I'm using desktop for saving Emacs' sessions. I've set (setq desktop-restore-frames t) (desktop-save-mode 0) So windows and frames state is supposed to be saved, and I'm ...
25 views

### How to create shortcut that will kill process for buffer with fixed name

I have code like this to run R command from Emacs: (defun call-r-command (command-list) "run R command in shell buffer window if there is displayed buffer that have shell it will use that window"...
43 views

### How to fix indentation of C++ methods with ref-qualifiers?

Emacs in its default configuration seems to have trouble indenting C++ methods with reference qualifiers (& and &&). For example: struct foo { void a_method() && { ...
22 views

### sr-speedbar won't open

I used the package installer to install sr-speedbar, so I can have the speedbar and editor in a single frame. When I try M-x sr-speedbar-open, it opens a second window (with same file), beeps and says ...
48 views

### How to delete ^M in the diffs of Magit?

I had an issue with a file that had inconsistent line ending. My file would show a ^M for every line ending. I ran into this article that shows how to get rid of the ^M character and set the buffer ...
55 views

### Is there any command like other-frame which behaves like windows's Alt-TAB?

Is there any command like other-frame which behaves like windows's Alt-TAB? And how to create this command? To clarify this behavior, I wrote python code which virtually emulate this behavior. Each ...
159 views

### Can I make “comment-region” comment empty lines?

In LaTeX code I can have: Lorem ipsum dolor sit amet, consectetur \begin{comment} adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis ...
39 views

### Elisp expressions in projectile-replace-regexp

I need to execute a regular expression with case conversion in a entire project. If I run query-replace-regexp in a single file informing '$$[A-Z]+$$' and '\,(downcase \1)', it works as expected. But ...
20 views

### How to redisplay dired buffer after changing listing-switches

This sample code doesn't work: (defun toggle-hidden-in-dired () (interactive) (setq dired-listing-switches (if (equal dired-listing-switches "-l --group-directories-first") "-...
28 views

### Configure echo time for input of key-sequence prefix keys

I am writing latex code with AUCTEX. I very often highlight text in bold or italics. For instance, AUCTEX comes with the command C-c C-f C-e, wich can be used to emphasize text in an active marked ...
13 views

### Org-gcal can't parse entry

I am using org-gcal for syncing my org schedules with google calendar. I have the following entry in my schedule.org file: * Holidays :PROPERTIES: :END: %%(org-calendar-holiday) but when ...
26 views

### calc formula interpretation?

Reading this twitter and applying Pemdas I believe that the answer should be 9, but applying this formula in emacs-calc yields 1: '6/2(1+2) ==> alg' 6 / 2 * (2 + 1) 1 Hard to believe I'm wrong, ...
20 views

### flyspell does not start form the first try

I used flyspell-mode with aspell backend before, but now I want to make the transition to the hunspell so that I could use multiple dictionaries. To do so, I added the following lines to the init.el: ...
45 views

### How to bind 'C-u M-x shell' to 'C-c s'? [duplicate]

I would like to define the keybinding C-c s which should start a new shell in the current directory (so C-c s should behave like C-u M-x shell). I know how to define a keybinding based on a function (...
29 views

### Include special (LaTeX) symbols in verbatim/code?

I wonder if it is possible to include special symbols within verbatim delimiters, e.g. =\alpha 6=, although displayed correctly in a prettified buffer, actually exports the literal words \alpha 6 ...
46 views

### How to (mostly) get rid of doc-view?

Since I moved to emacs 25 (25.3.2 at the moment) in every context (org-mode, gnus, latex, browsing url, direct access to file) I access pdf-files in emacs, they are displayed in doc-view. I basically ...
119 views

### emacs is frozen

I'm running emacs 26.2 RC1 compiled with debugging features on Debian 8 Jessie 64bit. Sometimes the Emacs GUI will freeze and all the buffers will go black. I've tried hitting C-g a number of times ...
17 views

### Recalculate buffer tables after field motion commands?

I would like emacs to automatically run org-table-recalculate-buffer-tables every time and only if A) cursor is in a table AND B) after a field motion command (TAB, S-TAB or RET) OR (optionally) ...
26 views

### org-mode: How can noweb handle a multiple line output

I have a code chunk in my document that I want to use as a list of patterns to search for with grep. If I were just writing a script without org-babel, I could write. a="ar er ir or ur" printf "...
19 views

### binding M-[ causes mouse focus to insert characters

I have bound M-[ to backward-paragraph. This causes a problem in terminal mode, whereby every time the mouse enters or leaves the frame (i.e., Emacs gains or loses focus), the characters I and O are ...
20 views

### org-macros in header arguments of org-babel?

Is there a way to specify org-macros that can be used in header arguments of org-babel? One application is to specify the figure path. For instance I want to define: #+macro: folder figures_here in ...
49 views

### live, literate, lean programming with org-mode

I would like to use lean-mode and org-mode together to write literate code that is also being parsed by the Lean server. lean-mode (available on melpa) supports a live-coding style of interaction, ...
34 views

### Progress Percentage calculate Sub Percentages

* TODO Organize party [50%] ** TODO call people [33%] - [ ] Peter - [X] Sarah - [ ] Sam ** DONE order food ** TODO think about what music to play ** DONE talk to the neighbors is there a way ...
10 views

### mmm-mode strange behavior with perl-shell-script

Background: I've been working with a program that is about half Bash and half perl. I thought I'd give mmm-mode a try since it sounded like just the mode for me. I don't know lisp well enough to be ...
44 views

### How to make emacs or emacsclient exit with nonzero return code

How to exit emacs with nonzero return code? And how to achieve that also with emacsclient? Duplicate of https://superuser.com/questions/295156/how-to-set-the-exit-status-for-emacsclient/542916
47 views

### Auctex autocomplete and physics.sty

I have autocomplete successfully working in auctex. It also works for included packages, so if I, for example, have \usepackage{url} in my preamble, I will get autocompletion while typing \url. ...
31 views

### set key for 'comment-or-uncomment-region in python-mode

i want a shortcut for the nice little function comment-or-uncomment-region. The thing is, it works fine for me in every mode using M-x comment-or-uncomment-region. And espacially it works differently (...
41 views

### Disable left win key in Emacs for Windows

With AutoHotkey If I press the key Win alone, then nothing happens. That's true except with Emacs, because it opens the Windows menu. Is there a way to prevent it? Update: In AHK I have exaclty ...
17 views

### Keep text selection after indenting with evil

I'm using emacs with evil key-bindings and I like to know, after getting some text into visual mode, how do you make sure that after hitting >> for indenting the text, the selection is kept, ...
36 views

### Launch an emacsclient instance in a new terminal window

I am using Sway/wlroots and I decided to switch to using terminal emacs for the forseeable future as there is no transparency in the xwayland version of emacs. I previously bound emacs to run as a ...