Commit Graph

3507 Commits

Author SHA1 Message Date
Siddharth Shekar
aa64cf9426 Replace kill-this-buffer with kill-current-buffer
As per the documentation for kill-this-buffer, it should only be invoked
from the menu and behaves unpredictably when invoked programmatically.
2019-05-30 18:54:58 -07:00
Henrik Lissner
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
Henrik Lissner
990896ac9c
Fix doom quickstart help formatting
Not breaking lines in the right place.
2019-05-30 14:00:41 -04:00
Henrik Lissner
390647da87
Fix case where package has no backend
In doom/help-packages
2019-05-30 13:59:39 -04:00
Henrik Lissner
b68fb2aa11
Fix #1444: exclude TRAMP/remote files from recentf
Causes hanging due to authentication attempts.
2019-05-30 13:58:32 -04:00
Henrik Lissner
2643d7e5ba
Prefer vertical splits 2019-05-29 23:46:45 -04:00
Henrik Lissner
c9493038a0
Auto-unbind non-prefix keys on doom/reload #1431 2019-05-28 23:47:53 -04:00
Henrik Lissner
6c69bf5313
Fix emoji font initialization 2019-05-28 23:47:52 -04:00
Henrik Lissner
9413e9ccae
Remove tutorial--saved-dir
See #1433: it is a function, not a variable.
2019-05-28 23:47:52 -04:00
Henrik Lissner
9860cebe9f
Don't save package-selected-packages to custom-file
It's already saved in doom-package-autoload-file
2019-05-28 23:47:52 -04:00
Henrik Lissner
3d7626341f
Fix vestigial reference to load-env-vars
Was replaced with in-house envvar parser.
2019-05-28 23:47:49 -04:00
Henrik Lissner
93876028b4
cli/upgrade: always update packages
Even when Doom is up-to-date.
2019-05-22 17:10:44 -04:00
Henrik Lissner
977d587479
Bring back doom-big-font #1428
Falls back to doom-big-font-increment if doom-big-font isn't set.
2019-05-22 17:05:05 -04:00
Henrik Lissner
4d6d90399e
dtrt-indent-run-after-smie = t
Fix dtrt not updating indent variables in modes that use SMIE (like
sh-mode).
2019-05-22 14:50:31 -04:00
Henrik Lissner
7c3e4ffa0c
Fix over-eager ` pairing in minibuffer 2019-05-22 03:51:12 -04:00
Henrik Lissner
efb06ee42f
Improve deprecation warnings for modules
Hopefully makes them easier to understand.
2019-05-21 17:24:23 -04:00
Henrik Lissner
0383e504fe
Fix exec-path on Windows #1423
Windows uses ; as its PATH separator.
2019-05-21 17:24:22 -04:00
Henrik Lissner
66ddbf981e
Disable persistent undo
It's not worth the possible stack overflow and undo history corruption
issues.
2019-05-21 03:42:32 -04:00
Henrik Lissner
2214c3175e
Minor tweaks across the board 2019-05-21 00:34:32 -04:00
Henrik Lissner
8f9056906d
Rethink scratch buffer keybinds & commands
For non-evil users:

<leader> x    doom/open-scratch-buffer
<leader> X    doom/switch-to-scratch-buffer
<leader> p s  doom/open-project-scratch-buffer
<leader> p S  doom/switch-to-project-scratch-buffer

For evil users:

<leader> x    doom/open-scratch-buffer
<leader> b s  doom/open-scratch-buffer
<leader> b S  doom/switch-to-scratch-buffer
<leader> p s  doom/open-project-scratch-buffer
<leader> p S  doom/switch-to-project-scratch-buffer
2019-05-20 21:09:12 -04:00
Henrik Lissner
1df35c166a
Display package homepage in doom/help-packages
If possible.
2019-05-20 21:09:11 -04:00
Henrik Lissner
9f63d94b13
Add doom/help-package-homepage command (SPC h d P) 2019-05-20 21:09:11 -04:00
Henrik Lissner
243a3a84a8
Add doom/help-news-search command (SPC h d N) 2019-05-20 21:09:11 -04:00
Henrik Lissner
8aa6273dcf
Remove org link syntax from help search commands
And prevent ivy sorting them.
2019-05-20 21:09:11 -04:00
Henrik Lissner
7c33d2c2e0
Fix C-c & C-x when used as leader keys 2019-05-20 21:09:11 -04:00
Henrik Lissner
448d5fc71f
map!: fix :prefix-map for non-leader keys
Would no-op if used on a non-leader key.
2019-05-20 21:09:10 -04:00
Henrik Lissner
d6aea001c5
Implement lazy auto-revert
Instead of using auto-revert-mode or global-auto-revert-mode, we employ
lazy auto reverting on focus-in-hook, doom-switch-buffer-hook and
after-save-hook.

We do this because autorevert abuses inotify handles, which can grind
Emacs to a halt if you have hundreds of buffers open and something
performs expensive mtime or attribute-altering IO on their files outside
of Emacs. We only really need revert checks when we switch to or save a
buffer, or when we focus the Emacs frame.
2019-05-20 21:08:21 -04:00
Henrik Lissner
39d4fa2256
Improve better-jumper integration into ivy
And remove unnecessary set-jump on imenu-after-jump-hook (it should
happen before the jump, not after).
2019-05-19 02:18:26 -04:00
Henrik Lissner
c3cb7c5000
:tools password-store -> :tools pass
A simpler name and matches the prefix of its module.
2019-05-19 02:18:25 -04:00
Henrik Lissner
0674e4b4b0
Remove :emacs imenu module
Some of it was moved into core as reasonable defaults, but the rest of
it doesn't warrant a whole module dedicated to it.
2019-05-19 02:18:00 -04:00
Henrik Lissner
8c65a63b1c
Move eshell, term & vterm modules to :term 2019-05-19 02:17:59 -04:00
Henrik Lissner
01face314d
Fix doom/help-* search commands
They weren't actually doing anything.
2019-05-19 02:17:59 -04:00
Henrik Lissner
4cde9afd93
Refactor setq-hook!
Simplifies its expanded form and names the hook function to make the
hook's value more readable in help buffers.
2019-05-19 02:17:58 -04:00
Henrik Lissner
4d20655f78
Optimize incremental loading
Interrupt package loading if Emacs recieves input. This further reduces
percieved pauses at startup.
2019-05-19 02:17:58 -04:00
Henrik Lissner
f7fb729269
Enable show-trailing-whitespace selectively
Instead of enabling it globally and disabling it in particular modes, we
do the opposite. There are fewer edge cases this way.
2019-05-19 02:17:58 -04:00
Henrik Lissner
81a054deda
Add custom-set-faces! convenience macro
For setting face attributes non-destructively. See docstring for usage
example.
2019-05-18 16:46:21 -04:00
Henrik Lissner
d62e13c803
Alphabetize plugins in core-editor
Easier to find them this way.
2019-05-18 14:44:40 -04:00
Henrik Lissner
2e6d8be6fc
Rethink SPC n keybinds and add new ones
Adds the following keybinds:

SPC n .    Browses org-directory
SPC n /    Text search in org-directory
SPC n *    Text search in org-directory with symbol at point
SPC n h    Jump to org headline in org-agenda-files
2019-05-17 23:57:24 -04:00
Henrik Lissner
5ec0c5ba3f
cli/env: refactor 2019-05-17 21:34:21 -04:00
Henrik Lissner
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
Henrik Lissner
32f8fa9f46
Fix :prefix-map indentation in map! calls 2019-05-17 13:31:05 -04:00
Henrik Lissner
ba92adf7b3
Reformat core-ui, add outline headers to core-editor 2019-05-17 01:58:39 -04:00
Henrik Lissner
20720cda61
Remove visual-fill-column package from Doom core
It is not essential enough to keep in Doom core. I'm working on a new
module (or a rewrite for app/write) to replace it.
2019-05-17 01:58:27 -04:00
Henrik Lissner
67b6c44939
Enable show-trailing-whitespace globally
The variable is buffer-local and must be set with setq-default instead.

Also adds doom|{enable,disable}-show-trailing-whitespace hooks.
2019-05-17 01:58:08 -04:00
Henrik Lissner
5d2610fc31
Fix window issues due to switch-buffer hooks
- Fixes the issue that 45873615 was trying to address with frameworks
  like ivy, helm and hydra (where they would manipulate the wrong
  windows),
- Fixes an issue where notmuch couldn't find its buffers ("no buffer
  named *notmuch-X*" errors),
2019-05-16 11:42:30 -04:00
Henrik Lissner
4587361579
Prevent switch hooks while minibuffer is active
Fixes an issue where lv (used by hydra) would manipulate the wrong
window when invoked from, say, ivy.
2019-05-16 03:27:52 -04:00
Henrik Lissner
40d2d4d222
Minor tweaks & byte-compiler offerings 2019-05-15 20:53:11 -04:00
Henrik Lissner
c612ba58a9
Fix stringp errors in doom/help search commands 2019-05-15 20:51:52 -04:00
Henrik Lissner
a4fb4070ea
Rework how unicode fonts are set and loaded 2019-05-15 20:24:52 -04:00
Henrik Lissner
2525822791
Move GC optimization to init.el
And reformat core.el
2019-05-15 18:30:20 -04:00
Henrik Lissner
2cb5d895d7
cli/upgrade: fix void-function error
Derpity derp derp.

Derp McDerpington.

Derpsville, population me.
2019-05-15 17:29:43 -04:00
Henrik Lissner
4b66b7c29b
cli/upgrade: emit full error, if one occurs 2019-05-15 17:17:56 -04:00
Henrik Lissner
c6ceb147e6
doom-log: show source module before message 2019-05-15 15:22:09 -04:00
Henrik Lissner
962f6a1032
Fix switch-buffer hooks running from wrong buffer
The destination buffer should be current while the switch-buffer hooks
run.
2019-05-15 15:22:08 -04:00
Henrik Lissner
5cd1fb2a52
tutorial--saved-dir = doom-cache-dir/tutorial/ 2019-05-14 23:41:21 -04:00
Henrik Lissner
f7a6b2b33e
cli/upgrade: refresh before updating packages
So missing packages are installed and orphaned ones are removed (and env
file updated, if necessary).
2019-05-14 23:41:02 -04:00
Henrik Lissner
f0fe71892b
cli/upgrade: autoremove orphaned packages 2019-05-14 22:30:16 -04:00
Henrik Lissner
c5a3556510
Fix interactive codes for doom/{move,copy,sudo}-this-file 2019-05-14 20:53:51 -04:00
Henrik Lissner
75777756e1
Remove redundant dired sort hook #1414
This still means dired will be unsorted for BSD ls users, but that's
acceptable (for now).
2019-05-14 18:45:38 -04:00
Henrik Lissner
b7d1702484
Add :prefix-map to map! macro
Each prefix now defines a doom-leader-DESC-map keymap, where DESC is the
which-key description for that prefix key. This should make it easier
for users to move leader prefixes. e.g.

To move SPC TAB (workspaces) to SPC l:

  (map! :leader
        "TAB" nil
        "l" doom-leader-workspaces-map)
2019-05-13 22:30:21 -04:00
Henrik Lissner
9bc47ca329
Minor refactors
- Don't aggressively load gnu-elpa-keyring-update, it autoloads itself
- Update docstring + comments
- scroll-margin = 1
2019-05-13 19:34:44 -04:00
Henrik Lissner
20596cd41f
Reformat gc optimization & gc on focus-out
Also raises the gc upper limit to 512mb
2019-05-13 19:34:44 -04:00
Henrik Lissner
ddb03c6335
Optimize doom-local-dir entry in recentf-exclude
file-in-directory-p is a tad more expensive.

Also takes into account any modifications to recentf-filename-handlers
2019-05-13 19:34:44 -04:00
Henrik Lissner
7443669b1e
Minor refactors & comment revision 2019-05-13 14:37:00 -04:00
Henrik Lissner
646cba3f68
Bring back undo history compression
But only if zstd is available. Also strips text properties from the undo
list. This often provides a 30-50% size benefit, with a negligible
performance impact.
2019-05-13 14:31:49 -04:00
Henrik Lissner
6ea0c39137
Ensure use-package settings are set @ compile-time 2019-05-13 00:57:59 -04:00
Henrik Lissner
f696ff32f4
doom-project-find-file: add helm-find-files as a fallback 2019-05-13 00:18:51 -04:00
Henrik Lissner
6ab16621e0
better-jumper: quelpa -> melpa 2019-05-12 23:27:34 -04:00
Henrik Lissner
f2d267ce8b
projectile: fall back to git-grep instead of rgrep
Also changes projectile-sort-order, but this only affects the native
indexer.
2019-05-12 22:12:08 -04:00
Henrik Lissner
769cfbe5d1
projectile: resort to ripgrep if fd is absent
Speeds up file search in general, and on Windows especially.
2019-05-12 22:12:04 -04:00
Henrik Lissner
5e8db5a860
Refactor core-packages + add gnu-elpa-keyring-update
- Adds melpa-mirror, for those lonely days when melpa is down
- Reduce logging spam from package!
- Revise comments & use outline-mode headings
- Prioritize melpa over elpa
2019-05-12 22:09:52 -04:00
Henrik Lissner
0f0fdbc00c
Add doom/{increase,decrease,reset}-font commands
Borrows the idea from zoom-frm (see #1389).
2019-05-12 21:56:52 -04:00
Henrik Lissner
ef4106dae8
Remove echo-keystrokes fix in isearch
It isn't necessary anymore.
2019-05-12 17:06:56 -04:00
Henrik Lissner
e5d566ea2a
Prevent non-prefix key errors on doom//refresh
May also help doom/reload
2019-05-12 01:43:22 -04:00
Henrik Lissner
2358dbfc84
Replace "Doom" w/ ~/.emacs.d when 'upgrade' fails 2019-05-12 00:56:17 -04:00
Henrik Lissner
a558f9b3f1
cli/quickstart: fix font path for all-the-icons-install-fonts
all-the-icons-install-fonts guesses the font path based on
`window-system', which is nil in tty Emacs.
2019-05-12 00:56:17 -04:00
Bryan Gilbert
29fb8b3611 Enable better-jumper-mode when loaded 2019-05-10 12:43:25 -04:00
Henrik Lissner
e088a21335
Fix theme not loading in daemon sessions #1397 2019-05-09 23:15:13 -04:00
Henrik Lissner
17e337a434
Remove reload-theme-on-new-display-device feature
The intention for this feature was to ensure the theme always looks as
expected even if you were to open a new frame on a different display
device (e.g. open a GUI frame, start the server, then open a tty frame
from it).

