From 36a2336a251ddd756f0d76c3a26749b2806d45c5 Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 7 Apr 2021 04:31:41 +0100 Subject: keybindings --- init.org | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'init.org') diff --git a/init.org b/init.org index d202e2b..bdfb40a 100644 --- a/init.org +++ b/init.org @@ -1181,14 +1181,16 @@ #+end_src *** same mode #+begin_src emacs-lisp - (defun jao-buffer-same-mode (&optional mode) + (defun jao-buffer-same-mode (&optional mode pre-fn) (interactive) (let* ((mode (or mode major-mode)) (pred `(lambda (b) (let ((b (get-buffer (if (consp b) (car b) b)))) (and ;; (not (eq b ,(current-buffer))) - (eq ',mode (buffer-local-value 'major-mode b))))))) - (pop-to-buffer (read-buffer "Buffer: " nil t pred)))) + (eq ',mode (buffer-local-value 'major-mode b)))))) + (buff (read-buffer "Buffer: " nil t pred))) + (when pre-fn (funcall pre-fn)) + (pop-to-buffer buff))) (global-set-key (kbd "C-c C-b") #'jao-buffer-same-mode) #+end_src *** buffer quit function (the triple ESC) @@ -1540,7 +1542,8 @@ ("O" (jao-org-pdf-goto-org 4) "notes file, linking")) "Navigation" (("b" jao-doc-view-back "back jump") - ("B" jao-doc-view-back "forward jump")) + ("B" jao-doc-view-back "forward jump") + ("u" jao-doc-view-visit-url "visit URL")) "Slices" (("cb" doc-view-set-slice-from-bounding-box "bounding box") ("cm" doc-view-set-slice-using-mouse "using mouse")) @@ -2229,7 +2232,7 @@ *** Web browsers #+begin_src emacs-lisp (jao-load-org "eww") - (jao-load-org "w3m") + ;; (jao-load-org "w3m") #+end_src * Shells *** shell modes -- cgit v1.2.3