All Questions

Filter by
Sorted by
Tagged with
174 votes
10 answers
116k views

How do I reload a file in a buffer?

I usually work on files which are updated in the file system via version control. What's a quick way to reload a file without having to C-x C-f the file again and getting asked if I want to reload it?
Fernando Briano's user avatar
136 votes
4 answers
21k views

What are the practical differences between the various Emacs Package Repositories?

I notice that there are several different repositories that often contain the same software. Why would I want to prefer: GNU ELPA Marmalade MELPA over the others? Since any one repository does not ...
Eric Brown's user avatar
  • 3,222
129 votes
14 answers
82k views

How to switch between windows quickly?

How do I switch between windows quickly? I often have multiple windows open and need to switch between them. Right now, I use C-x o to get to the one I want. Is there a more efficient workflow ...
Sibi's user avatar
  • 3,723
124 votes
6 answers
23k views

Are there any advantages to using ~/.emacs.d/init.el instead of ~/.emacs?

I've normally used ~/.emacs for my config file, but I've noticed others using ~/.emacs.d/init.el. Are there advantages to the init.el location? Any disadvantages?
Larry Coleman's user avatar
121 votes
3 answers
40k views

How to merge Git conflicts in Emacs

My recent Git merge has resulted in a large number of conflicts. My current approach is to search for the next occurence of '<<<' and then perform the merge by standard text editing. ...
Beginner's user avatar
  • 2,731
116 votes
9 answers
47k views

How can I get a ruler at column 80?

As a programmer, I want to see a ruler at a specific column (usually 80), both so I see when I cross that column, but also to see how close I am getting to it so I can reformat my code early. The ...
Jorgen Schäfer's user avatar
113 votes
3 answers
39k views

How to Restore File System Access in macOS Catalina

I updated to macOS Catalina which requires the user through pop-ups to allow any app trying to access the file system for the first time. No such pop-up is appearing for Emacs. Running the script ...
wsaleem's user avatar
  • 1,233
109 votes
5 answers
48k views

What is the difference between Aquamacs and other Mac versions of Emacs?

Macintosh users have several choices of pre-built Emacs. I am aware of the following versions: YAMAMOTO Mitsuharu's Emacs Mac Port David Caldwell's Emacs for Mac OS X Vincent Goulet's Emacs Modified ...
Eric Brown's user avatar
  • 3,222
108 votes
12 answers
18k views

How do I prevent extremely long lines making Emacs slow?

I see hugely varied performance depending on how many newlines there are in the file I'm visiting. Here's an example. I have two JSON files: $ wget https://github.com/Wilfred/ReVo-utilities/blob/...
Wilfred Hughes's user avatar
108 votes
4 answers
45k views

How do I get a fancier mode line that uses solid colors and triangles?

People occasionally post screenshots with modelines that have solid colors and triangles: How do I replicate this effect?
Tikhon Jelvis's user avatar
102 votes
7 answers
46k views

Quickly insert source blocks in org mode

org-mode has the ability to render source code, with blocks of the following syntax: #+NAME: <name> #+BEGIN_SRC <language> <switches> <header arguments> <body> #+...
Matthew Piziak's user avatar
102 votes
6 answers
46k views

Reading and writing email with emacs

How can we use emacs to read and write email? This question is intended to provide a canonical landing point for users wanting to deal with email using emacs. Please post only one package/solution ...
T. Verron's user avatar
  • 4,293
97 votes
5 answers
34k views

Edit file with super-user rights

When you have to edit system files, it's an usual situation that you launched Emacs with a normal user before, so the file will be write-protected. What can I do to gain root privileges? I mean ...
smonff's user avatar
  • 1,589
93 votes
6 answers
46k views

How to maximize my Emacs frame on start-up?

Is there a way to maximize my window on start-up? Currently, I hit Control++Up on my keyboard but it is very bothersome to do that every time. I am using Emacs 24.4 on Ubuntu 12.04.
programking's user avatar
  • 7,234
90 votes
25 answers
59k views

How do I switch buffers quickly?

In vanilla Emacs, I have to do C-x b and then manually type out the buffer name to switch. If I forget the name of the buffer, I have to hit TAB to list possible completions. Is there anything I can ...
nixeagle's user avatar
  • 2,457
90 votes
5 answers
21k views

Advantages of setting variables with setq instead of custom.el?

