Tmsu.el
An integration between GNU Emacs and TMSU
Install / Use
/learn @vifon/Tmsu.elREADME
tmsu.el
An integration between GNU Emacs and TMSU.
FEATURES
tmsu.el doesn't try to replicate the full functionality of TMSU.
Instead it focuses on enhancing the UX of the most common operations:
tag editing and querying. It's primarily intended to be used from
dired, though tmsu-edit can be used separately from it.
The two main commands are tmsu-dired-edit to interactively edit the
tag list of the currently selected file and tmsu-dired-query to
create a dired buffer with the TMSU query results. Both utilize the
Emacs completing-read-multiple interface and so greatly benefit from
packages such as vertico.
Persistent queries
The queries can be stored for later recall either with the
native Emacs bookmarks or with org-mode links using
org-store-link.
The first type is supported out of the box. The second one needs to be loaded:
(require 'ol-tmsu)
Bulk operations
tmsu-dired-tags-add and tmsu-dired-tags-remove can be used to edit
tags of multiple files at a time. For convenience, the completion of
tmsu-dired-tags-remove offers the sum of tags of all the
marked files.
INSTALLATION
To install tmsu.el, you can use the following code:
(use-package tmsu
:ensure t
:after dired
:bind (:map dired-mode-map
(";" . tmsu-dired-edit)
("M-;" . tmsu-dired-query)
("C-M-;". tmsu-dired-overlay))
:config (require 'tmsu-dired))
If you prefer to attach your TMSU tags to directories and not single
files (think: a directory with a set of movies with common tags), use
tmsu-dired-edit-directory instead of tmsu-dired-edit. See their
docstrings for the details.
For the org-mode links support, this is the suggested setup:
(use-package ol-tmsu
:ensure t
:after (:any org tmsu-dired)
:if (executable-find "tmsu"))
Orderless compatibility
If you're using Orderless
with a style dispatcher using = as a suffix (which is the default
since early 2023 when orderless-affix-dispatch got added), you may
want to add the following snippet:
(defun call-without-orderless-dispatchers (orig &rest args)
"Use with `advice-add' (`:around') to ignore the dispatchers."
(let ((orderless-style-dispatchers nil))
(apply orig args)))
(advice-add 'tmsu-edit :around
#'call-without-orderless-dispatchers)
(advice-add 'tmsu-dired-query :around
#'call-without-orderless-dispatchers)
This modification allows the completion suggestions for inputs like
tag= to show up immediately and not only after the next keypress
(that makes the input not end with = anymore).
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
