From 00a6d1188f54929ebdd9a9fffb694942ec934a6f Mon Sep 17 00:00:00 2001 From: JSDurand Date: Fri, 23 Feb 2024 15:02:57 +0800 Subject: bookmark: add dired group --- bookmark-conf.el | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/bookmark-conf.el b/bookmark-conf.el index 5a64417..12409cb 100644 --- a/bookmark-conf.el +++ b/bookmark-conf.el @@ -100,7 +100,8 @@ (cons "C" #'blist-c-p) (cons "Gnus" #'blist-gnus-p) (cons "ELisp" #'blist-elisp-p) - (cons "Eshell" #'blist-eshell-p))) + (cons "Eshell" #'blist-eshell-p) + (cons "Dired" #'blist-dired-p))) ;;;;; Automatic groups @@ -257,8 +258,16 @@ ;;;; External group (blist-define-criterion "external" "External" - (eq (bookmark-get-handler bookmark) - #'durand-external-jump)) + (eq (bookmark-get-handler bookmark) #'durand-external-jump)) + +;;;; Dired group + +(blist-define-criterion "dired" "Dired" + (let ((location (blist-get-location bookmark))) + (and (stringp location) + (not (string= location (string))) + (not (file-remote-p location)) + (file-directory-p location)))) ;;; Fit annotations buffer to window -- cgit v1.2.3-18-g5258