I see a lot of people (extension authors and others) give configuration examples with setq: (setq foo 'bar) These parameters are often defined with defcustom, making them available for customization ...
J David Smith's user avatar
76 votes
14 answers
43k views

How to start emacs with a custom user-emacs-directory

I'm working on a custom and small Emacs configuration that I want to share with some friends as a git repository for them to use as a baseline for their own future configurations. For this I need ...
Mattias Bengtsson's user avatar
73 votes
9 answers
85k views

How do I display line numbers in emacs (not in the mode line)?

I know how to display line numbers (and columns) in the mode-line, but I'd like emacs to display the line numbers for all the lines on the left-hand side. I've seen this done in vim and other text ...
programking's user avatar
  • 7,234
73 votes
4 answers
18k views

Add change to a previous commit with Magit

I have 2 commits, A then B, ready to be pushed. I realize I forgot to add something in A. How can I add this change to A using Magit? I don't even know which part of the Git documentation I should ...
Mathieu Marques's user avatar
73 votes
2 answers
34k views

How to convert DOS/Windows newline characters to Unix format within GNU Emacs?

Is there a way to tell GNU Emacs to convert DOS/Windows newline characters in a file to Unix format?
Charo's user avatar
  • 925
72 votes
5 answers
19k views

How can I find out in which keymap a key is bound?

I have rebound a the 'd' key in gnus-article-mode, but its old behavior is still active when the point is on an attachment. I can see that the rebinding did not take effect there by doing C-h k d, but ...
brab's user avatar
  • 925
71 votes
5 answers
48k views

How do you create a robust Python IDE with Emacs (as the Text editor)

Emacs is an excellent editor - however it is said "to program you first need an IDE" - so how would you build an IDE in the extensively customizable Emacs for PYTHON with all the features of modern ...
Serial Exchangist's user avatar
70 votes
2 answers
14k views

How can I open a specific revision of a file with Magit?

Is it possible to open a specific revision of a file in Emacs with Magit without changing the current branch? I have rebased some local changes to a revision where the modified functions were ...
David Holm's user avatar
  • 1,199
70 votes
10 answers
15k views

How can I start learning Emacs Lisp?

Background: I'm mostly a vi user and am converting to Emacs. Past the basics and now use it for writing code in C and some Python with plans to do an R conversion too. I wrote (Common) LISP for ...
user1172468's user avatar
  • 1,047
70 votes
8 answers
7k views

What should/shouldn't I do when keeping .emacs and .emacs.d in version control?

Like many people, I manage a lot of my dotfiles via a version control repository (Mercurial on Bitbucket, private, in my case). This is handy when setting up a new machine or propagating ...
Paul Bissex's user avatar
69 votes
9 answers
36k views

How to proceed on package.el signature check failure

I just tried to install ascii-art-to-unicode from the gnu repository (http://elpa.gnu.org/) via list-packages. I get the following error: package--check-signature: Failed to verify signature ...
user avatar
69 votes
4 answers
34k views

How to quickly copy/move file in Emacs Dired?

In Dired mode, I can m mark files and R to move them to a destination. Some times the destination path is too long. With the destination open in a split window, is there a way to move files quicker? ...
Nick's user avatar
  • 4,493
68 votes
8 answers
36k views

How do I list all key-bindings available in a given buffer?

I am trying out a new major mode, how can I take advantage of Emacs' documentation system to get a listing of key bindings available in that specific buffer?
nixeagle's user avatar
  • 2,457
67 votes
2 answers
13k views

How to list branches with Magit

How do I list the branches of a repository in Magit (i.e., the equivalent of git branch --list)? I expected to find this in the branch popup, but it seems to be neither there nor was I able to find it ...
Nikratio's user avatar
  • 939
67 votes
4 answers
23k views

Fundamentals of multiple-cursors

I recently learned about multiple-cursors, and it looks like a very useful package. I went through the documentation on the original repo, but the commands still look a bit obscure to me. I then ...
Amelio Vazquez-Reina's user avatar
65 votes
4 answers
22k views

How to migrate Markdown files to Emacs org mode format

I've got hundreds of personal notes stored as files in Markdown format, after several years using the VoodooPad personal wiki software for OS X. There's plenty of information available for exporting ...
Steve HHH's user avatar
  • 755
65 votes
8 answers
2k views

How can I use Emacs to edit questions, answers, and comments here?

Emacs as a StackExchange client? How can I use Emacs to edit questions, answers, and comments here on the Emacs Stack Exchange site? Broadly, what possible methods exist? Kill and yank This works, ...
daveloyall's user avatar
  • 1,300
64 votes
2 answers
20k views

What do I do when Emacs is frozen? [duplicate]

What should I do when Emacs stops responding? My current "emacs-is-frozen" protocol looks like this: Spam C-g (it sometimes works) Wait for a while. pkill -9 emacs What alternate steps could I try ...
Clément's user avatar
  • 3,995
63 votes
12 answers
9k views

Synchronize packages between different machines

I use emacs in different places and I want to have a similar setup and packages installed everywhere. I guess I can use a version control repository for the setup files. Since I use Prelude, that ...
El Diego Efe's user avatar
  • 1,631
63 votes
4 answers
19k views

How to easily cherry pick with magit?

I've been using magit for a few months now and I like it a lot. But one thing I still do it in a terminal is cherry picking. What is a simple way to do this?
caisah's user avatar
  • 4,096
63 votes
4 answers
10k views

Debugging a frozen Emacs

I am using mew for my e-mail. I need to use TLS with my email provider for SMTP. However, when I try to invoke that, Emacs freezes. I would like to take this opportunity to learn more about Emacs ...
Svante's user avatar
  • 731
63 votes
3 answers
23k views

What's the Magit equivalent of 'git add'?

What is the Magit equivalent of git add [--intent-to-add] <filename> for checking a newly created file into Git?
feoh's user avatar
  • 910
61 votes
5 answers
11k views

What options are there for writing better non-programming text in Emacs?

This is a fork from the question What options are there for doing spell-checking in Emacs? Because I'm currently doing a lot of non-programming tasks in Emacs I'm wondering whether Emacs can support ...
elemakil's user avatar
  • 2,537
61 votes
1 answer
8k views

Can I checkout a given commit from magit's log view?

I'm exploring a git repository history using magit's log view using l l. Can I checkout a given commit from there without going to terminal?
Rafa de Castro's user avatar
59 votes
3 answers
26k views

How can I troubleshoot a very slow Emacs?

I am writing a document and I have a problem with Emacs' performance that I think appeared just yesterday. I haven't made any alterations in my init file or installed any new packages. The problem is ...
Adam's user avatar
  • 2,457
59 votes
2 answers
19k views

What are the differences between autocomplete and company mode?

There seem to be two major autocompletion extensions for emacs: autocomplete and company mode. What are some of the practical differences between the two and when would I want to use one over the ...
Connor's user avatar
  • 1,611
58 votes
3 answers
28k views

How do I get the current major mode?

If I am editing a .tex file in emacs, by default (for me) the bottom right corner of the frame will say "LaTeX/P". However, I won't get to that mode by typing "M-x LaTeX/P-mode"; I can only get to it ...
john smith's user avatar
58 votes
6 answers
33k views

How to exclude files from Projectile?

I am using the helm-projectile setup from prelude and it has been a huge improvement to my workflow. The only remaining issue are auto-generated files (e.g. generated by CMake) which show up during ...
Beginner's user avatar
  • 2,731
58 votes
5 answers
16k views

Change a branch's upstream with Magit

When you push a branch with Magit (with P P) and the branch has no upstream, Magit asks you the name of the branch you want to push to. That's great. Once you set the upstream for a branch, however, ...
Malabarba's user avatar
  • 23.2k
58 votes
1 answer
4k views

How to view diff when emacs suggests to recover this file?

Sometimes it happens: emacs prompts you about recovering unsaved changes to a file, but you cannot remember if you want those changes or not. Starting at the recover-this-file buffer, is there a way ...
Sparx's user avatar
  • 1,121
57 votes
6 answers
11k views

How to replace an element of an alist?

I have this by default in my auto-mode-alist: ("\\.js\\'" . javascript-mode) (even with emacs -Q). I'd like to substitute js2-mode for javascript-mode. Of course, I could use assq-delete-all and ...
mbork's user avatar
  • 1,687
57 votes
3 answers
16k views

Inline verbatim and code with quotes in Org-mode

In Org-mode I can surround text with = or ~ to place text in inline verbatim or code mode. However this fails if the text has quotes, and I couldn't find an explanation or workaround in the ...
Amelio Vazquez-Reina's user avatar
56 votes
6 answers
22k views

Can I use org-mode to structure my .emacs or other .el configuration file?

My .emacs configuration file gets bigger and bigger and I'd like to get a better overview and structuring by adding headings, subheadings and being able to hide or show them like I can do with Emacs ...
MostlyHarmless's user avatar
56 votes
9 answers
35k views

Using Emacs as a full-featured C/C++ IDE

I have been trying off and on for over a year now to use Emacs as a C/C++ IDE. I have only been marginally successful thus far, but have run into a few brick walls along the way. Currently I am ...
nispio's user avatar
  • 8,235
55 votes
9 answers
13k views

How do I find text across many open buffers?

Lets say I have 10 buffers open, and I want to find all occurrences of blah in all 10 buffers. How would I do this?
nixeagle's user avatar
  • 2,457

15 30 50 per page
1
2 3 4 5
545