Commit graph

526 commits

Author SHA1 Message Date
Henrik Lissner
4dab595ad3
Minor refactors & comment revision 2020-11-20 14:10:29 -05:00
Han Mertens
a56f58d4ab Prevent native compilation for emacs-jupyter
Something in jupyter-channel.el does not get compiled correctly and
raises void-variable jupyter-channel errors.
2020-11-17 20:48:34 +01:00
Andrew Whatson
e9394c7c06 Add with-editor.el to the compilation black-list 2020-11-16 14:52:41 +10:00
Henrik Lissner
9ce9c6838e
Add emacs version to autoloads file path
Prevents stale byte-code across Emacs versions.

Relevant to #4172
2020-10-29 01:42:04 -04:00
Henrik Lissner
9e1ac0c0be
Reduce active message-log-max; scale in debug mode
8kb of log isn't really necessary. We'll scale it up when debug mode is
on, instead.
2020-10-26 05:51:12 -04:00
Henrik Lissner
f92f4aab97
Fix file-handlers for daemon sessions 2020-10-21 11:18:47 -04:00
Henrik Lissner
b461f76b0d
Fix *-local-vars-hook & doom-first-*-hook not triggering
When starting Emacs with a file path argument these hooks aren't set up
in time for the file to be processed.

Fixes #3891, #4082, #4104
2020-10-16 23:08:56 -04:00
Henrik Lissner
35185b2175
Split doom-reload-hook into before/after hooks 2020-10-16 22:28:08 -04:00
Henrik Lissner
3f24fc3737
regexp-quote comp blacklist entries 2020-10-11 16:41:05 -04:00
Andrew Whatson
2e07a85590 Native-compile everything on load-path
Add an extra pass to `doom build` to queue native compilation of all
packages on `load-path`. This ensures that all core and site Elisp
packages are actually native-compiled, even on "fast boot" builds.

Add `.local/autolads.el` to the blacklist as native-compiling this file
succeeds, but prevents emacs from starting up.

Revise the evil-collection-vterm blacklist entry to use a more efficient
regex.

Fix a bug where an updated .error file wasn't always written, causing
spurious rebuilds.
2020-10-09 09:34:34 +10:00
Andrew Whatson
1d0f1575aa Remove comp-eln-load-path injection hack
This was fixed upstream, so comp-eln-load-path is now passed to async
compilation workers.
2020-10-09 09:34:34 +10:00
Henrik Lissner
29b12de83e
Fix #3901: unset comp-deferred-compilation later 2020-10-06 02:08:17 -04:00
Henrik Lissner
8f64a0eb31
Fix #3871: void-function doom-autoload-error
Due to calling an error as if it were a function.
2020-08-31 00:01:34 -04:00
Henrik Lissner
a986621a5f
Revert 70148bb
Fixes #3829
Relevant to #3691
2020-08-25 01:57:00 -04:00
Henrik Lissner
e632871a11
core-cli: backport more refactors from rewrite
Still a long way to go, but this introduces a few niceties for
debugging CLI failures:

+ The (extended) output of the last bin/doom command is now logged to
  ~/.emacs.d/.local/doom.log
+ If an error occurs, short backtraces are displayed whether or not you
  have debug mode on. The full backtrace is written to
  ~/.emacs.d/.local/doom.error.log.
+ bin/doom now aborts with a warning if:
  - The script itself or its parent directory is a symlink. It's fine if
    ~/.emacs.d is symlinked though.
  - Running bin/doom as root when your DOOMDIR isn't in /root/.
  - If you're sporting Emacs 26.1 (now handled in the elisp side rather
    than the /bin/sh shebang preamble).
+ If a 'doom sync' was aborted prematurely, you'll be warned that Doom
  was left in an inconsistent state and that you must run `doom sync`
  again.

