Commit Graph

4543 Commits

Author SHA1 Message Date
e16c410b2a Fix use-package load errors on 'doom install' 2020-05-15 05:37:10 -04:00
2b8388079b Fix doom/bump-module command
Also allows you to bump :core now.
2020-05-15 05:37:10 -04:00
76b133fd98 Install core packages early 2020-05-15 05:37:08 -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
2884dd9ea7 Fix 'recreate repo' option not being recommended
When updating a package with a changed recipe (e.g. it's branch).
2020-05-15 02:29:22 -04:00
ea18c83c0a General refactors & reformatting across the board 2020-05-15 01:44:53 -04:00
f521823d3b Fix quiet! macro not silencing file loading 2020-05-15 01:33:52 -04:00
fc90e0fb71 Simplify quiet!'s expanded form
We don't need to test doom-interactive-mode at runtime.
2020-05-15 01:33:52 -04:00
68709fe93a Fix letf! sometimes losing letf binds
When expanding:

  (quiet! ...)

You'd expect (simplified for explanation):

  (letf! ((standard-output ...)
         ((symbol-function #'message) ...)
         ((symbol-function #'load-file) ...)
         ((symbol-function #'write-region) ...))
    ...)

But instead get:

  (letf! ((standard-output ...))
    ;; where'd the other binds go?
    ...)

This was due to data-loss caused by nreverse's destructive mutation of
the given bindings.

Also: silences byte-compiler complaining about unused bindings.
2020-05-15 01:33:52 -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
e92a470252 Merge pull request #3100 from chuxubank/develop
Change path separator on Windows when using fd
2020-05-14 04:20:09 -04:00
a2011232a2 Change envvar coding system buffer locally 2020-05-14 04:13:05 -04:00
8a70dd0379 Change path separator on Windows when using fd
Show slash instead of backslash
2020-05-14 16:07:04 +08:00
21fda9af60 Read & write envvar file as utf-8 #3044 2020-05-14 02:54:56 -04:00
500e078e12 Map windows key to super 2020-05-14 02:07:25 -04:00
a239326165 Activate save-place-mode when it loads 2020-05-14 01:00:12 -04:00
f83499c7a7 Revert 63ab88105
With this fix we're forced to rebind all C-i keybinds plugins bind. This
is too much of a maintenance nightmare. This "fix" doesn't really fix
anything really, so users can reinstate it themselves, if they prefer
it.

Relevant to #3090
2020-05-13 14:41:57 -04:00
a63ee13f01 Bump :core
Wilfred/helpful@c54e9dd -> Wilfred/helpful@c0662aa
bbatsov/projectile@5cd261d -> bbatsov/projectile@768f057
domtronn/all-the-icons.el@0b74fc3 -> domtronn/all-the-icons.el@d6cb6d4
jscheid/dtrt-indent@9163cd9 -> jscheid/dtrt-indent@50c440c
2020-05-12 21:41:05 -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
24aabfc8e0 Fix #3098: wrong-number-of-args on some interactive closures
It appears key-translation-map keybinds are passed an argument, but
`lambda!` and `lambda!!` produce 0-arity closures.

Closes #3099
2020-05-11 19:46:37 -04:00
63ab88105f Fix #3090: distinguish C-i from TAB 2020-05-11 16:22:15 -04:00
24164f4869 Disable use-package's :ensure t property by default
Many packages recommend setting up their packages with something like:

  (use-package PACKAGE
    :ensure t
    ...)

New users will frequently copy these into their config, then experience
long startup times or a cryptic error about the package failing to
install.

This is because `:ensure t`, by default, uses package.el (Emacs'
built-in package manager) to check for and install packages, but Doom
doesn't use package.el, it uses straight.el. So we disable `:ensure`.

On the other hand, if the user has loaded `package` by hand, then we
should assume that they know what they're doing, and restore the old
behavior.
2020-05-11 16:16:58 -04:00
42a21dffdd Add doom-incremental-load-immediately option
Closes #3063
2020-05-08 16:06:55 -04:00
4f27d8e774 Fix #3070: project scratch buffers not persistent 2020-05-08 15:08:25 -04:00
cb8b66dd36 Remove old persisted scratch buffer file
This was for backward compatibility with the old format. Removing this
now after two months being deprecated.
2020-05-08 14:44:48 -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
4a181ebfe8 Revert 7d2876ee0
Didn't fix #3042
2020-05-05 20:14:02 -04:00
7d2876ee00 Prevent coding system prompt during doom commands
Possibly fixes #3042
2020-05-05 16:07:02 -04:00
fd342dfdb0 Fix #2982: multiple instances of Emacs on restart
When invoking a restart during a restart (Yo dawg...)
2020-05-03 19:49:18 -04:00
0c3ffbbb25 Fix wrong-type-arg arrayp error on doom/help search commands
The org crawler assumed that no headings were empty, which led to errors
when they were.
2020-05-03 16:38:44 -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
a35a457a1b Fallback to USERPROFILE for HOME on Windows 2020-05-03 09:45:53 +02:00
4b28e9ce86 Rework & polish doom-store library
+ Add doom-store-rem
+ Add real doom-store-member-p (to replace doom-store-exists alias)
+ Fix doom-store-clear not clearing in-memory store
+ Add doom-store-flush
+ Add deferred flushing through doom--inhibit-flush lexical var
+ Update doom-store-persist & doom-store-desist for new API
2020-05-02 19:32:02 -04:00
b51c4fc8b3 Fix projectile on Windows failing to index anything with ripgrep
Due to unescaped glob arguments.

Fixes #2897, and possibly #1803
2020-05-02 17:41:36 -04:00
ea1a1805b3 Fix projectile failing to index symlinks
Fixes cases where, if the contents of your ~/.doom.d were symlinks, fd
and ripgrep wouldn't index them (or recurse into them), so it'd miss out
of many files.

Possibly fixes #1803
2020-05-02 16:28:48 -04:00
1fb5981ba6 Highlight recommended straight prompt option in green 2020-05-02 14:41:18 -04:00
e832ec5708 Fix projectile ignoring symlinks
Due to the underlying program (fd) ignoring them.
2020-05-02 13:17:10 -04:00
29c0781916 Fix doom-store library
And rename doom-store-set -> doom-store-put to be more consistent with
the underlying operation.
2020-05-02 13:17:10 -04:00
29e91a6ff6 Replace doom-cache library with doom-store
And remove persistent-store dependency.
2020-05-02 00:14:08 -04:00
e4f24fd150 Don't enable smartparens-mode in minibuffer if global mode is off 2020-05-01 16:03:18 -04:00
db7f382030 Merge pull request #3016 from gagbo/patch-1
Add a few missing modes to `hdm` alist
2020-04-30 20:41:26 -04:00
eb381ce2bd Remove custom indent functions for map! properties
Now that we have a634e2c81
2020-04-30 20:33:46 -04:00
61b7368d49 Add a few missing modes to hdm alist
Rule was mostly to add major-modes defined by packages bundled in the module
2020-05-01 02:03:04 +02:00
ba8892d7e9 Fix #3004: stale root cache on project search 2020-04-30 19:02:20 -04:00
c25f88c874 Fix #2995: ligature & all-the-icons conflicts
See domtronn/all-the-icons.el#174
2020-04-30 17:02:24 -04:00