Commit Graph

724 Commits

Author SHA1 Message Date
Henrik Lissner
a4fb4070ea
Rework how unicode fonts are set and loaded 2019-05-15 20:24:52 -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
f696ff32f4
doom-project-find-file: add helm-find-files as a fallback 2019-05-13 00:18:51 -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
e5d566ea2a
Prevent non-prefix key errors on doom//refresh
May also help doom/reload
2019-05-12 01:43:22 -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
898ef11b76
Saving the world, one trailing space at a time 2019-05-02 16:20:40 -04:00
Henrik Lissner
6d314c2795
Revise and update docstrings and comments 2019-05-01 21:02:28 -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
1ab8dac872
Fix arg-less color functions in print!/format! 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
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
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
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
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
4724d0a109
Fix #1323: void-variable projectile-project-root 2019-04-11 18:29:26 -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
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
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
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
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
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
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
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
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
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
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
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
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