Commit Graph

95 Commits

Author SHA1 Message Date
a10693886e Fix double-rebuilding & lingering stale elc files
This update addresses two evasive issues:

1. Packages updated with `doom update` would not rebuild correctly,
   requiring a `doom refresh` afterwards,
2. Packages would fail to rebuild even if their byte-compiled files were
   stale. The result: "*.el is newer than *.elc" warnings at startup.
2019-07-26 20:17:29 +02:00
f8c4d075a5 Fix doom purge reporting failure despite success 2019-07-26 20:17:29 +02:00
c2ae6f30a5 Don't compress auto-mode-alist
Modules may readd their entries afterwards, anyway.
2019-07-26 15:33:32 +02:00
8834ba17e3 Only return non-nil if doom-packages-purge worked 2019-07-26 13:59:14 +02:00
9311744f7f Restore comment header in envvar files
`shell-command` erases the target buffer before piping output to it.
Which means the envvar file comment header was wiped out. This causes
trouble for the envvar file parser, which expects the envvar list to
start with two newlines.
2019-07-26 13:38:13 +02:00
321b797046 cli/packages: fix infinite waiting on pkg update
Caused lecause straight is prompting for input in a headless
session *and* from a headless async child instance of Emacs. It waits
forever for input for a question we could never see or respond to.

How sad.
2019-07-26 11:54:37 +02:00
44c694da47 Make bin/doom options consistent & improve errors/docs 2019-07-26 03:12:07 +02:00
829ad8c8b7 cli/packages: refactor doom-packages-purge
Sets it up for a later update where purging repos will no longer be the
default behavior.
2019-07-26 03:12:06 +02:00
905ba1d23c Refactor autoloads byte-compilation
- Let-bind byte-compile-* vars instead of using file-local vars.
- Fix duplicate bullet point in "Copied backup..." message.
- Only display refresh message if cli command was successful.
2019-07-26 03:12:06 +02:00
bdcb156b91 Manually finalize straight transactions
Straight expects to be used interactively, which don't do (yet). Its
transactional system depends on idle timers, which don't run in a
noninteractive session, so we have to nudge it ourselves.
2019-07-26 03:12:06 +02:00
2aa7dbfb27 cli/packages: refactor doom-packages-update
- Now handles errors from threads gracefully, rather than failing
  silently.
- Exploits straights modification system to trigger rebuilds
  later (instead of force-rebuilding after each update).
2019-07-26 03:12:06 +02:00
ba990a6c9d Build package autoloads in install order #374
Before this update, the autoloads files were collected in
lexicographical order (by traversing straight's build directory). By
using straight--build-cache's keys (which are entered in the order they
were registered) we avoid issues like
2019-07-23 21:54:50 +02:00
93f7520c79 Refactor Doom core init process (again)
- Eager-load all core autoloaded libraries if autoloads file isn't
  present.
- Renames functions to be more descriptive of their true purpose:
  - doom-initialize-autoloads -> doom-load-autoloads-file
  - doom-load-env-vars -> doom-load-envvars-file
- Use doom-module-p instead of featurep! for backend use (the latter is
  mainly syntax sugar for module use, and evaluates at compile/expansion
  time, which may cause hash-table-p errors early in the startup
  process).
- Reorder plist library to prevent load order race condition with the
  functions using the macros that haven't been defined yet.
2019-07-22 23:22:54 +02:00
afebdb35da Refactor autodef generator 2019-07-22 23:22:54 +02:00
a301330603 Fix doom update #1584
It would no-op if you responded "y" to the 'update them?' prompt, and
proceed if you responded "n".

Doom must be in its rebellious phase.

Also relevant: #1585
2019-07-22 23:22:38 +02:00
ffdb726ed8 Exclude gh.el from autoloads
See sigma/gh.el#95
2019-07-22 06:06:58 +02:00
6f878a38bd Fix incorrect path to init.example.el 2019-07-22 04:48:44 +02:00
1c4215c187 Fix 'command not found' errors for hidden commands 2019-07-22 04:46:14 +02:00
879ab3b2f3 Replace incorrect usage of doom-dir with doom-path 2019-07-22 04:20:52 +02:00
76bb892a0c Move cli/quickstart -> cli/install 2019-07-22 04:16:47 +02:00
d980920c97 cli/packages: fix rebuild ignoring argument 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
71ba4789ca Fix hash-table-p errors on reloading pkg autoloads
Because doom-modules wasn't set in doom-module-path's scope.
2019-07-22 02:37:44 +02:00
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
c3354e2620 cli: disable patch-macos (only --undo/-u works)
This has been deprecated for a while. I will remove it entirely with the 2.1
release, but for now, you can no longer patch your app bundle with this.

