summaryrefslogtreecommitdiff
path: root/ibuffer.el
diff options
context:
space:
mode:
Diffstat (limited to 'ibuffer.el')
-rw-r--r--ibuffer.el19
1 files changed, 19 insertions, 0 deletions
diff --git a/ibuffer.el b/ibuffer.el
index 9066617..5f7f614 100644
--- a/ibuffer.el
+++ b/ibuffer.el
@@ -431,6 +431,24 @@ value of `default-directory' in that buffer."
(expand-file-name
(buffer-local-value buf default-directory)))))))
+;;; For ITHKUIL
+(define-ibuffer-filter durand-ithkuil
+ "Matches ITHKUIL buffers.
+These are EWW buffers whose URL starts with www.ithkuil.net,
+along with the buffers of files in a dedicated Ithkuil directory."
+ (:description "ITHKUIL" :reader (read-string "no effect"))
+ (with-current-buffer buf
+ (let ((buf-name default-directory))
+ (ignore-errors
+ (cond
+ ((derived-mode-p 'eww-mode)
+ (string-prefix-p
+ "https://www.ithkuil.net" (plist-get eww-data :url)))
+ (buf-name
+ (string-prefix-p
+ "/Users/durand/Desktop/Centre/Ithkuil/"
+ (expand-file-name buf-name))))))))
+
;;;###autoload
(defun durand-bongo-set-filter ()
"Set my custom filters."
@@ -441,6 +459,7 @@ value of `default-directory' in that buffer."
(mode . rustic-mode)
(mode . rust-mode))))
(cons "TeX" '((derived-mode . tex-mode)))
+ (cons "ITHKUIL" '((durand-ithkuil)))
(cons "C" '((mode . c-mode)))
(cons "ELisp" '((mode . emacs-lisp-mode)))
(cons "EWW" '((mode . eww-mode)))