Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [autoload]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
24 views

disappearing function

I've got a standard function that seems to disappear on launch. After about a half an hour to an hour of use the function becomes available again. (avy-org-refile-as-child) The function appears to be ...
cochrane12's user avatar
1 vote
1 answer
34 views

dynamic scoping rules work differently after redefining an autoloaded function without changing its code

Evaluate the following code: (package-initialize) (unless package-archive-contents (package-refresh-contents)) (package-install-selected-packages) (org-babel-do-load-languages 'org-babel-load-...
user615536's user avatar
0 votes
1 answer
64 views

Celestial Mode Line throwing Error loading "celestial-mode-line" autoloads: (void-variable lunar-phases)

On startup am seeing this error and then the package is loading and working showing in modeline. Warning (emacs): Error loading "celestial-mode-line" autoloads: (void-variable lunar-phases) ...
Talespin's user avatar
  • 109
0 votes
1 answer
69 views

Completely, fully utilize/require a "package" from a local Git repository without any package managers, byte-compilation, autoloads, lazy-loading, etc

Problem After executing the following block of "minimal reproducible example" code, helm-mode is not defined thus leading to an error. I have run into these kinds of errors before when ...
David's user avatar
  • 126
0 votes
0 answers
133 views

massive memory leaks

I have a problem with memory leaks. Normally, I have only a few small org mode files loaded, and maybe a few odd yaml or Python files, less than 20 altogether). Over time, emacs keeps eating memory ...
user29402's user avatar
1 vote
1 answer
87 views

Make the linter aware of autoloads for init files using package-quickstart

If I try to call an autoloaded function inside my init.el file, it will get executed normally. However, the byte compiler will give me warnings about undeclared functions. This applies for all user-...
cidra's user avatar
  • 139
0 votes
1 answer
85 views

Use of ;;;###autoload

I have seen the use of ;;;###autoload when defining minor modes. Why do some modes define foo-enable and foo-disable, and could be the purpose of ;;;###autoload before all of them ? ;;;###autoload (...
Dilna's user avatar
  • 1
1 vote
4 answers
293 views

How does Emacs see the generated autoloads files?

I have some of my own Elisp code in my own directory. Like I have a file /tmp/foo/foo.el with this in it: ;;; foo.el -- Foo ;;;###autoload (defun foo-hello () (message "hello, world")) (...
Lone Learner's user avatar
1 vote
0 answers
340 views

How to change this Paredit configuration on the init file from the classic imperative installation to a declarative approach via use-package?

