Questions tagged [libraries]
29 questions
33
votes
3 answers
When should I use autoload instead of require?
From what I understand require is used to load large chunks of code (something like modules) although it can also load individual functions.
Autoload on the other side, only registers functions and defers the loading to execution time.
I've recently…

caisah
- 4,056
- 1
- 23
- 43
26
votes
1 answer
What does (require 'package) mean for emacs and how does it differ from load-file?
I just began using emacs a few days ago and I read somewhere that (require 'package-name) is not needed when the said package is installed using package-install. But why, what does (require 'package-name) actually do and how does it differ from…

Chakravarthy Raghunandan
- 3,132
- 2
- 18
- 42
16
votes
3 answers
Easiest way to install Emacs Windows support libraries
I installed binaries of Emacs 24.4 for Windows and want to install the support libraries described in the Emacs for Windows README. The latest precompiled libraries are available from the ezwinports project, but installing them is a little…

Michael Hoffman
- 665
- 6
- 14
13
votes
1 answer
Unload a whole package or library tree
Sometimes I want to call unload-feature to unload a library… and it a library depends on it… and another library depends on that library…
How can I unload a library and all the libraries that depends on it, without walking through the dependency…

Gilles 'SO- stop being evil'
- 21,702
- 4
- 53
- 89
9
votes
1 answer
Are there any libraries for input fields in Emacs?
Quite a few Emacs modes use (something like) forms: the customization interface is one of them, the Message mode (read: its header part) is another one; there are more of them, unfortunately not always very similar. By a "form" I mean here a buffer…

mbork
- 1,647
- 1
- 13
- 23
7
votes
2 answers
How to use autoload?
I am trying to figure out how to add autoload features to a private library. Let's say I have developed a private Lisp library "my-lib.el". It consist of a set of functions, some can be used from any mode, others are only used for a particular mode.…

Håkon Hægland
- 3,608
- 1
- 20
- 51
7
votes
3 answers
where are emacs lisp files?
I'm trying to add line numbers to emacs, following this guide: Linum: Separating line numbers from text.
I have to edit "linum.el" to add some code, however I can't find that file.
I'm using ubuntu, I have tried using:
find */* linum.el
but I'm…

user5133
- 73
- 3
7
votes
0 answers
Are there any Emacs libraries for encoding protocol buffers?
I've found a mode for editing protocol buffer definitions but I'm looking for a library to serialise and de-serialise the wire protocol itself.

stsquad
- 4,626
- 28
- 45
5
votes
2 answers
What templates are available for generating an elisp library?
At some point I remember encountering a command that generated a skeleton of a properly formatted emacs-lisp library as below:
;;; library.el --- summary
;; Copyright ...
;; Author:
;; Keywords:
;; License
;;; Commentary:
;;
;;;…

dgtized
- 4,169
- 20
- 41
4
votes
2 answers
Does autoload load all functions in the file or just the one specified?
I have developed some private extensions to some major modes, and I would like to load those extensions only when the given major mode is actually used by the user. The extensions consists of a set of functions confined to a single file. For…

Håkon Hægland
- 3,608
- 1
- 20
- 51
4
votes
2 answers
How to re-load a package?
The situation I have is this. First, I run
(require 'prolog)
...which loads the system's default version of prolog.el, and makes the variable prolog-mode-version available. It has value "1.22".
Now, I know that my personal copy of this package,…

kjo
- 3,145
- 14
- 42
3
votes
1 answer
How can I install eww or shr in Emacs 23?
I am beginner using Emacs 23.4, and I wanted to try a web browser package. From Emacs wiki, I found eww. But when Emacs starts I get from *Warnings*:
File error: Cannot open load file, shr
I get the same thing when I do M-x load-library RET…

Nicolas P
- 53
- 3
2
votes
2 answers
How to use function update-file-autoloads and and variable generated-autoload-file?
Let's say I have Emacs Lisp library ~/emacs/my-lib.el with contents:
;;;###autoload
(defun my-func()
"hello"
(interactive)
(message "Hello"))
(provide 'my-lib)
I would now like to produce a file ~/emacs/my-lib-autoload.el with autoload…

Håkon Hægland
- 3,608
- 1
- 20
- 51
2
votes
1 answer
Ubuntu 27.1 install needs X libraries
Getting this on running ./configure on Ubuntu 20.04 for the new 27.1 install
...
checking for X... no
checking for X... true
configure: error: You seem to be running X, but no X development libraries
were found. You should install the relevant…

147pm
- 2,907
- 1
- 18
- 39
1
vote
0 answers
does this routine exist? until (while until true)
I found myself needing this control loop and was very surprised not to find it in the standard library. Does it exist by some other name?
(defmacro until (form &optional guard)
"Runs `while' on FORM until it is non-nil, returning the value.
A…

fommil
- 1,750
- 11
- 24