It turned out to be buggier than anticipated. The underlying issue is
that solaire-mode is fundamentally incompatible with tty Emacs.
Terminals uses will need to disable it, as there's no good way to
predict what kind of frames a user will open.

TL;DR Avoid opening a TTY frame from a GUI session. If you must, and you
see odd colors, disable solaire-mode.
2019-05-09 21:45:42 -04:00
Henrik Lissner
d7bc99c3c3
Add deprecation warnings to doom patch-macos
And make "doom env enable" an alias for "doom env auto"
2019-05-09 18:43:32 -04:00
Henrik Lissner
ed562212eb
Fix & improve doom/help-package{s,-config}
The help buffer for Doom packages now display:

- locations of (and links to) where a package is configured in Doom
- limited documentation for site packages (like elisp-mode)
2019-05-08 02:08:08 -04:00
Henrik Lissner
f6dc4f6079
Fix void-function org-map-entries on doom/help-* 2019-05-08 00:56:16 -04:00
Henrik Lissner
e173fcbd54
Fix doom/help-package-config
And recenter after jumping to file.
2019-05-06 22:13:31 -04:00
Henrik Lissner
8e6953b3ac
Fix arrayp error when killing Emacs
Caused by doom|cleanup-project-cache, when a non-string key is present
in projectile-projects-cache (which will be removed).
2019-05-06 17:12:28 -04:00
Henrik Lissner
e0e82ffbeb
cli/quickstart: ensure new init.el doom! is seen 2019-05-06 02:12:49 -04:00
Henrik Lissner
e75c41b10d
Fix autoload/hydras.el autoloads #1388
Caused by autoloads paths not being resolved correctly during
generation.
2019-05-05 19:40:51 -04:00
Henrik Lissner
84c5da844b
Add email/{wanderlust,mu4e,notmuch} modules
Removed app/{email,notmuch}
2019-05-05 14:14:12 -04:00
Henrik Lissner
45266213a5
Revert 087127a3
Installing buttercup on demand wasn't robust enough. Tests were breaking
more often.
2019-05-05 00:02:59 -04:00
Henrik Lissner
c42600d771
Fix void-variable sym errors
And remove trailing hyphen on anonymous transient hooks.
2019-05-05 00:01:52 -04:00
Henrik Lissner
72e8178e42
show-trailing-whitespace = t
A sensible default.
2019-05-04 19:13:26 -04:00
Henrik Lissner
7f004f321a
Optimize set-transient-hook!
In case HOOK-OR-FUNCTION is an expensive lisp form.
2019-05-04 19:13:26 -04:00
Henrik Lissner
47f0f77d91
Fix #1384
Redundant with show-trailing-whitespace
2019-05-04 19:13:26 -04:00
Henrik Lissner
3bebf3ac9b
Extend switch-buffer hook coverage
To cover switch-to-{next,prev}-buffer commands, which are used in quite
a few places, but don't implicitly trigger switch-buffer hooks.

