Commit graph

176 commits

Author SHA1 Message Date
Quentin Le Guennec
db9bc3848d feature/workspaces: Fix +workspace-delete to match docstring 2018-10-30 19:10:16 +01:00
Henrik Lissner
6515efa19e
feature/workspaces: add +workspaces-on-switch-project-behavior #836
To control when a new workspace is created when switching projectile
projects.
2018-10-03 00:00:56 -04:00
Henrik Lissner
e7fc1d3290
Fix wrong-type-arg: stringp, nocache errors
Fix old usage of doom-project-name and doom-project-root.
2018-09-28 23:49:18 -04:00
Henrik Lissner
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
Henrik Lissner
bd7f1f6d17
Fix wrong-type-arg on project switch #836
A regression caused by e40a58c4, which made +workspace-new return
something other than a perspective struct.
2018-08-27 20:07:17 +02:00
Henrik Lissner
1ed8894826
+workspace/delete: error if workspace doesn't exist 2018-08-26 14:14:53 +02:00
Henrik Lissner
e40a58c423
Optimize +workspace-new & workspace creation
This is much faster than the old method of switching to the persp to
modify them.
2018-08-26 14:12:50 +02:00
Henrik Lissner
34de826ac4
+workspace-contains-buffer-p -> persp-contain-buffer-p
Wrapper is unnecessary.

Also remove unnecessary type checking.
2018-07-09 21:53:50 +02:00
Henrik Lissner
4941e327f4
General refactor for readability
+ Removes redundant/unhelpful comments
+ Renames functions, hooks and variables to be self-documenting
+ Use add-to-list to ensure idempotency (and is more performant)
2018-07-09 15:33:31 +02:00
Henrik Lissner
1a068f82f1
Add +workspace/load-last-session
And fix the load last session button on dashboard.
2018-07-07 11:41:24 +02:00
fuxialexander
8f74ce982d add action for counsel-projectile-switch-project 2018-07-04 23:59:36 +08:00
Henrik Lissner
eebe852de4
Fix workspace cleaning up visible popups
On :cleanup or doom/cleanup-session
2018-06-30 23:16:48 +02:00
Henrik Lissner
66e62e8b6e
destructuring-bind => cl-destructuring-bind 2018-06-30 02:58:25 +02:00
Henrik Lissner
91c4448ed2
Refactor +workspaces|associate-frame
No need to set current frame on first frame.
2018-06-30 02:29:19 +02:00
Henrik Lissner
83ba527afd
Refactor auto-add-buffer functionality
Use built-in mechanism for auto-adding buffers to current workspace,
rather than reinvent the wheel.
2018-06-30 02:29:18 +02:00
Henrik Lissner
537cc9e1ed
Rewrite doom-real-buffer-p; require first arg
Because of how widely used this function is, I'd rather it be as
explicit as possible to avoid bugs and to make it faster.
2018-06-30 01:57:51 +02:00
Henrik Lissner
2ffad42466
Prevent persp-mode throwing an error on kill-emacs
This would otherwise stop Emacs from quitting.
2018-06-29 22:23:44 +02:00
Henrik Lissner
6310236f51
Appease the holy byte-compiler 2018-06-26 01:46:34 +02:00
Henrik Lissner
d78f702401
Update feature/workspaces tests 2018-06-23 22:17:15 +02:00
Henrik Lissner
863fa16bcc
Refactor +workspace/new: use persp-copy
Instead of manually adding buffers to new workspace.
2018-06-23 19:59:17 +02:00
Henrik Lissner
fbf7834d93
Don't delete workspace if visible in another frame
This leaves persp-mode in a semi-broken state.
2018-06-23 19:53:58 +02:00
Henrik Lissner
f6dc6ac74e
Refactor out map.el usage
After some profiling, it turns out map-put and map-delete are 5-7x
slower (more on Emacs 25) than delq, setf/alist-get and add-to-list for
small lists (under 250 items), which is exactly how I've been using
them.

