Commit Graph

45 Commits

Author SHA1 Message Date
81ee250c09 Minor refactor & revision across the board 2019-09-03 00:59:46 -04:00
4b736bef68 Introduce doom-interactive-mode
As soft inverse alias for noninteractive; this makes it easier to unit
test functionality that depends on the session type.
2019-09-03 00:37:30 -04:00
081f09aac8 Fix 'doom run' #1724 2019-08-28 22:08:13 -04:00
e6c3a012e8 bin/doom: set user-emacs-directory
Fixes an issue where bin/doom wasn't running from the emacs config it
was located in.
2019-08-27 12:36:58 -04:00
aad0b2f842 Change how unit tests are set up and run
Moves init.test.el to core/test/init.el and initializes the test
environment from within the current session, rather than through a bash
script middle man.

TODO: don't buffer the unit test results
2019-08-27 00:07:01 -04:00
8ac1e1a781 Refactor doom init process
- Refactors doom-initialize
- Moves doom-initialize-modules call to init.el, to more easily isolate
  it during unit testing.
2019-08-27 00:05:12 -04:00
2122a31962 Add new instanced test runner
This will run the unit tests for each module in a separate Emacs
instance. It's a fair bit slower, but much more useful for something as
stateful as an Emacs config.

Now I just need to push the rewritten tests.
2019-07-26 03:12:07 +02:00
44c694da47 Make bin/doom options consistent & improve errors/docs 2019-07-26 03:12:07 +02:00
a7ce48c2df bin/doom: add -l/--local/DOOMLOCALDIR
Will come in handy for the new testing framework.
2019-07-22 02:37:48 +02:00
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
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
9236999df1 fix shebang 2019-06-08 07:13:19 +02:00
902f734cfb bin/doom POSIX compliance 2019-06-03 21:16:11 +10:00
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
348ba8f7d0 Correct type in bin/doom help 2019-04-04 18:54:27 -04:00
2e4feed1a4 bin/doom: alias -h/--help to help command 2019-03-03 21:56:24 -05:00
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
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
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
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
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
33d692a6be Make bin/doom work when it's symlinked 2018-08-30 16:31:09 +02:00
e5096f854d bin/doom: minimize user-error messages 2018-08-19 03:24:41 +02:00
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
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
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
fb406a165b bin/doom: more feedback about enabled options 2018-06-15 04:22:05 +02:00
2c0e93773b bin/doom: set YES and DEBUG envvars on -y/-d 2018-06-15 04:13:03 +02:00
bd55e53691 Add -i/--insecure flag to bin/doom 2018-06-15 03:58:04 +02:00
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
a3889dc8b1 bin/doom: don't set DOOMDIR
Now that we use it for doom-private-dir
2018-06-05 17:26:31 +02:00
08a453bd5e bin/doom: show usage info if no command is entered 2018-06-02 02:56:18 +02:00
6fdd6cb14c bin/doom: respond to -h/--help
In case people try that before `help`
2018-06-02 02:55:52 +02:00
d998ef3159 Fix emacs-lisp header in bin/doom 2018-05-29 23:14:33 +02:00
6b625e96b5 bin/doom: add support for custom emacs binary (EMACS envvar) 2018-05-28 15:49:50 +02:00
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
0750e877ab Ensure private/emacs dirs end with a slash 2018-05-25 20:06:01 +02:00
843c4d085f bin/doom: fix doom run 2018-05-25 01:25:56 +02:00
e3bdeabe0b bin/doom: discard extra command line args 2018-05-24 18:29:56 +02:00
e1e47b9173 bin/doom: minor refactor; no longer default to doom refresh
Better to be explicit, otherwise you get some weird cases where
incorrect commands fall through to a doom refresh.
2018-05-24 16:03:27 +02:00
8a7ebebf16 bin/doom: add -y/--yes option 2018-05-24 16:02:59 +02:00
499630fdcd bin/doom: handle doc/doctor especially 2018-05-24 16:00:46 +02:00
cf54b3705b bin/doom: alias h => help 2018-05-21 15:42:00 +02:00
337d2e9533 Make bin/doom (with no args) equivalent to make all 2018-05-21 01:38:17 +02:00
f058505306 New bin/doom (eventual replacement for make)
This commit adds bin/doom, which acts as the middle man that make once
was (and will stay for a while, though the documentation will shift away
from using it). It does everything the previous make interface did, but
is faster and more flexible. bin/doom should eventually replace the
makefile.

bin/doom also makes it easier to run Doom outside of ~/.emacs.d and
~/.doom.d with, for example:

  bin/doom run -p ~/.other.doom.d/ -e ~/.other.emacs.d

bin/doom.cmd is included for Windows users, but I don't recommend using
it yet. It hasn't been tested nor have I ever written a batch script
before.

Also update init.example.el with new defaults.
2018-05-21 01:38:17 +02:00