Commit Graph

147 Commits

Author SHA1 Message Date
fe9d45bcf5 Add/Fix doom/{discourse,issue-tracker,report-bug}
Updated their URLs
2021-05-20 21:09:32 -04:00
fdfd60dbad Don't call uname on Windows for doom/info
Mentioned in #5022
2021-05-10 04:46:14 -04:00
5d7526a224 doom-info: rename distro->system & add window-system 2021-05-06 04:27:33 -04:00
45147aace8 Refactor doom-debug-mode
Store intiial value in symbol plist instead. More info in 8ec8b2b.
2021-05-06 04:27:33 -04:00
ff64a9d106 Add doom-run-hooks
Produces more helpful (and harder-to-miss) error messages when a hook
emits an error. Also advises run-hook when doom-debug-mode is active, so
errors in hooks (generally, major mode hooks) don't quietly go
unnoticed.
2021-05-06 04:27:33 -04:00
2ef54eb782 Fix void-variable emacs-repository-branch in doom-info
Seems this var doesn't exist in some Emacs builds?
2021-04-29 17:24:40 -04:00
6e49cb5ce2 Reduce false positive symlinks in doom/info {emacs,doom}dir 2021-04-17 23:26:27 -04:00
233fd93b65 Add custom-file trait & custom-vars list to doom/info
So I can tell if users may have a custom.el where something may be
inadvertently saved.
2021-04-17 23:26:27 -04:00
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
ce65645fb8 Minor refactors & comment revision 2021-03-27 18:27:19 -04:00
ea105b874e Toggle async-debug on doom-debug-mode 2021-03-12 22:58:15 -05:00
2e1c10a6a4 Move sandbox code into own library 2021-03-12 22:58:15 -05:00
abec86310b Fix #4777: wrong-type-argument listp unpin error 2021-03-11 10:57:41 -05:00
ab7710adfd doom-info: fix args-out-of-range error 2021-03-08 10:25:09 -05:00
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
c5e3f4d632 New autoload/system.el core library 2021-03-01 22:27:17 -05:00
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
fc184852d0 Only replace usernames in file paths in doom/info 2021-01-11 02:49:00 -05:00
b7f6532e4f Fix startup hooks not running in vanilla sandbox 2020-12-01 18:16:12 -05:00
affd076d53 Minor refactors & reformatting 2020-12-01 13:53:46 -05:00
2c663ea5d4 Mention current theme and font in doom/info 2020-11-10 18:36:47 -05:00
45179fbf59 Mention current frame type in doom/info 2020-11-10 18:36:47 -05:00
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
3e0432959a Set user-init-file in sandbox 2020-11-02 21:03:28 -05:00
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
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
9b4fd806bb Simplify doom/info output 2020-10-20 23:21:11 -04:00
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
b29b865d30 Fix #3975: configure native-comp in sandbox 2020-10-06 02:08:17 -04:00
3cb7458d34 Fix #4033: correctly toggle explain-pause-mode
On doom-debug-mode.
2020-10-05 23:02:36 -04:00
ae3a2fa8c2 doom-info: use &nopath prefix for 404'd modules
The alternative is a stringp error.
2020-09-02 14:23:11 -04:00
5c6189fb4e Simplify doom/version output
Only really needs to output Doom's version and build info.
2020-08-24 23:00:32 -04:00
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
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
b5706c5793 Fix inverted on/off message from doom-debug-mode 2020-08-06 00:22:40 -04:00
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
3253ca8435 Minor refactors & comment/message revision 2020-05-25 22:11:15 -04:00
d1fcbf244b doom/toggle-debug-mode -> doom-debug-mode 2020-05-25 20:18:36 -04:00
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
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
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
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
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
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
f8a69464d0 Remove smartparens dependency for doom/info 2020-03-03 16:15:43 -05:00
b30f38ac06 Minor refactor & reformatting across the board 2020-02-23 15:42:43 -05:00
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
f600605de3 Add "unpin" section to doom/info
Important when debugging potential upstream issues.
2020-01-25 19:02:01 -05:00
4161014cfc doom/toggle-debug-mode: toggle garbage-collection-messages 2020-01-14 19:25:24 -05:00
a52909f5df Toggle {magit-refresh,use-package}-verbose on debug mode 2020-01-06 23:27:21 -05:00