The only caveat is alist-get's signature is different on Emacs 25, thus
a polyfill is necessary in core-lib.
2018-06-23 19:53:54 +02:00
Henrik Lissner
c9014487b1
Restore workspaces on --restore later
doom-post-init-hook isn't late enough.
2018-06-19 16:43:51 +02:00
Henrik Lissner
af350aa09e
feature/workspaces: disable magit persisting
Too buggy!
2018-06-19 16:43:28 +02:00
Henrik Lissner
d5adf4ccbc
Minor refactor of feature/workspaces
Improve error handling and update docstrings+comments
2018-06-19 15:00:15 +02:00
Henrik Lissner
d979c46ea2
Make +workspaces-load-session replace current
It should not merge with the current session.
2018-06-19 14:53:45 +02:00
Henrik Lissner
8cb36afa21
Switch to last workspace after persp-load
A little more intuitive than just switching to main workspace.
2018-06-19 14:52:33 +02:00
Henrik Lissner
5f04be599f
feature/workspaces: persist indirect buffers 2018-06-19 14:50:27 +02:00
Henrik Lissner
e703d3ec8a
Fix default workspace tab faces
The inherited faces were double-quoted
2018-06-19 14:18:31 +02:00
Henrik Lissner
44363cae40
General, minor refactor & revision
Across the board. All the boards.
2018-06-16 12:26:58 +02:00
Henrik Lissner
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
Henrik Lissner
530bdca097
Refactor persp-mode-map keybinds
Use define-key! instead of individual define-key's
2018-06-05 19:50:56 +02:00
Henrik Lissner
e4e2fb55ed
feature/workspaces: remove non-side-window fix
This was fixed upstream in persp-mode#90.
2018-06-05 18:39:50 +02:00
Henrik Lissner
e2979e5b82
Fix +workspace/delete when one workspace is left 2018-05-29 00:42:33 +02:00
Henrik Lissner
4771c047c6
Merge pull request #601 from jcf/fix-workspace-load
Fix use of +workspaces-data-file in +workspace/load
2018-05-25 15:37:19 +02:00
Henrik Lissner
9011593e38
feature/workspaces: fix tests 2018-05-25 00:50:52 +02:00
Henrik Lissner
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
Henrik Lissner
f058505306
New bin/doom (eventual replacement for make)
This commit adds bin/doom, which acts as the middle man that make once
was (and will stay for a while, though the documentation will shift away
from using it). It does everything the previous make interface did, but
is faster and more flexible. bin/doom should eventually replace the
makefile.

bin/doom also makes it easier to run Doom outside of ~/.emacs.d and
~/.doom.d with, for example:

  bin/doom run -p ~/.other.doom.d/ -e ~/.other.emacs.d

bin/doom.cmd is included for Windows users, but I don't recommend using
it yet. It hasn't been tested nor have I ever written a batch script
before.

Also update init.example.el with new defaults.
2018-05-21 01:38:17 +02:00
James Conroy-Finn
217ff2cd54 Fix use of +workspaces-data-file in +workspace/load 2018-05-19 15:02:54 +01:00
Henrik Lissner
0bd88b8414
Add restart-emacs package & commands 2018-05-14 13:05:03 +02:00
Henrik Lissner
5426fe072c
feature/workspaces: autoload faces 2018-05-10 21:09:54 +02:00
Henrik Lissner
776886a0a4
feature/workspaces: restore missing +workspace/{save,load} commands 2018-04-26 05:10:58 -04:00
Henrik Lissner
a5877139cd
feature/workspaces: persp-mode integration for eshell, compile & magit-status 2018-04-21 21:04:34 -04:00
Henrik Lissner
39836fc15d
feature/workspace: disable autosave on manual autosave
+workspace/save-session without a name = autosaves the current session.
Doing so now disables autosaving on kill-emacs, otherwise your autosave
would be overwritten when closing Emacs.
2018-04-21 21:03:23 -04:00
Henrik Lissner
693942e438
Merge pull request #511 from amosbird/develop
fix workspace switch-left cycle.
2018-04-18 00:19:43 -04:00
Henrik Lissner
484cba1b1b
feature/workspaces: unselect side-windows when switching workspaces #499 2018-04-08 18:14:07 -04:00
Amos Bird
b2b603240f fix workspace switch-left cycle. 2018-04-05 21:24:13 +08:00
Henrik Lissner
54c6301f45
feature/workspaces: reduce redundancy in +workspace/kill-session 2018-04-02 05:51:01 -04:00
Henrik Lissner
aad653d913
feature/workspaces: clear last workspace instead of erroring out 2018-04-02 05:50:39 -04:00
Henrik Lissner
3f4c2c81d9
feature/workspaces: if universal arg, don't prompt for file on project switch 2018-03-23 16:03:29 -04:00