Commit Graph

678 Commits

Author SHA1 Message Date
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
b618025e1d
Merge pull request #1237 from flatwhatson/fix-toggle-debug
Fix doom/toggle-debug-mode
2019-03-12 11:29:51 -04:00
Andrew Whatson
7b4afa32e4 Improvements to apropos and describe-symbol
Patch the apropos button types so they call helpful instead of the
built-in describe functions.  Also add some bindings to apropos-mode-map
so it behaves like other help modes.

Add `doom/describe-symbol` function, which shows documentation for
callable and variable symbols.  If a symbol is both a variable and a
callable, it dispatches to apropos.  This gives a better workflow than
`helpful-symbol`, which annoyingly prompts the user.

Remap `describe-symbol` to `doom/describe-symbol`, and update
`+emacs-lisp-lookup-documentation` to call it also.
2019-03-12 18:52:24 +10:00
Henrik Lissner
867f94e23a
Refactor doom-get-outdated-packages
May address #1235
2019-03-11 18:46:52 -04:00
Andrew Whatson
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
Henrik Lissner
c3a9828fa3
Allow doom-package-list to scrape *all* packages
Even ones that are conditional. This does mean its plist is unevaluated,
however.
2019-03-10 08:10:59 -04:00
Henrik Lissner
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
Henrik Lissner
ca9a2c8c17
Refactor interactiove bin/doom commands #1220 2019-03-09 04:28:25 -05:00
Henrik Lissner
bb9cbfecc9
Improve interactive bin/doom commands #1220
Now prints to a buffer rather than in echo-area. Still experimental
however.
2019-03-09 03:53:38 -05:00
Henrik Lissner
cec2b4e9bc
Add doom/toggle-debug-mode command 2019-03-08 04:25:45 -05:00
Henrik Lissner
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
Henrik Lissner
44de995ca5
config/default: change SPC h keymaps
SPC h now maps to help-map to reduce redundancy. Some adjustments and
additions were made to this map so all users (evil and vanilla) can
benefit from Doom's extra help commands.
2019-03-08 02:37:33 -05:00
Henrik Lissner
a05b1877be
Rewrite switch-{buffer,window} hooks
+ Add doom-switch-frame-hook
+ Replace doom-{enter,exit}-{buffer,window}-hook with
  doom-switch-{buffer,window}-hook
+ New switch-buffer hooks run on buffer-list-update-hook rather than
  in select-window advice.
+ Blank our buffer-list-update-hook in some places to reduce how many
  times it gets triggered.
2019-03-08 02:37:33 -05:00
Henrik Lissner
31688c921d
Refactor doom-get-outdated-packages
Partitions quelpa packages so there are 4 threads tops.
2019-03-08 02:34:26 -05:00
Henrik Lissner
884957bdc6
Refactor format! macro
By removing the cl-flet call, we reduce the size of backtraces produced
during bin/doom commands by a whopping 80%. Noice.

Also renames doom-ansi-apply -> doom-color-apply
2019-03-07 18:26:44 -05:00
Henrik Lissner
c1beb39c5b
Rename doom/describe-setters -> doom/describe-autodefs 2019-03-05 01:55:40 -05:00
Henrik Lissner
cfa97470fc
Add links to config files in describe-packages
Also dims packages that aren't installed.
2019-03-05 01:55:40 -05:00
Henrik Lissner
6a4682f3f1
Change doom/describe-module to browse module
Instead of opening its README.org, which may or may not exist.
2019-03-05 00:04:30 -05:00
Henrik Lissner
fbcb4e6973
Minor refactor across the board 2019-03-04 20:47:26 -05:00
Henrik Lissner
b054190820
New doom/describe-packages command
Replaces describe-packages and adds Doom module awareness to package
documentation.
2019-03-04 20:47:25 -05:00
Henrik Lissner
f6cc2644b0
New doom-log macro for debug-time logging
doom-log won't interfere with the minibuffer if it's in use, and will
report the originating module.

Addresses #1215
2019-03-04 18:38:25 -05:00
Henrik Lissner
b98f34d1fd
Add :killb & doom/kill-buried-buffers
Also fix reported killed-buffer count when invoking kill commands
interactively.
2019-03-04 14:07:34 -05:00
Henrik Lissner
f0ad9b7585
Ensure explicitly installed pkgs are user-selected 2019-03-04 04:57:07 -05:00
Henrik Lissner
66d23e39bb
Fix doom/move-this-file not opening renamed file 2019-03-03 02:17:42 -05:00
Henrik Lissner
80607ff033
Confirm quit on doom/restart-and-restore 2019-03-02 03:06:29 -05:00
Henrik Lissner
d46bb287ae
General refactor of Doom core
- Code reduction and refactor across the board (cull unneeded minor
  advise, hooks and hacks or update them)
