Most Popular
1500 questions
10
votes
1 answer
Override a function locally, but allow calls to the original function
The advice feature allows modifying the behavior of a function globally. An advice definition can make calls to the original function.
(defadvice foo
(around foo-bar activate compile)
"Always set `qux' to t when running `foo'."
(let ((qux t))
…

Gilles 'SO- stop being evil'
- 22,318
- 4
- 56
- 92
10
votes
1 answer
How to turn off `emacs-lisp-checkdoc` of flycheck when edit source block in org-mode file?
I have a emacs-lisp block in org-mode and when I try to edit it by press C-c ', flycheck always report errors as below:
0 warning The first line should be of the form: ";;; package --- Summary"... (emacs-lisp-checkdoc)
0 warning …

Enze Chi
- 1,460
- 13
- 29
10
votes
2 answers
How to set temporary halt after C-x C-c?
If I run C-x C-c in emacs, it will close immediately. If I set confirm-kill-emacs to y-or-n-p it will ask for confirmation before closing.
Instead of y-or-n-p, I want to set some temporary timer for 3 seconds before closing emacs. So, if I press…

Chillar Anand
- 4,102
- 1
- 24
- 52
10
votes
1 answer
How to use use-package with built-in packages?
For the sake of tidiness, I'd like to group setq(s) under single, related banner.
Let's say I want to set the value of compilation-scroll-output in "compilation" unit like this:
(use-package compilation
:init
(progn
(setq…

jacekmigacz
- 202
- 3
- 9
10
votes
3 answers
How do you configure emacs for julia?
What is a recomended way for making emacs as julia code editor? The things which I would like to have are:
autocomplete
julia shell in emacs with abbility to send the code from buffer
debugging

Jānis Erdmanis
- 393
- 3
- 11
10
votes
2 answers
org-mode table exports centered - change to left?
I'm exporting a simple org-table through LaTeX to PDF:
| a | b | c |
| 1 | 2 | 3 |
After export with C-c C-e l o the PDF contains a centered table, and I'd rather have it on the left (to be clear, I'm referring here to the table as a whole, not the…

Steven Arntson
- 1,333
- 9
- 28
10
votes
1 answer
What is a hook?
Just to clarify... For example, in this doc:
A hook is a Lisp variable which holds a list of functions, to be
called on some well-defined occasion. (This is called running the
hook.) The individual functions in the list are called the hook
…

147pm
- 2,959
- 1
- 18
- 42
10
votes
4 answers
Delete files to Trash on OS X
Is there a best, most future-proof method of setting emacs on OS X to delete files to the trash?
I tried the instructions here:
(setq delete-by-moving-to-trash t)
(defun system-move-file-to-trash (file)
"Use \"trash\" to move FILE to the system…

Harvey
- 978
- 6
- 15
10
votes
2 answers
Is there a standard/recommended syntax for defining a keyboard binding?
I have seen all of the following for defining a keyboard binding. All of these work (at least on MS Windows). I don't know if there is another way to do the same thing.
I am wondering if there is a standard or recommended way to define a keyboard…

Name
- 7,849
- 4
- 41
- 87
10
votes
2 answers
org-block-background font not having effect
I use variable-pitch-mode with org buffers. Normally I set org-block to fixed-pitch and the code between #+BEGIN_SRC and #+END_SRC are properly rendered as fixed width fonts, also with proper syntax highlighting. However starting from last week, for…

xji
- 2,635
- 18
- 38
10
votes
1 answer
How to pass function as argument in elisp
I am reading SICP recently to learn lisp programming.
There is an example in the book to make a high level function sum as below.
(define (sum term a next b)
...
(term a)
...
(next a)
...
In this function, term and next are…

Luis404
- 521
- 5
- 7
10
votes
2 answers
org-babel and remote sql commands
I'm using org-babel to do litterate programming and I find it very convenient. I am able to execute shell commands on remote hosts, and local database commands with the postgres client. To open a file as postgres user, it would look for example like…

KookieMonster
- 387
- 4
- 10
10
votes
7 answers
How to Implement Popup Menu Similar to That Used in Magit
Question
I would like to create user interface in form of popup menu, popup menu
similar to that used in Magit.
Features
Definition of Popup
Popup in context of this question means little temporary window that
contains collection of menu items so…

Mark Karpov
- 4,943
- 1
- 26
- 54
10
votes
4 answers
How to obtain a list of all functions exclusively provided by a certain major mode
This question in inspired by https://stackoverflow.com/q/605785/.
By M-x describe-function I can get a list of all
interactive or nonintractive functions available in the current state
of emacs.
If an specific mode is activated (e.g.…

Name
- 7,849
- 4
- 41
- 87
10
votes
2 answers
Default Magit commit state in Evil
I use evil. Normally, when I commit, I'd like to immediately start typing, but evil starts the buffer in evil-normal-state. I used to set
(evil-set-initial-state #'git-commit-mode 'insert)
But that no longer works, as Magit uses text-mode for its…

PythonNut
- 10,363
- 2
- 30
- 76