Commit graph

435 commits

Author SHA1 Message Date
Henrik Lissner
a6e25209b8
Fix #2046 replacing process-environment, exec-path & shell-file-name 2019-11-21 17:16:46 -05:00
Henrik Lissner
db19241936
Use gcmh package to manage adjust GC interactively 2019-11-21 14:46:45 -05:00
Henrik Lissner
a4fcbb40e9
Revert ed3408d #2085 2019-11-21 00:36:40 -05:00
Henrik Lissner
304506edcc
Fix first envvar set by doom-load-envvar-file
Potentially fixes #2077
2019-11-19 19:09:44 -05:00
Henrik Lissner
ed3408d839
Move tramp-histfile-override to doom-cache-dir 2019-11-17 18:45:30 -05:00
Henrik Lissner
fa1a19a1f0
core: minor refactor & reformatting 2019-11-17 16:48:26 -05:00
Henrik Lissner
7a7b89ded1
Init packages from init.el in noninteractive sessions
This allows users to load init.el for their batch scripts, rather than
some monstrosity involving loading core/core.el and doom-initialize.
2019-11-17 01:17:34 -05:00
Henrik Lissner
d683effd23
Recognize single-character envvars in doom-load-envvars-file
And preserve insertion order for process-environment's new value.
2019-11-08 16:02:06 -05:00
Henrik Lissner
d78d584fdf
Demote autoload errors to warnings 2019-11-08 16:02:06 -05:00
Henrik Lissner
873fc5c0db
Rewrite core-cli
Highlights:
- 'doom purge' now purges builds, elpa packages, and repos by default.
  Regrafting repos is now opt-in with the -g/--regraft switches.
  Negation flags have been added for elpa/repos: -e/--no-elpa and
  -r/--no-repos.
- Removed 'doom rebuild' (it is now just 'doom build' or 'doom b').
- Removed 'doom build's -f flag, this is now the default. Added the -r
  flag instead, which only builds packages that need rebuilding.
- 'doom update' now updates packages synchronously, but produces more
  informative output about the updating process.
- Straight can now prompt in batch mode, which resolves a lot of issues
  with 'doom update' (and 'doom upgrade') freezing indefinitely or
  throwing repo branch errors.
- 'bin/doom's switches are now positional. Switches aimed at `bin/doom`
  must precede any subcommands. e.g.
    Do: 'doom -yd upgrade'
    Don't do: 'doom upgrade -yd'
- Moved 'doom doctor' from bin/doom-doctor to core/cli/doctor, and
  integrated core/doctor.el into it, as to avoid naming conflicts
  between it and Emacs doctor.
- The defcli! macro now has a special syntax for declaring flags, their
  arguments and descriptions.

Addresses #1981, #1925, #1816, #1721, #1322
2019-11-08 16:02:06 -05:00
Henrik Lissner
99cd52e70f
💥 Drop Emacs 25.x support
Emacs 26.1 is Doom's new minimum supported version

