summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-12-31 13:13:17 +0000
committerjao <jao@gnu.org>2021-12-31 13:13:17 +0000
commit9193929177a1164c07482165db6a3c624c0544a1 (patch)
tree58625e09bb3fd4ea7baea3ad501f60d434874a1a
parentfc4986aea7855bd07c56208c940cb5d74509b3b5 (diff)
downloadelibs-9193929177a1164c07482165db6a3c624c0544a1.tar.gz
elibs-9193929177a1164c07482165db6a3c624c0544a1.tar.bz2
attic
-rw-r--r--attic/misc.org52
-rw-r--r--init.org22
2 files changed, 51 insertions, 23 deletions
diff --git a/attic/misc.org b/attic/misc.org
index 931aeb4..ddc5cd9 100644
--- a/attic/misc.org
+++ b/attic/misc.org
@@ -1,5 +1,20 @@
#+title: Miscellaneous config bits that i don't use anymore
+* portability macros
+ #+begin_src emacs-lisp
+ (defmacro jao-syscase (clauses)
+ (let ((cls (assoc system-type clauses)))
+ (when cls `(progn ,@(cdr cls)))))
+
+ (defmacro jao-d-l (darw linux)
+ `(jao-syscase ((darwin ,darw) (gnu/linux ,linux))))
+
+ (defmacro jao-when-darwin (&rest body)
+ `(jao-syscase ((darwin ,@body))))
+
+ (defmacro jao-when-linux (&rest body)
+ `(jao-syscase ((gnu/linux ,@body))))
+ #+end_src
* outlines
#+begin_src emacs-lisp
@@ -495,6 +510,30 @@
:diminish ((rcirc-omit-mode . "")))
#+end_src
+* ace-window
+ #+begin_src emacs-lisp
+ (defun jao-ace-switch-buffer-other-window ()
+ (interactive)
+ (aw-select "Other window"
+ (if (eq jao-completion-engine 'consult)
+ (lambda (w)
+ (aw-switch-to-window w)
+ (call-interactively 'consult-buffer))
+ #'aw-switch-buffer-in-window)))
+
+ (defun jao-ace-find-file-other-window ()
+ (interactive)
+ (aw-select "Other window"
+ (lambda (w)
+ (let ((df default-directory))
+ (aw-switch-to-window w)
+ (let ((default-directory df))
+ (call-interactively 'find-file))))))
+
+ (global-set-key (kbd "C-x 4 f") #'jao-ace-find-file-other-window)
+ (global-set-key (kbd "C-x 4 b") #'jao-ace-switch-buffer-other-window)
+ #+end_src
+
* switch window
An alternative for this one is ace-window, but it has the problem
of not displaying its overlay over org buffers (sometimes) and
@@ -505,6 +544,7 @@
:custom ((switch-window-minibuffer-shortcut ?z)
(switch-window-background t)
(switch-window-shortcut-style 'qwerty)
+ (switch-window-shortcut-appearance 'text)
(switch-window-timeout 7)
(switch-window-threshold 2))
:init (defalias 'jao-other-window 'switch-window)
@@ -529,8 +569,8 @@
:bind (("M-o" . switch-window)
("M-O" . switch-window-then-swap-buffer)
- ("H-s-o" . switch-window)
- ("H-s-O" . switch-window-then-swap-buffer)
+ ("s-o" . switch-window)
+ ("s-O" . switch-window-then-swap-buffer)
("C-x 4 d" . jao-switch-window-then-dired)
("C-x 4 f" . jao-switch-window-then-find-file)
("C-x 4 b" . jao-switch-window-then-consult-buffer)))
@@ -862,3 +902,11 @@
;; (vertico-buffer-mode -1))
#+end_src
+* window config persistence
+ #+begin_src emacs-lisp
+ (use-package bookmark-view
+ :ensure t
+ :bind (("C-c v" . bookmark-view)
+ ("C-c B" . bookmark-set)))
+
+ #+end_src
diff --git a/init.org b/init.org
index 454f712..711c997 100644
--- a/init.org
+++ b/init.org
@@ -19,21 +19,6 @@
warning-suppress-types '((comp)))
#+end_src
* Initialisation
-*** Portability macros
- #+begin_src emacs-lisp
- (defmacro jao-syscase (clauses)
- (let ((cls (assoc system-type clauses)))
- (when cls `(progn ,@(cdr cls)))))
-
- (defmacro jao-d-l (darw linux)
- `(jao-syscase ((darwin ,darw) (gnu/linux ,linux))))
-
- (defmacro jao-when-darwin (&rest body)
- `(jao-syscase ((darwin ,@body))))
-
- (defmacro jao-when-linux (&rest body)
- `(jao-syscase ((gnu/linux ,@body))))
- #+end_src
*** Paths
#+begin_src emacs-lisp
(defvar jao-local-lisp-dir "~/lib/elisp"
@@ -473,11 +458,6 @@
(setq bookmark-default-file "~/.emacs.d/emacs.bmk"
bookmark-set-fringe-mark nil)
- (use-package bookmark-view
- :ensure t
- :bind (("C-c v" . bookmark-view)
- ("C-c B" . bookmark-set)))
-
#+end_src
*** Man pages
#+begin_src emacs-lisp
@@ -2599,7 +2579,7 @@
(t "prolog")))))
#+END_SRC
*** Racket
- #+begin_src emacs-lisp
+ #+begin_src emacs-lisp :tangle no
(use-package racket-mode
:ensure t
:init (setq racket-show-functions '(racket-show-echo-area))