Commit Graph

191 Commits

Author SHA1 Message Date
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00
426369b4d3 revert: feat(popup): switch-to-buffer-obey-display-actions = t
As suspected, there were edge cases. Lots of sporadic window misbehavior
since I turned this on, so I'm reverting this.

Revert df520dfd4
2021-07-31 19:41:17 -04:00
348ff3f65d fix(popup): overaggressive ignoring of popup rules
Would cause errors in some legitimate cases where we want
display-buffer-alist respected.
2021-07-31 04:35:49 -04:00
df520dfd44 feat(popup): switch-to-buffer-obey-display-actions = t
This should give the popup module much more coverage, but *may* also
cause edge cases. Testing needed!
2021-07-28 15:23:56 -04:00
4d862d7770 fix(popup): org-edit-src breaks if forcibly killed
Invoke org-edit-src and an edit buffer is displayed for the src block at
point. If that popup is killed incorrectly, it leaves the original org
buffer (specifically, the src block you were editing) in a half-broken
state; forever waiting for you to finish editing that block.

This can happen when the edit window is a popup window and you switch
workspaces (which temporarily deletes popup windows), so clean up those
popups properly before switching.
2021-07-28 15:16:20 -04:00
d189132be1 fix(org): oversized org-todo popup
In the presence of multiple, horizontal splits, the org-todo popup
consumes ~50% of the vertical real-estate of its northern neighbor when
created. This is due to an edge case with some failsafe code somewhere
down org-fit-window-to-buffer's stack. This fix ensures the popup is
always a sane size.

And by enabling +popup-buffer-mode in it, we ensure it will be treated
as a popup (e.g. solaire-mode will be active in it, no modeline, etc).
2021-07-28 15:15:56 -04:00
2400e8b275 fix(popup): prioritize local actions over popup rules
Otherwise, commands like switch-to-buffer-other-{tab,window,frame} don't
do as they promise and revert to our global popup rules.

Fix #5301
2021-07-28 15:12:37 -04:00
cfcf7e0d03 Open embark grep buffers in popup 2021-07-25 15:47:58 -04:00
34fae1c01c Remove remaining Emacs27+ checks
- Remove remaining `EMACS27+` checks, since the whole codebase is
  assumed to run at version 27 or above now
- Remove `EMACS27+` definition since it's no longer needed
2021-07-10 16:03:41 +03:00
11cbd41b1b Fix process X is not a subprocess errors
When killing repl popups with special processes (e.g. for cider).
2021-03-13 16:33:18 -05:00
cf31b91858 Add default popup rule for *Apropos* buffers 2021-03-12 17:40:47 -05:00
9490d42cd3 Comment revision 2020-12-14 15:48:29 -05:00
9c510159ff popup.el: consider auto-saving indirect buffers too
Function (buffer-file-name) always returns nil with indirect buffer as
an argument. Extracting base buffer and checking if base buffer visiting
file fixes data loss in indirect buffers showed in popups.

E-mail thread in the org-mode mailing list:

  https://lists.gnu.org/archive/html/emacs-orgmode/2020-12/msg00085.html
2020-12-13 15:45:45 +01:00
6e30aa4395 popup: add rule for list-processes
Its content is typically thrown away after a quick glance, so make it popup.

Signed-off-by: Sergey Nizovtsev <snizovtsev@gmail.com>
2020-10-14 21:17:22 +03:00
6a64f37435 Minor refactors & revision across the board 2020-07-31 01:39:24 -04:00
d2f7999c29 Don't close treemacs on ESC #1970 2020-07-29 14:30:09 -04:00
b8a8ca9b06 Consider any window with no-other-window a popup
This allows +popup/other (other-popup) to jump to side windows created
outside of Doom's popup manager (e.g. treemacs or neotree).
2020-07-25 17:50:27 -04:00
233b15fe1e Larger *Customize* popup rule & don't quit on ESC/C-g 2020-06-13 16:21:43 -04:00
8bf902d5f4 General refactors & reformatting across the board 2020-06-04 20:13:28 -04:00
416f155d67 Show org-goto help window in a popup #3254
Rather than taking up a whole window only to show three lines of text.
2020-05-31 22:25:55 -04:00
5b23b3d486 Add popup rule for org-journal search commands 2020-05-07 00:23:46 -04:00
0904ee406f Make +popup/diagnose output result
Rather than succeed silently.
2020-05-03 16:31:06 -04:00
d12752324a Introduce letf! convenience macro
A more succinct cl-letf, which allows for local functions and macros.
2020-04-29 23:48:21 -04:00
b78fc4eb76 Minor refactor & reformatting across the board 2020-04-08 15:30:10 -04:00
9af8786e25 minor documentation spelling fix
`more tha one` -> `more than one`
2020-02-29 12:14:17 -08:00
86e03c04ba Make display-buffer-alist regexps case-sensitive #2619 2020-02-28 22:26:24 -05:00
f716aa5158 Fix conflict between :ui popup & org-src-window-setup
When set to split-window-*, other-frame, or current-window.
2020-02-25 13:36:18 -05:00
9bd3d66617 Add popup rule for *Local variables* popup 2020-02-11 13:36:03 -05:00
c395c08788 Fix #2396: remove unnecessary neotree popup hacks
Looks like they're not needed anymore.
2020-01-26 05:00:58 -05:00
4fe24df90f Fix #1970: don't count treemacs as a "popup"
And remove its popup rule.

It isn't being caught by the popup system in the first place, so this is
all a charade.
2020-01-06 03:50:48 -05:00
02a4f6b573 Suppress delete-window in org related functions
- 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>`
2020-01-05 11:52:39 +08:00
960d756b47 General, minor refactors 2019-12-30 18:23:56 -05:00
2e9195742a Fix shell popups from regaining their modeline #2228 2019-12-26 16:50:49 -05:00
adc8cba14b Revise docstrings & minor reformatting 2019-12-26 01:41:44 -05:00
6ac04e5a6d ui/popup: prevent infinite loop when killing popup buffers 2019-12-22 16:02:56 -05:00
491e80a568 Fix cut-off which-key popups #2219 2019-12-21 02:14:36 -05:00
a999a0ddd6 General refactors & comment revision 2019-12-19 14:51:34 -05:00
e56cc98ae9 Move multi-term-buffer-name to :term term 2019-12-17 18:09:39 -05:00
7f06644490 Make +pop/raise return the current window 2019-12-17 21:14:35 +01:00
207ce02a33 ui/popup: fix quit-window sometimes breaking popups
By burying the buffer and switching to a buffer that doesn't belong in a
popup.
2019-12-16 05:45:27 -05:00
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