Commit Graph

38 Commits

Author SHA1 Message Date
d297dc6934 Minor refactor & comment revision across the board 2019-10-03 23:33:59 -04:00
3f7e0fd103 Fix +workspace/delete changing workspaces
...when deleting other workspaces.
2019-09-29 23:12:43 -04:00
060f6a36d3 Fix +workspace/delete initially filtering workspaces
SPC u SPC TAB d will prompt you for the workspace you want to delete,
with the name of the current workspace prefilled into the the
minibuffer. This filters out all other workspaces from the get go, which
may fool you into thinking you can only delete the current workspace.

Now it only selects the current workspace by default, without filtering
them.
2019-09-29 12:50:20 -04:00
525193f94b ui/workspaces: fset -> defalias
Allows these commands to be advised.
2019-09-26 17:55:33 -04:00
e10cd8cf2e Insult byte-compiler's mom
Yeah, that shut him up.
2019-09-20 23:10:53 -04:00
f7c368c5da ui/workspaces: associate files opened via emacsclient
...with the current workspace.
2019-09-14 18:28:30 -04:00
059ede53b6 Update all unit tests
To meet changes introduced from the straight branch merge.
2019-09-03 00:59:46 -04:00
9e122c6847 ui/workspaces: fix session restoration
Caused by an inverted buffer filter when saving the current session.
2019-08-28 12:41:00 -04:00
243d69bb6d ui/workspaces: don't register filtered buffers
May indirectly address #1525
2019-08-22 14:45:40 -04:00
9b1c49149c New fix for #1525: 'selecting deleted buffer' error 2019-08-21 00:29:02 -04:00
58fb9faf3a ui/workspaces: use add-hook! for inline hook 2019-08-17 16:04:41 -04:00
0cf669ab92 Fix fix for #1525
Original fix complained about void function setf persp-buffers.
2019-08-15 21:30:59 -04:00
e32fd0c7e1 Fix #1525: selecting deleted buffer errors
...when killing Emacs or switching perspectives.
2019-08-15 21:14:21 -04:00
db1c1995fd ui/workspaces: fix evil-window-delete remapping
Relevant to #1641
2019-08-08 23:58:41 -04:00
19ecf8e46a Correct last inline hook defuns
See a3e262c7 for rationale
2019-07-28 16:10:53 +02:00
3313212f90 ui/workspaces: correct inline defun hooks
And add-to-list -> add-hook, because its a tiny bit faster (and fewer
characters).
2019-07-27 17:08:56 +02:00
a3e262c7ac 💥 Refactor add-hook! macro & change arg order
This update may potentially break your usage of add-hook! if you pass
the :local or :append properties to it. This is how they used to work:

  (add-hook! :append 'some-mode-hook #'do-something)

Thsoe properties must now follow the hooks, e.g.

  (add-hook! 'some-mode-hook :append #'do-something)

Other changes:
- Various add-hook calls have been renamed to add-hook! because I
  incorrectly assumed `defun` always returned its definition's symbol,
  when in fact, its return value is "undefined" (so sayeth the
  documentation). This should fix #1597.
- This update adds the ability to add multiple functions to hooks
  without a list:

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

- The indentation logic has been changed so that consecutive function
  symbols at indented at the same level as the first argument, but forms
  are indent like a defun.

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

    (add-hook! 'some-mode-hook
      (message "Hello"))
2019-07-26 20:17:29 +02:00
82ae3a73f3 def-advice!->defadvice! & conform to new advice conventions
This commit does two things:

- Renames def-advice! to defadvice!, in the spirit of naming convenience
  macros after the function/macro they enhance or replace.
- Correct the names of advice functions to indicate visibility and
  intent. A public advice function like doom-set-jump-a is meant to be
  used elsewhere. A private one like +dired--cleanup-header-line-a
  shouldn't -- it likely won't work anywhere but the function(s) it was
  made to advise.
2019-07-23 17:24:56 +02:00
76cacb5bfe 💥 Rename def-package! -> use-package!
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
2019-07-23 12:50:45 +02:00
5e0177d667 ui/workspaces: conform to new hook/advice conventions 2019-07-22 02:37:47 +02:00
c5cd29ef74 ui/workspaces: refactor restoration of indirect buffers 2019-07-08 21:21:02 +02:00
525cba3f3b ui/workspaces: fix +workspaces|init for daemon 2019-06-26 19:17:56 +02:00
9a02bd8ac8 Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
b5c5b7f10d Move posframe+persp-mode fix to ui/workspaces 2019-06-26 14:31:06 +02:00
9823881d47 ui/workspaces: general refactor
- Fixes #1506: unsets uniquify-buffer-name-style to work around breakage
  in persp-mode having to do with buffers being retrospectively renamed.
  See Bad-ptr/persp-mode.el#104.
- Move creation of main workspace into persp-mode-hook, to ensure main
  workspace always exists and nil workspace is never active.
- Remove +workspaces|init-frame and significantly reduce LOC in
  +workspaces|init to the bare essentials. This _may_ break persp-mode
  in daemon Emacs, but I'll deal with that next.
2019-06-26 14:30:37 +02:00
7a4bce3f9a ui/workspaces: associate buffers on buffer switch
We stop relying on the built-in mechanism for auto-registering a buffer
to the current workspace, because it misses many buffers (e.g. when we
switch buffers with SPC b b). Instead, we add buffers when they are
interactively switched to.
2019-06-26 14:28:40 +02:00
f2d7c5625d Revise comments & docstring 2019-06-18 14:43:05 +02:00
80958c0c17 Ensure non-dedicated window is active on workspace creation
Otherwise, workspaces are left in a broken state where they only contain
dedicated/side-windows, which Emacs can't handle well.

Indirectly fixes #1492
2019-06-14 12:34:23 +02:00
bc6c4b3e37 Add +workspace/other #1480
- Rename +workspace/switch-to-last to +workspace/switch-to-final, to
  avoid ambiguity.
- Add +workspace/switch-to-N commands
2019-06-11 16:12:06 +02:00
e7c12b1bb6 ui/workspace: minibuffer-message -> message
minibuffer-message adds 2 seconds to emacsclient calls that create new
workspaces.
2019-06-10 09:38:55 +02:00
2214c3175e Minor tweaks across the board 2019-05-21 00:34:32 -04:00
928ec16242 ui/workspaces: remove unused function 2019-05-19 02:17:59 -04:00
dce3d0ddc6 Fix evil-alternate-buffer + persp-mode
Fixes an issue where evil-switch-to-windows-last-buffer would switch to
buffers outside the current workspace.
2019-05-19 02:17:59 -04:00
ca8202c224 Standardize the READMEs of various modules 2019-05-09 21:31:23 -04:00
d1c9c3fc91 A more reliable +workspace-list-names
In case the cache goes stale.
2019-05-05 14:25:03 -04:00
eb62dde5d3 Fix ui/workspaces autoloads & tests 2019-04-25 22:20:31 -04:00
fc511ed701 ui/workspaces: minor refactors 2019-04-24 18:27:40 -04:00
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