Commit Graph

47 Commits

Author SHA1 Message Date
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
5a8a367510 [tools/password-store] copy-user key in ivy-pass 2018-12-27 16:16:13 +02: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
031deb7beb Fix C-k keybind in pass-mode 2018-06-23 20:00:21 +02:00
a53503eadb Fix +pass functions failing to locate pass entries
They use `password-store-dir` to determine where password-store is, but
that function isn't loaded in time for them to use it!
2018-06-23 01:55:52 +02:00
34cd055670 Autoload +pass/ivy 2018-06-23 01:53:59 +02:00
0501ea9c2c Fix auth-source-pass & password-store autoloads
They were marked as macros, but aren't macros!

This may fix #696
2018-06-19 12:01:52 +02:00
6808c46b58 💥 Change set-popup-rule! usage
Now accepts a flat plist of all its former parameters, including new
:parameters and :actions properties to increase your control over the
fate of your windows.

The old usage of set-popup-rule! is deprecated and may not work right!

The :ui popup module has also seen a major refactor to improve
efficiency and load times.

Sorry! This is the last "big" change before 2.1!
2018-06-18 02:34:16 +02:00
eaca8c58fa Move unit tests from ert to buttercup
Easier to organize and write. Now I can hopefully strive for better
coverage!
2018-06-15 03:42:01 +02:00
98d2f1de3f Add set-env! autodef; make :env obsolete 2018-06-15 03:42:01 +02:00
d8b1e469bc Introduce autodefs to replace some settings
+ :popup -> set-popup-rule!
+ :popups -> set-popup-rules!
+ :company-backend -> set-company-backend!
+ :evil-state -> set-evil-initial-state!

I am slowly phasing out the setting system (def-setting! and set!),
starting with these.

What are autodefs? These are functions that are always defined, whether
or not their respective modules are enabled. However, when their modules
are disabled, they are replaced with macros that no-op and don't
waste time evaluating their arguments.

The old set! function will still work, for a while.
2018-06-15 03:42:01 +02:00
1e81a35461 Minimize dependence on map!
This is in preparation for general.el integration coming in 2.1.1. It is
very likely that map! will change (and even more, be split into several
macros). Not much, but change none-the-less. Specifically, the state
keywords (e.g. :nvi, :n, :i) will be removed in favor of a :state
property that takes a list, e.g. (normal visual insert).

In any case, both map! and general are also relatively expensive
compared to define-key and evil-define-key* (and the new define-key!
macro), so use that when we can.

This also means changes to either API won't affect Doom's modules in the
long term.
2018-06-03 15:46:00 +02:00
11c7a5c1f4 Fix test for tools/password-store 2018-05-29 17:55:34 +02:00
e88f84fd02 Rewrite tools/password-store API 2018-05-29 17:50:55 +02:00
1a452b6842 💥 Change first arg of load! macro
load!'s first argument is no longer a symbol (that will cause
void-variable errors now) to save on unnecessary interning and simplify
compile-time logic. It accepts any valid form that evaluates to a string
now.

If you use load!, you need to change its argument to a string!

e.g. (load! +my-module) => (load! "+my-module")
2018-05-27 12:52:28 +02:00
09cb4f6716 Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.

In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.

Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.

This gained me a modest ~10% boost in startup speed.
2018-05-25 00:46:16 +02:00
f24725382f Update password-store +auth to only use auth-source-pass
Now that auth-password-store has been renamed to auth-source-pass and it matches
the same feature included in emacs 26 under the same name we don't need custom
checks and package loading.
2018-03-27 19:37:43 -07:00
855bc5bc20 tools/password-store: auth-source-store => auth-source-pass #480 2018-03-25 22:45:02 -04:00
74bbefc5fd tools/password: auto-password-store => auth-source-store #480
The package was renamed upstream.
2018-03-25 20:26:06 -04:00
de40ccd361 tools/password-store: don't add to auth-sources by default #404 2018-03-18 15:33:08 -04:00
6c4e048c23 General refactor & cleanup 2018-02-14 07:47:22 -05:00
84cba91e50 feature/popup: remove default slot & window-width
...and fix :popup not mapping the size parameter to the correct
dimension when no side is specified.
2018-01-07 05:56:00 -05:00
08b479b06f Rename popup parameter escape-quit => quit 2018-01-06 02:42:53 -05:00
91357a3e5d 💥 Replace core-popup with new feature/popup module
This is a breaking change! Update your :popup settings. Old ones will
throw errors!