When I first installed Paredit, I used to install things via the classic M-x and package-install. Then, I inserted the following configuration: (autoload 'enable-paredit-mode "paredit" "...
Pedro Delfino's user avatar
1 vote
0 answers
57 views

How to list auto-loaded packages?

Some packages are auto-loaded, others need be be explicitly loaded with require. How can I programmatically generate a list of packages that emacs auto-loads? (I'd assume this list would include subr &...
ideasman42's user avatar
  • 8,826
2 votes
1 answer
136 views

How to make defcustoms available before their file has been loaded?

I maintain an Elisp package that is split over many files, and each of the files has its own group of defcustoms in it, as a subgroup of the main package name. I am unsure of how to make these ...
martian's user avatar
  • 548
1 vote
1 answer
37 views

defcustom not appearing in Customize UI

I have a problem that variables defined with defcustom in elisp files under ~/.elisp do not appear in the Customize UI. In particular, I use word-count-mode from https://github.com/tomaszskutnik/word-...
Supernormal's user avatar
2 votes
2 answers
57 views

How to programatically detect if a unbound symbol is part of an autoloaded file and what file that is?

Given a variable or a function symbol not currently bound, what would be the variable that holds the auto-loading association I could use to search for the symbol and find out what file would get ...
PRouleau's user avatar
  • 796
1 vote
1 answer
141 views

How start Emacs only with specific packages?

Linux Mint 20, Emacs 27.1 In my init.el file I loaded many packages. But sometime I need to load only some specific packages. E.g. emacs -Q and only vertico+marginalia+theme The question is: How I ...
a_subscriber's user avatar
  • 4,124
2 votes
3 answers
436 views

Who or what decides what gets put into `loaddefs.el`?

For context, I'm writing an extension. I need to check if a particular symbol is an autoload symbol, such that autoloadp = t. After doing some digging I found that the defined autoloads in loaddefs.el ...
John DeBord's user avatar
2 votes
1 answer
63 views

For convenience, how should I load a package whenever a specific other package loads?

I have a package that enhances the functionality of another package. To save the user the effort of any additional configurating, I would like my package to load automatically if the larger package ...
mavit's user avatar
  • 211
0 votes
1 answer
85 views

Add autoloading use-package keywords to a fork of general.el

I have forked general.el to add a few autoloaded keywords of my own, by using the :general keyword use-package functions as a template. However, this bit of code, originally used for :general, is not ...
ShadowRylander's user avatar
2 votes
1 answer
140 views

How to autoload a non-elpa package such as help-fns+.el?

I read from some posts (require vs. package-initialize?, and here) that Emacs can autoload packages installed via ELPA/MELPA, which avoids using require on packages and speeds up loading during ...
tinlyx's user avatar
  • 1,360
2 votes
1 answer
662 views

How to use package-generate-autoloads

I am teaching myself autoloads for "home-made" packages. Official Docs suggest to use update-file-autoloads or update-directory-autoloads on the related package file or directory, which ...
antonio's user avatar
  • 1,822
2 votes
0 answers
114 views

Package autoloading and use-package

I'm a beginner on emacs and I don't understand packages autoloading and use-package. I see a lot of configs online which use 'use-package' and recommends installing packages with package manager (...
Rom's user avatar
  • 21
0 votes
1 answer
96 views

Autoloaded variable overrides the one from the init file

I added the following line to my init file to replace ruby-mode with enh-ruby-mode: (setq auto-mode-alist (mapcar (lambda (x) (if (eq (cdr x) 'ruby-mode) (cons (car ...
x-yuri's user avatar
  • 291
1 vote
1 answer
58 views

How to postpone loading a file until it's function is called?

Say I have foobar_utility.el that defines an interactive function foobar_utility. How can I postpone loading foobar_utility.el until foobar_utility is called? Example usage: (load (concat user-...
ideasman42's user avatar
  • 8,826
3 votes
2 answers
197 views

Why is cl-loop autoloaded on byte-compilation?

This question is motivated by a question about the "void function" error on cl-loop in the init file. The following test shows that (require 'cl-lib) is not needed for byte-compilation: Assume ...
Tobias's user avatar
  • 33.2k
1 vote
1 answer
244 views

use-package: autoload function outside the main package file

I am trying to install simplenote2 to read my org files on my phone. The official setup method is: (require 'simplenote2) (setq simplenote2-email "[email protected]") (setq simplenote2-password "...
antonio's user avatar
  • 1,822
0 votes
1 answer
417 views

Cannot open load file: Not a directory, notmuch [closed]

Does anyone see what's wrong in my attempt to run notmuch in emacs? My attempt to run notmuch helm-M-x notmuch: Cannot open load file: Not a directory, notmuch My .spacemacs (autoload 'notmuch "...
jjk's user avatar
  • 744
2 votes
1 answer
2k views

`use-package` errors with "failed to define function" message when loading a local copy of a package

I'm trying to modify the package ediprolog, which was installed and working before, with use-package, from ELPA. I copied the file from the elpa folder to a folder called ediprolog.el and used: (use-...
someonewithpc's user avatar
2 votes
0 answers
44 views

Redfining autoloaded function

I discovered that auctex's texmathp-match-switch does not check whether or not dollar signs are commented out or not, therefore i get wrong results when i all M-x `texmathp' in very specific contexts. ...
Lupino's user avatar
  • 121
0 votes
1 answer
564 views

autoload-do-load: Wrong type argument: consp, nil

I've encountered a problem after upgrading Emacs Speaks Statistics (ESS) from MELPA today to ess-20180926.54. When I try to start an R session under Emacs with M-x R I'm informed... autoload-do-load:...
slackline's user avatar
  • 345
0 votes
1 answer
205 views

Confusing defcustom usage in info.el

I was trying to read the info.el code when I ran across this strange use of defcustom: ;; This is a defcustom largely so that we can get the benefit ;; of custom-initialize-delay. Perhaps it would ...
147pm's user avatar
  • 2,969
22 votes
2 answers
5k views

How can I improve startup time despite many packages?

TL;DR I have such a huge amount of packages that it's hurting my startup time. If you don't believe that could be the case, read on. My Emacs startup time is quite small. I don't use use-package, I ...
GDP2's user avatar
  • 1,350
3 votes
1 answer
201 views

How should I test that autoloads work properly with package.el?

I've added some autoloads to PACKAGE with the ;;;###autoload cookie and I've run M-x update-directory-autoloads which generated PACKAGE-autoloads.el. I have the following form in my init: (package-...
Sean Allred's user avatar
  • 6,941
1 vote
2 answers
450 views

Adding advice to an autoloaded function

I want to add advice to an alias to a function in an internal elisp package at work, gating the logic on a variable. Both the function and the alias is marked autoload. Conceptually: ;;;###autoload ...
Realraptor's user avatar
  • 1,293
1 vote
2 answers
622 views

Can't build org autoloads -- Cannot open load file: cl-lib

Because of ongoing difficulties with configuring org-mode, I am trying to run org-mode using the development source code repo rather than through the emacs package. I tried the simplest thing I could ...
Lyn Headley's user avatar
1 vote
2 answers
454 views

autoload of general.el not working in spacemacs?

I have this in my personal spacemacs layer's packages.el: (setq mylayer-packages '(general (mylayer :location local) evil-org )) Then later in the same file: (defun ...
Croad Langshan's user avatar
1 vote
2 answers
345 views

Is it possible to lazy-load language mode packages?

Most of the packages I currently use are major modes for various languages that are only included in the off-chance I load a file of that type. Is there a way to postpone loading them at startup in ...
ideasman42's user avatar
  • 8,826
1 vote
1 answer
602 views

How to autoload a package without requiring in the init file?

When you install clojure-mode via package-install, you can then open any .clj file and automatically enter the mode. And this works for every subsequent Emacs launch ; Yet, no (require 'clojure-mode) ...
yPhil's user avatar
  • 983
11 votes
3 answers
3k views

How to generate and activate autoloads for local packages?

It is clear that not all local/custom/personal packages should be officially released, and it would be silly to do so just to benefit from built-in package management support. I'm wondering how to ...
Alexander Shukaev's user avatar
4 votes
1 answer
248 views

Autoloading defcustoms: good practice or not?

In my init file, I often find myself trying to set a customizable variable before the file (usually a mode of some sort) is loaded. This, of course, results in an error. While this problem could be ...
Tianxiang Xiong's user avatar
2 votes
2 answers
944 views

Use-package doesn't find autoload

I expect the package to be require'd as soon as mdi-insert is called but I get: Error (use-package): spaceline :config: Symbol’s function definition is void: mdi-insert ~/.emacs.d/init.el (let ((...
Mathieu Marques's user avatar
1 vote
2 answers
103 views

cl-lib isn't loaded the first time an autoloaded function is used from it

I'm trying to use cl-lib early in my init.el. The function I'm using (cl-some) is autoloaded, so I expect that don't need an explicit require, yet I get a void-function error if I don't explicitly ...
jpkotta's user avatar
  • 508
2 votes
2 answers
121 views

Autoloads for "generated" functions?

I have a file that I want to turn into a (local) package containing (inter alia) the code: (defun tl-sort-regexp-fields (reverse record-regexp key-regexp beg end) "Extended sort function." (...
Tim Landscheidt's user avatar
5 votes
3 answers
424 views

How to know which function triggered an autoload of a library

How can I monitor when Emacs loads a library because of an autoloaded function, and also know the name of that function? EXAMPLE:  I type M-x eval-buffer in a buffer where one of the functions uses ...
lawlist's user avatar
  • 19.2k
2 votes
2 answers
88 views

How to load personal prolog.el only if system's one is outdated?

I need to use a version of prolog.el not older than 1.25, so I defined the function maybe-reload-prolog-el: (defun maybe-reload-prolog-el () (when (version< prolog-mode-version "1.25") (add-...
kjo's user avatar
  • 3,247
1 vote
2 answers
2k views

How to stop a minor mode from auto-loading in Spacemacs?

The smartparens minor mode is quite annoying to me, so I want to have it disabled on default. However, I don't want to uninstall it, in case I need it someday. Can I disable a minor mode without ...
nalzok's user avatar
  • 675
6 votes
2 answers
4k views

How to lazy load init files to speedup Emacs startup?

My ~/.emacs.d/init.el file looks like this: (package-initialize) (require 'init-my-emacs-settings) (require 'init-my-emacs-performance) (require 'init-my-emacs-font) (require 'init-my-emacs-color-...
stardiviner's user avatar
  • 1,938
0 votes
3 answers
236 views

lazily activate an ELPA package?

I'd like a way to lazily activate certain ~/.emacs.d/elpa packages. I notice some of them have so many autoloads (which require other packages recursively from their *-autoloads.el), that you might as ...
unhammer's user avatar
  • 1,159
4 votes
3 answers
1k views

loading tramp overrides tramp-remote-path customization back to default value

I have customized tramp-remote-path in my .emacs.d/init.el with (custom-set-variables '(tramp-remote-path (quote (tramp-own-remote-path)))) but when tramp is loaded the value of tramp-...
Daniel Mahler's user avatar
3 votes
1 answer
79 views

are there conflicts between use-package and a package's autoloads?

Do I have to worry about a package's built-in autoloads somehow conflicting with those implicitly defined by use-package? For example if I do :commands some-cmd but the package already had an autoload ...
Jorge Israel Peña's user avatar
4 votes
1 answer
2k views

use-package :defer t and add-hook

If I have something like: (use-package X :defer t (add-hook 'some-mode 'package-x-function)) Will that work as expected given that I set :defer t and the package doesn't have any "built-in" ...
Jorge Israel Peña's user avatar
6 votes
1 answer
1k views

use-package :defer t and autoloads

My understanding is if that I use any of :commands, :bind, :bind*, :bind-keymap, :bind-keymap*, :mode, or :interpreter, then it will create a corresponding autoload and defer loading of the package ...
Jorge Israel Peña's user avatar