- Revise outdated comments and docstrings
- Reorganize core autoload libraries
- Remove large file check (Emacs already has a built-in one, which we
  augment to be even more performant when it does kick in)
- helpful.el can now be disabled completely through package!
2019-03-02 01:34:19 -05:00
Henrik Lissner
687496167a
Fix void-function projectile-relevant-known-projects
Thrown when using doom/find-file-in-other-project and
doom/browse-in-other-project too soon.
2019-03-02 01:34:19 -05:00
Henrik Lissner
8a90f29c91
Make session persistence module agnostic
They've been removed from feature/workspaces and moved into
core/autoload/sessions, which falls back to desktop.el if persp-mode
isn't present. This also offers a substantial speed up to
restart+restoring and restoring sessions in general.

Also fixes #1210, where the newly spawned frame after doom/restart
wasn't focused.

Introduces the following commands:

- doom/restart
- doom/restart-and-restore
- doom/quickload-session
- doom/quicksave-session
- doom/load-session
- doom/save-session
- +workspace/restore-last-session (alias for doom/quickload-session)

And removes

- +workspace/load-session
- +workspace/save-session
- +workspace/load-last-session (renamed to +workspace/restore-last-session)
- +workspace/restart-emacs-then-restore (replaced by doom/restart-and-restore)
- :ss (ex command)
- :sl (ex command)
2019-03-02 01:34:19 -05:00
Henrik Lissner
9b7d95f43a
Remove doom-cleanup-hook & doom/cleanup-session
These weren't reliable, often times buggy or overzealous about killing
buffers and processes. Best to do it manually or come up with a better
solution.
2019-02-26 22:57:02 -05:00
Henrik Lissner
4c35618044
Improve version check for line-numbers polyfill
Since there are early versions of Emacs [26.0, 26.1) that don't have the
new line numbers library.
2019-02-26 17:29:40 -05:00
Henrik Lissner
1b43ea50f0
Revise SPC f keybinds
- SPC f . -> counsel-file-jump or find-file
- SPC f > -> doom/browse-in-other-projects
- SPC f / -> projectile-find-file
- SPC f ? -> doom/find-file-in-other-project
- Moved doom/sudo-find-file to SPC f S

This change was made to accommodate the new
doom/browse-in-other-projects and doom/find-file-in-other-project
commands, which make it easy to jump to files in other known projects.
2019-02-26 13:21:16 -05:00
Henrik Lissner
4ccbc9c7df
Update major-mode=>module alist for help commands 2019-02-24 21:00:19 -05:00
Henrik Lissner
1758266ce4
Fix doom/describe-setters 2019-02-24 20:40:16 -05:00
Henrik Lissner
7c5eefee3e
General, minor refactoring 2019-02-24 13:58:56 -05:00
Henrik Lissner
acddf6a047
Move delete-backward-char & newline-and-indent advice
To config/default; the only place it is used.
2019-02-22 00:25:30 -05:00
Henrik Lissner
afae6e4f1d
Remove doom/toggle-comment-region-or-line
Replaced with simpler keybinds.
2019-02-21 19:13:36 -05:00
Henrik Lissner
c82faf7f10
General reformatting & minor refactors 2019-02-19 15:53:26 -05:00
Henrik Lissner
4437d80133
Add dos2unix & unix2dos conversion commands 2019-02-18 01:59:56 -05:00
Henrik Lissner
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
Sean Farley
11b4a3502a bindings: add common comment toggle
This is fairly common in most editors so let's make lives easier.
2019-01-28 23:14:14 -08:00
Luigy Leon
a3694edb15 Fix doom/update-package 2019-01-24 02:13:16 -05:00
Henrik Lissner
b6718715fe
Fix doom-big-font-mode when no frame exists
It must still be appended to emacs-startup-hook. If it's run any
earlier, doom|init-fonts will overwrite it.

Reported by @ar1a.
2019-01-21 22:19:14 -05:00
Henrik Lissner
efa577dec2
Improve error-handling in doom/update-package 2019-01-21 17:39:42 -05:00
Henrik Lissner
d80802d3c9
doom/cleanup-session: don't kill processes by default 2019-01-14 00:52:31 -05:00
Henrik Lissner
31a0ad5b95
Move doom--condition-case! to core/cli/packages
The only place it is being used
2019-01-10 15:44:42 -05:00
Henrik Lissner
81394cf733
Only prefer compiled theme on startup
...But not on doom/reload-theme or post-init load-theme calls.
2018-12-31 15:19:23 -05:00
Henrik Lissner
e9608ab939
doom-project-find-file: unset projectile-project-root
Instead of setting it default-directory, which can cause symlink
resolution issues.
2018-10-14 23:59:26 -04:00
Henrik Lissner
0ebf526e01
Fix doom/info omitting first module in each category
Discovered in #941
2018-10-12 14:07:25 -04:00