Commit Graph

231 Commits

Author SHA1 Message Date
Henrik Lissner
0425724571
Major rewrite of doom module API
+ Fix #446, where the .local/packages.el cache was generated with
  a faulty load-path.
+ Entries in the doom-modules hash table are now plists, containing
  :flags and :path, at least.
+ Add doom-initialize-modules for loading module config.el files.
+ Add doom-module-get for accessing this plist, e.g.

    (doom-module-get :some module)         ; returns plist
    (doom-module-get :some module :flags)  ; return specific property

+ Replace doom-module-enable with doom-module-set, e.g.

    (doom-module-set :some module :flags '(+a +b +c))

+ Remove doom-module-flags (use doom-module-get instead)
+ Rename doom-module-enabled-p with doom-module-p
+ Replace doom-module-path with doom-module-find-path and
  doom-module-expand-file. The former will search for an existing module
  or file in doom-modules-dirs. The latter will expand the path from
  whatever path is stored in doom-modules.
+ Replace doom-module-paths with doom-module-load-path
+ Changed doom! to allow for nested doom! calls by delaying the loading
  of module config.el files until as late as possible.
+ Refactor doom-initialize-packages to only ihitialize package state
  (i.e. doom-packages, package-alist, and quelpa-cache), rather than its
  previous behavior of loading all Doom files (and sometimes all module
  files). This is faster and more predictable.
2018-03-02 19:14:45 -05:00
Henrik Lissner
0b2548f7b1
Fix module load order (delay config.el load) #441 2018-02-28 17:57:30 -05:00
Henrik Lissner
606b4695cc
Add NOSUFFIX flag to (load custom-file) 2018-02-28 17:57:30 -05:00
Henrik Lissner
c2fd538261
Refactor doom startup benchmark 2018-02-28 17:57:29 -05:00
Henrik Lissner
047ed6c9ea
Rethink doom-initialize & use package-initalize
Doom saves a lot of startup time by avoiding package-initialize, because
it loads every packages' autoloads file, which is expensive.
Unfortunately, these autoloads files are necessary for some plugins with
abnormal file structures (such as ESS). Previously, I was content with
loading them myself, but these occurrences have become more frequent, so
it would be safest if I relied on package-initialize more.

So doom-initialize will now do so. However, it will cache the load-path
(and Info-directory-list, fixing the lost info buffers) on first run.
This makes byte-compiling Doom almost useless, but it makes startup just
as fast as Doom would be if you had.

This needs more testing.
2018-02-28 17:57:29 -05:00
Henrik Lissner
7707aec28a
Remove doom group
Not really useful, and Doom doesn't encourage using the Emacs Customize
interface.
2018-02-18 03:04:58 -05:00
Henrik Lissner
b05ccbb98e
Move some UI vars from core.el to core-ui.el 2018-02-18 02:59:11 -05:00
Henrik Lissner
bae226b94f
Refactor to revolve module tree roots around doom! calls
Any module can now use a doom! call to declare a module tree root.

This means that if you have a doom! block in
~/.emacs.d/modules/lang/org/init.el, then you can have submodules in
~/.emacs.d/modules/lang/org/modules/MODULE/SUBMODULE if you wanted to
for some reason.

This is only really truly useful for private modules. A doom! block in
~/.doom.d/init.el will recognize and enable modules in
~/.doom.d/modules/.
2018-02-16 05:07:46 -05:00
Henrik Lissner
d2436650a3
Move server+benchmark code into doom|finalize 2018-02-16 02:11:41 -05:00
Henrik Lissner
2b1c323dbf
💥 Redesign private sub-module system
~/.doom.d/modules is now a full module tree, like ~/.emacs.d/modules.
Symlinks are no longer involved.

Private modules can now shadow Doom modules. e.g.
~/.doom.d/modules/lang/org will take precendence over
~/.emacs.d/modules/lang/org.

Also, made doom--*-load-path variables public (e.g. doom--site-load-path
=> doom-site-load-path), and rearranged the load-path for a 10-15%
startup boost.
2018-02-16 02:11:10 -05:00
Henrik Lissner
324a644002
Refactor; compilation-scroll-output=first-error; ffap-machine-p-known=reject 2018-02-01 19:58:44 -05:00
Henrik Lissner
735d129f92
Truly prevent unstyled mode-line flash at startup 2018-01-29 17:06:20 -05:00
Henrik Lissner
25619908a2
Narrow down the purpose of init & post-init hooks
Essential hooks should be added to doom-init-hook. Non-essential and
extra hooks should be added to doom-psot-init-hook.
2018-01-07 00:15:58 -05:00
Henrik Lissner
31a4244686
Rethink what Doom loads at startup and manually
Better to simply load what we need, when we need it, rather than set up
autoloads for every litte thing.
2018-01-07 00:15:57 -05:00
Henrik Lissner
91357a3e5d
💥 Replace core-popup with new feature/popup module
This is a breaking change! Update your :popup settings. Old ones will
throw errors!

Doom's new popup management system casts off its shackles (hur hur) and
replaces them with the monster that is `display-buffer-alist`, and
window parameters.

However, this is highly experimental! Expect edge cases.  Particularly
with org-mode and magit (or anything that does its own window
management).

Relevant to #261, #263, #325
2018-01-06 02:17:43 -05:00
Henrik Lissner
df37f987fb
Delete autoloads file on error + simpler error code
This should prevent getting locked out of Doom due to a little errant
code sneaking into your autoloads file.
2018-01-04 22:01:43 -05:00
Henrik Lissner
b3b31e4bd4
Display *Warnings* buffer in main workspace after startup #319
The creation of the main workspace would swallow the Warnings buffer, so
we forcibly display it (if it exists) on startup.
2018-01-04 16:58:21 -05:00
Henrik Lissner
9f884bf998
Move delayed-warnings deferral to core.el
Possibly addresses #319
2018-01-03 12:54:30 -05:00
Henrik Lissner
2c7c9c6d94
v2.0.9 bump 2018-01-01 21:20:49 -05:00
Henrik Lissner
fcadde3ef9
core: refactor & comment 2017-12-28 19:16:22 -05:00
Henrik Lissner
8b1f8acc0d
Rearrange core config, epa & authinfo bits (fix after! error) 2017-12-27 22:48:05 -05:00
Henrik Lissner
13111ff5c4
Set epa-{file-encrypt-to,pinentry-mode}; no authinfo for sudo via tramp 2017-12-27 20:48:06 -05:00
Henrik Lissner
a2a5910126
Revise docstring for doom-{etc,cache}-dir 2017-12-23 14:30:17 -05:00
Henrik Lissner
02c14f560d
Refactor bootstrap process + add doom-initialize-load-path 2017-12-22 16:26:05 -05:00
Henrik Lissner
a2ab903003
Only reset gc-cons-threshold during user startup 2017-12-22 15:19:23 -05:00
Henrik Lissner
6343e8ad85
(BREAKING) Don't host-namespace local files
Local cache and data files were stored in a parent folder named after
your host, because I'd symlink the same config across computers via
dropbox. This would cause byte-compile issues in packages, so I stopped
doing this.

Now that each computer gets its own clone, host-namespaced local
directories are unnecessary. There's no other benefit to having them.
2017-12-22 14:48:13 -05:00
Henrik Lissner
1f5de79a57
v2.0.8 bump 2017-12-17 00:03:45 -05:00
Henrik Lissner
9d3155892a
Rethink how Doom loads core & std libs 2017-12-09 14:41:22 -05:00
Henrik Lissner
2190d29960
Enable load-prefer-newer sooner in noninterative/debug sessions 2017-12-03 20:04:00 -05:00
Henrik Lissner
e17357d7df
v2.0.7 bump 2017-11-08 22:56:05 +01:00
Henrik Lissner
c45e2c4918
General & minor refactor+cleanup 2017-11-05 19:54:44 +01:00
Henrik Lissner
95a5b46dc5
New // naming convention + refactor doom management functions 2017-11-05 19:54:43 +01:00
Henrik Lissner
60d6335acb
Set mc/list-file to doom-etc-dir 2017-11-02 14:17:15 +01:00
Henrik Lissner
9a7bd0263f
v2.0.6 bump 2017-10-06 02:37:24 +02:00
Henrik Lissner
a4ddb1bc9b
General minor refactor + cleanup 2017-09-28 18:19:15 +02:00
Henrik Lissner
0e7d81a41c
Add two naming conventions for hydras & app commands 2017-09-24 17:10:47 +02:00
Henrik Lissner
71bda74fdc
Prepare for v2.0.5 2017-09-03 23:31:45 +02:00
Henrik Lissner
6e8726a624
Simplify core loading process (part 2) 2017-08-08 16:31:48 +02:00
Henrik Lissner
65748c5809
Simplify core loading process 2017-08-08 14:25:36 +02:00
Henrik Lissner
6f5b853cc2
Silent init hooks if noninteractive 2017-07-27 00:01:55 +02:00
Henrik Lissner
233134a6da
Refactor doom init 2017-07-14 18:19:52 +02:00
Henrik Lissner
4454226a42
v2.0.4 bump + update README 2017-07-14 15:27:36 +02:00
Henrik Lissner
f93fb61f33
Refactor core.el
+ Load Doom core in doom! macro
+ Move automatic minor modes to core-editor
+ Move doom*set-indirect-buffer-filename to core-editor
2017-07-13 00:05:30 +02:00
Henrik Lissner
27b344b64a
Rename doom/clean-cache => doom/reset (+ make reset) 2017-07-09 22:51:36 +02:00
Henrik Lissner
ac70606452
Set buffer-file-name for indirect buffers #130 2017-07-05 18:19:53 +02:00
Henrik Lissner
f8dde296ca
Refactor core.el
+ Always reset gc-cons-* vars on doom|finalize
+ display-warning => lwarn
2017-06-28 12:26:50 +02:00
Henrik Lissner
e75bc10baa Unset mode-line-format sooner in startup process 2017-06-24 02:25:15 +02:00
Henrik Lissner
816df321a5
General refactor & cleanup 2017-06-14 21:15:19 +02:00
Henrik Lissner
732dee608a
Stability/error-handling refactor (part 1)
This refactor is about improving how Emacs deals with errors.

A large net is now cast at startup to catch possible errors, produce
more helpful error messages, and localize the damage. Significantly
reducing the risk of later modules not loading (and leaving you
stranded in a half-broken Emacs session).

The DOOM core files are an exception. If something messes up in there,
it *should* choke.

+ use-package will now report missing packages or slow-loading/broken
  def-package! configurations.
+ Persp-mode no longer (inadvertantly) hides buffers that pop up at
  startup, like the *Warnings*, *Backtrace* or debugger buffers.
+ `make autoloads` (or doom/reload-autoloads) now produces a slightly
  more informative error message if an error occurs while building the
  autoloads file.
+ Error handling for package management is *slightly* better now; error
  messages now include the type of error; this needs work.
2017-06-14 21:15:19 +02:00
Henrik Lissner
3031212a76
If an init-hook dies in the forest, does it make a sound? 2017-06-12 15:15:39 +02:00