Also removes switch-{window,buffer,frame} logging. Adds too much noise,
which isn't very helpful.

Also fixes VC state not being refreshed when switching to stale buffers
in certain ways.
2019-05-02 23:10:09 -04:00
Henrik Lissner
388e0def2c
Cheer up the byte-compiler
You deserve better than those warnings.
2019-05-02 21:54:47 -04:00
Henrik Lissner
898ef11b76
Saving the world, one trailing space at a time 2019-05-02 16:20:40 -04:00
Henrik Lissner
aff63899b0
dtrt-indent: silence messages, but still log them 2019-05-02 16:00:18 -04:00
Henrik Lissner
eb47568701
cli/quickstart: generate {init,config,packages}.el separately
Instead of aborting if DOOMDIR exists, all three files will be
checked (and generated) separately.
2019-05-01 21:02:29 -04:00
Henrik Lissner
6d314c2795
Revise and update docstrings and comments 2019-05-01 21:02:28 -04:00
Henrik Lissner
4aa65aa019
Move avy, ace-link & ace-window out of core
They don't belong there, and ace-window is no longer a core dependency
anyhow.
2019-05-01 21:02:28 -04:00
Henrik Lissner
6bd6c1623b
Fix 'doom upgrade' not updating pkg autoloads
Folks should no longer need to run 'doom refresh' after upgrading.
2019-04-30 18:44:44 -04:00
Henrik Lissner
a57d9d3a25
Change :after-call heuristic for detecting fn/hook 2019-04-30 15:12:07 -04:00
Henrik Lissner
3a3017004c
Fix whitespace-style for non-default-indentation hl
And remove lines-tail. This is outside the purview of this hook.
2019-04-30 14:37:29 -04:00
Henrik Lissner
39db0a38c5
Record TRAMP files in recentf 2019-04-29 18:56:25 -04:00
Henrik Lissner
9735f034e1
General refactors & optimizations 2019-04-29 18:54:46 -04:00
Henrik Lissner
087127a31d
Lazy-install buttercup package 2019-04-29 18:48:35 -04:00
Henrik Lissner
7c5fb8ed9c
Remove highlight-escape-sequences
Payoff < performance cost, and is too opinionated.
2019-04-29 18:17:23 -04:00
Henrik Lissner
4aa4802885
ui/modeline: remove indent segment
It's wasted space now that dtrt-indent logs changes to indentation.

