47
votes
Accepted
How is the GNU Emacs source code organized?
Being an official GNU project it adheres closely to the GNU coding standards and directory layout. That said, if you are exploring the source tree I would start, as with most projects, with the README ...
32
votes
Accepted
How do I use nadvice?
All information you need is included in C-h f add-function which
describes the underlying mechanism of advice-add.
The new advice system basically acts like replacing the current
definition of a ...
29
votes
Accepted
What piece of code in Emacs makes `line-number-mode` print "??" as line number in buffers with long lines?
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. ...
25
votes
Accepted
What algorithm does sort use?
If you have the Emacs source code installed, you can find the source code for sort with M-x find-function.
There you can see that sort performs a merge sort. It checks the length of the list, breaks ...
15
votes
Accepted
How do I force kill Emacs?
You can try setting kill-emacs-hook to nil before calling kill-emacs:
(defun really-kill-emacs ()
"Like `kill-emacs', but ignores `kill-emacs-hook'."
(interactive)
(let (kill-emacs-hook)
(...
11
votes
Are there any benefits of compiling Emacs with one graphical toolkit opposed to another?
There is at least one documented difference: apparently, there is a bug causing a crash of gtk+ emacs daemon, but not lucid emacs.
If you start emacs as a daemon, you will see the following warning:
...
8
votes
Compile Emacs with xwidgets in Ubuntu 14.04
For emacs-26 on ubuntu, the required package for --with-xwidgets is libwebkit2gtk-4.0-dev.
Found in comment here, confirmed by experience.
6
votes
Accepted
Who is "juergen" and why can I see the value of his exec-path?
It does sound like this was caused by the user who originally built the binary for you. If they didn't do so in some sort of stripped down environment then this would happen.
You might want to report ...
5
votes
Does Elisp replay on hash lookups every time code require access to symbol value?
Does that mean that on every call of adjust-fill-column varref and varset do hash lookup?
No. In Emacs Lisp, the hashing is only done by the reader to convert the strings into symbols (this is ...
5
votes
Accepted
Buffer local idle-timer
(defun run-with-local-idle-timer (secs repeat function &rest args)
"Like `run-with-idle-timer', but always runs in the `current-buffer'.
Cancels itself, if this buffer was killed."
(let* (;; ...
3
votes
Accepted
Why doesn't emacs store buffers internally as a tree (better random access, no line-number limitations)?
Personally, I doubt the buffer implementation can be blamed for every performance problem people encounter with buffers. My specific problem with it did involve long lines that were slowing down ...
3
votes
Accepted
zs and ze from Vim?
It's easy enough to set the horizontal position of the current window.
(defun hscroll-cursor-left ()
"Scroll horizontally to bring the cursor to the leftmost visible column.
Similar to Vim's `zs'."
...
3
votes
Compile Emacs with xwidgets in Ubuntu 14.04
Emacs switched from webkit1gtk to webkit2gtk so you'll need to install that instead. Your GTK package should be fine.
PS: I agree with the linked article, although I wouldn't put it this drastically....
2
votes
Accepted
compiling emacs without dump/unexec enabled
Is there a way of configuring the emacs build to produce an executable that does not use dump/unexec functionality?
Yes, the configure script has un-advertised support for inhibiting dumping:
env ...
2
votes
How does emacs mark the stack for GC
but what happens when by pure chance a block of memory stores a valid Elisp object even when it is not supposed to be one?
Emacs conservatively marks the stack, which means that it examines each word ...
1
vote
Why is Emacs code so unorganized?
Several reasons. First, emacs has grown over time. Thousands of people have contributed, and not all of the code is of identical quality. Like all things which grow over time, the final shape was not ...
1
vote
avoid emacs to lock down or crash when used for many tasks
Entirely up to you, really. I don't think there is any agreed "best practice" here. Your concerns are perfectly valid, so it's certainly not unreasonable to isolate distinct use-cases as separate ...
1
vote
What is the argument count limit to a function call?
I believe this is limited only by amount of available memory. I couldn't find any information about this sort of limitation in official manual, so it generally means that number of arguments an Emacs ...
1
vote
How do I force kill Emacs?
Sometimes, I end up with several unreachable emacs processes laying around. My emacsclient normally automatically starts an emacs and calls server-start--I guess there is some bug in my configuration ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
emacs-internals × 20elisp × 4
performance × 2
evil × 1
mode-line × 1
scrolling × 1
advice × 1
compilation × 1
syntax × 1
line-numbers × 1
async × 1
path × 1
source × 1
idle-timer × 1
emacs24 × 1
emacs-development × 1
irc × 1
garbage-collect × 1