[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/popper 1312c0f0f6 053/102: Added video demo of buffer h
From: |
ELPA Syncer |
Subject: |
[elpa] externals/popper 1312c0f0f6 053/102: Added video demo of buffer hiding |
Date: |
Fri, 8 Sep 2023 15:58:53 -0400 (EDT) |
branch: externals/popper
commit 1312c0f0f6ef080778da880fc92532c2cd803717
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Added video demo of buffer hiding
Tweaks to readme, major-mode identification code
---
README.org | 21 +++++++++++----------
images/popper-hide-popup.gif | Bin 0 -> 144745 bytes
popper.el | 8 +++-----
3 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/README.org b/README.org
index 821ad3a854..a44ceadd63 100644
--- a/README.org
+++ b/README.org
@@ -183,19 +183,21 @@ If you already have rules in place for how various
buffers should be displayed,
#+end_src
** Suppressing popups
-Popper can suppress popups when they are first created. The buffer will be
registered in the list of popups but will not show up on your screen. Instead,
a message ("Popup suppressed: $buffer-name") will be printed to the echo area.
You can then raise it using =popper-toggle-latest= or =popper-cycle= at your
convenience. It will behave like regular popups from that point on.
+Popper can suppress popups when they are first created. The buffer will be
registered in the list of popups but will not show up on your screen. Instead,
a message ("Popup suppressed: $buffer-name") will be printed to the echo area.
You can then raise it using =popper-toggle-latest= or =popper-cycle= at your
convenience. It behaves as a regular popup from that point on:
+
+[[file:images/popper-hide-popup.gif]]
To specify popups to auto-hide, use a cons cell with the =hide= symbol when
specifying =popup-reference-buffers=:
#+begin_src emacs-lisp
(setq popper-reference-buffers
- '("\\*Messages\\*"
- ("\\*Async Shell Command\\*" . hide)
+ '(("Output\\*$" . hide)
(completion-list-mode . hide)
- occur-mode))
+ occur-mode
+ "\\*Messages\\*"))
#+end_src
-This assignment will suppress async shell command output and the Completions
buffer. The other entries are treated as normal popups.
+This assignment will suppress all buffers ending in =Output*= and the
Completions buffer. The other entries are treated as normal popups.
You can combine the hiding feature with predicates for classifying buffers as
popups:
@@ -203,13 +205,12 @@ You can combine the hiding feature with predicates for
classifying buffers as po
(defun popper-shell-output-empty-p (buf)
(and (string-match-p "\\*Async Shell Command\\*" (buffer-name buf))
(= (buffer-size buf) 0)))
-
- (setq popper-reference-buffers
- '("\\*Messages\\*"
- (popper-shell-output-empty-p . hide)))
+
+ (add-to-list 'popper-reference-buffers
+ '(popper-shell-output-empty-p . hide))
#+END_SRC
-This assignment will suppress display of the async shell command output buffer
only when there is no output (stdout). Once it is hidden it will be treated as
a popup on par with the Messages buffer.
+This assignment will suppress display of the async shell command output buffer
only when there is no output (stdout). Once it is hidden it will be treated as
a popup on par with other entries in =popper-reference-buffers=.
* Technical notes
=popper= uses a buffer local variable (=popper-popup-status=) to identify if a
given buffer should be treated as a popup. Matching is always by buffer and not
window, so having two windows of a buffer, one treated as a popup and one as a
regular window, isn't possible (although you can do this with indirect clones).
In addition, it maintains an alist of popup windows/buffers for cycling through.
diff --git a/images/popper-hide-popup.gif b/images/popper-hide-popup.gif
new file mode 100644
index 0000000000..c7992b75ba
Binary files /dev/null and b/images/popper-hide-popup.gif differ
diff --git a/popper.el b/popper.el
index bbcc144fab..347c4fc937 100644
--- a/popper.el
+++ b/popper.el
@@ -601,11 +601,9 @@ If BUFFER is not specified act on the current buffer
instead."
(pcase elm
((pred stringp) 'name)
((and (pred symbolp)
- (guard (or (get elm 'derived-mode-parent)
- (get elm 'mode-class)
- (not (boundp elm))
- (not (fboundp elm))
- (commandp elm))))
+ (guard (or (memq 'derived-mode-parent (symbol-plist elm))
+ (memq 'mode-class (symbol-plist elm))
+ (string= "-mode" (substring (symbol-name elm) -5)))))
'mode)
((pred functionp) 'pred)
((pred consp) 'cons)))
- [elpa] externals/popper 03dc41c315 019/102: More robust minor mode definition, (continued)
- [elpa] externals/popper 03dc41c315 019/102: More robust minor mode definition, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 1a059a5973 009/102: Reduced surface area of package, ELPA Syncer, 2023/09/08
- [elpa] externals/popper a27500408c 023/102: Enhancements, see details, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 3584603390 013/102: Setting up project awareness, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 9eb1a8cbd8 006/102: Merge pull request #1 from syohex/fix-minimum-version, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 35e266d984 031/102: Add support for fullscreen popups, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 598571f025 041/102: Started work on buffer-hiding feature, ELPA Syncer, 2023/09/08
- [elpa] externals/popper b120c6836c 042/102: extract window height determining function, ELPA Syncer, 2023/09/08
- [elpa] externals/popper c96915cb77 043/102: Merge commit 'b120c68' into feature, ELPA Syncer, 2023/09/08
- [elpa] externals/popper cd975ac5b8 047/102: Updated README with new features, popups by predicate, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 1312c0f0f6 053/102: Added video demo of buffer hiding,
ELPA Syncer <=
- [elpa] externals/popper 851d838821 065/102: Extracted popper-echo into a separate library, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 7afd502b3b 068/102: Fixed popper-echo display when the group is a symbol, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 667dcdd063 069/102: Added badge, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 4d58a6dbba 076/102: Handle unbound dispatch keys in popper-echo, ELPA Syncer, 2023/09/08
- [elpa] externals/popper d5ab9b2c41 077/102: Popup without selecting (#17), ELPA Syncer, 2023/09/08
- [elpa] externals/popper a93ff38ab6 098/102: popper: Assign copyright to FSF, ELPA Syncer, 2023/09/08
- [elpa] externals/popper fd39948875 024/102: Removed redundant info from documentation, ELPA Syncer, 2023/09/08
- [elpa] externals/popper b32abcba49 030/102: Fixed popup display of newly created popup buffers, ELPA Syncer, 2023/09/08
- [elpa] externals/popper c465e0de24 007/102: Added technical notes to README, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 7f61e916ce 037/102: Child frame support for popper (ongoing), ELPA Syncer, 2023/09/08