about summary refs log tree commit diff stats
path: root/.emacs.d/lisp
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-10-21 16:54:28 +0100
committerDavid Morgan <djm_uk@protonmail.com>2022-10-21 16:54:28 +0100
commita3d03d956ab84f6835bd62bdc8810b389e0aa97e (patch)
treed20ee11922cbc3d4f0bd18b4e2e641e4d30897e8 /.emacs.d/lisp
parent988e427843a1fe7cd55ee33c6ea7738f04a2ecd6 (diff)
downloaddotfiles-a3d03d956ab84f6835bd62bdc8810b389e0aa97e.tar.gz
Try out various packages
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r--.emacs.d/lisp/init-clojure.el10
-rw-r--r--.emacs.d/lisp/init-navigation.el25
-rw-r--r--.emacs.d/lisp/init-search.el2
-rw-r--r--.emacs.d/lisp/init-windows.el46
4 files changed, 81 insertions, 2 deletions
diff --git a/.emacs.d/lisp/init-clojure.el b/.emacs.d/lisp/init-clojure.el
index 73542f1..d86787f 100644
--- a/.emacs.d/lisp/init-clojure.el
+++ b/.emacs.d/lisp/init-clojure.el
@@ -115,8 +115,16 @@
         cider-show-error-buffer 'except-in-repl
         clojure-toplevel-inside-comment-form t)
   (unbind-key "C-c C-l" cider-mode-map)
+  (unbind-key "C-c C-b" cider-mode-map)
+  (unbind-key "C-c C-b" cider-repl-mode-map)
   :bind
