Commit graph

119 commits

Author SHA1 Message Date
Henrik Lissner
b29b865d30
Fix #3975: configure native-comp in sandbox 2020-10-06 02:08:17 -04:00
Henrik Lissner
3cb7458d34
Fix #4033: correctly toggle explain-pause-mode
On doom-debug-mode.
2020-10-05 23:02:36 -04:00
Henrik Lissner
ae3a2fa8c2
doom-info: use &nopath prefix for 404'd modules
The alternative is a stringp error.
2020-09-02 14:23:11 -04:00
Henrik Lissner
5c6189fb4e
Simplify doom/version output
Only really needs to output Doom's version and build info.
2020-08-24 23:00:32 -04:00
Henrik Lissner
7e362e8fbd
Redesign doom/info
+ Replace "daemonp" and "windowsys" fields with "traits" field, which
  can now indicate the presence of: Chemacs, exec-path-from-shell,
  symlinked EMACSDIR/DOOMDIR, a running server, the daemon and an envvar
  file.
+ Now replaces $USER in absolute paths with literal "$USER".
+ Reordered fields from most to least general (system -> emacs -> doom)
+ Show "&user" next to modules that are private modules (defined in
  ~/.doom.d/modules/)
2020-08-24 22:27:40 -04:00
Henrik Lissner
4e82ee4397
Refactor doom-debug-mode
+ Add explain-pause-mode
+ Now reloads itself if doom-debug-variables is changed or when one of
  its variables becomes available.
+ doom-debug-variables now supports a cons cell entry where its CAR is
  the name of the variable and CDR is the value it should be set to when
  doom-debug-mode is active.
2020-08-21 01:26:24 -04:00
Henrik Lissner
b5706c5793
Fix inverted on/off message from doom-debug-mode 2020-08-06 00:22:40 -04:00
Henrik Lissner
a9bf0b8985
Add cmd!, cmd!!, cmds! convenience macros
It's kind of silly that our command lambda macros (λ! and λ!!) need a
snippet, special key sequence or copy-paste to insert, so in the spirit
of fn! -- and to make sure they take up less space than `lambda!` --
I've added `cmd!` and `cmd!!` aliases. `lambda!` and `lambda!!` are now
deprecated. λ! and λ!! will remain.

