Commit Graph

109 Commits

Author SHA1 Message Date
Henrik Lissner
9bea168cc1
Rewrite doom-doctor
- Use message library instead of reinventing the wheel
- Fix -d/--debug support for `bin/doom doctor`
- Add indent and autofill support to print! and format!
- Add doom-message-backend for forcing format! to use a specific backend
- Phase out anaphoric when! macro in doctor scripts, it was hardly used
2019-04-24 18:16:05 -04:00
Henrik Lissner
0caf0abcbb
Major refactor of the Doctor
- Reorganize tests into logical groups
- Report Doom initialization with more granularity
- Make better use of whitespace and indentation in output
- Use backquotes for quoting symbols in pcase (for backward
  compatibility)
- Initialize Doom completely and manually (less maintanence headache and
  more certain to work across Doom updates).
2019-04-19 13:31:27 -04:00
Henrik Lissner
6afc8e5563
Add stale elc check to doctor
And short-circuit internal checks if Doom fails to load.
2019-04-17 18:38:02 -04:00
Henrik Lissner
20a63a35ab
Reformat doctor output & add DOOMDIR check
- Will now warn you if both .doom.d and .config/doom exists.
- Include branch and last commit date in doctor/info, next to Doom
  version.
- Issues in Doom core are now indented.
2019-04-16 20:57:03 -04:00
Henrik Lissner
f37b1342a2
Don't show hostname in doom info or doctor output
It doesn't help me, and some folks may not want it publicized.
2019-04-16 20:57:03 -04:00
Henrik Lissner
54d180b376
Ensure user-emacs-directory in doctor
Also allow it to be customized with EMACSDIR envvar
2019-04-15 03:47:24 -04:00
Henrik Lissner
348ba8f7d0
Correct type in bin/doom help 2019-04-04 18:54:27 -04:00
Henrik Lissner
36919fedda
bin/org-capture: refactor & use -k switch 2019-03-29 23:49:47 -04:00
Henrik Lissner
ddfcc4299c
bin/doom-doctor: minor refactor
Also allow Doom init errors to be debugged.
2019-03-28 02:01:38 -04:00
Henrik Lissner
acf67244ca
Improve doom doctor
+ Bump Emacs version check to 25.3
+ Fix doctor reporting missing packages that are user-disabled
+ Add Doom core checks for over-sized cache files (a possible cause of
  freezes/hangs)
+ Emit a backtrace from module doctor script errors
+ Fix doom doctor not respecting DEBUG envvar
2019-03-16 23:59:50 -04:00
Henrik Lissner
2e4feed1a4
bin/doom: alias -h/--help to help command 2019-03-03 21:56:24 -05:00
Henrik Lissner
0d902e8cf1
bin/doom: demote missing -p path error to warning
The error would prevent bin/doom quickstart from working with a custom
private directory. Instead, just warn that it doesn't exist.

Fixes #974
2018-10-21 20:01:09 -04:00
Henrik Lissner
2637544022
bin/doom: refactor no-args error message
Dumping usage to stdout just drowns out the problem: they forgot a
command!
2018-09-30 00:55:39 -04:00
Henrik Lissner
a91df46aa8
bin/doom: revert debug-on-error = t
It's too destructive. Will sometimes crash the script with no error
output.
2018-09-28 21:59:06 -04:00
Henrik Lissner
8a8b5c6089 Refactor bin/doom & doom-dispatch
Done to make bin/doom produce better debugger output (and more readily).
A lot of bin/doom errors aren't recurring, so it's better to produce the
full error report ASAP.
2018-09-28 21:13:27 -04:00
Edwin Török
575c3cccd9 make compile: exit with non-zero code on error
This would allow the CI to fail to compilation errors.
2018-09-12 22:55:13 +01:00
Henrik Lissner
f7326a2c40
Update doom doctor for new init process
For changes made in 31bcac9a
2018-09-09 09:58:19 -04:00
Henrik Lissner
33d692a6be
Make bin/doom work when it's symlinked 2018-08-30 16:31:09 +02:00
Henrik Lissner
e5096f854d
bin/doom: minimize user-error messages 2018-08-19 03:24:41 +02:00
Ben Johnson
94092081db
Fix running make from inside doom
The `term.el` package defines an environment variable `EMACS` inside its shell process, containing the Emacs and term.el version, in a string that looks like this: `26.1 (term:0.96)`. This interferes with the `bin/doom` command, which expects that environment variable to be a path to an Emacs binary. Trying to run make inside a doom terminal thus gives you this error:

```
Emacs isn't installed
make: *** [Makefile:5: all] Error 1
```

This simple fix just checks if `$EMACS` looks like a term version string, and ignores it if so.
2018-08-14 01:08:13 -07:00
Josh Seba
bc5621adb6 Add ability to pass additional args to 'doom run' 2018-07-16 16:35:05 -07:00
Josh Seba
92b8222529 %* doesn't behave as expected
%* is unaffected by SHIFT, so using it results in Emacs loading a
buffer named "run" on startup.

