[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/popper fe4f0b3b8b 100/102: popper.el, README: Release v
From: |
ELPA Syncer |
Subject: |
[elpa] externals/popper fe4f0b3b8b 100/102: popper.el, README: Release version 0.4.6 |
Date: |
Fri, 8 Sep 2023 15:58:57 -0400 (EDT) |
branch: externals/popper
commit fe4f0b3b8b16f005fb8b5f79bc26b380038400ab
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
popper.el, README: Release version 0.4.6
popper.el (popper-toggle): Rename `popper-toggle-latest' to
`popper-toggle'.
popper-echo.el: Indentation.
README.org: Update mentions of `popper-toggle-latest'.
---
README.org | 10 ++++-----
popper-echo.el | 67 +++++++++++++++++++++++++++++-----------------------------
popper.el | 63 ++++++++++++++++++++++++++++--------------------------
3 files changed, 72 insertions(+), 68 deletions(-)
diff --git a/README.org b/README.org
index 3d9d7fb6cf..76b312f674 100644
--- a/README.org
+++ b/README.org
@@ -81,7 +81,7 @@ Turn on =popper-mode=.
There are two commands for displaying popups, you can bind them as
convenient:
-- =popper-toggle-latest=: Show/hide the latest popup. Does more with prefix
args.
+- =popper-toggle=: Show/hide the latest popup. Does more with prefix args.
- =popper-cycle=: Cycle through your popups in sequence.
To automatically designate buffers as popups, see the customization section.
Additionally, you can kill an open popup buffer with =popper-kill-latest-popup=.
@@ -95,7 +95,7 @@ If you want the echo-area hints, turn on =popper-echo-mode=.
#+BEGIN_SRC emacs-lisp
(use-package popper
:ensure t ; or :straight t
- :bind (("C-`" . popper-toggle-latest)
+ :bind (("C-`" . popper-toggle)
("M-`" . popper-cycle)
("C-M-`" . popper-toggle-type))
:init
@@ -119,7 +119,7 @@ See the Customization section for details on specifying
buffer types as popups.
"\\*Async Shell Command\\*"
help-mode
compilation-mode))
- (global-set-key (kbd "C-`") 'popper-toggle-latest)
+ (global-set-key (kbd "C-`") 'popper-toggle)
(global-set-key (kbd "M-`") 'popper-cycle)
(global-set-key (kbd "C-M-`") 'popper-toggle-type)
(popper-mode +1)
@@ -195,7 +195,7 @@
https://user-images.githubusercontent.com/8607532/135748097-268f5aae-ad42-44fa-9
This section details these (and other) customization options.
** Grouping popups by context
-Popper can group popups by "context", so that the popups available for display
are limited to those that are relevant to the context in which
=popper-toggle-latest= or =popper-cycle= is called. For example, when cycling
popups from a project buffer, you may only want to see the popups (REPLs, help
buffers and compilation output, say) that were spawned from buffers in that
project. This is intended to approximate DWIM behavior, so that the most
relevant popup in any context is never more [...]
+Popper can group popups by "context", so that the popups available for display
are limited to those that are relevant to the context in which =popper-toggle=
or =popper-cycle= is called. For example, when cycling popups from a project
buffer, you may only want to see the popups (REPLs, help buffers and
compilation output, say) that were spawned from buffers in that project. This
is intended to approximate DWIM behavior, so that the most relevant popup in
any context is never more than on [...]
Built in contexts include projects as defined in Emacs' built in =project.el=
and =projectile=, using =perspective= names (from =persp.el=), as well as the
default directory of a buffer. To set this, customize =popper-group-function=
or use one of
@@ -257,7 +257,7 @@ 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 behaves as a regular popup 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= or =popper-cycle= at your
convenience. It behaves as a regular popup from that point on:
[[https://user-images.githubusercontent.com/8607532/132929265-37eee976-131f-4631-9bad-73090bf17231.mp4]]
# [[file:images/popper-hide-popup.gif]]
diff --git a/popper-echo.el b/popper-echo.el
index d89016a967..03698401a8 100644
--- a/popper-echo.el
+++ b/popper-echo.el
@@ -26,8 +26,8 @@
;;; Commentary:
;; Popper-echo is a minor-mode to display a list of popup names in the echo
area
-;; when toggling or cycling popups. These popups can be accessed directly using
-;; dispatch keybinds. See Popper for how to classify a buffer as a popup.
+;; when toggling or cycling popups. These popups can be accessed directly
using
+;; dispatch keybinds. See Popper for how to classify a buffer as a popup.
;; COMMANDS:
@@ -93,7 +93,7 @@ NOTE: This feature is experimental."
The first element is bound to the currently open popup.
Each entry in the list can be a character or a string suitable
-for the kbd macro. These keys are available when using
+for the kbd macro. These keys are available when using
popper-echo-mode.
Examples:
@@ -126,20 +126,20 @@ off."
"Show popup list in the echo area when cycling popups."
(let* ((message-log-max nil)
(grp-symb (when popper-group-function
- (funcall popper-group-function)))
+ (funcall popper-group-function)))
(buried-popups (thread-last (alist-get grp-symb
popper-buried-popup-alist nil nil 'equal)
- (mapcar #'cdr)
- (cl-remove-if-not #'buffer-live-p)
- (mapcar #'buffer-name)
- (delete-dups)))
+ (mapcar #'cdr)
+ (cl-remove-if-not #'buffer-live-p)
+ (mapcar #'buffer-name)
+ (delete-dups)))
(group (and grp-symb (concat "Group ("
(truncate-string-to-width (format "%S"
grp-symb) 20 nil nil t)
"): ")))
(open-popup (buffer-name))
(dispatch-keys-extended (append (cdr popper-echo-dispatch-keys)
- (make-list (max 0 (- (length
buried-popups)
- (1- (length
popper-echo-dispatch-keys))))
- nil)))
+ (make-list (max 0 (- (length
buried-popups)
+ (1- (length
popper-echo-dispatch-keys))))
+ nil)))
(popup-strings
(cl-reduce #'concat
(cons
@@ -181,28 +181,28 @@ off."
(make-vector 1 keybind))
((stringp keybind)
(kbd keybind)))
- (popper-echo--dispatch-toggle i (cons open-popup
-
buried-popups)))
+ (popper-echo--dispatch-toggle i (cons
open-popup
+
buried-popups)))
(when popper-echo-dispatch-actions
(define-key map
- (kbd
- (concat "k " (cond
- ((characterp keybind)
- (char-to-string keybind))
- ((stringp keybind)
- keybind))))
- (popper-echo--dispatch-kill i (cons open-popup
-
buried-popups)))
+ (kbd
+ (concat "k " (cond
+ ((characterp keybind)
+ (char-to-string
keybind))
+ ((stringp keybind)
+ keybind))))
+ (popper-echo--dispatch-kill i (cons
open-popup
+
buried-popups)))
(define-key map
- (kbd
- (concat "^ " (cond
- ((characterp keybind)
- (char-to-string keybind))
- ((stringp keybind)
- keybind))))
- (popper-echo--dispatch-raise i (cons open-popup
-
buried-popups))))
+ (kbd
+ (concat "^ " (cond
+ ((characterp keybind)
+ (char-to-string
keybind))
+ ((stringp keybind)
+ keybind))))
+ (popper-echo--dispatch-raise i (cons
open-popup
+
buried-popups))))
(setq i (1+ i)))))))
@@ -245,10 +245,11 @@ quickly."
;;;###autoload
(define-minor-mode popper-echo-mode
- "Show popup names in cycling order in the echo area when
- performing an action that involves showing a popup. These
- popups can be accessed directly or acted upon by using quick
- keys (see `popper-echo-dispatch-keys').
+ "Toggle Popper Echo mode.
+Show popup names in cycling order in the echo area when
+performing an action that involves showing a popup. These popups
+can be accessed directly or acted upon by using quick keys (see
+`popper-echo-dispatch-keys').
To define buffers as popups and customize popup display, see
`popper-mode'."
diff --git a/popper.el b/popper.el
index e4673cd19b..c61f82219e 100644
--- a/popper.el
+++ b/popper.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2023 Free Software Foundation, Inc.
;; Author: Karthik Chikmagalur <karthik.chikmagalur@gmail.com>
-;; Version: 0.4.5
+;; Version: 0.4.6
;; Package-Requires: ((emacs "26.1"))
;; Keywords: convenience
;; URL: https://github.com/karthink/popper
@@ -39,7 +39,7 @@
;;;; Commands:
;; `popper-mode': Turn on popup management
-;; `popper-toggle-latest': Toggle latest popup
+;; `popper-toggle': Toggle latest popup
;; `popper-cycle': Cycle through all popups, or close all open popups
;; `popper-toggle-type': Turn a regular window into a popup or vice-versa
;; `popper-kill-latest-popup': Kill latest open popup
@@ -291,9 +291,9 @@ This is intended to be used in `display-buffer-alist'."
(with-current-buffer buffer
(eq popper-popup-status 'user-popup)))
('t (with-current-buffer buffer
- (or (memq popper-popup-status '(popup user-popup))
- (unless (eq popper-popup-status 'raised)
- (popper-popup-p buffer))))))))
+ (or (memq popper-popup-status '(popup user-popup))
+ (unless (eq popper-popup-status 'raised)
+ (popper-popup-p buffer))))))))
(defun popper-group-by-directory ()
"Return an identifier (default directory) to group popups.
@@ -443,10 +443,10 @@ Optional argument GROUP is called with no arguments to
select
a popup buffer to open."
(unless popper-mode (user-error "Popper-mode not active!"))
(let* ((identifier (when popper-group-function group))
- (no-popup-msg (format "No buried popups for group %s"
- (if (symbolp identifier)
- (symbol-name identifier)
- identifier))))
+ (no-popup-msg (format "No buried popups for group %s"
+ (if (symbolp identifier)
+ (symbol-name identifier)
+ identifier))))
(if (null (alist-get identifier popper-buried-popup-alist
nil 'remove 'equal))
(message (if identifier no-popup-msg "No buried popups"))
@@ -513,7 +513,7 @@ the screen by `display-buffer' will not all be displayed."
(while (alist-get group popper-buried-popup-alist nil nil 'equal)
(popper-open-latest group))))
-(defun popper-toggle-latest (&optional arg)
+(defun popper-toggle (&optional arg)
"Toggle visibility of the last opened popup window.
With prefix ARG \\[universal-argument], toggle visibility of the
@@ -536,6 +536,9 @@ windows as it can."
(popper--open-all)
(popper-open-latest group)))))
+(define-obsolete-function-alias
+ 'popper-toggle-latest #'popper-toggle "0.4.6")
+
(defun popper-cycle (&optional num)
"Cycle visibility of popup windows one at a time.
@@ -616,8 +619,8 @@ If BUFFER is not specified act on the current buffer
instead."
(defun popper--suppress-p (buf)
"Predicate to check if popup-buffer BUF needs to be suppressed."
(or (seq-some (lambda (buf-regexp)
- (string-match-p buf-regexp (buffer-name buf)))
- popper--suppressed-names)
+ (string-match-p buf-regexp (buffer-name buf)))
+ popper--suppressed-names)
(member (buffer-local-value 'major-mode buf) popper--suppressed-modes)
(seq-some (lambda (pred) (funcall pred buf))
popper--suppressed-predicates)))
@@ -647,27 +650,27 @@ This should run after `popper--update-popups' in
"Unpack `popper-reference-buffers' to set popper--reference- variables."
(cl-labels ((popper--classify-type
(elm) (pcase-exhaustive elm
- ((pred stringp) 'name)
- ((and (pred symbolp)
- (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)))
+ ((pred stringp) 'name)
+ ((and (pred symbolp)
+ (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)))
(popper--insert-type
(elm) (pcase-exhaustive (popper--classify-type elm)
- ('name (cl-pushnew elm popper--reference-names))
- ('mode (cl-pushnew elm popper--reference-modes))
- ('pred (cl-pushnew elm popper--reference-predicates))
- ('cons (when (eq (cdr elm) 'hide)
- (pcase-exhaustive (popper--classify-type (car
elm))
- ('name (cl-pushnew (car elm)
popper--suppressed-names))
- ('mode (cl-pushnew (car elm)
popper--suppressed-modes))
- ('pred (cl-pushnew (car elm)
popper--suppressed-predicates))))
- (popper--insert-type (car elm))))))
+ ('name (cl-pushnew elm popper--reference-names))
+ ('mode (cl-pushnew elm popper--reference-modes))
+ ('pred (cl-pushnew elm popper--reference-predicates))
+ ('cons (when (eq (cdr elm) 'hide)
+ (pcase-exhaustive (popper--classify-type (car
elm))
+ ('name (cl-pushnew (car elm)
popper--suppressed-names))
+ ('mode (cl-pushnew (car elm)
popper--suppressed-modes))
+ ('pred (cl-pushnew (car elm)
popper--suppressed-predicates))))
+ (popper--insert-type (car elm))))))
(dolist (entry popper-reference-buffers nil)
- (popper--insert-type entry))))
+ (popper--insert-type entry))))
;;;###autoload
(define-minor-mode popper-mode
- [elpa] externals/popper 8592573f33 070/102: Fixed popper-echo display when groups are symbols, (continued)
- [elpa] externals/popper 8592573f33 070/102: Fixed popper-echo display when groups are symbols, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 7b02960025 082/102: Revert "Fix pcase clause for native-comp", ELPA Syncer, 2023/09/08
- [elpa] externals/popper 60297066e3 085/102: pcase 'otherwise' clause should be _ not 'T (#28), ELPA Syncer, 2023/09/08
- [elpa] externals/popper 6599c9b5a1 086/102: eliminate all warnings generated during byte-compilation (#33), ELPA Syncer, 2023/09/08
- [elpa] externals/popper 7ea13618c8 087/102: Remove needless quote (#37), ELPA Syncer, 2023/09/08
- [elpa] externals/popper d7560f1835 089/102: Fix for #35: alist argument ignored by default popper display func, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 47bf592c89 081/102: Fix pcase clause for native-comp, ELPA Syncer, 2023/09/08
- [elpa] externals/popper da70c8296a 092/102: popper-echo.el: Tweak popper echo display format, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 76b1a1f1bc 094/102: popper-echo: Tweak popper group display, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 809ec965d8 097/102: popper: popper-cycle can cycle backwards, ELPA Syncer, 2023/09/08
- [elpa] externals/popper fe4f0b3b8b 100/102: popper.el, README: Release version 0.4.6,
ELPA Syncer <=
- [elpa] externals/popper 031e4d093c 102/102: popper: Update defcustom for popper-reference-buffers, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 3406efb1df 088/102: Fix byte-compile warning in popper-echo, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 71bbc5fc10 096/102: popper: Handle atomic window popups, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 793aef4e5f 099/102: popper.el: Documentation changes for ELPA, ELPA Syncer, 2023/09/08
- [elpa] externals/popper ecc01a46b0 101/102: popper: Revert type natnum to integer, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 38811f9c09 014/102: project root integrated into popper-popup-status, ELPA Syncer, 2023/09/08
- [elpa] externals/popper f9fef8192a 084/102: Fix popper-mode-line not respecting nil., ELPA Syncer, 2023/09/08
- [elpa] externals/popper 527a85c491 079/102: Fix setup instructions (non use-package) for popper-echo #21, ELPA Syncer, 2023/09/08
- [elpa] externals/popper e399120223 095/102: popper-echo: Fix string truncation, ELPA Syncer, 2023/09/08