Also resolves a performance issue where the tab/space unicode character
would cause long 3-5s delays on startup or first-file load.
2019-04-29 18:03:18 -04:00
Henrik Lissner
26050bb1d7
Refactor interactive CLI commands
Also fixes an issue where output wasn't colored correctly.
2019-04-26 22:11:37 -04:00
Henrik Lissner
6b69eaa397
Minor refactors across the board 2019-04-26 17:42:44 -04:00
Henrik Lissner
ac55b6a826
Remove unused doom-which-key-leader-prefix-regexp 2019-04-26 17:39:13 -04:00
Henrik Lissner
a03b676297
Move leader which-key labels to core-keybinds 2019-04-26 17:29:54 -04:00
Henrik Lissner
1ab8dac872
Fix arg-less color functions in print!/format! 2019-04-24 18:16:07 -04:00
Henrik Lissner
88406bb11a
Fix unit test runner 2019-04-24 18:16:07 -04:00
Henrik Lissner
eb22177cea
Suppress kill-emacs-hook in noninteractive Doom 2019-04-24 18:16:06 -04:00
Henrik Lissner
cb172becd9
Make doom-get-outdated-packages synchronous
Concurrency doesn't speed this up enough to justify its problems. It
swallows errors emitted from the child processes and a child process can
block indefinitely.
2019-04-24 18:16:06 -04:00
Henrik Lissner
2066206e83
Update docstrings for config commands 2019-04-24 18:16:06 -04:00
Henrik Lissner
40f6a2b6e3
Rewrite vanilla sandbox & report-bug commands
- Renamed doom/open-vanilla-sandbox to doom/sandbox (because it's not
  just for vanilla testing anymore)
