From 89ee77e7d67a22534262e913eb91583aeb1552fc Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Sun, 20 Jan 2019 12:37:14 -0500 Subject: Push changes I forgot to commit --- jakob.org | 74 ++++++++++++++++++++++++++----------------------- snippets/org-mode/elisp | 7 ----- snippets/org-mode/src | 6 ++++ 3 files changed, 45 insertions(+), 42 deletions(-) delete mode 100644 snippets/org-mode/elisp create mode 100644 snippets/org-mode/src diff --git a/jakob.org b/jakob.org index 4f59479..71e6a36 100644 --- a/jakob.org +++ b/jakob.org @@ -129,6 +129,12 @@ Require =bind-key= early on for =:bind= declarations. (use-package bind-key :defer t) #+END_SRC +And require the libraries that I use throughout this file. + +#+BEGIN_SRC elisp +(require 'cl) +#+END_SRC + ** Lisp Interaction Don't omit information when lists nest too deep. @@ -404,33 +410,24 @@ current inferior bitlbee process." (get-buffer "bitlbee"))))) (defun irc-cycle-buffer-list (starting-buffer) - "Returns the forward order in which to cycle channel buffers. -Channels with activity take priority in the order of -`erc-modified-channels-alist', followed by other channels in -alphabetical order. Control buffers belonging to bitlbee are -omitted." - (let* ((modified (map 'list - #'(lambda (channel) - (first channel)) - erc-modified-channels-alist)) - (rest (map 'list - #'(lambda (channel) - (get-buffer channel)) - (sort (remove-if #'(lambda (channel) - (member (get-buffer channel) modified)) - (list-irc-channels)) - #'(lambda (channel1 channel2) - (string< (subseq channel1 1) - (subseq channel2 1)))))) - (split-index (position (get-buffer starting-buffer) rest))) + "Returns the forward order in which to cycle channel buffers, +which as of the current implementation is alphabetical. Control +buffers belonging to bitlbee are omitted." + (let* ((buffers (sort (map 'list + #'(lambda (channel) + (get-buffer channel)) + (list-irc-channels)) + #'(lambda (channel1 channel2) + (string< (subseq (buffer-name channel1) 1) + (subseq (buffer-name channel2) 1))))) + (split-index (position (get-buffer starting-buffer) buffers))) (remove-if #'(lambda (buffer) (or (equal buffer (get-buffer starting-buffer)) (bitlbee-control-buffer-p buffer))) (if split-index (concatenate 'list - modified - (subseq rest split-index) - (subseq rest 0 split-index)) - (concatenate 'list modified rest))))) + (subseq buffers split-index) + (subseq buffers 0 split-index)) + buffers)))) (defun irc-cycle-forward () "Visits the next channel buffer as dictated by @@ -938,18 +935,22 @@ Ah, yes. Simulation keys, the real reason I decided to install EXWM. ([?\C-s] . [?\C-f]))) #+END_SRC -The tab switching functionality of Saka Key is sadly limited to tabs containing -HTML content that have finished loading, so I'm implementing simulation keys for -the tab switching keybindings built into Firefox. +The tab switching functionality of Saka Key is pretty limited, so I'm using +simulation keys for tab switching. Simulation keys is also disabled for kitty +because it gets in the way of readline. #+BEGIN_SRC elisp -(add-hook 'exwm-manage-finish-hook - (lambda () - (when (and exwm-class-name - (string= exwm-class-name "Firefox")) - (exwm-input-set-local-simulation-keys (concatenate 'list - exwm-input-simulation-keys - '(([?\C-q] . [?\C-w]))))))) +:hook +(exwm-manage-finish . (lambda () + (when (and exwm-class-name + (string= exwm-class-name "Firefox")) + (exwm-input-set-local-simulation-keys + (concatenate 'list + exwm-input-simulation-keys + '(([?\C-q] . [?\C-w]))))) + (when (and exwm-class-name + (string= exwm-class-name "kitty")) + (exwm-input-set-local-simulation-keys nil)))) #+END_SRC EXWM's buffers are named =*EXWM*= upon creation, which makes switching between @@ -1036,7 +1037,8 @@ Scale up embedded LaTeX so that I can actually read it. Replace my [[Imenu]] binding with =org-goto=, as it allows me to select headings with subheadings. Keybindings for working with my Org workflow from anywhere are also -here, because =use-package= doesn't like split =:bind= declarations. +here, as are rebindings for [[Counsel]] because =use-package= doesn't like split =:bind= +declarations. #+BEGIN_SRC elisp :init @@ -1048,6 +1050,7 @@ here, because =use-package= doesn't like split =:bind= declarations. ("C-c c" . (lambda () (interactive) (org-capture nil "c"))) ("C-c t" . (lambda () (interactive) (org-capture nil "t"))) :map org-mode-map + ("C-c C-q" . counsel-org-tag) ("C-c s" . org-goto))) #+END_SRC @@ -1591,7 +1594,8 @@ here. * dumb-jump -Replace =xref= keybindings instead of using the default ones. +Replace =xref= keybindings instead of using the default ones, since I'm nearly +always using =dumb-jump= instead of a proper tag indexer. #+BEGIN_SRC elisp (use-package dumb-jump diff --git a/snippets/org-mode/elisp b/snippets/org-mode/elisp deleted file mode 100644 index 153e45d..0000000 --- a/snippets/org-mode/elisp +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: elisp -# key: elisp -# -- -#+BEGIN_SRC elisp -$0 -#+END_SRC \ No newline at end of file diff --git a/snippets/org-mode/src b/snippets/org-mode/src new file mode 100644 index 0000000..ebf3c68 --- /dev/null +++ b/snippets/org-mode/src @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: src +# key: src +# -- +#+BEGIN_SRC ${1:prog} +#+END_SRC \ No newline at end of file -- cgit v1.3