May address #3746
2020-08-24 23:00:32 -04:00
Henrik Lissner
70148bbfc8
Inhibit local-vars hooks when reverting
Possibly addresses #3691
2020-08-21 00:03:01 -04:00
Henrik Lissner
995b45285c
core: revise & clarify comments 2020-08-20 03:35:29 -04:00
Henrik Lissner
c74f8170b6
Remove mac-specific packages from core
Now that they're in :os macos
2020-08-20 03:33:35 -04:00
Henrik Lissner
dddfd9a7b1
Fix #3787: only inhibit some hooks for org-src ops
Inhibiting all MAJOR-MODE-hook functions (to fix #3660) would mean
inhibiting some useful functionality, like indentation or syntax
highlighting modes. We only want to inhibit expensive hooks. Since Doom
adds these to MAJOR-MODE-local-vars-hook by convention, we can
selectively inhibit those instead.
2020-08-20 02:30:06 -04:00
Henrik Lissner
394a18096e
Disable comp-deferred-compilation in early-init.el 2020-08-18 20:32:34 -04:00
Henrik Lissner
58af4aef56
Fix #3772 (again): void-variable comp-eln-load-path 2020-08-18 02:51:53 -04:00
Henrik Lissner
3d622101cb
Fix #3772: void-variable doom-reloading-p
This wasn't necessary in the first place. doom/reload doesn't re-read
Doom's core.
2020-08-18 02:44:03 -04:00
Henrik Lissner
ed25ab76f9
Respect comp-eln-load-path in comp async process
Thanks to @SwiftLawnGnome in hlissner/doom-emacs@295f806
2020-08-18 00:46:41 -04:00
Henrik Lissner
a2da5d7a6f
Fix void-variable comp-eln-load-path error
For users on older versions of gccemacs.
2020-08-17 21:25:34 -04:00
Henrik Lissner
295f8066be
Update gccemacs support
To add support for "update 11", see:
http://akrl.sdf.org/gccemacs.html#org4b11ea1

Also:
+ Move eln files to ~/.emacs.d/.local/cache/eln
+ Disable comp-deferred-compilation by default (now that it is
  enabled-by-default upstream).
2020-08-17 21:24:14 -04:00
Henrik Lissner
dc489d24e7
bidi-inhibit-bpa = t
Speeds up redisplay a little, but possible at the expense of folks who
use Emacs for RTL languages.
2020-08-04 14:58:13 -04:00
Henrik Lissner
9f84bc334b
Forward file-missing errors from within autoloads
If a load call occurs within the autoloads file and throws a
file-missing error, it would be misleading to say 'doom sync' will fix
it, so forward the real error!
2020-08-04 07:34:16 -04:00
Henrik Lissner
c7513e4135
Fix #3390: only execute local-vars hooks once 2020-08-02 16:29:46 -04:00
Henrik Lissner
092480152e
Fix #3650: void-variable tab-prefix-map
Seems like some OSes' package managers are serving up a build of Emacs
where it doesn't define `tab-prefix-map`, but uses it (or another
package uses it--honestly, it difficult to tell. I can't reproduce this,
but I've gotten reports of it on Arch and Ubuntu).

It'll likely go away on its own, so I'll remove this after a year or
something.
2020-07-30 18:57:53 -04:00
Henrik Lissner
e71b7fc705
Revise comments in core.el 2020-07-25 17:52:55 -04:00
Peter Hoeg
9cead32108 core: use custom.el instead of config.el for custom-file 2020-07-22 17:17:05 +08:00
Henrik Lissner
1d709e30be
custom-file = ~/.doom.d/config.el
custom-file is now set to your private config.el, because users may want
to be able to see what Customize is storing (and where) front and
center. Storing it away in ~/.emacs.d/.local makes it harder to notice.

Also, have enable-command (and disable-command) save their data to
custom-file instead of ~/.emacs.d (see #3379).

Fixes #3379
2020-06-13 16:21:43 -04:00
Henrik Lissner
c2c81ece35
Revert server-auth-dir to default
This directory is used when server-use-tcp is non-nil (which is the case
on Windows). With this changed from its default, users have to manually
specify its location when using emacsclientw.exe to connect to daemons.

This means a little more noise in `~/.emacs.d`, but Windows users have
worse things to put up with.

Fixes #3324
2020-06-07 14:09:30 -04:00
Henrik Lissner
3253ca8435
Minor refactors & comment/message revision 2020-05-25 22:11:15 -04:00
Henrik Lissner
d1fcbf244b
doom/toggle-debug-mode -> doom-debug-mode 2020-05-25 20:18:36 -04:00
Henrik Lissner
e6c88e4384
Refactor autoloads generator & reduce to one generated file
We no longer need two separate autoloads files, so I merged them and
optimized its generation logic.

Other changes
- Doom will refuse to start up (with a helpful error) if it's in an
  incomplete state. This should hopefully reduce the number of bug
  reports from folks that have done something weird, e.g.
  1. You've changed Emacs versions without running 'doom sync -b'.
  2. You've updated Doom outside of `doom upgrade` and didn't run `doom
     sync -u`.
  3. You've forgotten to run 'doom sync' in the first place!
  4. If a previous 'doom ...' command was aborted midway without running
     'doom sync' afterwards.
- 'doom sync' will emit reminders that you need to reload/restart Emacs
- Autoloads API now uses the `doom-autoloads-` prefix, intead of
  'doom-cli-autoloads-', as will be the new convention in the coming
  rewrite.
- Errors from within the package autoloads should be easier to invoke
  the debugger on.
- `doom-modules` is now stored in your autoloads file. Your module list
  will soon be frozen between calls to 'doom sync' to allow for our new,
  atomic CLI I'm working on. This will also means the `doom!` block
  won't cost anything in interactive sessions.
2020-05-25 15:55:29 -04:00
Henrik Lissner
3a38fc633c
Change doom-{interactive,debug}-mode suffix to -p
Because these are not really modes.

Also makes `doom-debug-mode` an actual (global) minor mode.
2020-05-25 03:43:40 -04:00
Henrik Lissner
e00bfc7612
Minor refactors & reformatting 2020-05-25 03:43:40 -04:00
Henrik Lissner
3e5cf3de09
Simplify gcmh config
We don't need to manipulate gc-cons-percentage. The GC never procs at
startup either way.
2020-05-25 02:10:07 -04:00
Henrik Lissner
a680885ed9
Fix doom-first-{file,buffer}-hook on first file
Due to typo.
2020-05-18 13:59:40 -04:00
Henrik Lissner
1b43cf99f7
Add comments to & reformat doom-initialize 2020-05-15 21:57:21 -04:00
Henrik Lissner
0e851ace9b
Backport bits of CLI rewrite
The rewrite for Doom's CLI is taking a while, so I've backported a few
important changes in order to ease the transition and fix a couple bugs
sooner.

Fixes #2802, #2737, #2386

The big highlights are:

- Fix #2802: We now update recipe repos *before* updating/installing any
  new packages. No more "Could not find package X in recipe repositories".

- Fix #2737: An edge case where straight couldn't reach a pinned
  commit (particularly with agda).

- Doom is now smarter about what option it recommends when straight
  prompts you to make a choice.

- Introduces a new init path for Doom. The old way:
  - Launch in "minimal" CLI mode in non-interactive sessions
  - Launch a "full" interactive mode otherwise.
  The new way
  - Launch in "minimal" CLI mode *only* for bin/doom
  - Launch is a simple mode for non-interactive sessions that still need
    access to your interactive config (like async org export/babel).
  - Launch a "full" interactive mode otherwise.

  This should fix compatibility issues with plugins that use the
  async.el library or spawn child Emacs processes to fake
  parallelization (like org's async export and babel functionality).

- Your private init.el is now loaded more reliably when running any
  bin/doom command. This gives you an opportunity to configure its
  settings.

- Added doom-first-{input,buffer,file}-hook hooks, which we use to queue
  deferred activation of a number of packages. Users can remove these
  modes from these hooks; altogether preventing them from loading,
  rather than waiting for them to load to then disable them,
  e.g. (after! smartparens (smartparens-global-mode -1)) -> (remove-hook
  'doom-first-buffer #'smartparens-global-mode)

  Hooks added to doom-first-*-hook variables will be removed once they
  run.

  This should also indirectly fix #2386, by preventing interactive modes
  from running in non-interactive session.

- Added `doom/bump-*` commands to make bumping modules and packages
  easier, and `doom/bumpify-*` commands for converting package!
  statements into user/repo@sha1hash format for bump commits.

- straight.el is now commit-pinned, like all other packages. We also
  more reliably install straight.el by cloning it ourselves, rather than
  relying on its bootstrap.el.

  This should prevent infinite "straight has diverged from master"
  prompts whenever we change branches (though, you might have to put up
  with it one more after this update -- see #2937 for workaround).

All the other minor changes:

- Moved core/autoload/cli.el to core/autoload/process.el
- The package manager will log attempts to check out pinned commits
- If package state is incomplete while rebuilding packages, emit a
  simpler error message instead of an obscure one!
- Added -u switch to 'doom sync' to make it run 'doom update' afterwards
- Added -p switch to 'doom sync' to make it run 'doom purge' afterwards
- Replace doom-modules function with doom-modules-list
- The `with-plist!` macro was removed, since `cl-destructuring-bind`
  already serves that purpose well enough.
- core/autoload/packages.el was moved into core-packages.el
- bin/doom will no longer die if DOOMDIR or DOOMLOCALDIR don't have a
  trailing slash
- Introduces doom-debug-variables; a list of variables to toggle on
  doom/toggle-debug-mode.
- The sandbox has been updated to reflect the above changes, also:
  1. Child instances will no longer inherit the process environment of
     the host instance,
  2. It will no longer produce an auto-save-list directory in ~/.emacs.d
2020-05-15 01:33:52 -04:00
Henrik Lissner
6d52baeb57
Fix end-of-file error
Because I was a derp lord in 717d53c66, and always will be.
2020-05-12 21:33:52 -04:00
Henrik Lissner
717d53c666
Tweak GC settings, particularly for org & lsp
These two modes are particularly expensive. This needs more
testing.
2020-05-12 19:59:14 -04:00
Henrik Lissner
066119849d
Speed up IPC for windows users 2020-05-12 04:55:19 -04:00
Henrik Lissner
42a21dffdd
Add doom-incremental-load-immediately option
Closes #3063
2020-05-08 16:06:55 -04:00
Henrik Lissner
66d4aeed1a
Don't unset abbreviated-home-dir for Windows users
With a35a457a1, this isn't necessary anymore
2020-05-06 02:14:30 -04:00
simendsjo
a35a457a1b Fallback to USERPROFILE for HOME on Windows 2020-05-03 09:45:53 +02:00
Henrik Lissner
eb995adada
Minor refactors & comment revision 2020-04-29 23:48:21 -04:00
Henrik Lissner
64b799c68e
Load subr-x & cl-lib a little earlier 2020-04-29 20:31:40 -04:00