Skip to content

pavlo/denote-solo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

denote-solo

License: GPL v3

Switch the active Denote directory and keep working in it — one active solo at a time, remembered across sessions and shown in the mode line.

Demo

latest.mov

Switching between the Studies, Experimentations and Personal solos, with the active one shown in the mode line.

Why denote-solo

Denote can hold several independent note collections — e.g. Studies, Experimentations, Personal — each its own directory with its own keywords.

The official =denote-silo= answers “which directory?” every time you run a command. That is great when you bounce between collections constantly.

denote-solo takes the opposite stance: you pick one once, and it stays active until you switch again. Every Denote command just uses the current one. No per-command prompt, no second-guessing.

And yes — silosolo. One letter apart, but a different idea: not a silo you choose among each time, but a single collection that plays solo until you cue the next one. That collection is what we call a solo throughout these docs. The pun is fully intentional. 🙂

Use denote-silo if you want to choose per command; use denote-solo if you’d rather choose once and forget about it.

Features

  • Switch the active solo with a single command, denote-solo-switch.
  • The choice is persisted and restored on the next Emacs session.
  • The active solo is shown in the mode line, e.g. {denote: Studies} (can be turned off).
  • Per-solo denote-keyword-history: keyword completions don’t leak between solos.
  • Quick toggle: the previous solo is pre-selected in the prompt, so C-c n s RET switches back to it instantly — no typing, no scrolling.

Installation

denote-solo requires Emacs 28.1+ and Denote 4.0+.

With use-package and :vc (Emacs 30+)

(use-package denote-solo
  :vc (:url "https://github.com/pavlo/denote-solo")
  :after denote
  :config
  (denote-solo-mode 1))

With straight.el / elpaca

;; elpaca
(use-package denote-solo
  :ensure (:host github :repo "pavlo/denote-solo")
  :config
  (denote-solo-mode 1))

Manual

Clone the repository and put it on your load-path:

(add-to-list 'load-path "/path/to/denote-solo")
(require 'denote-solo)
(denote-solo-mode 1)

Configuration

Tell denote-solo about your solos via denote-solo-directories — an alist of (NAME . DIRECTORY) pairs:

(use-package denote-solo
  :after denote
  :config
  (setq denote-solo-directories
        '(("Studies"         . "~/notes/studies")
          ("Experimentations" . "~/notes/experimentations")
          ("Personal"        . "~/notes/personal")))
  (denote-solo-mode 1))

Customisable options:

OptionDefaultMeaning
denote-solo-directoriesnilAlist of (NAME . DIRECTORY) solos.
denote-solo-display-modelinetShow the active solo in the mode line.

All options are available through M-x customize-group RET denote-solo.

Usage

  • M-x denote-solo-switch — pick a solo by name; denote-directory switches to it and the choice is saved.
  • After switching, run any Denote command (denote, denote-open-or-create, …) as usual — it operates in the active solo.
  • On the next Emacs start, denote-solo-mode restores the solo you used last.

The mode line shows the active solo:

... {denote: Studies} ...

Bind the switch command to taste, e.g.:

(keymap-global-set "C-c n s" #'denote-solo-switch)

Toggling between two solos

The previous solo is always pre-selected in the prompt. If you bounce between Studies and Personal, the workflow is:

  1. You are in Studies. Run denote-solo-switchPersonal is pre-selected.
  2. Press RET — you are now in Personal.
  3. Run denote-solo-switch again — Studies is pre-selected.
  4. Press RET — back in Studies.

One keystroke per switch, no matter how many solos you have configured.

How it works

denote-solo-switch sets the global denote-directory and writes the chosen solo name to a small state file (denote-solo-last-directory under user-emacs-directory). The global minor mode denote-solo-mode reads that file on startup to restore the last solo, and manages the mode line indicator. Keyword history is swapped per solo so completions stay relevant to where you are.

Contributing

Issues and pull requests are welcome. Before sending a patch, please run:

make lint

which byte-compiles the package and runs checkdoc in a clean Emacs.

License

Copyright (C) 2026 Pavlo V. Lysov.

Released under the GNU General Public License v3.0 or later (SPDX-License-Identifier: GPL-3.0-or-later).

About

Pick one Denote silo and let it play solo - Emacs package

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors