Questions tagged [autoload]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
58 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 "...
0
votes
1answer
186 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-...
2
votes
0answers
33 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. ...
0
votes
1answer
177 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:...
0
votes
1answer
85 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 ...
19
votes
2answers
2k 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 ...
2
votes
1answer
66 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-...
1
vote
2answers
122 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 ...
1
vote
2answers
255 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 ...
1
vote
2answers
203 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 ...
1
vote
2answers
131 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 ...
1
vote
1answer
238 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) ...
9
votes
3answers
713 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 ...
4
votes
1answer
121 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 ...
2
votes
2answers
345 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 ((...
1
vote
2answers
51 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 ...
2
votes
2answers
76 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." (...
3
votes
2answers
204 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 ...
2
votes
1answer
69 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-...
0
votes
2answers
920 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 ...
5
votes
2answers
2k 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-...
0
votes
3answers
159 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 ...
2
votes
3answers
473 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-...
3
votes
1answer
60 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 ...
3
votes
1answer
1k 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" ...
3
votes
1answer
417 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 ...
0
votes
1answer
51 views

Dependent functions: eval or autoload?

I have a situation where I have a function that depends on other functions. So (defun a () (something)) and (defun b () (something-else)) are used by (defun c () (something-calling (a) (...
2
votes
0answers
153 views

How to autoload a custom group?

I put my custom js setting into zwb-js group in zwb-js.el, I want to use use-package to load it, it seems that zwb-js.el has been loaded, but the functions defined in zwb-js.el seems not be called ...
0
votes
1answer
1k views

How to load self package with use-package?

I use Prelude, and I want to use use-package for loading and configuring my personal config files. In ~/.emacs.d/personal/load-private-config.el, my code is below: (like https://github.com/jwiegley/...
0
votes
1answer
103 views

projectile-switch-project not working with autoload

When I attempt to autoload projectile like so (autoload 'projectile-global-mode "projectile" " t nil) And then open Emacs I cannot use projectile-switch-project (Symbol's function definition is void:...
0
votes
2answers
112 views

Ghost code in Emacs configuration, how to find it?

I use the package vimish-fold. The package contains, for example, two functions, called as: Function 1 Function 2 There is a new commit to the package vimish-fold on Github, which will add the new ...
2
votes
1answer
157 views

Why isn't magit-version available?

I have Git 2.5.3 installed and am using GNU Emacs 24.4.1 on Ubuntu. I just installed Magit from MELPA: (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (...
8
votes
1answer
425 views

Autoloads and variables

I understand what autoload does for functions (register file to load when such function is called or its documentation string is retrieved). However, it's not clear how to use autoload facility in ...
30
votes
3answers
2k views

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 ...