wasamasa
  • Member for 7 years, 4 months
  • Last seen this week
Do I still need GNU ELPA if I have MELPA?
Accepted answer
58 votes

First of all, ELPA is the name of a specification, the Emacs Lisp Package Archive. There are three widely known implementations of that specification, GNU ELPA, Marmalade and MELPA. GNU ELPA is the ...

View answer
What's the difference between the different vim implementations?
Accepted answer
35 votes

vi, vip and viper (ordered by creation date) come built-in with Emacs, all of those emulate VI. vim-mode is a newer, stand-alone effort to actually emulate Vim, vimpulse is a set of extras on top of ...

View answer
Curiosity: What does progn stands for?
Accepted answer
33 votes

progn is a special form borrowed from CL-like Lisp dialects. In their implementations it's composed from multiple progs, expressions that are evaluated and a number that specifies which expression ...

View answer
What piece of code in Emacs makes `line-number-mode` print "??" as line number in buffers with long lines?
Accepted answer
29 votes

Thanks to @lunaryorn's suggestions I've been able to locate the piece of code causing this. It looks like format-mode-line eventually calls decode_mode_spec to turn the format codes given into values. ...

View answer
How do I debug `Package cl is deprecated`?
Accepted answer
22 votes

Try the following in an Emacs session with the code in question loaded up: (require 'loadhist) (file-dependents (feature-file 'cl))

View answer
Export code blocks in org-mode with minted environment
Accepted answer
22 votes

You will need to tell Org to Use minted for listings Include minted in the default package list Change the compilation switches to accommodate for minted: (setq org-latex-listings 'minted ...

View answer
How to change default minibuffer message?
Accepted answer
21 votes

display-startup-echo-area-message triggers this little advertisement unless you're using customize and have set it there or have it set in your user-init-file (because it actually goes ahead and scans ...

View answer
Differences between evil-normal-state-map and evil-motion-state-map
Accepted answer
20 votes

Motion state is an Evil-specific thing, intended for modes where you don't edit text, but still want Vim-style movement available, with all other keys of that mode passing through. Help buffers are ...

View answer
Show line number on error
Accepted answer
18 votes

Emacs provides a good amount of debugging facilities including M-x toggle-debug-on-error, M-x toggle-debug-on-quit, debug on signal (which can be used by sending USR2 to Emacs from outside), debug-on-...

View answer
Instructions on how to work with Evil Mode
Accepted answer
17 votes

Evil is basically a global minor mode that enables a few extra keymaps on top of Emacs and comes with the respective editing commands you'd use in them. It is intentionally built to reuse as much ...

View answer
Track "TODO" items when writing code
17 votes

fixmee-mode offers highlighting of such notes and navigation. It is easily installed from MELPA and supports varying priorities of todo items.

View answer
"Pop" a window into a frame
Accepted answer
16 votes

Try this instead: (defun my-turn-current-window-into-frame () (interactive) (let ((buffer (current-buffer))) (unless (one-window-p) (delete-window)) (display-buffer-pop-up-frame ...

View answer
Save lock-files to a directory instead of disabling them
Accepted answer
16 votes

I'm afraid this is not straightforward to do considering F1 v create-lockfiles takes you to filelock.c which only exposes this variable and temporary-file-directory. So, to have this behaviour you'd ...

View answer
Any way to make prompts and previous-output uneditable in shell/term-mode?
Accepted answer
16 votes

comint-derived modes (like shell, ielm, ...) support filter functions, the following snippet makes the output and prompt read-only: (setq comint-prompt-read-only t) (defun my-comint-preoutput-turn-...

View answer
How to truly unbind ALL global keybinds?
Accepted answer
16 votes

Taken from the Emacs Lisp Manual (see Controlling Active Maps): (use-global-map (make-sparse-keymap)) To quote the manual: "It is very unusual to change the global keymap.". Safety note: Make sure ...

View answer
syntax highlighting in source blocks
Accepted answer
16 votes

Org-mode fontifies these blocks if you enable the corresponding setting. Try: (setq org-src-fontify-natively t)

View answer
Meaning of period in (. 123)
15 votes

It looks like Emacs simply reads (. 123) as 123, what happened? That's exactly what happened. To back it up with sources: if (ch == '.') { if (!NILP (tail)) XSETCDR (tail, read0 (...

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

Literate programming takes you the most way there, org-mode supports it via org-babel. Two possible solutions are explained on @malabarba's blog: The simplest way is loading org-mode, then using its ...

View answer
Rendering URLs as clickable links
Accepted answer
14 votes

Emacs offers goto-address-mode for making a number of things, including HTTP links, clickable.

View answer
How to remap : to ; in Evil Mode
Accepted answer
14 votes

First of all, in Emacs one thinks in keymaps and commands, not so much keys in their (original) context. Your first step would be figuring out how the commands are named in Evil's normal and visual ...

View answer
Is there a more convenient key binding for RETURN?
Accepted answer
14 votes

C-m should have the same effect, C-j and M-j come close, but do subtly different things depending on your active modes and configuration, such as indenting the current line.

View answer
How to programmatically execute a command in eshell?
Accepted answer
13 votes

My initial hunch was looking for an official command that does this already, so I've found eshell-command. However that outputs to a separate buffer, so it's not an option. Here's an example with ls ...

View answer
How do I set the fringe colors to whatever is the background color?
Accepted answer
13 votes

The official way would be customizing the theme in question to make the fringe face look the same as the background face. A face spec along the lines of (fringe :inherit default) should do the trick. ...

View answer
Accessing JSON data in elisp
Accepted answer
12 votes

I've taken the liberty of adjusting your code appropriately: (require 'json) (let* ((json-object-type 'hash-table) (json-array-type 'list) (json-key-type 'string) (json (json-...

View answer
Default Magit commit state in Evil
Accepted answer
12 votes

Here's a workaround: (add-hook 'with-editor-mode-hook 'evil-insert-state) I'm not sure why the initial state system was chosen as it either means you have a huge whitelist of states or do lookup of ...

View answer
How do I set up key bindings for modes in a specific Evil state?
Accepted answer
12 votes

Evil has the evil-define-key macro for defining commands for certain states in a specific keymap only: (evil-define-key 'insert emacs-lisp-mode-map (kbd "C-c C-c") 'butterfly ...

View answer
How to prevent slow-down when an inferior processes generates long lines?
Accepted answer
12 votes

As already answered in the comments, Emacs becoming very slow in its redisplay for long lines is a well-known issue. Fixing it would be very nice, but needs lots of thought to be pulled off correctly....

View answer
error: Package `use-package-' is unavailable
Accepted answer
11 votes

This particular error happens if Emacs failed looking up the latest version of a package, like if there's no package-archives file containing that information. Before installing packages, make sure ...

View answer
A way to insert a predefined text into Magit's commit message window?
Accepted answer
11 votes

There is a git-commit-setup-hook that can be used to prepare the commit message buffer. Here comes a short example: (defun my-git-commit-setup () (insert "#123 ")) (add-hook 'git-commit-setup-...

View answer
How to pass a prefix argument to helm-m-x?
Accepted answer
11 votes

helm-M-x is arguably unusual in this aspect. You first invoke it, type until you've picked the command you want to execute, then add the prefix argument by pressing C-u.

View answer
1
2 3 4 5
13