- Renamed doom/open-bug-report to doom/report-bug (for consistency with
  `report-emacs-bug`; makes it easier to discover)
- Add SPC h d b for doom/report-bug
- Add SPC h d s for doom/sandbox
2019-04-24 18:16:06 -04:00
Henrik Lissner
fa7f7042b0
Add and expand doom/help* commands
Adds the following commands:

- doom/help (opens the Doom manual)
- doom/help-search (for searching through org headlines in Doom's
  documentation)
- doom/help-faq (for searching the FAQ)
- doom/help-news (for browsing the Doom newsletters)
- doom/help-autodefs (renamed from doom/describe-autodef -- for looking
  up documentation on autodef function/macros, like
  `set-lookup-handler!`)
- doom/help-modules (renamed from doom/describe-module, for jumping to a
  Doom module's documentation)
- doom/help-packages (renamed from doom/describe-package and recently
  fixed -- looks up information about installed packages, including what
  Doom module(s) install it and where it is configured)
- doom/help-package-config (for searching and jumping to any block where
  a package is configured in Doom Emacs)

Also adds the SPC h d (or C-h d) prefix for Doom-specific help commands.
SPC h D will invoke doom/help.

However, the documentation itself hasn't been committed yet, so some of
these commands may be useless atm. Sorry!
2019-04-24 18:16:06 -04:00
Henrik Lissner
c399c07694
Add :tools lsp checks for +lsp flag
Also:
- Reorganizes some :lang modules' packages.el file.
- Adds setuptools check in lang/python
- Adds javac check in lang/java
- Removes the depends-on! macro
2019-04-24 18:16:05 -04:00
Henrik Lissner
9bea168cc1
Rewrite doom-doctor
- Use message library instead of reinventing the wheel
- Fix -d/--debug support for `bin/doom doctor`
- Add indent and autofill support to print! and format!
- Add doom-message-backend for forcing format! to use a specific backend
- Phase out anaphoric when! macro in doctor scripts, it was hardly used
2019-04-24 18:16:05 -04:00
Henrik Lissner
1fb2178716
Move sp skip-match disabler to config/default
This shouldn't be mandatory.
2019-04-24 18:16:04 -04:00
Henrik Lissner
a4c5396558
Add better-jumper
Replaces evil's jumplist; makes its functionality available for non evil
users.
2019-04-24 18:16:04 -04:00
Henrik Lissner
77e4cc4d58
💥 Remove :feature category
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:

- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces

More potential changes in the future:

- A new :term category for terminal emulation modules (eshell, term and
  vterm).
- A new :os category for modules dedicated to os-specific functionality.
  The :tools macos module would fit here, but so would modules for nixos
  and arch.
- A new :services category for web-service integration, like wakatime,
  twitter, elfeed, gist and pastebin services.
2019-04-24 18:16:04 -04:00
Henrik Lissner
ff42cf0767
Rewrite require! and change depends-on!
depends-on! was changed to no longer load a specified module's
packages.el, but to preform a module-enabled assertion. It emits an
error if the linked module isn't (or specified flags aren't) enabled.
2019-04-21 19:40:02 -04:00
Henrik Lissner
03b76e1789
Fix deprecated modules not passing on their flags
Also fixes redundant deprecated-module warnings from 'bin/doom refresh'.
2019-04-21 18:54:57 -04:00
Henrik Lissner
4278eb683f
Autoload projectile-add-known-projects
This should be PRed upstream at some point
2019-04-20 19:25:10 -04:00
Henrik Lissner
f61e0aa00c
Use outline-mode comment headings in core.el 2019-04-20 02:18:49 -04:00
Henrik Lissner
3e74b339c7
Revise featurep! docstring & error message 2019-04-20 02:18:49 -04:00
Henrik Lissner
123f7174ed
Revise docstrings for scratch buffer commands 2019-04-19 20:50:53 -04:00
Henrik Lissner
99c26e2fc2
Allow doom-project-find-file on arbitrary paths
- If DIR is not in a valid project, index it as normal and do
  projectile-find-file from current directory (but do not cache).
