Compare commits
4 Commits
57a18de9aa
...
main
Author | SHA1 | Date | |
---|---|---|---|
8c396a11f5 | |||
e8b16420f8 | |||
7a75e73f88 | |||
3e37e3ad0c |
20
README.org
20
README.org
@ -43,6 +43,26 @@ this utility:
|
|||||||
|
|
||||||
* How?
|
* How?
|
||||||
|
|
||||||
|
** Installation
|
||||||
|
|
||||||
|
You can install pip-frame.el from [[https://melpa.org/#/pip-frame][MELPA]]. If you use [[https://github.com/radian-software/straight.el][straight.el]] and
|
||||||
|
prefer using source repos directly, you can install pip-frame.el as
|
||||||
|
follows:
|
||||||
|
|
||||||
|
#+begin_src elisp
|
||||||
|
(straight-use-package
|
||||||
|
'(pip-frame :type git
|
||||||
|
:repo "https://git.zamazal.org/pdm/pip-frame"
|
||||||
|
:local-repo "pip-frame"))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
For manual installation, simply put [[./pip-frame.el][pip-frame.el]] file to your
|
||||||
|
=site-lisp= directory and add the following to your Emacs configuration:
|
||||||
|
|
||||||
|
#+begin_src elisp
|
||||||
|
(require ’pip-frame)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Commands
|
** Commands
|
||||||
|
|
||||||
The PIP frame is created using =M-x pip-frame-add-buffer= command. You
|
The PIP frame is created using =M-x pip-frame-add-buffer= command. You
|
||||||
|
11
pip-frame.el
11
pip-frame.el
@ -33,10 +33,10 @@
|
|||||||
;; `M-x pip-frame-remove-buffer' or close the whole frame with
|
;; `M-x pip-frame-remove-buffer' or close the whole frame with
|
||||||
;; `M-x pip-frame-delete-frame'.
|
;; `M-x pip-frame-delete-frame'.
|
||||||
|
|
||||||
(require 'cl-lib)
|
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
(require 'cl-lib)
|
||||||
|
|
||||||
(defgroup pip-frame ()
|
(defgroup pip-frame ()
|
||||||
"Display PIP frame."
|
"Display PIP frame."
|
||||||
:group 'frames)
|
:group 'frames)
|
||||||
@ -175,7 +175,8 @@ If the buffer is not present in the PIP frame, do nothing."
|
|||||||
(interactive (list (completing-read "Remove PIP buffer: "
|
(interactive (list (completing-read "Remove PIP buffer: "
|
||||||
(mapcar #'buffer-name (pip-frame--buffers))
|
(mapcar #'buffer-name (pip-frame--buffers))
|
||||||
nil t)))
|
nil t)))
|
||||||
(let* ((windows (window-list (pip-frame--get-frame)))
|
(if-let ((frame (pip-frame--get-frame t))
|
||||||
|
(windows (window-list frame))
|
||||||
(buffer (get-buffer buffer-or-name))
|
(buffer (get-buffer buffer-or-name))
|
||||||
(windows-to-delete (cl-remove buffer windows
|
(windows-to-delete (cl-remove buffer windows
|
||||||
:key #'window-buffer
|
:key #'window-buffer
|
||||||
@ -233,4 +234,8 @@ Any other key stops this command and executes its own command."
|
|||||||
|
|
||||||
(provide 'pip-frame)
|
(provide 'pip-frame)
|
||||||
|
|
||||||
|
;; Local Variables:
|
||||||
|
;; checkdoc-force-docstrings-flag: nil
|
||||||
|
;; End:
|
||||||
|
|
||||||
;;; pip-frame.el ends here
|
;;; pip-frame.el ends here
|
||||||
|
Reference in New Issue
Block a user