Skip to content

arcli/emacs-org-visibility

 
 

Repository files navigation

Org Visibility

https://img.shields.io/badge/Emacs-27-8e44bd.svg https://img.shields.io/badge/license-GPL_2-green.svg https://melpa.org/packages/org-visibility-badge.svg https://stable.melpa.org/packages/org-visibility-badge.svg

Org Visibility is an Emacs package that adds the ability to persist (save and load) the state of the visible sections of org-mode files. The state is automatically saved when the file is saved or killed, and restored when the file is loaded.

Example Configuration:

(use-package org-visibility
  :after (org)
  :bind (:map org-visibility-mode-map
              ("C-x C-v" . org-visibility-force-save) ; defaults to `find-alternative-file'
              ("C-x M-v" . org-visibility-remove))    ; defaults to undefined
  :hook (org-mode . org-visibility-mode)
  :custom
  ;; list of directories and files to automatically persist and restore visibility state of
  (org-visibility-include-paths `(,(file-truename "~/.emacs.d/init-emacs.org")
                                  ,(file-truename "~/org")))
  ;; list of directories and files to not persist and restore visibility state of
  (org-visibility-exclude-paths `(,(file-truename "~/org/old")
                                  ,(file-truename "~/org/test"))))

Of course you will need to edit the above paths to match your setup.

See the Installation and Usage parts of the Commentary section in org-visibility.el for more information and a full list of customizations.

Emacs version 27.1 or later is required.

Build with make.

Clean with make clean.

Run tests with make test.

All files are generated from org-visibility.org using Emacs’ org-mode literate programming system to “tangle” them.

Copyright (C) 2022 Kyle W T Sherman

License: GNU General Public License 2

About

Persistent org tree visibility

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Emacs Lisp 99.4%
  • Makefile 0.6%