- If DIR is a valid project, but not the project root, fall back to
  different mechanism for exploring it (project-find-file,
  counsel-file-jump, or find-file).
- If DIR is a valid project AND is the project root, use
  projectile-find-file as normal.

This is to make doom-project-find-file more do-what-I-mean.
2019-04-19 20:48:48 -04:00
Henrik Lissner
79ee09d65b
Replace :ui evil-goggles w/ :ui ophints
Now offers op hinting for non-evil users.
2019-04-19 17:26:26 -04:00
Henrik Lissner
25a86c18c8
Fix quiet! not returning BODY's return value 2019-04-19 13:30:39 -04:00
Henrik Lissner
1136e9f49b
Improve doom/describe-module
Opens module's README.org, if present, otherwise it prompts if you want
to browse the module's root.
2019-04-17 18:37:52 -04:00
Henrik Lissner
863fc1a6bb
Add buffer-live-p check to doom-real-buffer-p 2019-04-17 11:29:41 -04:00
Henrik Lissner
6cd30c926b
Persist scratch buffer across sessions
- Adds doom/open-project-scratch-buffer (persistent project scratch
  buffers)
- Prefix arg = open scratch buffer in current window, for both
  doom/open-scratch-buffer and doom/open-project-scratch-buffer.
- Rename doom/delete-scratch-files ->
  doom/delete-persistent-scratch-file
