All Questions

23
votes
3answers
3k views

How can I run an async process in the background without popping up a buffer?

I have defined some functions to run async background process using async-shell-command in my .emacs, but everytime I run the commands a new window (not frame) is created and the process' buffer is ...
23
votes
1answer
2k views

How to stash individual files with magit

git is capable of stashing of individual hunks. With --patch, you can interactively select hunks from the diff between HEAD and the working tree to be stashed. The stash entry is constructed such ...
23
votes
1answer
13k views

How to use pdf-tools (pdf-view-mode) in emacs?

pdf-tools includes pdf-view-mode which offers several features not present in doc-view-mode (see end of question). Can pdf-view-mode be used as a replacement for doc-view-mode generally, or does it ...
23
votes
2answers
4k views

Reverse a hunk in Magit 2.1.0

I just upgraded to magit 2.1.0. (And also to emacs 25.0.50 and git 2.3.1.) Previously, in the *magit* buffer I could: Select a hunk in the Unstaged area. Type v and answer yes to reverse it. This ...
23
votes
2answers
758 views

What was Emacs like back in the 80s?

I've looked all around for footage of ancient Emacs distributions, but to no avail. The source code for Emacs 16.56 from July 15, 1985 is available on Github, but under no circumstances could I manage ...
23
votes
2answers
3k views

Exporting org file breaks when upgrading to orgmode 8.3

My orgmode was recently updated to the recent 8.3, and I found that I can't export my init.org file as HTML any more. I'm getting the following output in *Messages* buffer: org-babel-exp process ...
23
votes
4answers
5k views

org: How to sort headings by TODO and then by priority?

