# All Questions

16,154 questions
29 views

### org-mode internal link works only in some cases

I have an .org document with the following structure. * Headline 1 This is some text * Headline 2 :Custom_id: h2 This is heading number two ** Sub heading 1 <<target>> ** Sub heading ...
36 views

### Is it possible to apply a function to every region between two “marker” lines?

I have a .tex file that looks something like this: \$ cat foo.tex \begin{document} \begin{question} lots of multiline text with several paragraphs of information \end{question} other text \begin{...
20 views

### mark-whole-buffer followed by kill-ring-save not working correctly

I'm using Emacs 26.1 on MacOS. Instead of copying the entire buffer I get a warning: Saved text until "text where is stopped saving with whitespace seemingly to the end of the buffer " I'm ...
36 views

### How to enable the superword minor mode globally?

I am just wondering how to enable the superword-mode globally? I tried to enable it following the answers found here: How to enable ido-mode forever? , using: (require 'superword-mode) (...
48 views

### How to change window splitting behavior in Magit?

emacs: 26.2 spacemacs: develop (19c429e) magit: 20190609.1424 Some time ago (e.g. 20190222.1746), magit's window management used to be different from how it currently is. For example, magit-status ...
12 views

### Org Agenda is looking for agenda file names inside of my todo file

When I try to open a org-agenda view, I am prompted with emacs claiming that the first line of my todo list is not a valid file, with options to remove it from the agenda list, or abort. Removing it ...
9 views

### cmake-ide in projects with only make

What are my options to mimic cmake-ide in the projects that are not built with CMake? The features that I want the most are find-definition and autocomplete. For the compilation related features, ...
22 views

### Org-Mode not exporting all child subheading

While exporting following sample org file content to html, final output skips headings from 3rd depth in table of content. After reading org documentation, and forum questions, I tried following, ...
40 views

### Huge buggy padding in line-number buffer

A picture: As you can see there is a huge waste of space on the left side of the line number section. When I increase the font size the padding even increases and does not decrease when I decrease ...
23 views

### How to go to matching pattern after org-occur?

After typing C-c / / and a regex, org shows a sparse tree containing matches of the pattern. How do I move point through these matches, in a way similar to C-s?
17 views

### BibTeX Line Breaks in fields

I'd like to have linebreaks within fields of a BibTeX entry that are preserved even after I format the entry with C-q. Currently, what happens in my BibTeX buffer is this. I produce an entry with a ...
28 views

### org-ref “Unbalanced parentheses”, 20306, 18248 error

I am new to org-mode and I am learning to use it to replace markdown for academic writing. M-x org-ref gave me this error: org-ref "Unbalanced parentheses", 20306, 18248 error What should I do ...
17 views

### Evil: How to add keybinding for changing buffers?

With Evil mode, :bn shows the next buffer, and :bp shows the previous buffer. I wish to define a custom keybinding where <Space>n shows the next buffer, and <Space>p shows the previous ...
20 views

### Wrap a block of html with one or multiple tags

Often my point is at a paragraph <p>The quick brown fox jumped over the fence</p> <br> Example and I want to wrap it like this <div class="row"> <div class="columns">...
27 views

### Can Org-mode link to a Babel block?

I would like to have a link that runs a Babel source-code block. Does Org-mode support running something from the library of babel in a link, or a source block via a file+blockname reference? A ...
29 views

### How do I keep special modes from overriding my keybindings?

I usually have multiple windows open and switch between them often, so I put this in my init file: (global-set-key (kbd "C-o") 'other-window) ; Save a keystroke when switching windows (global-set-key ...
27 views

### vc-root-dir is not a valid command name

Trying to use the vc-root-dir function on Emacs gives the error message vc-root-dir is not a valid command name On inspecting vc.elc as found by locate-library the function appears to exist as a ...
26 views

### How to chain isearch-forward-symbol-at-point and query-replace-regexp into a single keybinding?

I'm looking to create a keybinding that will perform the following shortcut: call isearch-forward-symbol-at-point call query-replace-regexp It's basically a shortcut for the following key combo: M-s ...
73 views

### What happens if I have different versions of Emacs using the same directory

Currently I have two versions of Emacs (system installed by apt-get: emacs26 and my own compiled version emacs27). They both us emacs.d directory, and I wonder what happens the packages are ...
79 views

### Is it possible to shuffle paragraphs?

I'd like to be able to quickly "shuffle" the order in which all paragraphs in a region occur. Can this be easily accomplished in emacs? For example, consider the following region. Hello world. This ...
16 views

### How to specify a pdf viewer for ess mode

I have set the variable ess-pdf-viewer-pref to "evince" But when I export any Rnw file using M-n e, instead of displaying the pdf in evince it is displayed inside Emacs. How can I stop Emacs ...
22 views

### Breaking up minified html

Is it possible to do this with vanilla emacs? If not what changes do I need to make. Original test.html <a id="try_redacted" target="_blank" href="http://redacted.com/game/2d/?try=1" style="right:...
37 views

### How can I automatically swap frame buffers if the buffer is already open?

I've seen the https://www.emacswiki.org/emacs/buffer-move.el script, but I'm trying to something a bit different. Suppose I have a frame with a buffer from file A.h in it and A.cpp in another frame ...
34 views

### How do I clear a global variable that also is buffer-local?

I called add-hook multiple times because I had a few typos in the hook function, and now there are a bunch of broken copies of it in the hook. I want to do (setq after-save-hook nil), but after doing ...
17 views

### Calc Embedded Mode keybindings

I am trying to use calc to modify equations in an org mode buffer. Activating calc in embedded mode works, but not without opening the calc stack buffer itself. That is, C-x * e puts the CalcEmbed ...
15 views

### Compile multiple Rnw files

If we divide our Rnw file into multiple files, is it possible to create the whole document using knitr and LaTeX in Emacs by pressing M-n e on a child file? I guess the process above should be ...
63 views

### what's wrong with my elisp? (“Debugger entered--Lisp error: (invalid-function”) [closed]

so I'm learning elisp and wouldn't ask this if I could figure out what was wrong with just the debug message. I'm trying to implement a super basic LRU cache (with the keys in the map just mapping to ...
30 views

### How can backup-directory-alist be set to save in the files directory?

I want the backup files to be created in sub-directories of the files being edited, and I have created a function returns that directory. (defun tempfilepath () (interactive) (concat (file-name-...
22 views

### ES6 imports auto suggestion

I'm new to emacs and trying to setup emacs for ES6/React developement. I would like to have auto suggestions for es6 imports like lodash similar to vscode (as shown in screenshot). Is there a way to ...
22 views

### how to ignore current selection from ivy when my typed text matches one

I run into this issue from time to time when I want to create a new file but the new name matches a pattern already so my Ivy auto-complete setup will pick the matched option when I press Enter ...
20 views

### Json - get count of elements

Emacs 26.1 Here json file: [ { "id": 11, "name": "my name" }, { "id": 22, "name": "my name3" }, { "id": 33, "name": "my name3" } ] As you can see the count of ...
70 views

### Org-mode activation for noob - where is the emacs/config/init file to enter commands into?

Below answers all of my original questions so I deleted them. Maybe below will help someone else, if not delete away, cheers. If you don't know where to find the 'config' or 'emacs' or 'init' file, ...
45 views

### csv-mode: do not split line on newline inside quoted field

I'm using the latest csv-mode in Emacs 25.3.1 in centos 6.10. The problem is that I have many fields that are long documentation strings and many of them have embedded newlines. This messed up csv-...
23 views

### Default file extension for dired-do-rename

I am wondering how to make renaming files in dired to use the current file extension as the default. For example, imagine I run dired-do-rename on the file foo.bar and then type foo2 and press Enter....
40 views

### Infix calculator with standard order of operations [duplicate]

I've been using quick-calc for years because it seems like the most sane calculator and it can do a lot of things. But is there really no calculator for Emacs that supports infix notation and uses the ...
45 views

### Search and replace two consecutive newlines

Running spacemacs 0.200. I am sorry if it is too basic. But I am just not able to get this. How do I convert two consecutive newlines with some text, say, 'there were two newlines here'? I could ...
40 views

### Emacs wont reopen my files from recover session

I was working in emacs when had a power outage, so my computer was knocked offline. After I got the computer back up, I launched emacs and tried to restore the last session. Emacs then said: "No files ...
38 views

### Emacs displays Hebrew text incorrectly

I have a number of org-mode/text documents that contain English and Hebrew text. They are scholarly papers. However, the Hebrew text in Emacs is not displayed correctly. I am using Dejavu Sans Mono as ...
22 views

### Is there a way to calculate rows on a “rolling” basis?

Rolling formulas are very common in accounting, for example, carrying forward a monthly balance based on expenses. So say you had a table with month, beginning balance, fixed income, expenses, and ...
25 views

### Saving file everytime leaving insert mode in evil-mode

Is there a way that I can automatically save the file when leaving insert state to go to normal state with ESC?
34 views

I'm writing an emacs wrapper to a set of scripts that require a lot of config settings to run. These can be variously environment variables, command line parameters and so forth. They should be user ...
137 views

### Breaking changes to eieio in Emacs 27?

Q: are there breaking changes to eieio in Emacs 27? I just upgraded to the Emacs 27 snapshot, and I'm getting a peculiar break in code that works in previous versions of Emacs. walkthrough Here's a ...
48 views

### Ctrl c Ctrl v copy paste in multi-term

I want to be able to copy paste using C-c and C-v when I edit a file and in multi-term. After more than a few hours I gave up. I would be thankful if anyone could tell me what the recommended way for ...
34 views

### How to navigate stack frames in Emacs debugger?

I'm trying to debug the infamous Unrecognized entry in undo list undo-tree-canary, and after having Emacs debugger triggered on error, I want to move back and forth between stack frames and to examine ...
57 views

### How to diff one file against another branch with Magit

I want to see the differences of a file in another branch. With git I can simply do: git diff otherbranch: path-to-file. In magit this seems trickier as the file may not be dirty and not showing up ...
44 views

### Save place in files but don't move the cursor to the saved position automatically

I'd like to have a command that moves the cursor to the last position it was in when I left the buffer (either by killing it or by killing Emacs). I know I can use saveplace.el to save the position ...
24 views

### How can I drag-and-drop an org-mode header onto the Mac desktop?

John Kitchin has a terrific video on modifying the default drag-n-drop behavior, going from the Mac Finder onto an Emacs buffer. I would like to implement the opposite behavior: dragging an org-mode ...
23 views

### realgud ipdb how to highlight line being debugged

I debug a python source file with M-x realgud:ipdb then call ipdb as python3 -m pdb <sourcepath> <args> I get 2 windows: ipdb ... shell and my source buffer. How can I get the line ...