17 votes
Accepted

How can I improve startup time despite many packages?

One of the design choices in package.el was to try and make things "simple". Part of this is that package-initialize searches for all the packages that are installed, then tries to figure out which ...
Stefan's user avatar
  • 26.3k
11 votes
Accepted

Require a file in the current directory without setting load-path

Like John Kitchin pointed out, load-file does what you want. For example: (setq my-utils-file "utils.el") (load-file (expand-file-name my-utils-file (file-name-directory (...
Heikki's user avatar
  • 3,066
7 votes
Accepted

Obviate the need to specify every folder for a manual setup

(defvar my-packages-dir "~/.emacs.d/packages") (let ((default-directory my-packages-dir)) (normal-top-level-add-subdirs-to-load-path))
Fran Burstall's user avatar
6 votes

How can I improve startup time despite many packages?

The problem you describe about package-initialize taking so much time to load is a well known problem. It is also one of the problems that some emacs frameworks try to solve by loading the autoloads ...
UndeadKernel's user avatar
5 votes
Accepted

Does `load` prefer .elc files over .el files?

By default the .elc would be loaded rather than the .el, as noted in the other answers/comments. A few things can affect this behavior, however: Set load-prefer-newer to t if you want to load ...
glucas's user avatar
  • 20.6k
4 votes
Accepted

How to load libraries (Lisp files), wherever they are located

What you are looking for is (add-to-list 'load-path "~/Projects/modules-test") See docs: Lisp Libraries Library Search The best thing you can do is C-h v load-path RET and follow links in the *...
sds's user avatar
  • 6,104
3 votes
Accepted

Help me install the development version of org-mode from Github repo

I had a similar problem with my installation, but I'm using the command org-babel-load-file to load an org file as init file. What I believe it was causing the problem (might not be it) is that org ...
Dox's user avatar
  • 985
3 votes
Accepted

How to list a newly formed emacs minor-mode?

You are right in assuming that the location is wrong. Emacs does not know about your niranjan directory. You assume that ~/.emacs.d/elpa/ is a special location and that emacs automatically knows how ...
Heikki's user avatar
  • 3,066
3 votes
Accepted

How does Emacs see the generated autoloads files?

There is no magic with files of autoload declarations -- just like any other *.el file, Emacs knows nothing about the contents of an *-autoloads.el file unless that file is loaded; so in order to make ...
phils's user avatar
  • 50.4k
3 votes

How does Emacs see the generated autoloads files?

I am not sure how Emacs usually does this, but you should simply require the autoloads before calling (foo-hello), using (require 'foo-autoloads). Now instead of loading the full foo 'package' ...
dalanicolai's user avatar
  • 7,745
2 votes

Obviate the need to specify every folder for a manual setup

(defvar my-packages-directory "~/.emacs.d/packages") (dolist (package-directory (directory-files my-packages-directory :absolute)) (add-to-list 'load-path package-directory))
Phil Hudson's user avatar
  • 1,731
2 votes
Accepted

Warning: Lisp directory '~/.emacs.d/site-lisp': No such file or directory

Not sure whether it is an intended behavior - Emacs doesn't recognize ~ in EMACSLOADPATH, though require does recognize it. One workaround is to expand the pathname: export EMACSLOADPATH="$( ...
shynur's user avatar
  • 5,174
2 votes

Emacs doesn't search inside elpa directory while loading

Add the following line to your init.el file before you require the package (require 'bookmark+). (package-initialize)
husky's user avatar
  • 149
1 vote

Search path for lisp files

The answer depends on your build of Emacs. You can get this information by starting Emacs using the initialisation file you mentioned, and invoking C-h v load-path RET. The help window will display ...
Tristan Riehs's user avatar
1 vote
Accepted

test `normal-top-level-add-subdirs-to-load-path` in “subdirs.el”

They wrote a Bash code in Makefile.in to generate subdirs.el automatically: write_subdir=if [ -f "$${subdir}/subdirs.el" ]; \ then true; \ else \ umask 022; \ ...
shynur's user avatar
  • 5,174
1 vote

How does Emacs see the generated autoloads files?

In your "foo-autoloads.el" generated by make-directory-autoloads, you will see the line: (autoload 'foo-hello "foo" nil nil nil) Why not just write this one line directly to init....
roomworoof's user avatar
1 vote
Accepted

Is there a way to convince Emacs 29 to use the initial directory to save setup information?

Just set up your load-path conditionally, in your init file. Have it use different directories for different Emacs versions. Just test emacs-version or any of the other variables provided for this -- ...
Drew's user avatar
  • 77k
1 vote
Accepted

How do I permanently change my emacs load-path?

Evaluating lisp expressions in the minibuffer (or in the scratch buffer, or with C-x C-e in an emacs-lisp buffer, or loading lisp libraries by hand with M-x load-file or ....) only affects the current ...
NickD's user avatar
  • 29.2k
1 vote
Accepted

How to identify the file of an already loaded feature, independently on how the file was loaded?

Global variable load-history records the files you've loaded (no matter how), and the definitions they contain. Assuming you know the file name of the file that provides the feature, you can use this, ...
Drew's user avatar
  • 77k
1 vote

Unusual Emacs Error scss-mode runs into 'duplicate source' error when compiling scss file

I've never used sass-dart, but this looks like an error having to do with filenames and paths on Windows. You're configuring it to run a command that looks file sass file1.scss file2.scss, but with ...
db48x's user avatar
  • 17.6k
1 vote
Accepted

Can't enable a file in Version Control RCS in Emacs 26

the error message Searching for program: No such file or directory, rcs, This means Emacs can't find the executable called rcs. You need to install it through your OS package manager, or build it ...
npostavs's user avatar
  • 9,153
1 vote
Accepted

`load-path`, `exec-path`

exec-path is where subprocesses find executable files. so your emacs should be able to find the executable. However, require is looking not for the executable, but for hindent.el (or the coresponding ...
NickD's user avatar
  • 29.2k
1 vote

Missing function in CEDET?

The cedet-gnu-global-version-check is defined within the cedet-global.el file, adding the (require 'cedet-global) statement solved my issue.
Daniele's user avatar
  • 657
1 vote

Flycheck variable warnings despite flycheck load-path

The solution to this issue was not in the flycheck load path. Instead, the variable warnings were showing up because the contents of the (require 'my-dcls) were not providing declarations that the ...
Kevin's user avatar
  • 1,318
1 vote
Accepted

Spacemacs - move org-mode customization to separate file

AFAIK, there is no 'proper' way of doing this. What I use in such cases is not load but require. Every private layer that has such configurations files (features / packages) has a folder named extra. ...
d12frosted's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible