Commit Graph

39 Commits

Author SHA1 Message Date
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
1c4215c187 Fix 'command not found' errors for hidden commands 2019-07-22 04:46:14 +02:00
51d3b1b424 💥 revise advice naming convention (1/2)
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.
2019-07-22 02:27:45 +02:00
394d13179f Fix Org tags popup hack
Causing Org tags output to be written to the source buffer.
2019-07-10 17:28:20 +02:00
14b1e36812 ui/popup: fix *Org tags* popups
- 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
2019-07-10 12:41:51 +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
f4ef25bb12 Don't delete-other-windows during org-agenda popup 2019-06-26 14:31:06 +02:00
b9729380c4 Use ;;;###package cookies in popup hacks file
Used by doom/help-package-config
2019-05-08 00:58:51 -04:00
9b1b75f947 Improve profiler popup integration
Following profiler links will open in different window; also displays
CPU/Memory reports side by side.
2019-03-13 20:15:20 -04:00
4132be4208 org-agenda-window-setup = popup-window
This is a custom setting that allows org agenda windows to be managed by
Doom's popup manager.
2019-02-03 18:39:29 -05:00
6a03b37dd3 General refactor for comments & docstrings 2019-01-05 15:20:49 -05:00
1610cd32b2 ui/popup: respect org-src-window-setup
Added a new value for org-src-window-setup: 'popup-window

Other values (like 'other-window) will revert to org's old behavior.

Needs more testing.
2018-12-06 17:52:12 -05:00
b41e38dcf4 Make RET respect popups in Buffer-menu 2018-12-06 17:50:32 -05:00
702e0a6159 ui/popup: fix typo in d8928d4a 2018-10-03 02:32:22 -04:00
d8928d4aab ui/popup: fix which-key vslot fix
Prevents which-key from "sharing" popups.

Reported by @mfiano
2018-10-03 01:26:59 -04:00
b76a09539c Fix helm TAB completion from org-insert-link #897 #829
This is a tricky issue and a tricky fix. See the comments in the commit
for an explanation.
2018-09-18 21:44:59 -04:00
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
cc47798846 Revert 6b910392 #829
Causes other errors. Will need a better solution.
2018-08-25 12:00:27 +02:00
6b91039283 Fix helm persistent action with *Org Links* window
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.
2018-08-24 01:09:53 +02:00
c69543fecc Fix helm not cooperating with other popups
Like the compilation window
2018-08-15 23:32:53 +02:00
b349dd3473 ui/popup: respect org-src-window-setup 2018-08-07 14:44:10 +02:00
c1e2919294 completion/helm: set default window height = 22%
A little smaller than the default
2018-08-04 18:42:29 +02:00
4489ce6b81 ui/popup: refactor hacks 2018-08-04 00:00:16 +02:00
4db89a2fb4 Remove treemacs popup hack
Now that it is supported upstream.

Relevant to #766
2018-08-03 19:15:46 +02:00
d2ecd87739 Fix ivy completion when treemacs is open
Caused by incorrectly initialized treemacs popup hack.
2018-08-02 03:31:20 +02:00
cbc59f9333 Appease the byte-compiler 2018-07-30 12:10:11 +02:00
28e21352ec Have popup manager handle treemacs windows
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.
2018-07-21 01:20:59 +02:00
7f284e98b6 Fix helm-M-x help popup not properly closing
On successive TAB presses on a command
2018-07-21 01:20:05 +02:00
0b7faa468c Fix which-key sharing windows with other popups
Which-key is now lazy-loaded, so the modified which-key-popup-type gets
overwritten.
2018-07-06 14:57:40 +02:00
0dc0ccc63e Refactor +popup*org-pop-to-buffer
Simplify pop-to-buffer call.
2018-06-25 20:19:33 +02:00
6490c4b922 Prevent unsafe file variable prompts on help links 2018-06-17 17:26:15 +02:00
1eae57a0b4 Rename +popup-display-buffer
To +popup-display-buffer-stacked-side-window, to make it more obvious
what it actually does.
2018-06-17 02:21:46 +02:00
635fbb4a97 Fix "selecting deleted buffer" errors in helm #665
By properly handling helm popups.
2018-06-16 14:42:47 +02:00
44363cae40 General, minor refactor & revision
Across the board. All the boards.
2018-06-16 12:26:58 +02:00
02d532a09a Set ibuffer-use-other-window in ui/popup/+hacks.el
It was originally set to accommodate the popup system.
2018-06-16 10:22:59 +02:00
d8b1e469bc Introduce autodefs to replace some settings
+ :popup -> set-popup-rule!
+ :popups -> set-popup-rules!
+ :company-backend -> set-company-backend!
+ :evil-state -> set-evil-initial-state!

I am slowly phasing out the setting system (def-setting! and set!),
starting with these.

What are autodefs? These are functions that are always defined, whether
or not their respective modules are enabled. However, when their modules
are disabled, they are replaced with macros that no-op and don't
waste time evaluating their arguments.

The old set! function will still work, for a while.
2018-06-15 03:42:01 +02:00
6fe0017e24 Add popup hacks for pdf-tools' annot list windows
Annotations are displayed in stacked windows to the left of the pdf.

Thanks to @UndeadKernel for help figuring this out.
2018-06-14 19:55:36 +02:00
6e6dfc2215 Implement helm project search functionality #644
Adds +helm/project-search, as well as +helm/ag and +helm/ag-from-cwd,
and variants for rg, pt and grep/git-grep, to mirror the functionality
available to :completion ivy.

Also updates the evil ex commands and keybinds
2018-06-02 20:37:02 +02:00
83118dc65c Move feature/popup => ui/popup
And move settings to ui/popup/init.el
2018-05-14 13:05:03 +02:00