Commit graph

329 commits

Author SHA1 Message Date
Henrik Lissner
e16c410b2a
Fix use-package load errors on 'doom install' 2020-05-15 05:37:10 -04:00
Henrik Lissner
87e279ce61
doom/doctor: improve error handler for font detection
Fixes #3008
2020-05-15 04:59:10 -04:00
Henrik Lissner
8f8d796ecd
doom/doctor: fix 'missing emacs package: org' #2284 2020-05-15 04:19:25 -04:00
Henrik Lissner
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
Henrik Lissner
c682079783
doom/doctor: warn about 28+, not 27+
27 is now the recommended version for Doom.
2020-05-15 01:33:52 -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
a2011232a2
Change envvar coding system buffer locally 2020-05-14 04:13:05 -04:00
Henrik Lissner
21fda9af60
Read & write envvar file as utf-8 #3044 2020-05-14 02:54:56 -04:00
Henrik Lissner
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
Henrik Lissner
f61fa50336
Null-byte delimit envvar file lines
This prevents issues with multi-line envvar values.
2020-04-29 19:39:35 -04:00
Henrik Lissner
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
Henrik Lissner
d3c2e4829b
Disable byte-compile-dynamic for autoloads files
Its deprecated and more trouble than its worth.
2020-04-17 15:47:05 -04:00
Henrik Lissner
9e5dd51ca4
doom env: ignore SSH_TTY 2020-04-15 14:20:00 -04:00
Henrik Lissner
c095e7279a
Update 'doom env' docs #2835 2020-04-15 00:14:08 -04:00
Henrik Lissner
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
Henrik Lissner
ca74996d1b
Complain if repo is invalid on 'doom update' 2020-03-01 13:25:47 -05:00
Henrik Lissner
3ecff5777b
Fix overaggressive recloning when updating packages 2020-03-01 13:23:39 -05:00
Henrik Lissner
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
Henrik Lissner
71e5a5513b
Fix #2556 (hopefully): exec format error on Windows 2020-02-19 17:54:50 -05:00
Henrik Lissner
f7445a10db
General refactor & reformatting across the board 2020-02-18 22:56:47 -05:00
Paul Oppenheimer
0a463673c9 make doom purge -g more aggressive
Reflog keeps the history of every reset, so expiring it allows us to
remove more older commits. git gc by default only cleans for 2 week old
objects, so I made it more aggressive
2020-02-10 20:23:09 -05:00
xeijin
8de0f62c52
apply Henrik changes 2020-02-02 23:44:03 +00:00
xeijin
f9e8cb2f01
adding warning message 2020-02-02 23:39:42 +00:00
xeijin
266ea5038c
Update install.el 2020-02-02 23:23:05 +00:00
xeijin
22bc21a712
windows: disable all-the-icons font install
the command is actually fairly useless on windows anyway -- unless you are specifically running emacs with elevated privileges, you get the following error:

```
This will download and install fonts, are you sure you want to do this? (y or n) y
Contacting host: raw.githubusercontent.com:443
mm-write-region: Opening output file: Permission denied, c:/Windows/Fonts/material-design-icons.ttf
```
2020-02-02 23:16:47 +00:00
Henrik Lissner
0dc173a631
Polish progress output during 'doom update' 2020-02-01 02:07:24 -05:00
Henrik Lissner
53d799f377
Reduce file init work when reading autoloads
Should suppress Emacs trying to read file-local variables and/or
attempts to open TAGS files for the current project.
2020-01-30 19:39:36 -05:00
Henrik Lissner
9a0e029135
Fix output truncation & indentation on 'doom update' 2020-01-30 18:38:18 -05:00
Henrik Lissner
35364f1dd1
Fix hash-table-p errors on 'doom build' 2020-01-30 15:31:30 -05:00
Henrik Lissner
097972bd9d
Refactor package pinning
- Make doom/info package details more concise
- Removed doom-pinned-packages variable (pin info now stored in
  doom-packages metadata)
- Fix unpin! not actually unpinning some packages
2020-01-28 20:47:45 -05:00
Henrik Lissner
4dc01912f1
Fix 'doom update' reporting that a successful fetch failed 2020-01-28 14:06:20 -05:00
Henrik Lissner
471be76ba5
Fix typo causing void-function error 2020-01-27 02:05:14 -05:00
Henrik Lissner
5056c74688
Fix some packages failing to fetch on 'doom update' 2020-01-27 01:44:30 -05:00
Henrik Lissner
99fc55f75c
General, minor refactors in doom core 2020-01-27 00:51:32 -05:00
Henrik Lissner
dadd54604b
Refactor package update logic
Still needs more work.
2020-01-26 21:21:06 -05:00
Henrik Lissner
a2354a7ad7
Add -p/--packages to 'doom upgrade'
And document -f/--force
2020-01-26 05:00:57 -05:00
Henrik Lissner
a9402cfb55
Fix #2373: bring back package pinning
This needs some serious refactoring...
2020-01-25 19:02:00 -05:00
Henrik Lissner
c3734603f5
Don't strip out vars from doom module autoloads
Doom's autoloads generator will strip out forms that modify variables in
doom-autoload-cached-vars (load-path, auto-mode-alist, etc). These are
undesireable in package autoloads, but may be desireable in Doom module
autoloads.
2020-01-24 18:16:11 -05:00
Henrik Lissner
453e20534f
Temporarily disable pinning #2373
I'm swamped today and tomorrow so this will have to do for now
2020-01-15 11:19:32 -05:00
Henrik Lissner
dc4df47842
Don't fetch/checkout packages that are up-to-date 2020-01-14 22:47:38 -05:00
Henrik Lissner
f3a9d0c03c
Resolve pinned packages based on overridden recipes
And rearrange "Checking out ..." message during 'doom upgrade' to
display package first, then commit (and abbreviated), rather than the
other around. It's easier to read.
2020-01-14 21:57:58 -05:00
Henrik Lissner
b8b0f73edc
Resolve packages to repo for pinned packages
- Allow :pin SHA's to be abbreviated.
- Print out the repo being updated, rather than the package.
2020-01-14 21:18:59 -05:00
Henrik Lissner
9eb3a74a57
Save interpreter-mode-alist to autoloads 2020-01-14 02:59:16 -05:00
Henrik Lissner
0c9f1b1a9c
Minor refactors & comment revision 2020-01-11 17:27:04 -05:00
Henrik Lissner
f6852a2c9f
Add --discard switch to 'doom upgrade' #2224
Also rewrites straight prompt-in-batch-Emacs hack, and move it to
core-cli.el.
2020-01-09 03:36:00 -05:00
Henrik Lissner
b7dc9c644e
Don't use find if find can't be found 2020-01-08 22:09:42 -05:00
Xuan Bi
09f7db43be
Be explicit about fc-list when listing fonts 2020-01-06 14:22:18 +08:00
Henrik Lissner
4f7217719a
Merge pull request #2301 from wnikola/patch-1
Fix typo in env.el
2020-01-05 20:10:32 -05:00
Henrik Lissner
cf04a44ca7
Refactor comment/string check in autoloads generator 2020-01-04 17:13:05 -05:00
Nikola M
f9b3ad2bb1 Fix typo in env.el 2020-01-03 21:42:14 +01:00