Commit Graph

3446 Commits

Author SHA1 Message Date
2a079e2733 Load env even in tty Emacs
Even if it matches the current shell (or doesn't), the env file should
be the authority.
2019-04-03 01:53:20 -04:00
700cda370b Refactor doom env
- Limits process-environment during scraping
- Add `doom-env-executable` and `doom-env-switches` variables
- Announce what commands were run to produce your env var within env var
  file header
2019-04-03 00:09:22 -04:00
34e3985409 Remove doom/open-env
This file shouldn't be edited by hand anyway.
2019-04-02 20:09:44 -04:00
fd48329c36 Reset exec-path/shell-file-name on doom/reload-env 2019-04-02 00:55:43 -04:00
cd68044b5d Merge pull request #1299 from jochu/patch-1
Escape key regexps when building which-key leader prefix
2019-04-02 00:30:05 -04:00
7dcc4fc55b Merge pull request #1302 from shanavas786/fd-ex-name
Use variable for `fd-find` binary name
2019-04-02 00:27:33 -04:00
390edee702 ui/fci -> fill-column: replace fci w/ hl-fill-column
fci was buggy, slow and presented numerous incompatibilities with other
modes. It is also unmaintained.

Relevant to #1045
2019-04-01 13:44:20 -04:00
a6cc66e21e Refresh exec-path & shell-file-name
When loading envvars, since `load-env-vars` only affects the environment
and not Emacs' variables.
2019-04-01 13:15:15 -04:00
d974acfef1 Use variable for fd-find binary name 2019-04-01 12:18:12 +05:30
ec76d9acb6 Escape key regexps when building which-key leader prefix 2019-03-31 12:38:42 -07:00
7488b51e9a Prevent void-function load-env-vars errors
In case load-env-vars hasn't been autoloaded yet.
2019-03-29 01:51:36 -04:00
803ca2863a Use resolved, absolute paths in doom-project api
Ensures projectile caches files under the right key.
2019-03-28 19:57:34 -04:00
c0b00327c2 Purge excess from projectile's cache
Bloated projectile caches can cause freezing and delays. This is
especially so if you accidentally index $HOME or /, which will bloat
them into the hundreds of MBs.

+ Adds purging of blacklisted, over-sized and non-projects from
  projectile's cache when Emacs is killed.
+ Projectile's project file cache will now expire after a week.
+ Corrects file paths in core/doctor's filesize checks.
2019-03-28 19:57:34 -04:00
0085d089f3 Refactor doom*projectile-locate-dominating-file 2019-03-28 16:43:04 -04:00
ece7b8fdcd Fix doom-project-find-file on non-project DIRs
This function should be as DWIM as possible.
2019-03-28 15:07:14 -04:00
7b8a2fcff8 Don't capture INSECURE, DEBUG & YES envvars
They should be transient.
2019-03-28 14:47:31 -04:00
af37f9af58 Fix wrong-number-args error on doom env 2019-03-28 13:30:39 -04:00
eb1296387f Make load-env-vars a core package
Fixes a race condition where the load-env-vars package is used before it
was (or could be) installed.
2019-03-28 13:30:39 -04:00
9b97631ddf Fix typo in env file template 2019-03-28 02:25:28 -04:00
2f0ad0e269 Fix -y/--yes/YES in doom quickstart 2019-03-28 02:24:19 -04:00
b3d931d7ce Refactor undo-tree advice 2019-03-28 01:56:09 -04:00
37525bb1bd Fix clipboard support on Windows #1284
Windows uses UTF-16 for clipboard content. selection-coding-system is
set correctly on Windows systems so we leave it to its default there.
2019-03-28 01:56:09 -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
ab616cfb95 Merge pull request #1247 from jdnavarro/develop
Maximize window vertically/horizontally
2019-03-26 03:45:52 -04:00
2364415140 Allow exec-path-from-shell config everywhere
In case linux users install exec-path-from-shell themselves. However, it
still won't be installed by default for anyone but Mac users.
2019-03-26 03:42:32 -04:00
c2d0cae6a5 doom-project-find-file: avoid helm-projectile #1274
helm-projectile-find-file misbehaves as a workspace project-switch
handler (likely because it runs asynchronously and misses the lexical
value of `default-directory`), so we avoid it and use
projectile-find-file directly (which still uses helm, just not the
helm-projectile package).
2019-03-26 03:38:37 -04:00
d589f87253 Add maximize window key bindings
This includes maximization for entire buffer, vertically and
horizontally.
2019-03-24 14:47:55 +00:00
cc20b28c26 Restore session later on restart-and-restore
So Doom has enough time to initialize before tryhing to restore the last
session.
2019-03-22 14:14:03 -04:00
9befc015bb Prompt to restart after doom//upgrade 2019-03-22 14:13:35 -04:00
d7e9b47266 Fix #1278
Refactors :after-call to not fmakunbound the transient hook function, as
it may get executed multiple times before getting a chance to fully
remove itself, causing void-function errors.
2019-03-22 14:11:59 -04:00
82ef3e987b Remove protect-visible-buffer tests 2019-03-17 00:16:22 -04:00
259590d54e Remove doom|protect-visible-buffer
This behavior is now isolated to kill-this-buffer.
2019-03-16 23:59:50 -04:00
7fd1497e88 Ask to install all-the-icons fonts in doom quickstart 2019-03-16 23:59:50 -04:00
c9e3facb38 Revert bb3f027c
After more testing (along with 1ce2b291), projectile can, in fact, be
deferred until after startup.
2019-03-16 23:59:50 -04:00
acf67244ca Improve doom doctor
+ Bump Emacs version check to 25.3
+ Fix doctor reporting missing packages that are user-disabled
+ Add Doom core checks for over-sized cache files (a possible cause of
  freezes/hangs)
+ Emit a backtrace from module doctor script errors
+ Fix doom doctor not respecting DEBUG envvar
2019-03-16 23:59:50 -04:00
689a3bb446 Remove :modules from private packages in doom/info
Unnecessary bulk.
2019-03-16 23:59:50 -04:00
a086e6967e Fixes for doom/kill-this-buffer-in-all-windows
This was erroring when run inside a popup (eg. `M-x ielm` `C-x k`) due
to a missing check for `window-live-p`.  We don't need to do anything if
the window has already gone away.

The real vs unreal check was backwards; we should only try
`previous-buffer` if the current buffer is *not* real.
2019-03-17 00:53:17 +10:00
93d2a2212d Restore projectile's :after-call
If users open Emacs with a file argument, projectile will need to load
sooner.
2019-03-15 13:30:52 -04:00
8da2785141 Remove doom-project file/dir local var support
It didn't really work, and it's too Doom-specific to be useful. We'll
need better heuristics.
2019-03-14 17:59:24 -04:00
bb3f027ca2 Load projectile sooner in the startup process
Projectile's use is so prolific in Doom that trying to lazy load it at
startup is wasted breath.
2019-03-14 17:59:24 -04:00
82622c2d8f Fix package.el command substitutions
doom//autoremove and doom//install are more appropriate replacements for
package-autoremove and package-install-selected-packages, respectively.
2019-03-14 17:59:24 -04:00
bd6233518b Fix doom|run-switch-window-hooks
Using the wrong variable.
2019-03-13 20:15:23 -04:00
1ce2b29193 ui/modeline: minor startup optimization
Prevents project.el from being eager-loaded at startup.
2019-03-13 18:46:06 -04:00
a669406cad Remove doom/what-face unit tests 2019-03-13 02:17:37 -04:00
d868f5fd10 Use new ;;;###package cookie
This will later be used for doom/describe-packages to list all locations
where a package is being configured (along with def-package! and after!
blocks).
2019-03-13 01:55:50 -04:00
5e5ae456bb Replace doom/what-face with describe-char
describe-char produces the same information and much more.
2019-03-13 01:37:55 -04:00
89e91a0291 Fix autoloading helpful for doom/describe-symbol 2019-03-13 06:44:39 +10:00
bca814cb7c Fix listp error when updating #1235
The async process wasn't mapping through doom-package-outdated-p, only
filtered.

Also ensure no less than two packages per thread are checked.
2019-03-12 11:50:27 -04:00
b618025e1d Merge pull request #1237 from flatwhatson/fix-toggle-debug
Fix doom/toggle-debug-mode
2019-03-12 11:29:51 -04:00
ff89a5f645 Remove redundant :commands
The helpful package defines these as autoloads already.
2019-03-12 11:25:00 -04:00