Doom's new popup management system casts off its shackles (hur hur) and
replaces them with the monster that is `display-buffer-alist`, and
window parameters.

However, this is highly experimental! Expect edge cases.  Particularly
with org-mode and magit (or anything that does its own window
management).

Relevant to #261, #263, #325
2018-01-06 02:17:43 -05:00
8ad2666f8f Refactor and fix unit tests, plus isolate them better 2017-12-31 14:58:45 -05:00
86934fe1a4 Fix typo 2017-12-25 14:30:17 +02:00
3bc0b18184 tools/password-store: fix emacs 26 compatibility 2017-12-10 15:37:01 -05:00
76a4ae459d Fix obsolete (when|if)-let messages in Emacs 26 2017-12-10 14:49:52 -05:00
9d81bc5a8b Major refactor: use-package-always-defer = nil & use :hook
Possibly breaking change: packages are no longer deferred by default.

Addresses #286
2017-12-08 23:14:11 -05:00
9506cc9902 Take 2 on auth-store-pass detection in Emacs 26+ 2017-07-29 00:00:21 +02:00
ff9965e039 Disable +pass-get-field in noninteractive session
Otherwise you'll get pass pinentry prompts in while byte compiling.
2017-07-28 23:59:36 +02:00
f467c29252 Remove auto-store-pass support (keep things simple!) 2017-07-14 18:20:23 +02:00
b7776b7f7b Fix auth-store-pass error in Emacs 26+ #146 2017-07-14 11:58:21 +02:00
f492a98937 tools/password-store: +pass-ivy was renamed to +pass/ivy 2017-06-24 18:46:44 +02:00
816df321a5 General refactor & cleanup 2017-06-14 21:15:19 +02:00
9c93c453e8 Reorganize unit-tests and test workflow
+ Moved unit tests out of tests/ and into their respective modules.
+ Rewrite makefile and added these tasks:
  + <MODULE>/<SUBMODULE> -- byte-compile a specific module
  + test:<MODULE>/<SUBMODULE> -- runs tests for a specific module
  + testi -- run tests in an interactive session of Emacs (WIP)
  + run -- opens an Emacs session with this config; useful when it is in
    a non-standard location.
2017-06-14 21:15:19 +02:00
1678bf8382 tools/password-store: version check + refactor 2017-06-13 11:04:18 +02:00
146de3e618 tools/password-store: add auth-password-store package decl 2017-06-12 18:58:31 +02:00
ca07eb5077 Add +pass-get-user & +pass-get-secret (#103) 2017-06-12 02:43:35 +02:00
77298f3672 +pass/ivy: fix open-url; add +pass-get-field (#103) 2017-06-12 02:39:25 +02:00
37012b86ca +pass/ivy: add get-field action (#103) 2017-06-12 01:43:02 +02:00
2f3f966990 +pass/ivy: remove test data (#103) 2017-06-12 01:42:53 +02:00
0047baf15c tools/password-store: improve ivy support (#103)
+ Removed +pass/find & +pass/browse.
+ Added +pass/open (delegates to +pass/ivy, helm-pass or pass, depending).
+ Added +pass/ivy with copy password/username, open url and edit entry
  actions.
2017-06-11 18:02:47 +02:00
20cd13c572 tools/password-store: add helm-pass support 2017-06-11 18:00:45 +02:00
588858a21e Rudimentary ivy support for pass (#103) 2017-06-11 16:49:33 +02:00
2b3311faa2 tools/password-store: refactor 2017-06-11 16:49:33 +02:00
9c25865942 tools/password-store: initial commit
pass doesn't play at all with shackle yet
2017-06-11 15:55:30 +02:00