- If there's only one other window, delete-window would be called,
instead of delete-other-windows
- when there is only one window other than the popup, this other window
is the main window in this frame, delete it would raise an error:
`delete-window: Attempt to delete main window of frame <frame name>`
A change upstream causes the prompt to be suppressed if the current
command wasn't run interactively. The check for interactivity gets
tricky when advice are involved.
This removes a few popup advice functions that are no longer necessary
and changes how we handle org agenda windows (they're now displayed in
the current window, rather than a popup -- see org-agenda-window-setup
to change this).
Other issues addressed:
+ Fixes 'Attempt to delete main window of frame' errors when using
org-todo from popups (particularly in daemon Emacs).
+ Removed the custom 'popup-window options for org-agenda-window-setup
and org-src-window-setup, and change them to 'current-window and
'other-window, respectively.
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.
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.
In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.
doom*shut-up -> doom-shut-up-a
doom*recenter -> doom-recenter-a
+evil*static-reindent -> +evil--static-reindent-a
The rationale behind this change is:
1. Elisp's own formatting/indenting tools would occasionally struggle
with | and * (particularly pp and cl-prettyprint). They have no
problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
github markdown) struggle with it, sometimes refusing to highlight
code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
on haphazardly way back when Doom was simply "my private config".
Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.
Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
macro. The old pair weren't as useful. The new def-advice! saves on a
lot of space.
- Removed "stage" assertions to make sure you were using the right
macros in the right place. Turned out to not be necessary, we'll
employ better checks later.
- So the mode-line doesn't "hide" the last line of the popup
- So org doesn't delete all other windows when displaying the *Org tags*
popup
- Minor corrections to comments in ui/popup/+hacks.el
Fixes#829. Helm's persistent action would try to operate on the *Org
Links* window, which is dedicated, causing a "Cannot split side window
or parent of side window" error.
This fix gets rid of this unhelpful popup altogether when helm is
enabled.
Other windows would be resized slightly incorrectly because treemacs
opens as a fixed split, rather than a side window. This change forces it
to be a side window, which resolves the problem _and_ restores the
functionality of balance-windows, which is disabled when a fixed split
is present.