Commit Graph

65 Commits

Author SHA1 Message Date
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
2dc52bc9be 💥 Replace exec-path-from-shell w/ 'bin/doom env'
IMPORTANT: This is a breaking update for Mac users, as your shell
environment will no longer be inherited correctly (with the removal of
exec-path-from-shell). The quick fix is: 'bin/doom env refresh'. Also,
the set-env! autodef now does nothing (and is deprecated), be sure to
remove calls to it in your config.

Smaller changes:
+ This update also adds --no-* switches to doom quickstart
+ Includes general improvements to the documentation of several bin/doom
  commands.
+ Moves doom/reload* commands to core/autoload/config.el
+ doom/reload-project has been removed (it didn't actually do anything)

The breaking change:
This update adds an "envvar file" to Doom Emacs. This file is generated
by `doom env refresh`, populated with variables scraped from your shell
environment (from both non-interactive and interactive sessions). This
file is then (inexpensively) loaded at startup, if it exists.

+ The file is manually generated with `doom env refresh`.
+ It can be regenerated automatically whenever `doom refresh` is run by
  running `doom env enable` (`doom env clear` will reverse this and
  delete the env file).
+ `doom quickstart` will ask if you want to auto-generate this envvar
  file. You won't need it if you're confident Emacs will always be
  started from the correct environment, however.
+ Your env file can be reloaded from a running Emacs session with `M-x
  doom/reload-env`. Note: this won't work if the Emacs session you're
  running it in doesn't have a correct SHELL set. i.e. don't use this to
  create your first env file!

The idea isn't mine -- it's borrowed from Spacemacs -- and was
introduced to me in #1053 by @yurimx. I was impressed with it. Prior to
this, I was unhappy with exec-path-from-shell (no hate to the dev, I
understand its necessity), and 'doom patch-macos' wasn't ideal for mac
users (needed to be reapplied every time you update Emacs). What's more,
many users (even Linux users) had to install exec-path-from-shell
anyway.

This solution suffers from none of their shortcomings. More reliable
than patch-macos, more performant and complete than
exec-path-from-shell, and easily handled by bin/doom.
2019-03-28 01:56:09 -04:00
689a3bb446 Remove :modules from private packages in doom/info
Unnecessary bulk.
2019-03-16 23:59:50 -04:00
f065ddfdaa Fix doom/toggle-debug-mode
Previously this would error due to undefined `doom-debug-on-error`
variable.  Now behaves like a minor-mode function to toggle both
`doom-debug-mode` and `debug-on-error`.
2019-03-10 22:56:53 +10:00
681d0f1a2a Improve vanilla sandbox
Can now launch four different sessions:

1. Vanilla Emacs
2. Vanilla Doom (only Doom core)
3. Doom core + modules - private config
4. A full Doom session (load everything)
2019-03-09 04:53:14 -05:00
cec2b4e9bc Add doom/toggle-debug-mode command 2019-03-08 04:25:45 -05:00
a443d9ab07 Refactor doom-initialize-packages & package API
- Packages are initialized once, when package.el is first loaded, and
  must be updated manually via doom/reload-packages.
- Package->module association is now stored in the package's PLIST under
  :modules. This is an internal property and cannot be explicitly set
  through `package!'
- Add doom-package-list function
- Rename doom-get-packages to doom-find-packages
- Updated doom-find-packages' docstring
- Added the :core filter to doom-find-packages
- Simplified doom-initialize-packages
- doom/reload calls doom/reload-packages if necessary.
- Fix redundant properties in doom-packages
- Remove tracking of after!, def-package! and def-package-hook! blocks.
  Replaced with doom-package-list being able to see all packages, even
  in disabled modules.
- Add :built-in property to package! for dummy packages. This is
  important so that doom/describe-package can see built-in packages.
2019-03-08 04:25:44 -05:00
7c5eefee3e General, minor refactoring 2019-02-24 13:58:56 -05:00
9558b5e793 copy-seq -> copy-sequence
It's a possibility that the copy-seq alias doesn't exist in certain
builds of Emacs. Better safe than sorry.
2019-02-15 20:03:57 -05:00
0ebf526e01 Fix doom/info omitting first module in each category
Discovered in #941
2018-10-12 14:07:25 -04:00
77d2d84e14 Refactor core-cli
Moved to separate files for better organization.
2018-09-09 09:58:20 -04:00
7d3ffdff06 Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
25cc01ce41 Fix & refactor doom/open-vanilla-sandbox
It would fail to run the new instance because the arguments send to it
were incorrectly formatted.
2018-08-30 13:29:56 +02:00
1890356d11 Refactor & fix vanilla sandbox in tty Emacs
Except for Windows users. Doesn't seem to be possible to suspend and
foreground Emacs in windows' shell.
2018-08-23 16:18:56 +02:00
12f6add329 package-initialize for doom/open-vanilla-sandbox 2018-08-23 11:27:27 +02:00
480378d30c Fix doom/info in noninteractive sessions 2018-08-16 01:26:28 +02:00
b149dcffd4 Replace esup with doom/profile-emacs #788
Since esup (called directly) doesn't work with Doom.
2018-08-13 03:50:17 +02:00
25d9786edf Add early-init-file support to doom/profile-emacs #788
And fix wrong-type-argument: stringp errors when running esup.

Also ensure that doom|run-all-startup-hooks sets after-init-time.
2018-08-13 03:47:33 +02:00
c530866f0a Add option to load doom in vanilla sandbox
This adds the option to run elisp in an environment where doom core &
modules are loaded, but not your private modules or config.

Also updates the vanilla sandbox text template.
2018-08-12 02:45:01 +02:00
d6f89aaafd Make doom/copy-backtrace copy the whole backtrace 2018-08-10 19:13:31 +02:00
c33de42dce Don't use uname in doom/info on windows 2018-07-17 18:29:43 +02:00
b7eeaa4525 Improve docstring for doom/copy-backtrace 2018-07-14 19:33:47 +02:00
7ed9c5196f Add doom/copy-backtrace command 2018-07-13 13:00:42 +02:00
1530cdbdb6 Fix vanilla sandbox creating too many temp files
On every execution.
2018-07-03 03:41:08 +02:00
ca2c8b5a45 Minor refactor, across the board
Do you see the board? Now look at the other side. That's how far this
refactor extends.

Yes.
2018-06-18 15:02:24 +02:00
72201fead5 Major refactor of package management API
Fixes issues where:

+ package!'s :disable property was ignored and def-package! wouldn't
  ignore disabled packages.
+ Certain quelpa packages were being removed/reinstalled infinitely
+ Improved flexibility of doom-get-packages (its docstring needs to be
  updated!)
2018-06-12 00:02:04 +02:00
7e00a83acc Update & refactor doom-info 2018-06-10 17:28:17 +02:00
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
73045f9950 Fix doom//quickstart & improve feedback (make quickstart) 2018-05-25 12:49:39 +02:00
ea86b1075f Fix doom-template-exists-p 2018-05-24 21:20:02 +02:00
18a6df5e6f Fix doom/info 2018-05-24 21:20:02 +02:00
592e16d76d Conform debug commands to naming convention 2018-05-24 16:40:37 +02:00
f80be3682b New open-bug-report & open-vanilla-sandbox commands 2018-05-20 12:18:16 +02:00
7b8917ed42 Split core/autoload/util.el into {help,debug}.el 2018-05-20 12:13:05 +02:00
3dfffe455e Rename core/autoload/debug.el => util.el
"debug.el" conflicted with the built-in debug package
2018-04-22 17:21:34 -04:00
afdf2047a7 Improve error handling in doom/info 2018-03-20 20:45:16 -04:00
44d30ca3ce Fix doom-active-minor-modes 2018-03-14 04:49:14 -04:00
0425724571 Major rewrite of doom module API
+ Fix #446, where the .local/packages.el cache was generated with
  a faulty load-path.
+ Entries in the doom-modules hash table are now plists, containing
  :flags and :path, at least.
+ Add doom-initialize-modules for loading module config.el files.
+ Add doom-module-get for accessing this plist, e.g.

    (doom-module-get :some module)         ; returns plist
    (doom-module-get :some module :flags)  ; return specific property

+ Replace doom-module-enable with doom-module-set, e.g.

    (doom-module-set :some module :flags '(+a +b +c))

+ Remove doom-module-flags (use doom-module-get instead)
+ Rename doom-module-enabled-p with doom-module-p
+ Replace doom-module-path with doom-module-find-path and
  doom-module-expand-file. The former will search for an existing module
  or file in doom-modules-dirs. The latter will expand the path from
  whatever path is stored in doom-modules.
+ Replace doom-module-paths with doom-module-load-path
+ Changed doom! to allow for nested doom! calls by delaying the loading
  of module config.el files until as late as possible.
+ Refactor doom-initialize-packages to only ihitialize package state
  (i.e. doom-packages, package-alist, and quelpa-cache), rather than its
  previous behavior of loading all Doom files (and sometimes all module
  files). This is faster and more predictable.
2018-03-02 19:14:45 -05:00
2b1c323dbf 💥 Redesign private sub-module system
~/.doom.d/modules is now a full module tree, like ~/.emacs.d/modules.
Symlinks are no longer involved.

Private modules can now shadow Doom modules. e.g.
~/.doom.d/modules/lang/org will take precendence over
~/.emacs.d/modules/lang/org.

Also, made doom--*-load-path variables public (e.g. doom--site-load-path
=> doom-site-load-path), and rearranged the load-path for a 10-15%
startup boost.
2018-02-16 02:11:10 -05:00
0019deb276 Rewrite doom/info 2018-02-10 17:27:02 -05:00
7d9f2e5078 New doom/toggle-debug-mode command 2018-02-04 17:53:05 -05:00
245ef02597 Fix misplaced info in doom/info output
And update its docstring
2018-02-04 01:39:50 -05:00
e2a6028643 Add docstring to doom/toggle-profiler 2018-02-03 22:41:34 -05:00
ee24aba034 Fix whitespace inconsistencies in doom/info 2018-02-03 22:35:40 -05:00
1dfe6c472a Rewrite doom/info for concise debug output 2018-02-02 23:44:09 -05:00
189e401197 Refactor doom/info 2017-12-31 18:32:34 -05:00
5048b72c12 Add doom/info command
This copies debug information about the current session of Doom Emacs in
the clipboard, which folks can use to include system information with
their bug reports!
2017-12-31 17:49:31 -05:00
4af354c693 Fix doom/am-i-secure 2017-12-20 19:57:15 -05:00
76a4ae459d Fix obsolete (when|if)-let messages in Emacs 26 2017-12-10 14:49:52 -05:00
8f0268d9fc Add GNUTLS feature detection to doom/am-i-secure 2017-09-15 14:37:19 +02:00