Use 'doom env refresh' instead.
2019-07-20 11:40:00 +02:00
527079094d Expand docs for doom {install,update,autoremove} 2019-07-12 14:16:53 +02:00
cb401c8302 Don't abbreviate autoload paths on windows #1548 2019-07-10 16:05:40 +02:00
dfa5324f3d cli/env: change how envvars are ignored
Improves the detection and omission algorithm of undesired envvars.
2019-07-10 15:06:45 +02:00
71d505b893 Cache doom-modules on doom refresh 2019-07-07 14:10:21 +02:00
52f575d4d2 Exclude PROMPT & RPROMPT envvars from env file 2019-07-02 14:16:58 +02:00
275f499ce9 Exclude PS1 envvar from env file 2019-07-02 13:01:28 +02:00
5d0c408c38 cli/env: ignore PWD envvar 2019-06-30 09:48:54 +02:00
9a02bd8ac8 Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
4f5f51237e cli/env: remove ignored vars retroactively
doom-env-ignored-vars is now treated as a list of regexps.

Also updates docstrings and announces ignored variables.
2019-06-26 14:31:06 +02:00
cdc41fc822 cli/env: reformat envvar file header
Places the generation command on line 2 for easier retrieval and
reformats explanation below.
2019-06-26 14:31:06 +02:00
b45591989b Revert remote reloading after refreshing autoloads
It's too flimsy, breaks easily, and doesn't handle the case where
multiple instances of Emacs are open.
2019-06-18 22:10:19 +02:00
6be401f1a7 Refactor Doom core & reload autoloads remotely
- Move subr-x/cl-lib loading to core-lib
- Revise docstrings for and rename various CLI functions to be more
  descriptive and up-to-date
- After regenerating autoloads file, bin/doom will try to reload
  autoloads files remotely, through the server/daemon, if possible. This
  is highly experimental and could break
2019-06-16 23:01:17 +02:00
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
47739698a8 Correct typo in doom env enable output #1499 2019-06-16 19:16:22 +02:00
84fd744e3f Minor, general refactor & comment revision 2019-06-14 11:08:59 +02:00
9d668791da Correct documentation of env_var file
Because of 3ed54e191b The `load-env-vars` advice is false now. Instead we can propose setting "doom-env-file" correctly, it seems to work for me.
2019-06-13 10:03:50 +02:00
6641e26283 Refactor package management API
Sets out to solve a number of issues with the package management
process. Namely:

- To-be-removed packages that are simply being removed are no longer
  incorrectly labeled "quelpa->elpa", but "removed" instead.
- A backend (elpa vs quelpa) column was added to the package listing
  confirmation when running `doom update`.
- Doom now correctly recognizes that packages installed with a psuedonym
  are installed, and will not endlessly attempt to uninstall and
  reinstall them on every `doom refresh`.
- Packages declared with :built-in will no longer lose their built-in
  marking if said package is not actually present in Emacs' site load
  paths. i.e. if you say it's built in, Doom won't question it.
- package!'s :ignore property is now treated as a form whose evaluated
  result will be used as its value.
2019-06-11 08:01:42 +02:00
29293aa17f Fix #1453: ensure package autoloads are reloaded
`doom-package-update` does not trigger regeneration of the package
autoloads file.
2019-06-10 09:38:56 +02:00
2631ca90d9 fix shebang for macos patch 2019-06-08 07:31:24 +02:00
0733a6dfac Replace SPC h p with doom/help-packages
Now that it supersedes describe-packages in functionality.
2019-05-30 14:01:48 -04:00
990896ac9c Fix doom quickstart help formatting
Not breaking lines in the right place.
2019-05-30 14:00:41 -04:00
93876028b4 cli/upgrade: always update packages
Even when Doom is up-to-date.
2019-05-22 17:10:44 -04:00
5ec0c5ba3f cli/env: refactor 2019-05-17 21:34:21 -04:00
3ed54e191b Fix #1322: replace load-env-vars w/ custom loader
I've replaced load-env-var with our own custom parser. load-env-var
expects a well-formatted env file, which neither env nor set produces,
which is what doom env uses to dump the shell environment.

This should fix issues that arise when envvars (like PATH) contain
arbitrary whitespace.
2019-05-17 20:19:35 -04:00
2cb5d895d7 cli/upgrade: fix void-function error
Derpity derp derp.

Derp McDerpington.

Derpsville, population me.
2019-05-15 17:29:43 -04:00