Most Popular

1500 questions
88
votes
25 answers

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 do to make this process faster?
nixeagle
  • 2,407
  • 3
  • 17
  • 14
75
votes
12 answers

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 some way to test my configuration and the simplest…
Mattias Bengtsson
  • 1,271
  • 1
  • 11
  • 18
72
votes
4 answers

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 it is not telling me what keymap is in effect at…
brab
  • 925
  • 1
  • 7
  • 8
70
votes
5 answers

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 IDE. I want to be able to effectively debug, run…
Serial Exchangist
  • 851
  • 1
  • 7
  • 7
69
votes
8 answers

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 configurations among different machines. So naturally I added…
Paul Bissex
  • 833
  • 8
  • 9
68
votes
2 answers

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 replaced by functionality in a different file. I would…
David Holm
  • 1,179
  • 1
  • 10
  • 10
68
votes
10 answers

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 years over two decades ago when I was in grad school…
user1172468
  • 1,027
  • 2
  • 9
  • 8
67
votes
2 answers

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
  • 865
  • 1
  • 9
  • 11
67
votes
4 answers

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 look at.
Mathieu Marques
  • 1,953
  • 1
  • 13
  • 30
66
votes
4 answers

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 watched the video in Emacs Rocks!, and the video is…
Amelio Vazquez-Reina
  • 5,157
  • 4
  • 32
  • 47
66
votes
4 answers

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? When I see the two dired windows on the screen,…
Nick
  • 4,423
  • 4
  • 24
  • 41
66
votes
8 answers

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 editors. How do I do this for emacs?
programking
  • 7,064
  • 9
  • 41
  • 62
66
votes
2 answers

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 anywhere in the "Inspecting" section of the…
Nikratio
  • 919
  • 1
  • 6
  • 11
65
votes
8 answers

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
  • 2,407
  • 3
  • 17
  • 14
65
votes
8 answers

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, but the method is so cumbersome that it's not worth…
daveloyall
  • 1,280
  • 9
  • 21