-  (:map cider-mode-map ("C-c M-l" . cider-load-file))
+  (:map cider-mode-map
+        ("C-c M-l" . cider-load-file)
+        ("C-c M-b" . cider-interrupt))
+  (:map cider-repl-mode-map
+        ("C-c M-b" . cider-interrupt))
+  (:map cider-start-map
+        ("C-c M-j" . cider-jack-in-and-run-main))
   (:map clojure-mode-map
         ("C-c C-r C-m" . run-main)
         ("C-c M-j" . cider-jack-in-and-run-main)
diff --git a/.emacs.d/lisp/init-navigation.el b/.emacs.d/lisp/init-navigation.el
index f3232cd..0e0492d 100644
--- a/.emacs.d/lisp/init-navigation.el
+++ b/.emacs.d/lisp/init-navigation.el
@@ -81,5 +81,30 @@ Or remove all highlighted symbols in the current buffer (with`ARG')."
   ("C-c {" . gumshoe-persp-backtrack-back)
   ("C-c '" . gumshoe-peruse-in-persp))
 
+(use-package goto-chg
+  :config
+  (defvar goto-chg-repeat-map
+    (let ((map (make-sparse-keymap)))
+      (define-key map (kbd "C-(") #'goto-last-change)
+      (define-key map (kbd "C-)") #'goto-last-change-reverse)
+      map))
+  (dolist (cmd '(goto-last-change goto-last-change-reverse))
+    (put cmd 'repeat-map 'goto-chg-repeat-map))
+  :bind
+  ("C-c C-(" . goto-last-change)
+  ("C-c C-)" . goto-last-change-reverse))
+
+(use-package goto-last-point
+  :diminish
+  :custom (goto-last-point-max-length 100)
+  :hook (emacs-startup . goto-last-point-mode)
+  :config
+  (defvar goto-last-point-repeat-map
+    (let ((map (make-sparse-keymap)))
+      (define-key map (kbd "<") #'goto-last-point)
+      map))
+  (put 'goto-last-point 'repeat-map 'goto-last-point-repeat-map)
+  :bind ("C-c <" . goto-last-point))
+
 (provide 'init-navigation)
 ;;; init-navigation.el ends here
diff --git a/.emacs.d/lisp/init-search.el b/.emacs.d/lisp/init-search.el
index 76f899f..8e89f31 100644
--- a/.emacs.d/lisp/init-search.el
+++ b/.emacs.d/lisp/init-search.el
@@ -55,7 +55,7 @@
   (define-key search-map "d" 'deadgrep)
   (define-key search-map "D" 'deadgrep-symbol-at-point)
   :bind
-  ("C-," . deadgrep-symbol-at-point)
+  ("C-S-z" . deadgrep-symbol-at-point)
   ("C-c c d" . deadgrep))
 
 (use-package affe
diff --git a/.emacs.d/lisp/init-windows.el b/.emacs.d/lisp/init-windows.el
index a96cf07..616ad1f 100644
--- a/.emacs.d/lisp/init-windows.el
+++ b/.emacs.d/lisp/init-windows.el
@@ -93,5 +93,51 @@
                            (popper-mode +1)
                            (popper-echo-mode +1))))
 
+(use-package frog-jump-buffer
+  :config
+  (defun frog-jump-buffer-filter-buffer-ring (buffer)
+    "Check if a BUFFER is in current buffer ring."
+    (let ((bfr-ring (buffer-ring-current-ring)))
+      (when bfr-ring
+        (let ((ring (buffer-ring-ring-ring bfr-ring)))
+          (unless (dynaring-empty-p ring)
+            (dynaring-contains-p ring (buffer-ring--parse-buffer buffer)))))))
+  (defun frog-jump-buffer-filter-buffer-ring-or-same-mode (buffer)
+    (let* ((bfr-ring (buffer-ring-current-ring))
+           (ring (buffer-ring-ring-ring bfr-ring)))
+      (if (dynaring-empty-p ring)
+          (frog-jump-buffer-filter-same-mode buffer)
+        (frog-jump-buffer-filter-buffer-ring buffer))))
+  ;;(setq frog-jump-buffer-default-filter 'frog-jump-buffer-filter-same-mode)
+  (setq frog-jump-buffer-default-filter 'frog-jump-buffer-filter-buffer-ring-or-same-mode)
+  (setq frog-jump-buffer-filter-actions
+        '(("R" "[Ring]" frog-jump-buffer-filter-buffer-ring)))
+  (set-face-background 'frog-menu-posframe-background-face "black")
+  :bind
+  ("C-," . frog-jump-buffer)
+  ("C-x 4 C-," . frog-jump-buffer-other-window))
+
+;; TODO perspective integration
+(use-package buffer-ring
+  :diminish
+  :hook (emacs-startup . buffer-ring-mode)
+  :bind
+  ("C-<" . buffer-ring-prev-buffer)
+  ("C->" . buffer-ring-next-buffer))
+
+;; TODO C-c ./C-c , C-c >/C-c < , available (but the first two currently clash with other bindings)
+;; C-<left> and C-<right> can be used
+(use-package cbm
+  :bind
+  ("C-c C-b <" . cbm-cycle)
+  ("C-c C-b C-b" . cbm-switch-buffer))
+
+(use-package buffer-flip
+  :bind  (("C-c C-<left>" . buffer-flip)
+          (:map buffer-flip-map
+                ( "C-<left>" .   buffer-flip-forward)
+                ( "C-<right>" . buffer-flip-backward)
+                ( "C-g" . buffer-flip-abort))))
+
 (provide 'init-windows)
 ;;; init-windows.el ends here
am <vc@akkartik.com> 2015-11-27 21:38:09 -0800 committer Kartik K. Agaram <vc@akkartik.com> 2015-11-27 21:38:09 -0800 2483 - to-text can now handle lists' href='/akkartik/mu/commit/073list.mu?h=hlt&id=fca48e92d4e51eb7e5b1a811b65e5d69fadeb713'>fca48e92 ^
afb467ea ^









fca48e92 ^





fca48e92 ^
















afb467ea ^
















fca48e92 ^

67bc24e7 ^



c9b98c21 ^
67bc24e7 ^


c9b98c21 ^
67bc24e7 ^

afb467ea ^











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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137