Commit Graph

63 Commits

Author SHA1 Message Date
eae2529ed8 fix(popup): ensure hooks run in popup buffer/window
Ref: 13b64229a0
2025-04-09 15:59:47 -04:00
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
f26094b4ab tweak(popup): 7% bigger help popups by default 2022-02-01 18:56:16 +01:00
Dan
f458f97760 fix(popup): rules for report-emacs-bug 2021-12-03 16:48:06 +01:00
b2f27c2b4f refactor(lookup): move xwidget popup rule (#5598)
Setting the rules explicitly was preventing users from customizing how
xwidget popups should behave, so it was moved to the popup module as a 
global default.
2021-10-10 18:22:13 +02: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
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
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
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
233b15fe1e Larger *Customize* popup rule & don't quit on ESC/C-g 2020-06-13 16:21:43 -04:00
b78fc4eb76 Minor refactor & reformatting across the board 2020-04-08 15:30:10 -04:00
9bd3d66617 Add popup rule for *Local variables* popup 2020-02-11 13:36:03 -05:00
2e9195742a Fix shell popups from regaining their modeline #2228 2019-12-26 16:50:49 -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
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
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
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
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
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
1c4215c187 Fix 'command not found' errors for hidden commands 2019-07-22 04:46:14 +02:00
2f86c01170 Add default popup rule for M-x calc 2019-07-09 19:55:37 +02:00
20b397362b Don't auto-kill term/vterm/eshell dedicated popups 2019-06-27 01:27:40 +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
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
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
6cd30c926b Persist scratch buffer across sessions
- Adds doom/open-project-scratch-buffer (persistent project scratch
  buffers)
- Prefix arg = open scratch buffer in current window, for both
  doom/open-scratch-buffer and doom/open-project-scratch-buffer.
- Rename doom/delete-scratch-files ->
  doom/delete-persistent-scratch-file
- Remove doom-scratch-buffer-display-fn
- Rename doom-scratch-files-dir -> doom-scratch-dir
- Add SPC p s keybind to open project scratch buffer
2019-04-17 11:15:56 -04:00
4a7b821934 Don't auto-kill scratch buffer popups 2019-04-15 14:16:45 -04:00
138248ed03 Don't auto-kill compilation log buffers #1316 2019-04-09 21:55:46 -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
9b7d95f43a Remove doom-cleanup-hook & doom/cleanup-session
These weren't reliable, often times buggy or overzealous about killing
buffers and processes. Best to do it manually or come up with a better
solution.
2019-02-26 22:57:02 -05:00
ccb04c43da ui/popup: refactor default rules
The vslots don't have to be so far from 0. Also makes compilation popups
bigger.
2018-09-28 21:13:52 -04:00
4ea4754162 Add commands for using bin/doom from inside Emacs
This is experimental. I'd eventually like users to be able to management
Doom from inside Emacs, if they desire. This may be the only way to have
a decent user experience on Windows, for that matter.

Also adds a popup rule for it.
2018-09-28 21:13:27 -04:00
a1440f8d66 Fix meta keybinds in popup in tty Emacs #869
Meta keys map to ESC in tty Emacs.
2018-09-13 19:15:16 -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
fd8f8c5108 feature/lookup: rewrite dash docset integration
+ Uses alist variable to store config, rather than hooks
+ Added check for installed docsets in +lookup/documentation
+ Set docsets for various language modules (c-mode, c++-mode, css-mode,
  scss-mode, sass-mode, web-mode, go-mode, racket-mode, emacs-lisp-mode,
  js2-mode, rjsx-mode, typescript-mode, rust-mode, and php-mode)
+ Made *eww* popups for dash docsets larger
+ Renamed set-docset! => set-docsets! (set-docset! is aliased to
  set-docsets!)
+ New +lookup/install-docset alias
2018-08-31 02:49:48 +02:00
be8eedc296 Fix lost window state when toggling popups
Replaces af045213 with a method for preserving popup state.
2018-08-29 02:16:06 +02:00
af045213e3 Preserve window state when toggling popups
e.g. size
2018-08-26 17:24:27 +02:00
4eda07e576 Don't replace scratch buffer with other popups 2018-06-28 00:31:36 +02:00
f6dc6ac74e Refactor out map.el usage
After some profiling, it turns out map-put and map-delete are 5-7x
slower (more on Emacs 25) than delq, setf/alist-get and add-to-list for
small lists (under 250 items), which is exactly how I've been using
them.

The only caveat is alist-get's signature is different on Emacs 25, thus
a polyfill is necessary in core-lib.
2018-06-23 19:53:54 +02:00
0bea00c183 Fix with-popup-rules! macro
Mistreating its RULES argument, causing void-function errors.
2018-06-22 19:17:15 +02:00
16975d0dc3 Slightly smaller backtrace popups 2018-06-22 01:49:21 +02:00
27ab47cd11 Improve *Backtrace* popup rule
+ High vslot = unlikely to be replaced by other popups.
+ Make it large; backtraces are important!
+ Don't allow ESC to close it. It must be done manually, with q or zx
2018-06-20 02:12:37 +02:00
ca2c8b5a45 Minor refactor, across the board
Do you see the board? Now look at the other side. That's how far this
refactor extends.

Yes.
2018-06-18 15:02:24 +02:00
6808c46b58 💥 Change set-popup-rule! usage
Now accepts a flat plist of all its former parameters, including new
:parameters and :actions properties to increase your control over the
fate of your windows.

The old usage of set-popup-rule! is deprecated and may not work right!

The :ui popup module has also seen a major refactor to improve
efficiency and load times.

Sorry! This is the last "big" change before 2.1!
2018-06-18 02:34:16 +02:00