Commit Graph

495 Commits

Author SHA1 Message Date
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
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
3253ca8435 Minor refactors & comment/message revision 2020-05-25 22:11:15 -04:00
d1fcbf244b doom/toggle-debug-mode -> doom-debug-mode 2020-05-25 20:18:36 -04:00
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
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
e00bfc7612 Minor refactors & reformatting 2020-05-25 03:43:40 -04:00
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
a680885ed9 Fix doom-first-{file,buffer}-hook on first file
Due to typo.
2020-05-18 13:59:40 -04:00
1b43cf99f7 Add comments to & reformat doom-initialize 2020-05-15 21:57:21 -04:00
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
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
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
066119849d Speed up IPC for windows users 2020-05-12 04:55:19 -04:00
42a21dffdd Add doom-incremental-load-immediately option
Closes #3063
2020-05-08 16:06:55 -04:00
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
a35a457a1b Fallback to USERPROFILE for HOME on Windows 2020-05-03 09:45:53 +02:00
eb995adada Minor refactors & comment revision 2020-04-29 23:48:21 -04:00
64b799c68e Load subr-x & cl-lib a little earlier 2020-04-29 20:31:40 -04:00
1442e694fb Move core helpers to core-lib
Since they can be generally useful.
2020-04-29 20:31:40 -04:00
f61fa50336 Null-byte delimit envvar file lines
This prevents issues with multi-line envvar values.
2020-04-29 19:39:35 -04:00
9788b1235c Disable jit-lock
Deferred & stealth font-locking has produced a fair number of obscure
bugs. It's just not worth the trouble.
2020-04-29 02:17:42 -04:00
c601382a55 Add EMACS28+ const 2020-04-27 02:12:47 -04:00
ddc7bf782c Activate jit-lock
Improves scrolling and buffer performance by deferring font-locking
until you're idle. YMMV
2020-04-25 00:18:30 -04:00
0c3e11766c Fix #2949: swap TLS 1.3 & 1.2 in gnutls-algorithm-priority 2020-04-21 17:08:34 -04:00
f532019b1f Restore file-name-handler-alist non-destructively
And in reverse order, so new rules correctly shadow old ones.
2020-04-16 18:17:36 -04:00
ffb37f8fed Fix #2894: disable tty init deferral in daemon 2020-04-13 02:07:05 -04:00
4cc631aaa7 Fix #2816: disable TLS 1.3 on windows
Windows is a lost cause.
2020-04-10 23:41:27 -04:00
b78fc4eb76 Minor refactor & reformatting across the board 2020-04-08 15:30:10 -04:00
d1c2e7b234 Slightly faster incremental loading 2020-03-31 01:01:13 -04:00
58f52de912 inhibit-compacting-font-caches = t 2020-03-31 01:01:13 -04:00
6c4081f785 Refactor gnutls-algorithm-priority
And prevent void-variable error if gnutls is, for some reason,
unavailable or libgnutls-version isn't a numeric.
2020-03-27 21:30:07 -04:00
be257140b4 Merge pull request #2782 from vqhuy/security
Fix TLS error caused by #2763
2020-03-27 21:27:12 -04:00
9709d257d9 Fix TLS error caused by #2763
Check whether the current gnutls library supports tls1.3
Add more tests for `doom/am-i-secure`
2020-03-28 02:24:12 +01:00
217252e361 Wrap gcmh-mode bootstrap in interactive check
The interactive check is necessary until I've pushed the new CLI.
2020-03-27 19:09:19 -04:00
97a3950ec8 Fix gcmh-mode not being activated at startup 2020-03-27 05:20:02 -04:00
a0f674fc78 Refactor & revise comments in core.el 2020-03-27 02:35:19 -04:00
bf3cdc37ce Fix & add more security settings 2020-03-24 01:29:54 +01:00
0f4c0cce5b Only unset file-name-handler-alist in interactive sessions 2020-02-21 17:03:47 -05:00
8a7763337d doom refresh -> doom sync
refresh isn't going anywhere, but sync will be the canonical command
here on out, because it is more appropriate for kind of work it will be
doing in the future.
2020-02-19 23:34:16 -05:00
e31bb63c14 message-log-max = 8192 2020-01-31 16:43:08 -05:00
99fc55f75c General, minor refactors in doom core 2020-01-27 00:51:32 -05:00
dadd54604b Refactor package update logic
Still needs more work.
2020-01-26 21:21:06 -05:00
0bc7fc1ab8 gcmh-high-cons-threshold = 16mb #2378
In an attempt to fix stuttering after long term interactive use.
2020-01-23 02:17:51 -05:00
dc2b9781ab Minor refactors & reformatting 2020-01-20 01:55:31 -05:00
e65b5af709 Strip nils from exec-path
parse-colon-path will replace some paths with a nil, so we use
split-string instead with a non-nil OMIT-NULLS argument instead.
2020-01-15 02:04:14 -05:00
9c594d3f42 delete-by-moving-to-trash = t on macOS 2020-01-09 22:56:26 -05:00
ae5cf1889b Move custom-file to {doom-local-dir}/custom.el 2020-01-04 17:10:56 -05:00
195dfda045 Minor refactors & comment revision 2020-01-02 21:16:02 -05:00
b63ce98731 Add benchmark hook & restore switch earlier
If the user wants to remove them for some reason.
2019-12-29 18:47:12 -05:00