diff options
author | JSDurand <mmemmew@gmail.com> | 2021-12-19 14:52:57 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2021-12-19 14:52:57 +0800 |
commit | 5849cd830f00d67483c98f713ae42ba189cf039a (patch) | |
tree | 13810293bc15b7f02031aef6dcc32042d7a7e207 | |
parent | 34c09ddc9883d6e9116001b068f5235381d420ce (diff) |
ibuffer: a custom column
* ibuffer.el (protect): A custom column.
(ibuffer-formats): Add the newly defined column to the list of
formats.
-rw-r--r-- | ibuffer.el | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -257,6 +257,34 @@ derived modes of `ibuffer-mode'."))) (advice-add #'ibuffer-do-unprotect :before #'durand-ibuffer-restore-mark-before-advice) +;;;; A custom column + +;;;###autoload +(define-ibuffer-column protect + (:name "P" :inline t) + (cond + ((durand-member buffer durand-clear-passlist #'durand-born-equal) + "P") + (" "))) + +(setq ibuffer-formats + '((mark + modified + read-only + locked + protect + " " + (name 18 18 :left :elide) + " " + (size 9 -1 :right) + " " + (mode 16 16 :left :elide) + " " + filename-and-process) + (mark " " (name 16 -1) " " filename))) + +(ibuffer-recompile-formats) + ;;; key-bindings (define-key global-map (vector 24 2) #'ibuffer) |