Most Popular
1500 questions
39
votes
2 answers
Do I still need GNU ELPA if I have MELPA?
This has always confused me, since people are saying that MELPA does have newer versions of packages, but it's not really clear, if GNU ELPA is just a subset of MELPA, or if I do need both?
The reason why I'm asking is that I'm experimenting with my…

Jakub Arnold
- 493
- 1
- 4
- 6
38
votes
3 answers
Make visual-line-mode more compatible with org-mode
visual-line-mode is very useful to wrap lines with the window size changing without inserting any newlines. But in org-mode, it also wraps the headline and source blocks which is a little bit annoying.
So here comes my question:
How can I turn off…

Leu_Grady
- 2,420
- 1
- 17
- 27
38
votes
3 answers
What's the difference between push and add-to-list?
I've found that different packages in their installation instructions use either push or add-to-list (For example adding a directory to load-path) and I was wondering what the difference is and what the use case for each would be.

shadowthief
- 383
- 1
- 3
- 5
38
votes
6 answers
How to reopen just killed buffer, like C-S-t in Firefox Browser?
Sometimes I accidentally kill a buffer and want to reopen it, just like C-S-t to undo closed tab in Firefox, but there is no built-in command in Emacs, the defun undo-kill-buffer in http://www.emacswiki.org/RecentFiles :
(defun undo-kill-buffer…

CodyChan
- 2,599
- 1
- 19
- 33
38
votes
6 answers
How to update packages installed with use-package
I'm using use-package to install and configure packages (most of these packages are in melpa).
Is there a clean automated way of keeping all these packages up-to-date ?
If not, what is the best work flow in this case ?
Note: A very similar question…

Jaagrit Sapana
- 485
- 1
- 4
- 5
38
votes
3 answers
Command that formats (prettifies) Elisp code
Let's say I have a function that looks like the following (as is often the case
when printing elisp output).
(defun my-example-function () (let ((a (do-something)) (b (do-something))) (setq someone me) (with-current-buffer b (do-that (or this (and…

Malabarba
- 22,878
- 6
- 78
- 163
38
votes
2 answers
How to check in elisp if a string is a substring of another string?
How to check if a string s1 is a substring of another string s2?
For example (test-substring "f t" "df tj") --> t,
(test-substring "ft" "df tj") --> nil.

Name
- 7,689
- 4
- 38
- 84
38
votes
2 answers
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.

Eleno
- 1,428
- 11
- 17
38
votes
7 answers
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": "File", "popup": {"menuitem": [{"value": "New",…

Emmanuel Touzery
- 961
- 1
- 8
- 17
38
votes
6 answers
org-mode: How to export underscore as underscore instead of highlight in HTML?
I am using org-mode, and the document I am writing has a table name whose name looks like this: tab_weekly_report. When I export the document to HTML, I expect the name to exported as tab_weekly_report, but org-mode treats _ specially (as a markup…

Daniel Wu
- 1,711
- 2
- 17
- 26
37
votes
5 answers
Recording a GIF screencast of Emacs
I see lots of folks posting animated GIF's showing off Emacs features, but I haven't seen a nice walk through on creating one. Is there any code that tries to link the keyframes of the gif to keypresses in Emacs? Is there any elisp packages or…

dgtized
- 4,169
- 20
- 41
36
votes
4 answers
Show unbound keys
I want to define some key bindings for my new found usage of helm, amazing mode btw, and I want to do it without overwriting the usage of other keys. I realize that the number of different key combinations is infinite, but is there some way to see…

c-o-d
- 910
- 9
- 19
36
votes
6 answers
How to set a short-cut for #+BEGIN_SRC #+END_SRC?
I read the org-mode manual but did not find a short cut to insert:
#+BEGIN_SRC
#+END_SRC
I guess I need to create a configuration in ~/.emacs to set a shortcut? Or, is there a shortcut but I did not know?
I use R much in emacs. Is there a way to…

Xianwen Chen
- 461
- 1
- 4
- 4
36
votes
2 answers
Is it possible to use both MELPA and MELPA-stable at the same time?
I use melpa-stable as an additional package repository, but one of the packages I like to use (icicles) isn't available on melpa-stable. Is there any way to configure package.el to normally use melpa-stable, but use melpa for a specific subset of…

Timo Geusch
- 508
- 4
- 7
36
votes
2 answers
Understanding of emacs align-regexp
I've read the Emacs documentation for align-regexp but still have difficulty in understanding how it works. What I'm talking about is its prefixed form C-uM-xalign-regexp, not the simple form M-xalign-regexp. Here are my questions:
Does the first…

Just a learner
- 547
- 5
- 11