In order to preserve running all supported commands directly with
the bin/doom script, change the magic string in doom.cmd to one that
is unused ("runemacs")
2018-07-13 19:08:24 -07:00
Josh Seba
a0604e3feb Tweak the command used for the "run" argument
- Using "start" will allow the batch script to return immediately,
  rather than waiting for the command to finish.
- Using "runemacs" (instead of plain "emacs") will hide the console
  window that is displayed while Emacs is running
2018-07-12 15:45:37 -07:00
Josh Seba
31143f9f9e Fix a couple errors in doom.cmd
- Properly stringize the optional first argument
- Use correct path to init.el (relative to script directory)
2018-07-12 15:20:19 -07:00
Henrik Lissner
1b98422291
$* -> %* in bin/doom.cmd 2018-07-09 15:29:38 +02:00
Henrik Lissner
8b8c7c7411
doom-doctor: use ~ instead of HOME envvar 2018-07-05 01:32:38 +02:00
Henrik Lissner
ca5ff92192
Fix void-variable: package errors in doom doctor
Reported by @zaiste
2018-06-27 12:02:21 +02:00
Henrik Lissner
81753150a7
doctor: don't regard disabled/ignored packages
And refactor error handling.
2018-06-26 18:58:07 +02:00
Henrik Lissner
6c8df7c6bb
bin/org-capture: reformat & improve daemon cleanup
Ensures the temporary daemon is killed after org-capture is finished.
2018-06-24 16:31:14 +02:00
Henrik Lissner
8e23ab0a05
Add -h/--help usage info to bin/org-tangle 2018-06-20 11:29:29 +02:00
Henrik Lissner
60d6f70646
bin/org-tangle: fix uninitialzed all-blocks et co 2018-06-20 11:00:20 +02:00
Henrik Lissner
9f9b7ad792
Add EMACSDIR envvar support to bin/doom
As an alternative to the -e/--emacsd options. Sometimes it is more
consistent to customize bin/doom this way. e.g.

EMACS=/another/bin/emacs DOOMDIR=~/someplace EMACSDIR=~/emacsd bin/doom install
2018-06-20 02:07:20 +02:00
Henrik Lissner
151858a8dc
Redesign Doom error handling
Another refactor, again to improve the locality of doom errors and make
the data that accompanies them more useful in determining the origin and
source of issues. Also, bin/doom is now a little more informative about
how to debug errors.
2018-06-20 02:07:12 +02:00
Henrik Lissner
5400d608f4
Improve bin/org-tangle #691
Adds tag filtering. Also tangles regularly by default (with -p/--print,
it will print tangled blocks to stdout instead).
2018-06-17 14:22:29 +02:00
Henrik Lissner
fb406a165b
bin/doom: more feedback about enabled options 2018-06-15 04:22:05 +02:00
Henrik Lissner
2c0e93773b
bin/doom: set YES and DEBUG envvars on -y/-d 2018-06-15 04:13:03 +02:00
Henrik Lissner
bd55e53691
Add -i/--insecure flag to bin/doom 2018-06-15 03:58:04 +02:00
Henrik Lissner
eb254afd51
Fix doom doctor
Update doom loader to reflect recent changes.
2018-06-13 20:10:37 +02:00
Henrik Lissner
01d1a814f9
Refactor doom-initialize functions
Removes doom-module-table; which was inflexible (though more stable). It
prevented you from putting your doom! block in anywhere but
~/.doom.d/init.el.

It is replaced (somewhat) by (doom-modules).
2018-06-10 17:30:26 +02:00
Henrik Lissner
90be135d8b
bin/doom: ensure default-directory is in emacs dir
user-emacs-directory could be changed elsewhere.
2018-06-05 17:26:45 +02:00
Henrik Lissner
a3889dc8b1
bin/doom: don't set DOOMDIR
Now that we use it for doom-private-dir
2018-06-05 17:26:31 +02:00
Henrik Lissner
08a453bd5e
bin/doom: show usage info if no command is entered 2018-06-02 02:56:18 +02:00
Henrik Lissner
6fdd6cb14c
bin/doom: respond to -h/--help
In case people try that before `help`
2018-06-02 02:55:52 +02:00
Henrik Lissner
d998ef3159
Fix emacs-lisp header in bin/doom 2018-05-29 23:14:33 +02:00
Henrik Lissner
6b625e96b5
bin/doom: add support for custom emacs binary (EMACS envvar) 2018-05-28 15:49:50 +02:00
Henrik Lissner
fd86bfb027
Fix load-path not including site-lisp directories
This would cause plugins like mu4e to not be detected and included in
the cached load-path generated by doom-package-autoload-file.
2018-05-26 03:03:01 +02:00
Henrik Lissner
0750e877ab
Ensure private/emacs dirs end with a slash 2018-05-25 20:06:01 +02:00
Henrik Lissner
242a28ddc9
doctor: initialize more state for more accurate tests #603 2018-05-25 19:59:56 +02:00
Henrik Lissner
843c4d085f
bin/doom: fix doom run 2018-05-25 01:25:56 +02:00
Henrik Lissner
e3bdeabe0b
bin/doom: discard extra command line args 2018-05-24 18:29:56 +02:00