Closes #2026
2019-11-08 16:02:06 -05:00
Henrik Lissner
8db3b7dca7
Always load package autoloads file & demote errors
Indirectly addresses #2010
2019-11-04 17:21:56 -05:00
Henrik Lissner
7b9991711a
defvar->defconst for dir vars & expand DIR envvars
- Use defconst so that we can reload core.el if these variables change.
- Expand DIR envvars to ensure their correctness
2019-11-01 15:12:12 -04:00
Henrik Lissner
d407b3355a
Fix nonsensical error if autoloads are missing
`signal` treats its second argument like a list. Passing it a string
make it spew out the message as a list of character codes.
2019-10-30 00:03:39 -04:00
Henrik Lissner
90d9fd65b7
Fix void-function if-let on startup #1982 2019-10-30 00:03:39 -04:00
Henrik Lissner
63dfd298ca
Append slash to DOOMLOCALDIR & DOOMDIR
If needed.
2019-10-29 22:36:51 -04:00
Henrik Lissner
5b1dc3c63f
Support INSECURE envvar (again) 2019-10-26 23:44:28 -04:00
Henrik Lissner
12b276c4d6
Fix void-variable EMACS26+ issue
By loading core-lib a little later, for now.
2019-10-18 22:21:25 -04:00
Henrik Lissner
7b45b39860
Refactor doom-load-packages-incrementally 2019-10-18 22:09:28 -04:00
Henrik Lissner
43e8ddbc6d
Add docstrings to GC hooks
And correct grammar in a comment.
2019-10-18 22:09:28 -04:00
Henrik Lissner
2f4ac32b0d
Load core-lib & refactor x-win advice 2019-10-18 22:09:28 -04:00
Henrik Lissner
323e0adf45
Minor refactors & reformatting across the board 2019-10-17 01:47:58 -04:00
Henrik Lissner
ddce674a6c
Minor refactors across the board 2019-10-07 16:10:33 -04:00
Henrik Lissner
eae45e664b
doom-load-envvars-file: split-string->parse-colon-path 2019-10-05 13:00:06 -04:00
Undead Kernel
a3d79dcfa5 doom/core: avoid the litter of session.* files
When the  x-window system commands emacs to quit, emacs saves a session in
`.emacs.d/session.*` by default. There is no easy way to change the save
path. This commit overwrites the function responsible for creating the session
file name. We set the session file to reside in `doom-cache-dir`.
2019-09-28 15:22:40 +02:00
Henrik Lissner
45240699e0
Remove doom-elpa-dir variable
And just use package-user-dir. No need for two variable when one will
do.
2019-09-26 14:26:47 -04:00
Henrik Lissner
280a2407ab
Fix doom-load-envvars-file
A former regexp consumed the first letter of each environment variable's
name.
2019-09-06 14:17:34 -04:00
Henrik Lissner
29055ae6a3
Disable projectile-{ag,ripgrep}
Emit warnings for commands that won't work, as is, and that Doom
already provides a better alternative for.
2019-09-06 14:17:34 -04:00
Henrik Lissner
3b7711420f
General comment revision & cleanup 2019-09-06 00:25:35 -04:00
Henrik Lissner
cbe05e6df4
Soften formatting rules for envvar files
doom-load-envvar-file would fail if there weren't two newlines
indicating "the start of the envvar list", or if envvars were commented
out/were padded with whitespace. These rules have been relaxed.
2019-09-05 13:10:21 -04:00
Henrik Lissner
62b089ba36
Refactor core & core-lib
And make their tests pass
2019-09-03 00:59:46 -04:00
Henrik Lissner
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
Henrik Lissner
8766499b0d
Fix some file permissions errors
Occurs when deferred packages are loaded while in an unreadable or
non-existent directory.
2019-08-27 00:05:12 -04:00
Henrik Lissner
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
Henrik Lissner
a7bdf6825a
Set default exec-path & shell-file-name
In case doom-load-envvars-file is called when these vars have local
bindings.
2019-08-15 18:42:26 -04:00
Henrik Lissner
b29a7ba8fe
Fix 'doom compile'
Fixes `void-function define-key!` error.
2019-08-15 01:33:40 -04:00
Henrik Lissner
48415edce3
Fix #1644: --restore switch not recognized 2019-08-08 23:30:16 -04:00
Henrik Lissner
3423974234
Minor refactors & tweaks across the board 2019-08-06 14:50:42 -04:00
Henrik Lissner
3e4c02f92f
Resolve symlinks in doom-emacs-dir
Shaves a little time off startup on slower drives.
2019-08-06 14:46:15 -04:00
Henrik Lissner
a6d77e951f
Move doom-run-all-startup-hooks-h to autoload/debug.el 2019-07-28 02:32:25 +02:00
Henrik Lissner
4d73f659f5
Refactor out nested hook defuns & refactor core.el
Moves file-handling config to core-editor.el.
2019-07-27 02:46:49 +02:00
Henrik Lissner
38b69785dd
Don't load pkg autoloads in non-interactive sessions
Fixes an issue where autoloads would bloat load-path and auto-mode-alist
with duplicates because they were build on top of old autoloads state.

We initialize packages manually at the start of non-interactive sessions
anyway.
2019-07-26 20:17:29 +02:00
Henrik Lissner
08ba22c653
Minor refactor/reformatting of doom-initialize
- No need to use after! (it has a little magic associated with it that are
  meaningless this early in the startup process), so we use
  with-eval-after-load instead.

(And I've been itching for an excuse to use doom-rpartial)
2019-07-26 20:17:29 +02:00
Henrik Lissner
331a53c0a1
Complain if envvar file exists, but isn't readable 2019-07-26 13:15:28 +02:00
Henrik Lissner
c795a988e6
Conform many modules to new conventions 2019-07-23 12:30:47 +02:00
Henrik Lissner
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
Henrik Lissner
a7ce48c2df
bin/doom: add -l/--local/DOOMLOCALDIR
Will come in handy for the new testing framework.
2019-07-22 02:37:48 +02:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
0a84d2f0a9
core-lib: add auto-minor-mode, revise def-project-mode!
- Adds the auto-minor-mode package to replace our in-house
  implementation.
- Merges associate! into the def-project-mode! macro because associate!
  on its own is less useful than auto-minor-mode-alist,
  auto-minor-mode-magic-alist or hooks.
- Changes the semantics of :modes and :add-hooks properties of
  def-project-mode!. Its arguments are evaluated as is; lists will need
  to be quoted.

squash! core-lib: remove associate! macro
2019-07-22 02:30:39 +02:00