- Remove doom-scratch-buffer-display-fn
- Rename doom-scratch-files-dir -> doom-scratch-dir
- Add SPC p s keybind to open project scratch buffer
2019-04-17 11:15:56 -04:00
Henrik Lissner
20a63a35ab
Reformat doctor output & add DOOMDIR check
- Will now warn you if both .doom.d and .config/doom exists.
- Include branch and last commit date in doctor/info, next to Doom
  version.
- Issues in Doom core are now indented.
2019-04-16 20:57:03 -04:00
Henrik Lissner
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
Henrik Lissner
068a324fd1
Fix which-key labels for alt leader key #1332
Also mentioned in #1240
2019-04-16 10:56:26 -04:00
Henrik Lissner
4724d0a109
Fix #1323: void-variable projectile-project-root 2019-04-11 18:29:26 -04:00
Henrik Lissner
83cba583a7
with-eval-after-load -> after!
So :desc is ignored if which-key is disabled.
2019-04-11 18:29:23 -04:00
Henrik Lissner
500878c882
Enlargen command-log window slightly 2019-04-10 19:25:21 -04:00
Henrik Lissner
31eb845f6b
Reset more state on doom/module initialization
Makes `doom/reload` a little more reliable and the side effects of
`doom-initialize`/`doom-initialize-modules` a little more deterministic.
2019-04-09 03:43:13 -04:00
Henrik Lissner
defd60b24b
Fix doom quickstart not installing packages
If the user had no ~/.doom.d/init.el to begin with, and never reads it
after it's been created (by `doom quickstart`), then Doom can't possibly
know what modules to install packages for, therefore no packages get
installed!
2019-04-09 03:31:05 -04:00
Henrik Lissner
d3a12a3914
Refactor projects api
Improves correctness of projectile project state. Namely, prevents
projectile-project-root from poisoning the return value of
doom-project-root or doom-project-p, which may be causing an elusive bug
where doom-project-find-file is searching the wrong directory.
2019-04-09 03:13:18 -04:00
Henrik Lissner
f9b6f6746f
General, minor refactor/reformatting 2019-04-08 23:03:19 -04:00
Henrik Lissner
742687a51e
Add delq! and pushnew! macros
And move projectile configs to their respective modules (and out of
package configs).
2019-04-08 23:01:30 -04:00
Henrik Lissner
5f09c9c634
Fix map! tests wrt 1fab389d 2019-04-08 15:27:20 -04:00
Henrik Lissner
3b352143c0
Fix commandp errors on {local,}leader keys
General would read (function ...) forms unevaluated, as a list, rather
than a function symbol.
2019-04-08 14:06:18 -04:00
Henrik Lissner
a4283427f5
Fix autoloaded hydras
They weren't marked as interactive, making them unavailable for `M-x` or
keybinds.
2019-04-07 16:06:52 -04:00
Henrik Lissner
1fab389d9e
Fix #1310: use internal macro for leader binds
Creates a separate doom--define-leader-key macro for internal use (in
map!). define-leader-key! will continue to exist as a convenience macro
for users who want a general.el interface to defining leader keys.

Possibly relevant to: #1309
2019-04-07 15:55:16 -04:00
Henrik Lissner
182ab918b6
Enable xterm-mouse-mode in tty Emacs 2019-04-06 11:13:28 -04:00
Henrik Lissner
43bc14d38e
Undo noop'ed leader binds for missing commands
This was too magical and caused more confusion than the void-function
and commandp errors before it.

Addresses #1309, #1308
Relevant to #1217
2019-04-06 11:13:17 -04:00
Henrik Lissner
2b7c215aee
Refactor byte-compile dispatchers
And don't implicitly compile ~/.emacs.d/init.el unless :core (or no
args) are passed.
2019-04-06 00:11:32 -04:00
Henrik Lissner
337c16cb68
Dear byte-compiler, you drive me to drink,
About Emacs Lisp that I have to rethink.
The world could end,
And humanity transcend,
But you'd still be here raising a stink.
2019-04-05 23:52:29 -04:00
Henrik Lissner
45c9fb982d
Add docstring to switch-{buffer,window,frame} hooks 2019-04-05 22:50:09 -04:00
Henrik Lissner
9d65619d3e
Fix keybinds to keymaps being ignored 2019-04-05 03:43:27 -04:00
Henrik Lissner
5be0e2be4a
Omit private module on doom compile
The private module won't be byte-compiled implicitly anymore, as it can
cause unexpected problems with stale code and config portability.

