-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbeframe-transient.el
71 lines (59 loc) · 3.13 KB
/
beframe-transient.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
;;; beframe-transient.el --- Transient user interface for Beframe -*- lexical-binding: t -*-
;; Copyright (C) 2025 Free Software Foundation, Inc.
;; Author: Protesilaos Stavrou <[email protected]>
;; Maintainer: Protesilaos Stavrou <[email protected]>
;; URL: https://github.com/protesilaos/beframe
;; This file is NOT part of GNU Emacs.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; Transient user interface for Beframe commands.
;;; Code:
(require 'transient)
;; TODO 2025-01-23: How to process the prefix argument in a transient?
;;;###autoload (autoload 'beframe-transient-assume "beframe-transient")
(transient-define-prefix beframe-transient-assume nil
"Beframe commands to assume buffers."
["Beframe"
["Assume buffers (absorb into this frame)"
("f" "All the buffers of the given FRAME" beframe-assume-frame-buffers)
("s" "All the SELECTED buffers using completion (, to select another)" beframe-assume-buffers-selectively-all-frames)
("S" "All the SELECTED buffers of the given frame using completion (, to select another)" beframe-assume-frame-buffers-selectively)
("a" "All the buffers from EVERYWHERE" beframe-assume-all-buffers-no-prompts)
("r" "All buffer NAMES matching the REGEXP" beframe-assume-buffers-matching-regexp)]])
;;;###autoload (autoload 'beframe-transient-unassume "beframe-transient")
(transient-define-prefix beframe-transient-unassume nil
"Beframe commands to unassume buffers."
["Beframe"
["Unassume buffers (eject from this frame)"
("f" "All the buffers of the given FRAME" beframe-unassume-frame-buffers)
("s" "All the SELECTED buffers using completion (, to select another)" beframe-unassume-current-frame-buffers-selectively)
("a" "ALL buffers except `beframe-global-buffers'" beframe-unassume-all-buffers-no-prompts)
("r" "All buffer NAMES matching the REGEXP" beframe-unassume-buffers-matching-regexp)]])
;;;###autoload (autoload 'beframe-transient "beframe-transient")
(transient-define-prefix beframe-transient nil
"Beframe commands."
["Beframe"
["Switch"
("b" "Current frame buffer" beframe-switch-buffer)
("B" "Buffer of given frame" beframe-switch-buffer-in-frame)
("l" "List buffers" beframe-buffer-menu)]
["Rename (`beframe-rename-function')"
("r" "Rename this frame" beframe-rename-current-frame)
("R" "Rename a given frame" beframe-rename-frame)]
["Modify"
("a" "Assume buffers..." beframe-transient-assume)
("u" "Unassume buffers..." beframe-transient-unassume)]])
(provide 'beframe-transient)
;;; beframe-transient.el ends here