Commit graph

139 commits

Author SHA1 Message Date
Henrik Lissner
079feb26e4 Left align fields in doom-info
The leading whitespace can cause issues with some whitespace trimming
clipboard managers and <pre> blocks.
2021-04-14 23:31:13 -04:00
Henrik Lissner
ce65645fb8 Minor refactors & comment revision 2021-03-27 18:27:19 -04:00
Henrik Lissner
ea105b874e Toggle async-debug on doom-debug-mode 2021-03-12 22:58:15 -05:00
Henrik Lissner
2e1c10a6a4 Move sandbox code into own library 2021-03-12 22:58:15 -05:00
Henrik Lissner
abec86310b Fix #4777: wrong-type-argument listp unpin error 2021-03-11 10:57:41 -05:00
Henrik Lissner
ab7710adfd doom-info: fix args-out-of-range error 2021-03-08 10:25:09 -05:00
Henrik Lissner
4192d87dcd Redesign doom/info
+ Focus on the important information and cut down on excess.
+ Prompt the user to open pastebin.com after copying doom-info to
  clipboard.
+ Include timestamp in doom-info.
2021-03-07 00:03:04 -05:00
Henrik Lissner
c5e3f4d632 New autoload/system.el core library 2021-03-01 22:27:17 -05:00
Henrik Lissner
1a7536cbd1 Extend & compact doom/info
+ Output is now a couple lines shorter
+ Now tries to guess Linux distro names and versions
+ Displays symlinked EMACSDIR and DOOMDIR
+ Replaces elc-files segment with 'byte-compiled-config trait
2021-02-11 17:35:48 -05:00
Henrik Lissner
fc184852d0
Only replace usernames in file paths in doom/info 2021-01-11 02:49:00 -05:00
Henrik Lissner
b7f6532e4f
Fix startup hooks not running in vanilla sandbox 2020-12-01 18:16:12 -05:00
Henrik Lissner
affd076d53
Minor refactors & reformatting 2020-12-01 13:53:46 -05:00
Henrik Lissner
2c663ea5d4
Mention current theme and font in doom/info 2020-11-10 18:36:47 -05:00
Henrik Lissner
45179fbf59
Mention current frame type in doom/info 2020-11-10 18:36:47 -05:00
Henrik Lissner
611fdade09
Add doom/copy-buffer-contents command
To make it easier for beginners to copy content from logs or backtrace
windows.
2020-11-04 19:41:57 -05:00
Henrik Lissner
3e0432959a
Set user-init-file in sandbox 2020-11-02 21:03:28 -05:00
Henrik Lissner
fe37a590cc
Set doom--initial-load-path in sandbox
Prevents loaded packages miscount (e.g. -1) in dashboard/log in sandbox
instance.

This occurs because the benchmark line uses a simple heuristic to
determine the loaded packages: length of load-path minus the length of
doom--initial-load-path (to save on more expensive counting methods).
However, in the sandbox, load-path is pre-populated with all packages
right from the get-go, so doom--initial-load-path will be incorrect.
2020-10-26 05:52:30 -04:00
Henrik Lissner
9e1ac0c0be
Reduce active message-log-max; scale in debug mode
8kb of log isn't really necessary. We'll scale it up when debug mode is
on, instead.
2020-10-26 05:51:12 -04:00
Henrik Lissner
9b4fd806bb
Simplify doom/info output 2020-10-20 23:21:11 -04:00
Henrik Lissner
db07304c71
Don't enable explain-pause-mode at startup
When starting Emacs in debug mode, explain-pause-mode is enabled. This
pulls in other packages with it, which can taint results when testing
package load order. Also, explain-pause-mode is for measuring pauses
during interactive use, it isn't very useful for startup benchmarking.

So we only toggle it if doom-debug-mode is toggled interactively.
2020-10-11 16:41:07 -04:00
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