doom compile          -> only compiles ~/.emacs.d
doom compile :core    -> ~/.emacs.d/core
doom compile :plugins -> ~/.emacs.d/.local/packages/elpa
doom compile :private -> ~/.doom.d
2019-04-05 03:19:38 -04:00
Henrik Lissner
d6c9520d93
Don't bind missing commands to leader keys
I don't want to litter config/default/+evil-bindings.el with conditions
for every keybind whose module may or may not be enabled. It impacts its
readability and is relatively expensive (due to the internals of map!
and general).

So instead, we no-op keybinds for commands that don't exist (and aren't
autoloaded), so you don't see missing function errors when using these
keys.
2019-04-05 02:52:49 -04:00
Andrew Whatson
fe6dfb08b6 Add doom/kill-project-buffers command
Prompts for an open project and kills all its buffers.  This is useful
for closing `.emacs.d` in an effort to get some *billable* work done.

Added `doom-fixup-windows` and `doom-kill-buffer(s)-fixup-windows`
helper functions for leaving affected windows on a real buffer or the
fallback buffer.

Fixed `doom/kill-this-buffer-in-all-windows` to properly "fixup"
windows.
2019-04-05 16:04:26 +10:00
Henrik Lissner
ea3d9e2957
Refactor & optimize define-leader-key!
- Provides a 10-30% boost in startup time
- which-key advice is no longer needed
2019-04-05 01:24:16 -04:00
Henrik Lissner
23467374f5
Fix doom/forward-to-last-non-comment-or-eol #1306
This command would no-op if used in major modes with "fake" comments.
i.e. modes where "comments" are merely highlighted as comments, but have
no comment entry in its syntax table. e.g. text-mode + git-commit-mode.
2019-04-04 15:13:48 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
34e3985409
Remove doom/open-env
This file shouldn't be edited by hand anyway.
2019-04-02 20:09:44 -04:00
Henrik Lissner
fd48329c36
Reset exec-path/shell-file-name on doom/reload-env 2019-04-02 00:55:43 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Shanavas M
d974acfef1 Use variable for fd-find binary name 2019-04-01 12:18:12 +05:30
Jeffrey Chu
ec76d9acb6
Escape key regexps when building which-key leader prefix 2019-03-31 12:38:42 -07:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
0085d089f3
Refactor doom*projectile-locate-dominating-file 2019-03-28 16:43:04 -04:00
Henrik Lissner
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
Henrik Lissner
7b8a2fcff8
Don't capture INSECURE, DEBUG & YES envvars
They should be transient.
2019-03-28 14:47:31 -04:00
Henrik Lissner
af37f9af58
Fix wrong-number-args error on doom env 2019-03-28 13:30:39 -04:00
Henrik Lissner
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
Henrik Lissner
9b97631ddf
Fix typo in env file template 2019-03-28 02:25:28 -04:00
Henrik Lissner
2f0ad0e269
Fix -y/--yes/YES in doom quickstart 2019-03-28 02:24:19 -04:00
Henrik Lissner
b3d931d7ce
Refactor undo-tree advice 2019-03-28 01:56:09 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
ab616cfb95
Merge pull request #1247 from jdnavarro/develop
Maximize window vertically/horizontally
2019-03-26 03:45:52 -04:00
Henrik Lissner
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
Henrik Lissner
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
Danny Navarro
d589f87253 Add maximize window key bindings
This includes maximization for entire buffer, vertically and
horizontally.
2019-03-24 14:47:55 +00:00
Henrik Lissner
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
Henrik Lissner
9befc015bb
Prompt to restart after doom//upgrade 2019-03-22 14:13:35 -04:00
Henrik Lissner
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
Henrik Lissner
82ef3e987b
Remove protect-visible-buffer tests 2019-03-17 00:16:22 -04:00
Henrik Lissner
259590d54e
Remove doom|protect-visible-buffer
This behavior is now isolated to kill-this-buffer.
2019-03-16 23:59:50 -04:00
Henrik Lissner
7fd1497e88
Ask to install all-the-icons fonts in doom quickstart 2019-03-16 23:59:50 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
689a3bb446
Remove :modules from private packages in doom/info
Unnecessary bulk.
2019-03-16 23:59:50 -04:00
Andrew Whatson
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
Henrik Lissner
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
Henrik Lissner
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