I often have a list like this: * Main heading ** TODO [#A] Make world better ** TODO [#B] Make Emacs better ** TODO [#B] Customize emacs ** DONE [#C] some task ** TODO [#A] Launch rocket to mars I ...
23
votes
1answer
7k views

How to highlight text permanently in org-mode

I know I can use *bold*, /italic/, _underlined_, =verbatim= and ~code~, and, if you must, ‘+strike-through+’ to do some markup to text according to org-mode documentation, but they are not enough for ...
23
votes
2answers
6k views

How to reset color theme?

When I'm trying different color themes out, it seems if a particular element is not defined in the new theme the old theme value is retained, and this leads to some clashing. This happens in emacs 24 ...
23
votes
3answers
2k views

Let Emacs move the cursor off-screen

This question was originally asked at https://stackoverflow.com/questions/15895313/let-emacs-move-the-cursor-off-screen, but all the answers I got more or less said "it can't be done", which with ...
23
votes
3answers
1k views

Smooth (mouse) scroll for inline images?

I display images in-line with begin_src & result blocks. However, for large-images, when I scroll past the bottom of the image, I get a 'jerk' and the whole image is scrolled away. Similarly if I ...
22
votes
8answers
3k views

Close all dired buffers

Sometimes my buffer list has 10+ dired windows, and I end up using buffer-menu to manually mark and kill all of them. Is there a faster way to close all open dired windows?
22
votes
6answers
5k views

Switching between window layouts

When I configure a custom layout and then just need to temporary look into one file fullscreen and once I want that layout back - I need manually to reflow it. I would like a plugin/elisp code to ...
22
votes
2answers
6k views

How to make yasnippet and company work nicer?

In my emacs, let's say, I use a "elisp" yasnippet to extend a lisp block in org-mode. But before I extend it, company is triggered first, which gives me a menu like "1. elisp1, 2. elisp2" without an ...
22
votes
1answer
623 views

What is the function `purecopy` needed for?

I was browing through compile.el and I noticed this construction: (defcustom compile-command (purecopy "make -k ")) The purecopy docs state: purecopy is a built-in function in `C source code'. ...
22
votes
5answers
4k views

How can I get an org-mode outline in a 2nd buffer as a dynamic table of contents?

When I edit large documents, I would like to see where I'm at by seeing the outline (with no-content) in a separate buffer. Like when you read a PDF file there is a TOC on the left. (see below) In ...
22
votes
3answers
9k views

Untrack file without deleting it?

I have a tracked file in a git repository. How do I untrack this file without deleting it using magit?
22
votes
3answers
1k views

Fixing DOuble CApitals as I type

I have a bit of a slow pinky. As my other fingers get faster and faster at typing, my pinky just can't keep up. This frequently leads me to type sentences whose first word starts with two uppercase ...
22
votes
1answer
3k views

Why do regular expressions created with the regex builder use syntax different from the interactive regular expressions?

So, using the regular expression builder (M-x re-builder), finding lines that end in \ takes "\\$", while in search and replace by regex, it only takes "\$". I would have expected the regex builder ...
22
votes
3answers
3k views

mu4e - multiple accounts

I am using mu4e for email in Emacs, and it is currently only configured for one mail account, and I set key to view different inbox. I wonder how to use mu4e for managing multiple email accounts?
22
votes
1answer
4k views

Synchronized scrolling in two windows

Is there a way to reflect the navigation commands in the current window in another visible window. I have two related LaTeX files displayed in two windows and would like to scroll through them ...
22
votes
2answers
3k views

Reloading directory-local variables

How do you reload directory-local variables? I would like to modify a .dir-locals.el and have such changes applied to the current Emacs session.
22
votes
2answers
2k views

What are overlays for, and how do they differ from text properties?

The manual states: You can use overlays to alter the appearance of a buffer's text on the screen, for the sake of presentation features. From its name, it suggests it can be used to create “...
22
votes
4answers
3k views

Line height with unicode characters

Some Unicode characters cause the line they are displayed on to be quite large. For example, a grave accent "̀ " adds about 2.5 lines of space above and below it. Other characters that cause this ...
22
votes
1answer
569 views

What steps are necessary to start contributing to Emacs proper?

Now that Emacs is maintained in a git repository (AFAIK), this opens the door (at least for me) to intelligently explore Emacs as a F/OSS project to contribute to :) Trouble is, I have no idea how to ...
22
votes
2answers
1k views

Is there any way to order helm results by commonly used?

It seems that the order of helm results is never useful... I either have to navigate through the long list or keep typing until I've narrowed the list enough. Is there any way to sort the results in ...
21
votes
1answer
10k views

Command to insert code block? [duplicate]

I found the command SPC m x c to insert a small code snippet like ~~. I would like to insert a longer snippet like #+BEGIN_SRC #+END_SRC Is there a command to do this? I found a way to add it for ...
21
votes
2answers
2k views

Org Mode link to open directory in Dired

I'd like to have a link like [[file:~/projects][Projects]] open directly in Dired rather than Finder (I'm on a Mac), which is what it does now. Is there a way? (Of course there's a way. It's ...
21
votes
5answers
2k views

How do I force re-evaluation of a defvar?

Suppose I have an Emacs lisp buffer that contains: (defvar foo 1) If I call eval-last-sexp or eval-buffer, foo is bound to 1. If I then edit this buffer to: (defvar foo 2) eval-last-sexp and eval-...
21
votes
3answers
17k views

Suitability of Emacs as a Java development IDE

I'm making yet another attempt to convert over to Emacs. I'm a decent Vi user but have been using Eclipse for most of my development work for the past 10+ years (has it been that long). So I did some ...
21
votes
3answers
7k views

Can cursor jump back to the previous position?

Can I make my cursor in a buffer jump back to its last position? (preferrably without having to mark the previous position) For example, C-a jumps to the beginning of the current line, can I jump ...
21
votes
2answers
912 views

Is there a mode to automatically update copyright years in files?

Usually around this time of year people start to realize that their copyright year is out of date in their files. This is particularly annoying if you like to put the copyright in every source file. I ...
21
votes
4answers
3k views

How do I automatically save org-mode buffers?

I regularly use org-mode and the agenda to keep track of my to-do list. Since I use Dropbox to sync my list, I need the same tasks to be available on all computers. Sometimes during the course of my ...
21
votes
2answers
2k views

How to evaluate Elisp code contained in a string?

The question pretty much says it all: I have a string containing the source code for a valid Elisp expression, and I would like to evaluate it. (In Python, for example, the expression eval("1 - 2 + 3"...
21
votes
1answer
1k views

How do I troubleshoot Emacs problems?

In a situation where Emacs is not behaving like I want, what can I do to troubleshoot the problem? What steps can I take to find and fix the problem myself? Or, failing that, how can I gather useful ...
21
votes
5answers
15k views

How to pretty-format code (auto-insert newlines, indent, etc)?

I'm using spacemacs but presumably it's emacs knowledge that's required here. I have a JSON file with a single long line, let's say this JSON from json.org/example: {"menu": {"id": "file", "value": "...
21
votes
1answer
2k views

What piece of code in Emacs makes `line-number-mode` print “??” as line number in buffers with long lines?

I'm using line-number-mode to have an indicator of the current line in my modeline, however for large files or rather, files with long lines, it starts displaying two question marks instead of a line ...
21
votes
1answer
1k views

How to customize background color for some web pages opened with eww?

I just installed emacs 24.4 and I've started using eww. But one annoying thing is that when I visit google.com I get a grey background which makes text really hard to read for my theme. This is how ...
21
votes
1answer
964 views

How to implement Markdown style link IDs in org-mode?

At times, I need to use the same link at multiple places in a long document. For those cases it would be useful to have link IDs like in markdown. From markdown syntax ref, You can optionally use ...
21
votes
4answers
9k views

Browser-style 'tabs' for emacs?

I would like tabs like firefox but for emacs. I found this: http://emacswiki.org/emacs/TabBarMode But it just add to each buffer (window in Emacs terminology) a bar that shows currently open buffers....
21
votes
2answers
751 views

How to move an org-mode file together with all attachments?

I have a couple files, e.g. file-1.org, file-2.org in the same directory sharing the data/ directory for attachments. I'd like to move file-1.org to a different location, create a new data/ directory ...
20
votes
5answers
28k views

Emacs won't load theme on startup

I've installed the solarized theme package via MELPA. I can select one of the two solarized themes via `customize-theme and it activates it. When I save the theme settings it adds the following to my ...
20
votes
8answers
5k views

Hide list of minor modes in mode-line

I use quite a few minor modes and usually I know which minor mode is enabled in every major mode. If I really want to see the full list, I can run C-h v minor-mode-list. At the same time, my mode ...
20
votes
4answers
5k views

Understanding SCHEDULED in Org mode

I've read the various manual pages about DEADLINE and SCHEDULED, and have used them both. I understand that DEADLINE is used in the Agenda to alert in advance about an upcoming deadline, and to ...
20
votes
8answers
11k views

How do use Emacs to look up a function in Python?

What is the easiest way to configure Emacs to be able to look up where a function is defined? I want to highlight it in Emacs and press a key combo to look up where the source of the function is. Can ...
20
votes
3answers
2k views

Why does lisp-interaction-mode exist, and do we ever need it?

Q: Why does lisp-interaction-mode exist, and are there any reasons to use it instead of emacs-lisp-mode? The manual states that emacs-lisp-mode and lisp-interaction-mode are identical except that the ...
20
votes
3answers
3k views

Are there color pickers for Emacs?

I use the excellent rainbow-mode to highlight colors in CSS files. However, this assumes I know what color I want. Are there any color pickers that I can use for CSS editing inside Emacs? Ideally, I'...
20
votes
1answer
2k views

Curiosity: What does progn stands for?

According to Emacs documentation: progn is a special form in `C source code'. (progn BODY...) Eval BODY forms sequentially and return value of last one. What does progn stands for (or its origin)? ...
20
votes
3answers
2k views

Match two spaces with incremental search

When searching using: C-s SPC SPC Also matches single spaces. I want to match exactly two space.
20
votes
1answer
2k views

Choose files to stage of a new directory with magit

If you create a new directory, its files won't show up with magit-status, only the new directory is in the list of Untracked items. Currently I have to magit-stage-item the new directory and then ...

15 30 50 per page