Questions tagged [emacs-internals]
21 questions
47
votes
1 answer
How is the GNU Emacs source code organized?
How is the source code of GNU Emacs organized? What are the main modules and their functionality? Where can I find an official, up-to-date description of the architecture and its source code?

Amelio Vazquez-Reina
- 5,157
- 4
- 32
- 47
31
votes
1 answer
How do I use nadvice?
My config is full of advice, and I keep hearing about the new shiny minimalist nadvice.el package.
I've searched the manuals, and I've read the source, but I'll openly admit: I still have no idea how to actually use it.
Can anyone here point me to…

PythonNut
- 10,243
- 2
- 29
- 75
24
votes
1 answer
What piece of code in Emacs makes `line-number-mode` print "??" as line number in buffers with long lines?
I'm using line-number-mode to have an indicator of the current line in my modeline, however for large files or rather, files with long lines, it starts displaying two question marks instead of a line number. I've digged a bit and found out that…

wasamasa
- 21,803
- 1
- 65
- 97
23
votes
1 answer
What algorithm does sort use?
I need to add a single integer to a list that's already sorted, such
that it goes in the right place. My first tought was something like
(sort (cons newelt list) #'<)
However, given that list is already sorted, only one insertion is
really needed,…

Malabarba
- 22,878
- 6
- 78
- 163
19
votes
1 answer
Are there any benefits of compiling Emacs with one graphical toolkit opposed to another?
It seems the options are gtk, gtk2, gtk3, lucid or athena, motif. Of course, there are visual differences and one toolkit may be more to your tastes than others. Apart from that, are there any other differences such as with respect to performance…

tmalsburg
- 2,540
- 1
- 14
- 29
8
votes
3 answers
How do I force kill Emacs?
I often find myself with an incomplete or invalid emacs config, which breaks the normal behavior of kill-emacs such that it stops at an error.
In this case, I would like to forcefully kill emacs, without resorting to hunting down the PID and issuing…

PythonNut
- 10,243
- 2
- 29
- 75
6
votes
1 answer
Who is "juergen" and why can I see the value of his exec-path?
I noticed something strange when calling C-h v (describe-variable) on exec-path today:
exec-path is a variable defined in `C source code'.
Its value is
("/usr/bin" ...)
Original value was
("/home/juergen/.opam/4.02.0/bin" "/home/juergen/.cabal/bin"…

itsjeyd
- 14,586
- 3
- 58
- 87
6
votes
4 answers
Buffer local idle-timer
I would like to use an idle timer that is local to the current buffer in one of my packages. However, I can't seem to find out how.
How can I create (or fake) the behavior of a buffer local idle timer? Is the only way to call a function that checks…

PythonNut
- 10,243
- 2
- 29
- 75
5
votes
2 answers
Why does GUI emacs take longer to start?
I care about the time it takes to start emacs. I bounce around a lot and edit many files. I cannot use emacsclient due to some limitations in my workflow and machine.
In the terminal emacs -nw -Q M-x emacs-init-time returns 0.0 seconds
In the GUI…

PythonNut
- 10,243
- 2
- 29
- 75
5
votes
2 answers
Compile Emacs with xwidgets in Ubuntu 14.04
Going to build Emacs from the git repository.
Found this and this resources that suggest to compile it with xwidgets for Ubuntu 16.04.
On my Ubuntu 14.04, did install the corresponding dependencies with apt-get, but still getting this configure…

nephewtom
- 2,219
- 17
- 29
4
votes
2 answers
zs and ze from Vim?
I use evil-mode, but it doesn't support zs and ze shortcuts from Vim (scrolling horizontally to cursor position).
How can i map these keys to achieve the same behavior in Emacs?
Some explanation of what zs/ze do:
Let's assume i have a file with…

Kossak
- 1,159
- 1
- 9
- 18
4
votes
1 answer
Does Elisp replay on hash lookups every time code require access to symbol value?
I go across blog post: http://blog.cdleary.com/2010/09/picing-on-javascript-for-fun-and-profit/
It is about JS performance on accessing object properties and tricks that help reduce that time. Usual access require hash table lookup. Optimized…

gavenkoa
- 3,352
- 19
- 36
4
votes
2 answers
avoid emacs to lock down or crash when used for many tasks
I consider to start using emacs for IRC, SQL, Shell and maybe twitter and Feed reading. But than I wonder how power users of emacs deal with emacs being single threaded.
So if I have one long-running task, like updating melpa packages, I can not…

Thomas Koch
- 173
- 2
4
votes
1 answer
Why doesn't emacs store buffers internally as a tree (better random access, no line-number limitations)?
In section 11.18 of the GNU Emacs Manual, it's mentioned that buffers with a large number of lines line-number-display-limit or with particularly long lines line-number-display-limit-width might experience slow performance with line number…

Greg Nisbet
- 857
- 5
- 19
3
votes
0 answers
How can I list all function keys?
Seems that src/keyboard.c file contains C string arrays for (info "(elisp) Function Keys").
Is there a way to get that list in Elisp?
I discovered that such symbols have special properties:
(symbol-plist 'backspace)
==> (event-symbol-element-mask…

gavenkoa
- 3,352
- 19
- 36