Skip to content

Latest commit

 

History

History
686 lines (556 loc) · 29.7 KB

README.org

File metadata and controls

686 lines (556 loc) · 29.7 KB

consult-denote: enhance Denote with previews and more

This manual, written by Protesilaos Stavrou, describes the customization options for the Emacs package called consult-denote (or consult-denote.el), and provides every other piece of information pertinent to it.

The documentation furnished herein corresponds to stable version {{{stable-version}}}, released on {{{release-date}}}. Any reference to a newer feature which does not yet form part of the latest tagged commit, is explicitly marked as such.

Current development target is {{{development-version}}}.

If you are viewing the README.org version of this file, please note that the GNU ELPA machinery automatically generates an Info manual out of it.

1 Overview

This package glues together the denote and consult packages:

Denote
A file-naming scheme to easily retrieve files of any type. Useful for note-taking and long-term storage files.
Consult
Enhanced interactivity for the standard Emacs minibuffer, such as a preview mechanism for buffers and an asynchronous grep/find.

The purpose of consult-denote is as follows:

Preview files in all relevant Denote minibuffer prompts
Enable the consult-denote-mode to make all file-related Denote prompts show a preview of the selected file. Users of Denote do not need to use new commands or change anything in their workflow: this mode will work in the background to enhance the relevant minibuffer interactions.
Easy search with preview through the denote-directory
The commands consult-denote-grep and consult-denote-find provide direct search to the denote-directory for file contents (grep) or file names (find). Both commands show matching results in the minibuffer and preview the selected candidate. The user options consult-denote-grep-command and consult-denote-find-command control which command is actually invoked. For example, users may prefer to use consult-ripgrep instead of the default consult-grep.
Include Denote groups in the consult-buffer interface
With consult-denote-mode enabled, the consult-buffer will have more sections in its presentation. Those include a group for Denote buffers, another with subdirectories of the denote-directory, and a third with the user-defined Denote silos (for those user option denote-silo-extras-directories (for those who opt in to that extension, as described in the Denote manual). The user option consult-denote-buffer-sources can be configured to control which sources are added to consult-buffer.

In the future we may use other features of Consult, based on user feedback.

2 Installation

2.1 GNU ELPA package

The package is available as consult-denote. Simply do:

M-x package-refresh-contents
M-x package-install

And search for it.

GNU ELPA provides the latest stable release. Those who prefer to follow the development process in order to report bugs or suggest changes, can use the version of the package from the GNU-devel ELPA archive. Read: https://protesilaos.com/codelog/2022-05-13-emacs-elpa-devel/.

2.2 Manual installation

Assuming your Emacs files are found in ~/.emacs.d/, execute the following commands in a shell prompt:

cd ~/.emacs.d

# Create a directory for manually-installed packages
mkdir manual-packages

# Go to the new directory
cd manual-packages

# Clone this repo, naming it "consult-denote"
git clone https://github.com/protesilaos/consult-denote consult-denote

Finally, in your init.el (or equivalent) evaluate this:

;; Make Elisp files in that directory available to the user.
(add-to-list 'load-path "~/.emacs.d/manual-packages/consult-denote")

Everything is in place to set up the package.

3 Sample configuration

(require 'consult-denote)

(define-key global-map (kbd "C-c n f") #'consult-denote-find)
(define-key global-map (kbd "C-c n g") #'consult-denote-grep)

(consult-denote-mode 1)

4 Acknowledgements

consult-denote is meant to be a collective effort. Every bit of help matters.

Author/maintainer
Protesilaos Stavrou.
Ideas and/or user feedback
Damien Cassou, Jeff Valk, Joost Kremers, Peter Prevos, Samuel Flint, gitrh95, hapst3r.

5 COPYING

Copyright (C) 2024 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License.”

(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.”

6 GNU Free Documentation License