Commit Graph

151 Commits

Author SHA1 Message Date
08fb9c544d ui/popup: :transient -> :ttl in readme 2019-12-16 05:13:42 -05:00
dd7af506e3 Fix regex for detecting compilation buffer
*Compilation* and *compilation* are both allowed

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
2019-12-16 12:37:18 +07:00
a7d5da494e Fix end-of-file syntax error 2019-12-06 21:45:38 -05:00
996188250b Minor refactors & comment revision 2019-12-06 17:16:34 -05:00
a8fd59a054 Merge pull request #2143 from rgrinberg/popup-ignore-more
ui/popup: add more default rules
2019-12-03 22:56:33 -05:00
894c4e1855 Fix popup ignore rules
* Process Lis is without a space
* Escape trailing star
* Combine all rules
2019-12-04 09:46:27 +07:00
bcdb9f583a Require origin argument
If it doesn't satisfy windowp, it'll cause errors.
2019-12-03 20:00:38 -05:00
79faa02d6b Record origin window earlier
The selected window could change in between +popup--maybe-select-window calls.
2019-12-03 19:59:27 -05:00
359ae77250 ui/popup: extract +popup--maybe-select-window helper function 2019-12-04 08:32:27 +08:00
ca63b0bbfc ui/popup: respect :select nil when reusing a window
- before this change: when reusing a window, select option would get ignored
- after this change: when reusing a window, select option would be used
  just as a new popup
2019-12-04 08:20:17 +08:00
0bd0ac4ab9 Popup rules for more builtin types
process, timer, abbreviations, output, occur buffers are all better
displayed in a maximized fashion. Otherwise, they aren't really useful.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
2019-12-03 23:38:00 +07:00
a0e9981210 ui/popup: update configuration section in README 2019-11-25 13:51:23 -05:00
fb13b902b0 Minor comment/doc revision & refactors 2019-11-21 14:46:45 -05:00
99cd52e70f 💥 Drop Emacs 25.x support
Emacs 26.1 is Doom's new minimum supported version

Closes #2026
2019-11-08 16:02:06 -05:00
a074a2c851 ui/popup: let completion popups handle themselves
Fixes #1976
2019-11-01 22:31:05 -04:00
0e0fa37b22 [popup] ignore send mail buffers
[C-x m] should not appear in a popup.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
2019-10-28 12:20:35 +09:00
74cad2632b ui/popup: use old alist use-case for set-popup-rule!
This paradigm has been long since abandoned.
2019-10-21 06:26:57 -04:00
b3a0fb9fc7 ui/popup: correct docstring of set-popup-rule!
Predicate functions take two arguments.
2019-10-21 06:26:57 -04:00
e7f492c400 ui/popup: fix "back to top level" issue
The popup manager (by default) auto-kills most popup buffers after
~5s (controlled by the :ttl property). However, when backtrace buffers
are killed, it calls `top-level`. When the popup manager kills the
buffer, this causes janky cursor movement and the message "Back to top
level" to be displayed in the minibuffer.
2019-10-20 19:57:27 -04:00
7a1c8bd582 ui/popup: fix buffer cleanup ignoring kill-buffer-hook 2019-09-22 14:25:10 -04:00
87c6e8900c Fix org-insert-link desc prompt for helm users #1710
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.
2019-09-22 13:06:16 -04:00
799e822a19 ui/popup: move help buffers to new vslot
So *Messages* and help buffers get stacked instead of opened side by
side.
2019-09-22 11:58:42 -04:00
db0846f502 ui/popup: don't catch ibuffer windows
They're your problem now.
2019-09-22 11:56:00 -04:00
2de198e749 Fix +popup/raise not raising some windows
The command now raises the popup into the previously selected window,
unless the prefix argument is used.
2019-09-20 23:54:17 -04:00
d5ecfd3429 Move pdf-tools popup rules to tools/pdf 2019-09-19 18:55:44 -04:00
31ccd9be78 Replace vestigial references to def-package!
def-package! is deprecated and is replaced with use-package! to reduce
confusion about its purpose and connection to use-package.
2019-09-13 22:00:34 -04:00
d866ee3738 ui/popup: conform function to naming conventions 2019-09-10 15:01:00 -04:00
6f6e30c428 ui/popup: refactor org hacks
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.
2019-09-10 14:54:13 -04:00
43d80dcec6 Fix #1692 & stop org-todo from monopolizing frame
How org-todo manipulates the window config has changed upstream.
2019-09-09 14:25:23 -04:00
04166d6562 ui/popup: larger WoMan popups, by default 2019-07-27 19:40:31 +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
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
2f86c01170 Add default popup rule for M-x calc 2019-07-09 19:55:37 +02:00
53d1bf6b58 Refactor +popup/other 2019-06-30 18:12:16 +02:00
20b397362b Don't auto-kill term/vterm/eshell dedicated popups 2019-06-27 01:27:40 +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
a8300a53f1 ui/popup: allow ESC to close eval result popups 2019-05-15 20:29:46 -04:00
dd4e265a49 ui/popup: merge eval output popup rules 2019-05-15 15:25:03 -04:00
a22c035815 ui/popup: ensure existing buffers are reused
This resolves an issue where the popup manager would open another popup
if a previous one had been raised. The popup manager now delegates to
the existing buffer if it already exists (without resizing it).
2019-05-15 15:22:09 -04:00
c549091ce5 ui/popup: polish default rules
- Establish popup naming convention:
  - *doom:name* -> a temporary editing buffer (requires interaction)
  - *doom name* -> a transient buffer (no interaction required)
2019-05-15 15:22:09 -04:00
b9729380c4 Use ;;;###package cookies in popup hacks file
Used by doom/help-package-config
2019-05-08 00:58:51 -04:00
4c283a80f3 One dot in wrong place
Not sure what I am doing, but I cannot run the example with the `.` and the example on the previous line also use `:size` without a `.` before the size value.
2019-05-03 14:38:29 +02:00
ae06ddf78a ui/popup: update README 2019-05-02 15:11:32 -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
cce55db6ed Remove display-buffer-reuse-window from default actions
This would cause +popup/raise to reuse non-popup windows when raising
popups. If this doesn't work, it may be necessary to write a specialized
display-buffer-reuse-window to only reuse popups, specifically.
2019-04-21 13:32:22 -04:00