I've also added `cmds!` as a convenience wrapper around
general-predicate-dispatch.
2020-05-27 18:29:35 -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
cc5f498586
Add magic cli.el in modules & refactor module init
Doom now looks for cli.el files in your private directory or modules,
giving them an opportunity to customize the CLI (add commands or
reconfigure existing ones) to suit their purposes.
2020-05-25 15:55:28 -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
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
d12752324a
Introduce letf! convenience macro
A more succinct cl-letf, which allows for local functions and macros.
2020-04-29 23:48:21 -04:00
Vu Quoc Huy
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
Henrik Lissner
8f68237e8b
Don't pretty-print doom/info's packages section
Your doom/info should be a compact summary of your config. Pretty
printing the packages listing vertically consumed too much space.
2020-03-10 23:54:07 -04:00
Henrik Lissner
f8a69464d0
Remove smartparens dependency for doom/info 2020-03-03 16:15:43 -05:00
Henrik Lissner
b30f38ac06
Minor refactor & reformatting across the board 2020-02-23 15:42:43 -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
f600605de3
Add "unpin" section to doom/info
Important when debugging potential upstream issues.
2020-01-25 19:02:01 -05:00
Henrik Lissner
4161014cfc
doom/toggle-debug-mode: toggle garbage-collection-messages 2020-01-14 19:25:24 -05:00
Henrik Lissner
a52909f5df
Toggle {magit-refresh,use-package}-verbose on debug mode 2020-01-06 23:27:21 -05:00
Henrik Lissner
5495922a20
Resolve symlinks in doomdir slot for doom/info 2020-01-03 05:22:10 -05:00
Henrik Lissner
ffcc24350c
Add DOOMDIR to 'doom info' 2019-12-23 23:53:27 -05:00
Henrik Lissner
e623fde85a
Fix private & elpa package lists in doom/info
And display errors if something went wrong.
2019-12-14 20:42:40 -05:00
Henrik Lissner
441fc5115c
Don't load user's init.el in sandbox sessions
For 'C-c C-p' and 'C-c C-d', specifically.
2019-11-21 21:55:48 -05:00
Henrik Lissner
db19241936
Use gcmh package to manage adjust GC interactively 2019-11-21 14:46:45 -05:00
Henrik Lissner
abe9239088
Simplify doom/report-bug 2019-11-17 21:09:06 -05:00
Henrik Lissner
9ef6ccb7cd
Refactor doom-run-all-startup-hooks-h 2019-11-08 16:02:06 -05:00
Henrik Lissner
44d5e097c9
shell-command-to-string -> doom-call-process #1887
Minor optimization to remove a layer of indirection when starting
processes.
2019-11-08 16:02:06 -05:00
Henrik Lissner
8b57226634
doom/toggle-debug-mode: affect jka-compr-verbose & lsp-log-io 2019-10-17 02:36:19 -04:00
Rudi Grinberg
55e00bbd26 re-search-forward to search-forward when no re
When no regular expression is present, it's faster and simpler to use
search-forward

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2019-10-13 12:25:41 +09:00
Henrik Lissner
4a8cef56ea
Fix doom/info omitting flags on some modules 2019-09-26 21:57:55 -04:00
Henrik Lissner
fff4968da9
Change how doom/info lists private packages 2019-09-14 18:27:58 -04:00
Henrik Lissner
c8cd94a5d2
Add window-system & daemonp props to 'doom info' 2019-09-14 18:27:58 -04:00
Henrik Lissner
4bc65a3f78
Prevent C-c C-p sandbox from loading private modules
And don't change doom-private-dir, as it isn't necessary and it affects
the purity of the test environment.
2019-09-06 15:37:40 -04:00
Henrik Lissner
d665c7173a
Remove esup
Because esup is fundamentally incompatible with Doom, we are removing
it. Hopefully we can replace it later down the road.
2019-09-06 00:15:13 -04:00
Henrik Lissner
52b6c51914
Read packages.el files directly for doom-info
This is a little more accurate and affects less state of the current
session.
2019-09-03 00:38:29 -04:00
Henrik Lissner
a5096ff86b
Add ELPA packages to doom info output 2019-08-27 00:05:12 -04:00
Henrik Lissner
3b9701161a
Fix build date in doom/version
When it is called interactively from a file outside of ~/.emacs.d
2019-08-21 12:17:32 -04:00
Henrik Lissner
a6d77e951f
Move doom-run-all-startup-hooks-h to autoload/debug.el 2019-07-28 02:32:25 +02:00
Henrik Lissner
486e21ab44
Refactor doom-info; remove doom-find-packages
The function was overcomplicated and wasn't any more useful than looking
directly at doom-packages
2019-07-26 15:25:59 +02:00
Henrik Lissner
060ede0e2e
General, minor reformatting across the board
And an offering of blood to our great lord Byte Compiler-sama.
2019-07-22 02:37:45 +02:00
Henrik Lissner
b90dede1ab
💥 Replace package.el/quelpa with straight #374
There are a few kinks to iron out, but for the most part it's done. Doom
Emacs, powered by straight. Goodbye gnutls and elpa/quelpa issues.

This update doesn't come with rollback or lockfile support yet, but I
will eventually include one with Doom, and packages will be (by default,
anyway) updated in sync with Doom.

Relevant threads: #1577 #1566 #1473
2019-07-22 02:30:40 +02:00
Henrik Lissner
149b2617b0
💥 revise hook/var fns naming convention (2/2)
This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:

1. Replace the bar | to indicate a hook function with a -h suffix, e.g.

     doom|init-ui -> doom-init-ui-h
     doom|run-local-var-hooks -> doom-run-local-var-hooks-h

2. And add a -fn suffix for functions meant to be set on variables,
   e.g.

     (setq magit-display-buffer-function #'+magit-display-buffer-fn)

See ccf327f8 for the reasoning behind these changes.
2019-07-22 02:30:38 +02:00
Henrik Lissner
71d505b893
Cache doom-modules on doom refresh 2019-07-07 14:10:21 +02:00
Henrik Lissner
51c067cc4d
Fix vanilla-doom+ sandbox instance
Now initializes doom-modules correctly and suppresses an undo-tree
error.
2019-07-07 01:58:49 +02:00
Henrik Lissner
58299341b8
Fix vanilla-doom+ launcher in sandbox (C-c C-p)
vanilla-doom+ should launch an instance of Doom with doom core plus
modules minus your private config loaded.
2019-06-30 13:18:14 +02:00
Henrik Lissner
9c29ad78e0
Add SHELL to doom-info 2019-06-26 14:31:07 +02:00
Henrik Lissner
5e9c020c21
doom-files-in: replace NOSORT w/ SORT; change default MATCH
- SORT defaults to t
- MATCH's new default regexp excludes files that start with underscore.
2019-06-16 19:16:23 +02:00