Commit graph

54 commits

Author SHA1 Message Date
Henrik Lissner
aa54383b5d
refactor: deprecate doom-etc-dir for doom-data-dir
doom-etc-dir will be renamed to doom-data-dir, to better reflect its
purpose, and align it with XDG_DATA_HOME (where it will be moved to in
v3, where Doom will begin to obey XDG directory conventions more
closely).
2022-08-14 20:43:35 +02:00
Henrik Lissner
ad6a3d0f33
refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
Henrik Lissner
02850dd6d7 fix(workspaces): wrong-type-argument list error on kill emacs
Amend: 1db18f6e1390
Fix: #5687
2021-11-21 18:49:21 +01:00
Henrik Lissner
e431dbc138 fix(doom-dashboard,workspaces): module init order
Change (and simplify) the load order of Doom's dashboard and persp-mode
so that the dashboard always initializes later. This and 0ab6aba should
fix #5643.

Fix #5643
Ref 0ab6aba056
2021-10-18 01:15:20 +02:00
Henrik Lissner
2f100fef04 fix(workspaces): persist magit-status buffers
Fix #3558
Co-authored-by: Mikhail Levchenko <Mishkun@users.noreply.github.com>
2021-09-29 17:59:51 +02:00
Henrik Lissner
045ea7460d nit: revise and reformat code comments 2021-08-04 01:53:12 -04:00
Itai Y. Efrat
0e9864d308 selectrum: fix project switching with workspaces
Replicates ivy behavior of opening file in the new workspace
2021-07-25 02:49:41 +03:00
Henrik Lissner
84e1554f14 Fix #5109: startup files not added to main persp 2021-05-28 11:43:40 -04:00
Henrik Lissner
fa29a3cf1d Ensure associated workspace is deleted on server-done too
Should catch more corner cases where workspaces are surviving their
emacsclient-spawned frames.
2021-03-05 20:09:22 -05:00
Henrik Lissner
00b370fdc6
ui/workspaces: persp-local winner-mode history 2020-11-19 00:44:16 -05:00
Henrik Lissner
807f00a470
Fix #4205: void-function (setf persp-buffers) 2020-11-02 23:56:43 -05:00
Henrik Lissner
7d603185e1
Filter dead buffers from persp-mode workspaces
Fix #4196
Fix #1525
2020-11-02 14:43:12 -05:00
Henrik Lissner
8afba81b02
Fix #4037: persp-mode failure at daemon startup
Due to upstream changes.
2020-10-06 14:19:36 -04:00
Henrik Lissner
3f4eaec1af
Fix void-variable bb error when saving workspace 2020-10-05 16:35:58 -04:00
RobinMarchart
9f6cb1a1b4
fix #4025
function was renamed in persp-mode
2020-10-05 12:17:59 +02:00
t-e-r-m
b632cbaa5c Add projectile dired action in workspaces module
"open project in dired"
2020-08-19 17:37:00 +05:30
Henrik Lissner
08e5b8535a
ui/workspaces: don't persist TRAMP buffers
They're too slow to restore.
2020-08-11 20:53:12 -04:00
Henrik Lissner
095b32979f
Register workspace buffers opened via bookmark-jump 2020-07-28 16:06:37 -04:00
Henrik Lissner
847bbf380c
persp-kill-foreign-buffer-behavior = kill
Don't bother the user with prompts. If they're killing a buffer, they
want to kill the buffer.
2020-06-13 17:12:23 -04:00
Henrik Lissner
db16b12633
persp-reset-windows-on-nil-window-conf = nil
Do nothing when opening a perspective with no window conf; this is
particularly useful for emacsclient frames that are opened without a
dedicated workspace.
2020-04-29 14:44:51 -04:00
Henrik Lissner
5cc2befc72
Fix #2609: switch-project no-ops for helm users 2020-02-29 00:03:40 -05:00
Henrik Lissner
88dd15e204
Revise comments 2020-02-28 22:26:19 -05:00
Henrik Lissner
e220549bb8
Fix #2595: immortal find-file prompt on project switch
Regression caused by 8049914e0, for #2591
2020-02-24 22:27:25 -05:00
Henrik Lissner
93fce97e61
Refactor +workspaces-add-current-buffer-h 2020-02-11 17:47:39 -05:00
Henrik Lissner
725003376f
Add indirect buffer itself to workspace 2020-02-11 17:01:00 -05:00
Henrik Lissner
fe584a1f0c
Add (real) indirect buffers to workspace 2020-02-11 17:00:41 -05:00
Henrik Lissner
5eeb362610
Ensure workspace in insertion order
Closes #2488
Fixes #2487
2020-02-06 15:20:42 -05:00
Henrik Lissner
458cdd5df4
ui/workspaces: remove extra workspaces when restoring sessions 2019-12-22 19:59:22 -05:00
Henrik Lissner
c13b8df5df
Minor refactors & reformatting 2019-12-05 14:56:16 -05:00
Henrik Lissner
d347574d30
Fix #1973: selected region survives switching workspaces
Leaving behind ineffectual region highlights
2019-10-28 23:23:13 -04:00
Henrik Lissner
f7c368c5da
ui/workspaces: associate files opened via emacsclient
...with the current workspace.
2019-09-14 18:28:30 -04:00
Henrik Lissner
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
Henrik Lissner
243d69bb6d
ui/workspaces: don't register filtered buffers
May indirectly address #1525
2019-08-22 14:45:40 -04:00
Henrik Lissner
9b1c49149c
New fix for #1525: 'selecting deleted buffer' error 2019-08-21 00:29:02 -04:00
Henrik Lissner
58fb9faf3a
ui/workspaces: use add-hook! for inline hook 2019-08-17 16:04:41 -04:00
Henrik Lissner
0cf669ab92
Fix fix for #1525
Original fix complained about void function setf persp-buffers.
2019-08-15 21:30:59 -04:00
Henrik Lissner
e32fd0c7e1
Fix #1525: selecting deleted buffer errors
...when killing Emacs or switching perspectives.
2019-08-15 21:14:21 -04:00
Henrik Lissner
db1c1995fd
ui/workspaces: fix evil-window-delete remapping
Relevant to #1641
2019-08-08 23:58:41 -04:00
Henrik Lissner
19ecf8e46a
Correct last inline hook defuns
See a3e262c7 for rationale
2019-07-28 16:10:53 +02:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
5e0177d667
ui/workspaces: conform to new hook/advice conventions 2019-07-22 02:37:47 +02:00
Henrik Lissner
c5cd29ef74
ui/workspaces: refactor restoration of indirect buffers 2019-07-08 21:21:02 +02:00
Henrik Lissner
525cba3f3b
ui/workspaces: fix +workspaces|init for daemon 2019-06-26 19:17:56 +02:00
Henrik Lissner
b5c5b7f10d
Move posframe+persp-mode fix to ui/workspaces 2019-06-26 14:31:06 +02:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
f2d7c5625d
Revise comments & docstring 2019-06-18 14:43:05 +02:00