Commit Graph

309 Commits

Author SHA1 Message Date
9ec5428441 Set core.autocrlf = true in repos on Windows #2637
Line encoding issues can plague repos with dirty worktree prompts
updating packages or "Local variables entry is missing the suffix"
errors when installing them.
2020-07-24 01:49:59 -04:00
da1030985d Minor refactors & reformatting 2020-07-23 01:26:03 -04:00
f7431aa7c9 Fix units of "projectile cache is too large" warning
Labeled MB, but is actually displaying KB.
2020-06-10 21:54:09 -04:00
2a824136ef Fix #3277: 'doom install' options are ignored 2020-06-02 18:16:32 -04:00
aec94f5bb2 Fix #3228: 'Failed to fetch from upstream' on doom upgrade
Due to git name-rev returning fully qualified refs in some cases.
2020-05-29 19:36:13 -04:00
ca0dbc798d Use shorter seq.el alternatives 2020-05-26 04:18:20 -04:00
22c7eac897 Add doom-autoloads-files option
So users can scan additional files for autoloads during 'doom sync'.
2020-05-26 04:16:42 -04:00
f4e6d36574 Move 'restart Emacs to see changes' message to 'doom sync'
It isn't the autoloads generator's responsibility to do this. The
"changes" referred to consist of more than just the regenerated
autoloads file.
2020-05-26 04:09:11 -04:00
10a4e6570d Fix 'doom env' refusing arguments/options 2020-05-26 03:21:27 -04:00
b6cc110f4c Fix 'wrong-type-arg' error on 'doom upgrade' 2020-05-26 03:12:35 -04:00
894966b1e2 Fix #3221: incorrect usage of doom-cli-execute
The function is variadic in as-of-yet published versions of Doom's CLI;
this usage snuck into a commit.
2020-05-26 02:55:24 -04:00
a814239ec7 Implement daisy-chaining for CLI sessions
elisp lacks an execv implementation (or mature subprocess library), so
we exploit some splenderiffic hackery to get Emacs to execute arbitrary
shell commands after a 'doom ...' command completes. This allows us to
daisy chain doom commands in distinct sessions (wonderful for reloading
doom after a 'doom upgrade', which we do). This minimizes errors when a
'doom upgrade' pulls in breaking changes to Doom's CLI.

We also bring 'doom run' into elisp, since this new functionality
enables us to.
2020-05-26 02:30:54 -04:00
e89b604f5f Fix 'doom upgrade' when doom is a git submodule 2020-05-26 02:13:02 -04:00
15a58d5b81 Prevent 'doom sync' rebuilding all packages, each time 2020-05-25 18:17:38 -04:00
9f024e549f Instruct user to rerun 'doom upgrade'
If it fails during reloading of Doom's core.

Relevant to #3131
2020-05-25 16:27:51 -04:00
0bc3f8ea87 doom/purge: refactor & optimize
Reduce how much work it had to do.
2020-05-25 15:55:29 -04:00
e60d8f9cb1 doom/install: refactor template insertion & module init 2020-05-25 15:55:29 -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
be889d09e8 Rename doom-format lib -> doom-output
`format` isn't an appropriate for this library, considering it (and
future additions to it) will be mainly concerned with printing or
capturing output.
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
69a25a8468 Make doctor treat missing ripgrep as an error
It's a hard dependency for Doom.
2020-05-19 21:49:01 -04:00
204783a96e Change how doom core reloads itself after 'doom upgrade'
Hopefully to address weird void-function errors while upgrading.
2020-05-19 21:49:01 -04:00
643377d8a4 Fix void-function doom--straight-respect-print-indent-a error
On first use of 'doom upgrade'
2020-05-18 03:27:30 -04:00
6241ba2faa Emit fetch output when updating recipe repos 2020-05-17 06:14:37 -04:00
375faedb1b Emit backtrace if doom upgrade fails 2020-05-16 05:38:20 -04:00
49790fb53f Include the error when 'doom upgrade' fails 2020-05-16 05:31:33 -04:00
2e1c706c73 doom/env: fix -a switch, add -r switch #2434
Can now white and blacklist envvars
2020-05-15 21:56:04 -04:00
3d10e984ec Fix #3134: invalid lambda variable t on 'doom compile' 2020-05-15 17:56:29 -04:00
ea2de668b7 Fix #3135: no template after doom install 2020-05-15 17:19:39 -04:00
c1bee692cf doom/install? ignore errors in module init.el's
Fix #3132
2020-05-15 14:22:13 -04:00
e16c410b2a Fix use-package load errors on 'doom install' 2020-05-15 05:37:10 -04:00
87e279ce61 doom/doctor: improve error handler for font detection
Fixes #3008
2020-05-15 04:59:10 -04:00
8f8d796ecd doom/doctor: fix 'missing emacs package: org' #2284 2020-05-15 04:19:25 -04:00
68b5f687bd doom/doctor: fix 'org not installed' error
Also indents missing package warnings correctly and makes them harder to
mistake for system packages.

Fixes #2284
2020-05-15 01:33:52 -04:00
c682079783 doom/doctor: warn about 28+, not 27+
27 is now the recommended version for Doom.
2020-05-15 01:33:52 -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
a2011232a2 Change envvar coding system buffer locally 2020-05-14 04:13:05 -04:00
21fda9af60 Read & write envvar file as utf-8 #3044 2020-05-14 02:54:56 -04:00
2c70b75c6c Warn user to sync+rebuild on emacs' major version change
Byte-code is not generally compatible across major releases of Emacs,
and packages may have changed in that time. Best throw a more helpful
error than leave users to deal with the obscure errors that this can
cause.
2020-05-03 16:31:06 -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
efee551709 doctor: check for fc-list (fontconfig)
Instead of find-font, which the doc doesn't even use.
2020-04-24 22:00:17 -04:00
d3c2e4829b Disable byte-compile-dynamic for autoloads files
Its deprecated and more trouble than its worth.
2020-04-17 15:47:05 -04:00
9e5dd51ca4 doom env: ignore SSH_TTY 2020-04-15 14:20:00 -04:00
c095e7279a Update 'doom env' docs #2835 2020-04-15 00:14:08 -04:00
6bc0fcf714 Remove 'generated from X shell' from envvar file #2835
`doom env` no longer uses a sub-shell to scrape the environment.
2020-04-07 19:56:56 -04:00
ca74996d1b Complain if repo is invalid on 'doom update' 2020-03-01 13:25:47 -05:00
3ecff5777b Fix overaggressive recloning when updating packages 2020-03-01 13:23:39 -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
71e5a5513b Fix #2556 (hopefully): exec format error on Windows 2020-02-19 17:54:50 -05:00
f7445a10db General refactor & reformatting across the board 2020-02-18 22:56:47 -05:00