├── README.md ├── denote-search.el ├── doclicense.texi ├── COPYING └── README.org /README.md: -------------------------------------------------------------------------------- 1 | # denote-search: A simple search utility for Denote 2 | 3 | GNU ELPA 4 | 5 | ----- 6 | 7 | NOTICE: Together with Protesilaos, I merged most of the features of 8 | this package into Denote. From version 4.0.0 (released on 2025-04-15) 9 | onwards, the command `denote-grep` is available out-of-the-box to 10 | search in the contents of your notes. Other commands with the 11 | `denote-grep-` prefix mirror the functionality available in 12 | `denote-search`. Also, you can now create links to a specific search 13 | using the new command `denote-query-contents-link`. Another 14 | interesting addition: try the well-known `denote-search` filter 15 | commands in the backlinks buffer; they work there! 16 | 17 | The package will stay here for existing users, but you probably should 18 | switch to `denote-grep`. 19 | 20 | ----- 21 | 22 | This package provides a search utility for Denote, the simple-to-use, 23 | focused-in-scope, and effective note-taking tool for Emacs. 24 | 25 | The command `denote-search` is the main point of entry. It accepts a 26 | query, which should be a regular expression, and then searches the 27 | contents of all the notes stored in `denote-directory` for it. The 28 | results are put in a buffer which allows folding and further 29 | filtering; all standard commands offered by Xref are available as 30 | well. 31 | 32 | This package has the same code principles as Denote: to be 33 | simple-to-use, focused-in-scope, and effective. We build upon Xref to 34 | be good Emacs citizens, and don't use any dependencies other than 35 | Denote and built-in libraries. 36 | 37 | See the `README.org` file for a comprehensive manual. 38 | 39 | ## Installation 40 | 41 | denote-search is available in GNU ELPA. You can install the package by doing: 42 | 43 | ``` 44 | M-x package-refresh-contents RET 45 | M-x package-install RET denote-search RET 46 | ``` 47 | 48 | If for whatever reason you prefer to install it from source, you can do so by evaluating the following code: 49 | 50 | ```elisp 51 | (package-vc-install 52 | '(denote-search 53 | :url "https://github.com/lmq-10/denote-search" 54 | :doc "README.org")) 55 | ``` 56 | 57 | ## Sample configuration 58 | 59 | ```elisp 60 | (use-package denote-search 61 | :ensure t 62 | :bind 63 | ;; Customize keybindings to your liking 64 | (("C-c s s" . denote-search) 65 | ("C-c s d" . denote-search-marked-dired-files) 66 | ("C-c s r" . denote-search-files-referenced-in-region)) 67 | :custom 68 | ;; Disable help string (set it once you learn the commands) 69 | ;; (denote-search-help-string "") 70 | ;; Display keywords in results buffer 71 | (denote-search-format-heading-function #'denote-search-format-heading-with-keywords)) 72 | ``` 73 | -------------------------------------------------------------------------------- /denote-search.el: -------------------------------------------------------------------------------- 1 | ;;; denote-search.el --- Search the contents of your notes -*- lexical-binding: t; -*- 2 | 3 | ;; Copyright (C) 2024-2025 Free Software Foundation, Inc. 4 | 5 | ;; Author: Lucas Quintana 6 | ;; Maintainer: Lucas Quintana 7 | ;; URL: https://github.com/lmq-10/denote-search 8 | ;; Created: 2024-12-28 9 | ;; Keywords: matching 10 | ;; Version: 1.0.3 11 | ;; Package-Requires: ((emacs "29.1") (denote "3.0")) 12 | 13 | ;; This program is NOT part of GNU Emacs. 14 | 15 | ;; This program is free software; you can redistribute it and/or modify 16 | ;; it under the terms of the GNU General Public License as published by 17 | ;; the Free Software Foundation, either version 3 of the License, or 18 | ;; (at your option) any later version. 19 | 20 | ;; This program is distributed in the hope that it will be useful, 21 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | ;; GNU General Public License for more details. 24 | 25 | ;; You should have received a copy of the GNU General Public License 26 | ;; along with this program. If not, see . 27 | 28 | ;;; Commentary: 29 | 30 | ;; This package provides a search utility for Denote, the 31 | ;; simple-to-use, focused-in-scope, and effective note-taking tool for 32 | ;; Emacs. 33 | ;; 34 | ;; The command `denote-search' is the main point of entry. It accepts 35 | ;; a query, which should be a regular expression, and then searches 36 | ;; the contents of all the notes stored in `denote-directory' for it. 37 | ;; The results are put in a buffer which allows folding and further 38 | ;; filtering; all standard commands offered by Xref are available as 39 | ;; well. 40 | ;; 41 | ;; Other relevant points of entry are 42 | ;; `denote-search-marked-dired-files' and 43 | ;; `denote-search-files-referenced-in-region'. See the documentation 44 | ;; for details. 45 | ;; 46 | ;; This package has the same code principles as Denote: to be 47 | ;; simple-to-use, focused-in-scope, and effective. We build upon Xref 48 | ;; to be good Emacs citizens, and don't use any dependencies other 49 | ;; than Denote and built-in libraries. 50 | 51 | ;;; Code: 52 | 53 | (require 'denote) 54 | (require 'dired) 55 | (require 'outline) 56 | (require 'time-date) 57 | (require 'xref) 58 | 59 | ;;;; User options: 60 | 61 | (defgroup denote-search () 62 | "A simple search utility for Denote." 63 | :group 'denote 64 | :link '(info-link "(denote-search) Top")) 65 | 66 | (defcustom denote-search-buffer-name "*denote-search*" 67 | "Name of the buffer created by `denote-search'." 68 | :type 'string) 69 | 70 | (defcustom denote-search-format-heading-function #'denote-search-extract-title 71 | "Function used to construct headings in the `denote-search' buffer. 72 | 73 | It is called with a single argument, the path to the note file, and it 74 | should always return a string." 75 | :type 'function) 76 | 77 | (defcustom denote-search-untitled-string "[Untitled]" 78 | "String to use as heading for untitled notes." 79 | :type 'string) 80 | 81 | (defcustom denote-search-help-string 82 | "\\Refine with \ 83 | `\\[denote-search-refine]', exclude files with \ 84 | `\\[denote-search-exclude-files]', (only) include certain files \ 85 | with `\\[denote-search-only-include-files]'." 86 | "Help string appended to the header line of `denote-search' buffer. 87 | 88 | This gets processed by `substitute-command-keys', so it can contain key 89 | descriptions which get replaced; check the documentation for details. 90 | 91 | Once you are familiar with the program, you can safely set this variable 92 | to the void string." 93 | :type 'string) 94 | 95 | (defcustom denote-search-hook nil 96 | "Normal hook run after finishing a `denote-search'." 97 | :type 'hook) 98 | 99 | ;;;; Main variables: 100 | 101 | (defvar denote-search-query-history nil 102 | "Minibuffer history for generic search commands.") 103 | 104 | (defvar denote-search-file-regexp-history nil 105 | "Minibuffer history for commands asking for a file regexp.") 106 | 107 | (defvar denote-search--last-files nil 108 | "Variable holding a list of files matched by the last call to `denote-search'.") 109 | 110 | (defvar denote-search--last-query nil 111 | "Variable holding the QUERY argument of the last call to `denote-search'.") 112 | 113 | ;;;; Main functions: 114 | 115 | (defun denote-search-extract-title (file) 116 | "Extract note title from FILE front matter. 117 | 118 | When no title is found, return title found in FILE name. 119 | 120 | When that doesn't work, return `denote-search-untitled-string'. 121 | 122 | This is the default function used to format headings in the 123 | `denote-search' buffer. See `denote-format-heading-function'." 124 | (let ((title 125 | (denote-retrieve-title-or-filename 126 | file 127 | (denote-filetype-heuristics file)))) 128 | (if (and (stringp title) (not (string-blank-p title))) 129 | title 130 | denote-search-untitled-string))) 131 | 132 | (defun denote-search-file-regexp-prompt (&optional include) 133 | "Prompt for a file regexp in the minibuffer. 134 | 135 | The prompt assumes the user wants to exclude files, unless INCLUDE is 136 | non-nil." 137 | (list (read-string 138 | (if (not include) 139 | "Exclude file names matching: " 140 | "Only include file names matching: ") 141 | nil 'denote-search-file-regexp-history))) 142 | 143 | (defun denote-search-keywords-prompt (&optional include) 144 | "Prompt for keywords in the minibuffer, with completion. 145 | 146 | Keywords are read using `completing-read-multiple'. 147 | 148 | The prompt assumes the user wants to exclude the keywords, unless 149 | INCLUDE is non-nil." 150 | (list 151 | (delete-dups 152 | (completing-read-multiple 153 | (if (not include) 154 | "Exclude files with keywords: " 155 | "Only include files with keywords: ") 156 | (denote-keywords) nil t nil 'denote-keyword-history)))) 157 | 158 | (defun denote-search-query-prompt (&optional type) 159 | "Prompt for a search query in the minibuffer. 160 | 161 | The prompt assumes a search in all files, unless TYPE is non-nil. 162 | 163 | TYPE can be one of :focused (for a focused search, see 164 | `denote-search-refine') or :dired (for a search in marked dired files, 165 | see `denote-search-marked-dired-files'). 166 | 167 | TYPE only affects the prompt, not the returned value." 168 | (list (read-string 169 | (cond ((eq type :focused) 170 | "Search (only files matched last): ") 171 | ((eq type :dired) 172 | "Search (only marked dired files): ") 173 | ((eq type :region) 174 | "Search (only files referenced in region): ") 175 | (t "Search (all Denote files): ")) 176 | nil 'denote-search-query-history))) 177 | 178 | (defun denote-search-format-heading-with-keywords (file) 179 | "Format a heading for FILE with its title and keywords. 180 | 181 | Returned heading has the following format: 182 | 183 | TITLE [KEYWORD1, KEYWORD2] 184 | 185 | This function is intended to be used as the 186 | `denote-search-format-heading-function'." 187 | (let ((keywords (denote-retrieve-filename-keywords file)) 188 | (title (denote-search-extract-title file))) 189 | (if (not keywords) 190 | title 191 | (format 192 | "%s [%s]" 193 | title (replace-regexp-in-string "_" ", " keywords))))) 194 | 195 | (defun denote-search-set-header-line (query number-of-files time) 196 | "Set header line for `denote-search' buffer. 197 | 198 | QUERY should be a string. It is assumed to be the search term. 199 | 200 | NUMBER-OF-FILES should be an integer. It is assumed to be the number of 201 | files matching the search. 202 | 203 | TIME should be an Emacs timestamp as returned by e.g. `current-time'. 204 | It is assumed to be the exact time when search started. 205 | 206 | If `denote-search-help-string' is non-nil, it is appended to the header 207 | line, and any key descriptions within it are replaced using 208 | `substitute-command-keys'." 209 | (let ((help-string 210 | (if (or (not denote-search-help-string) 211 | (string-blank-p denote-search-help-string)) 212 | "" 213 | (concat " " (substitute-command-keys denote-search-help-string))))) 214 | (setq-local 215 | header-line-format 216 | (format 217 | "Search for ‘%s’ finished in %s (%d files matching).%s" 218 | query 219 | (seconds-to-string (float-time (time-subtract (current-time) time))) 220 | number-of-files help-string)))) 221 | 222 | (defun denote-search--get-files-referenced-in-region (start end) 223 | "Return a list with all Denote files referenced between START and END. 224 | 225 | START and END should be buffer positions, as integers. 226 | 227 | \"Referenced\" here means an ID is present in the text, so it'll work with 228 | plain links, links written by a dynamic block, or even file lists 229 | returned by ls (and that naturally includes dired). 230 | 231 | Returned value is a list with the absoulte path of referenced files." 232 | (let (id-list) 233 | (save-excursion 234 | (save-restriction 235 | (narrow-to-region start end) 236 | (goto-char (point-min)) 237 | (while (re-search-forward denote-id-regexp nil t) 238 | (push (denote-get-path-by-id (match-string 0)) id-list)))) 239 | id-list)) 240 | 241 | ;;;###autoload 242 | (defun denote-search (query &optional set) 243 | "Search QUERY in the content of Denote files. 244 | 245 | QUERY should be a regular expression accepted by `xref-search-program', 246 | which see. 247 | 248 | The files to search for are those returned by `denote-directory-files' 249 | with a non-nil TEXT-ONLY argument. When calling the function from Lisp, 250 | however, SET can be a list of files to search instead. This is mostly 251 | useful for filtering output; see e.g. `denote-search-refine'. 252 | 253 | The results are populated in a buffer whose major mode is 254 | `xref--xref-buffer-mode' and where `denote-search-mode-map' is active." 255 | ;; Some of this is based on `denote-link--prepare-backlinks' 256 | (interactive (denote-search-query-prompt)) 257 | (let ((now (current-time)) 258 | (inhibit-read-only t) 259 | (xref-file-name-display 'abs) 260 | (xref-alist 261 | (xref--analyze 262 | (xref-matches-in-files 263 | query 264 | (or set (denote-directory-files nil nil :text-only) 265 | (user-error 266 | "Directory `%s' doesn't have any text files to search" 267 | denote-directory)))))) 268 | (or xref-alist (user-error "No matches for `%s'" query)) 269 | ;; Set internal variables for last set of files and last query 270 | (setq denote-search--last-files nil) 271 | (setq denote-search--last-query query) 272 | (dolist (x xref-alist) 273 | (let* ((file-xref (car x)) 274 | (file 275 | ;; NOTE: Unfortunately, the car of the xref construct is 276 | ;; not reliable; sometimes it's absolute, sometimes it 277 | ;; is not 278 | (if (file-name-absolute-p file-xref) 279 | file-xref 280 | (xref-location-group 281 | (xref-match-item-location (car (last x))))))) 282 | ;; Add to current set of files 283 | (push file denote-search--last-files) 284 | ;; Format heading 285 | (setf (car x) (funcall denote-search-format-heading-function file)))) 286 | (delete-dups denote-search--last-files) 287 | (with-current-buffer (get-buffer-create denote-search-buffer-name) 288 | (erase-buffer) 289 | (xref--insert-xrefs xref-alist) 290 | (xref--xref-buffer-mode) 291 | (denote-search-mode) 292 | (denote-search-set-header-line query (length xref-alist) now) 293 | (setq-local revert-buffer-function 294 | (lambda (_ignore-auto _noconfirm) 295 | (denote-search 296 | denote-search--last-query 297 | denote-search--last-files))) 298 | (goto-char (point-min))) 299 | (pop-to-buffer-same-window denote-search-buffer-name) 300 | (run-hooks 'denote-search-hook))) 301 | 302 | ;;;###autoload 303 | (defun denote-search-marked-dired-files (query) 304 | "Search QUERY in the content of marked dired files. 305 | 306 | Internally, this works by passing the list of marked files as the SET 307 | parameter of `denote-search'." 308 | (interactive (denote-search-query-prompt :dired)) 309 | (if-let* ((files (dired-get-marked-files))) 310 | (denote-search query files) 311 | (user-error "No marked files"))) 312 | 313 | ;;;###autoload 314 | (defun denote-search-files-referenced-in-region (query start end) 315 | "Search QUERY in the content of files referenced between START and END. 316 | 317 | START and END should be buffer positions, as integers. Interactively, 318 | they are the positions of point and mark (i.e. the region). 319 | 320 | See `denote-search--get-files-referenced-in-region' for an explanation 321 | of what referenced means (in short: an ID is present somewhere). 322 | 323 | This function is not used for filtering content in the results buffer; 324 | see e.g. `denote-search-exclude-files' for that." 325 | ;; MAYBE: We could respect `use-empty-active-region', but it would 326 | ;; complicate things a little 327 | (interactive 328 | (append 329 | (denote-search-query-prompt :region) 330 | (list (region-beginning) (region-end)))) 331 | (if-let* ((files (denote-search--get-files-referenced-in-region start end))) 332 | (denote-search query files) 333 | (user-error "No files referenced in region"))) 334 | 335 | (defun denote-search-refine (query) 336 | "Search QUERY in the content of files which matched the last `denote-search'. 337 | 338 | QUERY should be regular expression. 339 | 340 | A typical case is to search notes which have two specific terms anywhere 341 | within them, such as \"emacs\" and \"philosophy\". The user would then 342 | call ‘\\\\[denote-search] emacs RET’ in order to search for 343 | emacs, and once the results are populated, they would type 344 | ‘\\\\[denote-search-refine] philosophy RET’ to 345 | search the term philosophy only in those notes. This can be done 346 | as many times as wished." 347 | (interactive (denote-search-query-prompt :focused)) 348 | (denote-search query denote-search--last-files)) 349 | 350 | (defalias 'denote-search-focused-search 'denote-search-refine) 351 | 352 | (defun denote-search-exclude-files (regexp) 353 | "Exclude files whose name matches REGEXP from current `denote-search' buffer. 354 | 355 | This is useful even if you don't know regular expressions, given the 356 | Denote file-naming scheme. For instance, to exclude notes with the 357 | keyword \"philosophy\" from current search buffer, type 358 | ‘\\\\[denote-search-exclude-files] _philosophy 359 | RET’. 360 | 361 | Internally, this works by generating a new call to `denote-search' with 362 | the same QUERY as the last one, but with a restricted SET gotten from 363 | checking REGEXP against last matched files. 364 | 365 | When called from Lisp, REGEXP can be a list; in that case, it should be 366 | a list of fixed strings (NOT regexps) to check against last matched 367 | files. Files that match any of the strings get excluded. Internally, 368 | the list is processed using `regexp-opt', which see. For an example of 369 | this usage, see `denote-search-exclude-files-with-keywords'." 370 | (interactive (denote-search-file-regexp-prompt)) 371 | (let (final-files) 372 | (dolist (file denote-search--last-files) 373 | (unless (string-match 374 | ;; Support list of strings as REGEXP 375 | (if (listp regexp) 376 | (regexp-opt regexp) 377 | regexp) 378 | file) 379 | (push file final-files))) 380 | (if final-files 381 | (denote-search denote-search--last-query final-files) 382 | (user-error "No remaining files when applying that filter")))) 383 | 384 | (defun denote-search-only-include-files (regexp) 385 | "Exclude file names not matching REGEXP from current `denote-search' buffer. 386 | 387 | See `denote-search-exlude-files' for details, including the behaviour 388 | when REGEXP is a list." 389 | (interactive (denote-search-file-regexp-prompt :include)) 390 | (let (final-files) 391 | (dolist (file denote-search--last-files) 392 | (when (string-match 393 | ;; Support list of strings as REGEXP 394 | (if (listp regexp) 395 | (regexp-opt regexp) 396 | regexp) 397 | file) 398 | (push file final-files))) 399 | (if final-files 400 | (denote-search denote-search--last-query final-files) 401 | (user-error "No remaining files when applying that filter")))) 402 | 403 | (defun denote-search-exclude-files-with-keywords (keywords) 404 | "Exclude files with KEYWORDS from current `denote-search' buffer. 405 | 406 | KEYWORDS should be a list of keywords (without underscore). 407 | 408 | Interactively, KEYWORDS are read from the minibuffer using 409 | `completing-read-multiple', which see." 410 | (interactive (denote-search-keywords-prompt)) 411 | (denote-search-exclude-files 412 | (mapcar (lambda (kw) (concat "_" kw)) keywords))) 413 | 414 | (defun denote-search-only-include-files-with-keywords (keywords) 415 | "Exclude files without KEYWORDS from current `denote-search' buffer. 416 | 417 | See `denote-search-exclude-files-with-keywords' for details." 418 | (interactive (denote-search-keywords-prompt :include)) 419 | (denote-search-only-include-files 420 | (mapcar (lambda (kw) (concat "_" kw)) keywords))) 421 | 422 | (defun denote-search-clean-all-filters () 423 | "Run the last search with the full set of files in `denote-directory'. 424 | 425 | This effectively gets ride of any interactive filter applied (by the 426 | means of e.g. `denote-search-exclude-files')." 427 | (interactive) 428 | (denote-search denote-search--last-query) 429 | (message "Cleaned all filters")) 430 | 431 | ;;;; Keymap and mode definition: 432 | 433 | (defvar-keymap denote-search-mode-map 434 | :doc "Keymap for buffers generated by `denote-search'." 435 | "a" #'outline-cycle-buffer 436 | "f" #'denote-search-refine 437 | "k" #'outline-previous-heading 438 | "j" #'outline-next-heading 439 | "o" #'delete-other-windows 440 | "s" #'denote-search 441 | "v" #'outline-cycle 442 | "x" #'denote-search-exclude-files 443 | "i" #'denote-search-only-include-files 444 | "l" #'recenter-current-error 445 | "X" #'denote-search-exclude-files-with-keywords 446 | "I" #'denote-search-only-include-files-with-keywords 447 | "G" #'denote-search-clean-all-filters) 448 | 449 | (define-minor-mode denote-search-mode 450 | "Minor mode enabled in the buffer generated by `denote-search'. 451 | 452 | It takes care of enabling `outline-minor-mode' and setting up the 453 | relevant keymap (`denote-search-mode-map')." 454 | :interactive nil 455 | (when denote-search-mode 456 | (setq-local outline-minor-mode-use-buttons 'in-margins) 457 | (outline-minor-mode))) 458 | 459 | (provide 'denote-search) 460 | ;;; denote-search.el ends here 461 | -------------------------------------------------------------------------------- /doclicense.texi: -------------------------------------------------------------------------------- 1 | @c The GNU Free Documentation License. 2 | @center Version 1.3, 3 November 2008 3 | 4 | @c This file is intended to be included within another document, 5 | @c hence no sectioning command or @node. 6 | 7 | @display 8 | Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. 9 | @uref{https://fsf.org/} 10 | 11 | Everyone is permitted to copy and distribute verbatim copies 12 | of this license document, but changing it is not allowed. 13 | @end display 14 | 15 | @enumerate 0 16 | @item 17 | PREAMBLE 18 | 19 | The purpose of this License is to make a manual, textbook, or other 20 | functional and useful document @dfn{free} in the sense of freedom: to 21 | assure everyone the effective freedom to copy and redistribute it, 22 | with or without modifying it, either commercially or noncommercially. 23 | Secondarily, this License preserves for the author and publisher a way 24 | to get credit for their work, while not being considered responsible 25 | for modifications made by others. 26 | 27 | This License is a kind of ``copyleft'', which means that derivative 28 | works of the document must themselves be free in the same sense. It 29 | complements the GNU General Public License, which is a copyleft 30 | license designed for free software. 31 | 32 | We have designed this License in order to use it for manuals for free 33 | software, because free software needs free documentation: a free 34 | program should come with manuals providing the same freedoms that the 35 | software does. But this License is not limited to software manuals; 36 | it can be used for any textual work, regardless of subject matter or 37 | whether it is published as a printed book. We recommend this License 38 | principally for works whose purpose is instruction or reference. 39 | 40 | @item 41 | APPLICABILITY AND DEFINITIONS 42 | 43 | This License applies to any manual or other work, in any medium, that 44 | contains a notice placed by the copyright holder saying it can be 45 | distributed under the terms of this License. Such a notice grants a 46 | world-wide, royalty-free license, unlimited in duration, to use that 47 | work under the conditions stated herein. The ``Document'', below, 48 | refers to any such manual or work. Any member of the public is a 49 | licensee, and is addressed as ``you''. You accept the license if you 50 | copy, modify or distribute the work in a way requiring permission 51 | under copyright law. 52 | 53 | A ``Modified Version'' of the Document means any work containing the 54 | Document or a portion of it, either copied verbatim, or with 55 | modifications and/or translated into another language. 56 | 57 | A ``Secondary Section'' is a named appendix or a front-matter section 58 | of the Document that deals exclusively with the relationship of the 59 | publishers or authors of the Document to the Document's overall 60 | subject (or to related matters) and contains nothing that could fall 61 | directly within that overall subject. (Thus, if the Document is in 62 | part a textbook of mathematics, a Secondary Section may not explain 63 | any mathematics.) The relationship could be a matter of historical 64 | connection with the subject or with related matters, or of legal, 65 | commercial, philosophical, ethical or political position regarding 66 | them. 67 | 68 | The ``Invariant Sections'' are certain Secondary Sections whose titles 69 | are designated, as being those of Invariant Sections, in the notice 70 | that says that the Document is released under this License. If a 71 | section does not fit the above definition of Secondary then it is not 72 | allowed to be designated as Invariant. The Document may contain zero 73 | Invariant Sections. If the Document does not identify any Invariant 74 | Sections then there are none. 75 | 76 | The ``Cover Texts'' are certain short passages of text that are listed, 77 | as Front-Cover Texts or Back-Cover Texts, in the notice that says that 78 | the Document is released under this License. A Front-Cover Text may 79 | be at most 5 words, and a Back-Cover Text may be at most 25 words. 80 | 81 | A ``Transparent'' copy of the Document means a machine-readable copy, 82 | represented in a format whose specification is available to the 83 | general public, that is suitable for revising the document 84 | straightforwardly with generic text editors or (for images composed of 85 | pixels) generic paint programs or (for drawings) some widely available 86 | drawing editor, and that is suitable for input to text formatters or 87 | for automatic translation to a variety of formats suitable for input 88 | to text formatters. A copy made in an otherwise Transparent file 89 | format whose markup, or absence of markup, has been arranged to thwart 90 | or discourage subsequent modification by readers is not Transparent. 91 | An image format is not Transparent if used for any substantial amount 92 | of text. A copy that is not ``Transparent'' is called ``Opaque''. 93 | 94 | Examples of suitable formats for Transparent copies include plain 95 | ASCII without markup, Texinfo input format, La@TeX{} input 96 | format, SGML or XML using a publicly available 97 | DTD, and standard-conforming simple HTML, 98 | PostScript or PDF designed for human modification. Examples 99 | of transparent image formats include PNG, XCF and 100 | JPG@. Opaque formats include proprietary formats that can be 101 | read and edited only by proprietary word processors, SGML or 102 | XML for which the DTD and/or processing tools are 103 | not generally available, and the machine-generated HTML, 104 | PostScript or PDF produced by some word processors for 105 | output purposes only. 106 | 107 | The ``Title Page'' means, for a printed book, the title page itself, 108 | plus such following pages as are needed to hold, legibly, the material 109 | this License requires to appear in the title page. For works in 110 | formats which do not have any title page as such, ``Title Page'' means 111 | the text near the most prominent appearance of the work's title, 112 | preceding the beginning of the body of the text. 113 | 114 | The ``publisher'' means any person or entity that distributes copies 115 | of the Document to the public. 116 | 117 | A section ``Entitled XYZ'' means a named subunit of the Document whose 118 | title either is precisely XYZ or contains XYZ in parentheses following 119 | text that translates XYZ in another language. (Here XYZ stands for a 120 | specific section name mentioned below, such as ``Acknowledgements'', 121 | ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' 122 | of such a section when you modify the Document means that it remains a 123 | section ``Entitled XYZ'' according to this definition. 124 | 125 | The Document may include Warranty Disclaimers next to the notice which 126 | states that this License applies to the Document. These Warranty 127 | Disclaimers are considered to be included by reference in this 128 | License, but only as regards disclaiming warranties: any other 129 | implication that these Warranty Disclaimers may have is void and has 130 | no effect on the meaning of this License. 131 | 132 | @item 133 | VERBATIM COPYING 134 | 135 | You may copy and distribute the Document in any medium, either 136 | commercially or noncommercially, provided that this License, the 137 | copyright notices, and the license notice saying this License applies 138 | to the Document are reproduced in all copies, and that you add no other 139 | conditions whatsoever to those of this License. You may not use 140 | technical measures to obstruct or control the reading or further 141 | copying of the copies you make or distribute. However, you may accept 142 | compensation in exchange for copies. If you distribute a large enough 143 | number of copies you must also follow the conditions in section 3. 144 | 145 | You may also lend copies, under the same conditions stated above, and 146 | you may publicly display copies. 147 | 148 | @item 149 | COPYING IN QUANTITY 150 | 151 | If you publish printed copies (or copies in media that commonly have 152 | printed covers) of the Document, numbering more than 100, and the 153 | Document's license notice requires Cover Texts, you must enclose the 154 | copies in covers that carry, clearly and legibly, all these Cover 155 | Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on 156 | the back cover. Both covers must also clearly and legibly identify 157 | you as the publisher of these copies. The front cover must present 158 | the full title with all words of the title equally prominent and 159 | visible. You may add other material on the covers in addition. 160 | Copying with changes limited to the covers, as long as they preserve 161 | the title of the Document and satisfy these conditions, can be treated 162 | as verbatim copying in other respects. 163 | 164 | If the required texts for either cover are too voluminous to fit 165 | legibly, you should put the first ones listed (as many as fit 166 | reasonably) on the actual cover, and continue the rest onto adjacent 167 | pages. 168 | 169 | If you publish or distribute Opaque copies of the Document numbering 170 | more than 100, you must either include a machine-readable Transparent 171 | copy along with each Opaque copy, or state in or with each Opaque copy 172 | a computer-network location from which the general network-using 173 | public has access to download using public-standard network protocols 174 | a complete Transparent copy of the Document, free of added material. 175 | If you use the latter option, you must take reasonably prudent steps, 176 | when you begin distribution of Opaque copies in quantity, to ensure 177 | that this Transparent copy will remain thus accessible at the stated 178 | location until at least one year after the last time you distribute an 179 | Opaque copy (directly or through your agents or retailers) of that 180 | edition to the public. 181 | 182 | It is requested, but not required, that you contact the authors of the 183 | Document well before redistributing any large number of copies, to give 184 | them a chance to provide you with an updated version of the Document. 185 | 186 | @item 187 | MODIFICATIONS 188 | 189 | You may copy and distribute a Modified Version of the Document under 190 | the conditions of sections 2 and 3 above, provided that you release 191 | the Modified Version under precisely this License, with the Modified 192 | Version filling the role of the Document, thus licensing distribution 193 | and modification of the Modified Version to whoever possesses a copy 194 | of it. In addition, you must do these things in the Modified Version: 195 | 196 | @enumerate A 197 | @item 198 | Use in the Title Page (and on the covers, if any) a title distinct 199 | from that of the Document, and from those of previous versions 200 | (which should, if there were any, be listed in the History section 201 | of the Document). You may use the same title as a previous version 202 | if the original publisher of that version gives permission. 203 | 204 | @item 205 | List on the Title Page, as authors, one or more persons or entities 206 | responsible for authorship of the modifications in the Modified 207 | Version, together with at least five of the principal authors of the 208 | Document (all of its principal authors, if it has fewer than five), 209 | unless they release you from this requirement. 210 | 211 | @item 212 | State on the Title page the name of the publisher of the 213 | Modified Version, as the publisher. 214 | 215 | @item 216 | Preserve all the copyright notices of the Document. 217 | 218 | @item 219 | Add an appropriate copyright notice for your modifications 220 | adjacent to the other copyright notices. 221 | 222 | @item 223 | Include, immediately after the copyright notices, a license notice 224 | giving the public permission to use the Modified Version under the 225 | terms of this License, in the form shown in the Addendum below. 226 | 227 | @item 228 | Preserve in that license notice the full lists of Invariant Sections 229 | and required Cover Texts given in the Document's license notice. 230 | 231 | @item 232 | Include an unaltered copy of this License. 233 | 234 | @item 235 | Preserve the section Entitled ``History'', Preserve its Title, and add 236 | to it an item stating at least the title, year, new authors, and 237 | publisher of the Modified Version as given on the Title Page. If 238 | there is no section Entitled ``History'' in the Document, create one 239 | stating the title, year, authors, and publisher of the Document as 240 | given on its Title Page, then add an item describing the Modified 241 | Version as stated in the previous sentence. 242 | 243 | @item 244 | Preserve the network location, if any, given in the Document for 245 | public access to a Transparent copy of the Document, and likewise 246 | the network locations given in the Document for previous versions 247 | it was based on. These may be placed in the ``History'' section. 248 | You may omit a network location for a work that was published at 249 | least four years before the Document itself, or if the original 250 | publisher of the version it refers to gives permission. 251 | 252 | @item 253 | For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve 254 | the Title of the section, and preserve in the section all the 255 | substance and tone of each of the contributor acknowledgements and/or 256 | dedications given therein. 257 | 258 | @item 259 | Preserve all the Invariant Sections of the Document, 260 | unaltered in their text and in their titles. Section numbers 261 | or the equivalent are not considered part of the section titles. 262 | 263 | @item 264 | Delete any section Entitled ``Endorsements''. Such a section 265 | may not be included in the Modified Version. 266 | 267 | @item 268 | Do not retitle any existing section to be Entitled ``Endorsements'' or 269 | to conflict in title with any Invariant Section. 270 | 271 | @item 272 | Preserve any Warranty Disclaimers. 273 | @end enumerate 274 | 275 | If the Modified Version includes new front-matter sections or 276 | appendices that qualify as Secondary Sections and contain no material 277 | copied from the Document, you may at your option designate some or all 278 | of these sections as invariant. To do this, add their titles to the 279 | list of Invariant Sections in the Modified Version's license notice. 280 | These titles must be distinct from any other section titles. 281 | 282 | You may add a section Entitled ``Endorsements'', provided it contains 283 | nothing but endorsements of your Modified Version by various 284 | parties---for example, statements of peer review or that the text has 285 | been approved by an organization as the authoritative definition of a 286 | standard. 287 | 288 | You may add a passage of up to five words as a Front-Cover Text, and a 289 | passage of up to 25 words as a Back-Cover Text, to the end of the list 290 | of Cover Texts in the Modified Version. Only one passage of 291 | Front-Cover Text and one of Back-Cover Text may be added by (or 292 | through arrangements made by) any one entity. If the Document already 293 | includes a cover text for the same cover, previously added by you or 294 | by arrangement made by the same entity you are acting on behalf of, 295 | you may not add another; but you may replace the old one, on explicit 296 | permission from the previous publisher that added the old one. 297 | 298 | The author(s) and publisher(s) of the Document do not by this License 299 | give permission to use their names for publicity for or to assert or 300 | imply endorsement of any Modified Version. 301 | 302 | @item 303 | COMBINING DOCUMENTS 304 | 305 | You may combine the Document with other documents released under this 306 | License, under the terms defined in section 4 above for modified 307 | versions, provided that you include in the combination all of the 308 | Invariant Sections of all of the original documents, unmodified, and 309 | list them all as Invariant Sections of your combined work in its 310 | license notice, and that you preserve all their Warranty Disclaimers. 311 | 312 | The combined work need only contain one copy of this License, and 313 | multiple identical Invariant Sections may be replaced with a single 314 | copy. If there are multiple Invariant Sections with the same name but 315 | different contents, make the title of each such section unique by 316 | adding at the end of it, in parentheses, the name of the original 317 | author or publisher of that section if known, or else a unique number. 318 | Make the same adjustment to the section titles in the list of 319 | Invariant Sections in the license notice of the combined work. 320 | 321 | In the combination, you must combine any sections Entitled ``History'' 322 | in the various original documents, forming one section Entitled 323 | ``History''; likewise combine any sections Entitled ``Acknowledgements'', 324 | and any sections Entitled ``Dedications''. You must delete all 325 | sections Entitled ``Endorsements.'' 326 | 327 | @item 328 | COLLECTIONS OF DOCUMENTS 329 | 330 | You may make a collection consisting of the Document and other documents 331 | released under this License, and replace the individual copies of this 332 | License in the various documents with a single copy that is included in 333 | the collection, provided that you follow the rules of this License for 334 | verbatim copying of each of the documents in all other respects. 335 | 336 | You may extract a single document from such a collection, and distribute 337 | it individually under this License, provided you insert a copy of this 338 | License into the extracted document, and follow this License in all 339 | other respects regarding verbatim copying of that document. 340 | 341 | @item 342 | AGGREGATION WITH INDEPENDENT WORKS 343 | 344 | A compilation of the Document or its derivatives with other separate 345 | and independent documents or works, in or on a volume of a storage or 346 | distribution medium, is called an ``aggregate'' if the copyright 347 | resulting from the compilation is not used to limit the legal rights 348 | of the compilation's users beyond what the individual works permit. 349 | When the Document is included in an aggregate, this License does not 350 | apply to the other works in the aggregate which are not themselves 351 | derivative works of the Document. 352 | 353 | If the Cover Text requirement of section 3 is applicable to these 354 | copies of the Document, then if the Document is less than one half of 355 | the entire aggregate, the Document's Cover Texts may be placed on 356 | covers that bracket the Document within the aggregate, or the 357 | electronic equivalent of covers if the Document is in electronic form. 358 | Otherwise they must appear on printed covers that bracket the whole 359 | aggregate. 360 | 361 | @item 362 | TRANSLATION 363 | 364 | Translation is considered a kind of modification, so you may 365 | distribute translations of the Document under the terms of section 4. 366 | Replacing Invariant Sections with translations requires special 367 | permission from their copyright holders, but you may include 368 | translations of some or all Invariant Sections in addition to the 369 | original versions of these Invariant Sections. You may include a 370 | translation of this License, and all the license notices in the 371 | Document, and any Warranty Disclaimers, provided that you also include 372 | the original English version of this License and the original versions 373 | of those notices and disclaimers. In case of a disagreement between 374 | the translation and the original version of this License or a notice 375 | or disclaimer, the original version will prevail. 376 | 377 | If a section in the Document is Entitled ``Acknowledgements'', 378 | ``Dedications'', or ``History'', the requirement (section 4) to Preserve 379 | its Title (section 1) will typically require changing the actual 380 | title. 381 | 382 | @item 383 | TERMINATION 384 | 385 | You may not copy, modify, sublicense, or distribute the Document 386 | except as expressly provided under this License. Any attempt 387 | otherwise to copy, modify, sublicense, or distribute it is void, and 388 | will automatically terminate your rights under this License. 389 | 390 | However, if you cease all violation of this License, then your license 391 | from a particular copyright holder is reinstated (a) provisionally, 392 | unless and until the copyright holder explicitly and finally 393 | terminates your license, and (b) permanently, if the copyright holder 394 | fails to notify you of the violation by some reasonable means prior to 395 | 60 days after the cessation. 396 | 397 | Moreover, your license from a particular copyright holder is 398 | reinstated permanently if the copyright holder notifies you of the 399 | violation by some reasonable means, this is the first time you have 400 | received notice of violation of this License (for any work) from that 401 | copyright holder, and you cure the violation prior to 30 days after 402 | your receipt of the notice. 403 | 404 | Termination of your rights under this section does not terminate the 405 | licenses of parties who have received copies or rights from you under 406 | this License. If your rights have been terminated and not permanently 407 | reinstated, receipt of a copy of some or all of the same material does 408 | not give you any rights to use it. 409 | 410 | @item 411 | FUTURE REVISIONS OF THIS LICENSE 412 | 413 | The Free Software Foundation may publish new, revised versions 414 | of the GNU Free Documentation License from time to time. Such new 415 | versions will be similar in spirit to the present version, but may 416 | differ in detail to address new problems or concerns. See 417 | @uref{https://www.gnu.org/licenses/}. 418 | 419 | Each version of the License is given a distinguishing version number. 420 | If the Document specifies that a particular numbered version of this 421 | License ``or any later version'' applies to it, you have the option of 422 | following the terms and conditions either of that specified version or 423 | of any later version that has been published (not as a draft) by the 424 | Free Software Foundation. If the Document does not specify a version 425 | number of this License, you may choose any version ever published (not 426 | as a draft) by the Free Software Foundation. If the Document 427 | specifies that a proxy can decide which future versions of this 428 | License can be used, that proxy's public statement of acceptance of a 429 | version permanently authorizes you to choose that version for the 430 | Document. 431 | 432 | @item 433 | RELICENSING 434 | 435 | ``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any 436 | World Wide Web server that publishes copyrightable works and also 437 | provides prominent facilities for anybody to edit those works. A 438 | public wiki that anybody can edit is an example of such a server. A 439 | ``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the 440 | site means any set of copyrightable works thus published on the MMC 441 | site. 442 | 443 | ``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 444 | license published by Creative Commons Corporation, a not-for-profit 445 | corporation with a principal place of business in San Francisco, 446 | California, as well as future copyleft versions of that license 447 | published by that same organization. 448 | 449 | ``Incorporate'' means to publish or republish a Document, in whole or 450 | in part, as part of another Document. 451 | 452 | An MMC is ``eligible for relicensing'' if it is licensed under this 453 | License, and if all works that were first published under this License 454 | somewhere other than this MMC, and subsequently incorporated in whole 455 | or in part into the MMC, (1) had no cover texts or invariant sections, 456 | and (2) were thus incorporated prior to November 1, 2008. 457 | 458 | The operator of an MMC Site may republish an MMC contained in the site 459 | under CC-BY-SA on the same site at any time before August 1, 2009, 460 | provided the MMC is eligible for relicensing. 461 | 462 | @end enumerate 463 | 464 | @page 465 | @heading ADDENDUM: How to use this License for your documents 466 | 467 | To use this License in a document you have written, include a copy of 468 | the License in the document and put the following copyright and 469 | license notices just after the title page: 470 | 471 | @smallexample 472 | @group 473 | Copyright (C) @var{year} @var{your name}. 474 | Permission is granted to copy, distribute and/or modify this document 475 | under the terms of the GNU Free Documentation License, Version 1.3 476 | or any later version published by the Free Software Foundation; 477 | with no Invariant Sections, no Front-Cover Texts, and no Back-Cover 478 | Texts. A copy of the license is included in the section entitled ``GNU 479 | Free Documentation License''. 480 | @end group 481 | @end smallexample 482 | 483 | If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, 484 | replace the ``with@dots{}Texts.''@: line with this: 485 | 486 | @smallexample 487 | @group 488 | with the Invariant Sections being @var{list their titles}, with 489 | the Front-Cover Texts being @var{list}, and with the Back-Cover Texts 490 | being @var{list}. 491 | @end group 492 | @end smallexample 493 | 494 | If you have Invariant Sections without Cover Texts, or some other 495 | combination of the three, merge those two alternatives to suit the 496 | situation. 497 | 498 | If your document contains nontrivial examples of program code, we 499 | recommend releasing these examples in parallel under your choice of 500 | free software license, such as the GNU General Public License, 501 | to permit their use in free software. 502 | 503 | @c Local Variables: 504 | @c ispell-local-pdict: "ispell-dict" 505 | @c End: 506 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.org: -------------------------------------------------------------------------------- 1 | #+title: denote-search: a simple search utility for Denote 2 | #+author: Lucas Quintana 3 | #+email: lmq10@protonmail.com 4 | #+language: en 5 | #+options: ':t toc:nil author:t email:t num:t 6 | #+startup: content 7 | #+macro: stable-version 1.0.3 8 | #+macro: release-date 2025-03-02 9 | #+export_file_name: denote-search.texi 10 | #+texinfo_filename: denote-search.info 11 | #+texinfo_dir_category: Emacs misc features 12 | #+texinfo_dir_title: Denote Search: (denote-search) 13 | #+texinfo_dir_desc: A simple search utility for Denote 14 | #+texinfo_header: @set MAINTAINER Lucas Quintana 15 | #+texinfo_header: @set MAINTAINEREMAIL @email{lmq10@protonmail.com} 16 | #+texinfo_header: @set MAINTAINERCONTACT @uref{mailto:lmq10@protonmail.com,contact the maintainer} 17 | 18 | #+texinfo: @insertcopying 19 | 20 | This manual, written by Lucas Quintana, describes the customization 21 | options for the Emacs package called ~denote-search~ (or 22 | =denote-search.el=), and provides every other piece of information 23 | pertinent to it. 24 | 25 | The documentation furnished herein corresponds to stable version 26 | {{{stable-version}}}, released on {{{release-date}}}. 27 | 28 | #+toc: headlines 8 29 | 30 | * COPYING 31 | :PROPERTIES: 32 | :COPYING: t 33 | :END: 34 | 35 | Copyright (C) 2024-2025 Free Software Foundation, Inc. 36 | 37 | #+begin_quote 38 | Permission is granted to copy, distribute and/or modify this document 39 | under the terms of the GNU Free Documentation License, Version 1.3 or 40 | any later version published by the Free Software Foundation; with no 41 | Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and 42 | with the Back-Cover Texts as in (a) below. A copy of the license is 43 | included in the section entitled “GNU Free Documentation License.” 44 | 45 | (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and 46 | modify this GNU manual.” 47 | #+end_quote 48 | 49 | * Overview 50 | 51 | This package provides a simple search utility for the excellent 52 | ~denote~ program, the simple-to-use, focused-in-scope, and effective 53 | note-taking tool for Emacs (see [[info:denote#Top]]). 54 | 55 | ~denote-search~ allows you to search for a regular expression in the 56 | contents of your notes. Once the results are populated, you are 57 | presented with a buffer from which you can refine the search (that is, 58 | search in the matched files), jump to a certain file using imenu, 59 | exclude certain files from the search, or search only certain files. 60 | All commands provided by Xref are available as well (see 61 | info:emacs#Xref). 62 | 63 | ~denote-search~ approach has several advantages over similar tools 64 | (~consult-grep~, ~consult-notes~, ~grep~, and so on): 65 | 66 | - It allows to search in the files matched by a previous search, which 67 | as far as I know is not possible with other similar packages. 68 | 69 | - It allows to search in the files referenced in a region, with the 70 | command ~denote-search-files-referenced-in-region~. That is great 71 | for metanotes, shell outputs of =ls=, and more. 72 | 73 | - It also allows to search in marked Dired files, with the command 74 | ~denote-search-marked-dired-files~. 75 | 76 | - It doesn't rely on the minibuffer to output results, and it thus 77 | doesn't need a completion stack in order to work (~helm~, 78 | ~vertico+consult~, etc.). 79 | 80 | - In fact, ~denote-search~ doesn't rely on any external package other 81 | than Denote. 82 | 83 | - Unlike ~grep~, it allows excluding (or including only) certain files 84 | on-demand, without command-line gimmicks. 85 | 86 | - It uses pretty file titles by default (and can be customized to show 87 | keywords or basically any other information as well). 88 | 89 | Furthermore, ~denote-search~ has a small and simple codebase. It is 90 | designed to do one thing and one thing only: to search in your notes. 91 | 92 | * Motivation 93 | 94 | I wrote ~denote-search~ because I needed a simple tool to search my 95 | personal knowledge database, which of course is managed with Denote. 96 | Available options, such as ~consult-notes~, almost always used the 97 | minibuffer to display results. Which is fine, it works, but it is 98 | sort of annoying on small screens. In fact, I hacked the first 99 | version of ~denote-search~ on Emacs for Android, in a time where I 100 | didn't have a laptop with me. Don't take those things as granted, 101 | trust me. 102 | 103 | I was mainly inspired by Howm[fn:1], a really great note-taking tool, 104 | also made for Emacs. It has a life-changing approach to notes: it 105 | doesn't matter where do you store your information as long as you can 106 | retrieve it later. "Write fragmentarily and read collectively", that 107 | is. Howm has thus powerful search facilities built-in, some of which 108 | (filtering and excluding/including files) I reimplemented in 109 | ~denote-search~. I'm very happy now ^_^ 110 | 111 | * Points of entry 112 | 113 | #+findex: denote-search 114 | The main point of entry of this package is the ~denote-search~ 115 | command. This command will prompt for a string. You should input a 116 | valid regular expression, as understood by the tool which will 117 | actually perform the search. Which program that is depends on the 118 | value of ~xref-search-program~, and its arguments are taken from 119 | ~xref-search-program-alist~. Note that ~denote-search~ is really just 120 | a wrapper for Xref, albeit an useful one, so anything related to the 121 | actual search results is the matter (for bad or for good) of that 122 | library and/or the program it calls. 123 | 124 | Once the (synchronous) search is over, a new buffer populated with the 125 | results, if any, will be made current. On that buffer, the user will 126 | be able to perform several potentially useful actions, including 127 | filtering the output (see [[#filtering-the-search-results][filtering the search results]]) and searching 128 | in the matched files (see [[#focused-search][focused search]]). 129 | 130 | History is available when searching. Press ~M-p~ 131 | (~previous-history-element~) to view past queries. 132 | 133 | There are two additional commands that can start a search: 134 | ~denote-search-marked-dired-files~ and 135 | ~denote-search-files-referenced-in-region~. They allow searching a 136 | restricted subset of files and are described in the next sections. 137 | 138 | ** Searching in marked Dired files 139 | 140 | #+findex: denote-search-marked-dired-files 141 | The command ~denote-search-marked-dired-files~ acts just like 142 | ~denote-search~, but it restricts the search to the files marked in 143 | current Dired buffer (see [[info:emacs#Marks vs Flags][Marks vs Flags]]). This is useful if you only 144 | want to search some files, though depending on the case maybe you'd 145 | be better served by our built-in filtering capabilities; see 146 | [[#filtering-the-search-results][filtering the search results]]. 147 | 148 | This works well in tandem with the Denote command ~denote-sort-dired~, 149 | which produces a Dired buffer with files matching a regexp. So, 150 | generating that buffer and then pressing ~t~ (~dired-toggle-marks~) 151 | will enable you to use ~denote-search-marked-dired-files~ to search on 152 | those files. Again, using the filtering functionality available for 153 | the results buffer should suit you better, but you have options. 154 | 155 | ** Searching in files referenced in a region 156 | 157 | #+findex: denote-search-files-referenced-in-region 158 | The command ~denote-search-files-referenced-in-region~ may seem odd at 159 | first, but it's probably the most useful one. It allows you to search 160 | in a set of notes referenced in a buffer. What does that means? 161 | Well, it means that any buffer can serve as the source for the set of 162 | files to search for; you just need Denote IDs written somewhere, and 163 | the command will recognize them as files and search in them. 164 | 165 | But let's look at an example. Probably, you already have a note with 166 | a section that resembles this: 167 | 168 | #+begin_src org 169 | ,* See also 170 | 171 | - An amazing note 172 | - Another amazing note 173 | - Yet another amazing note 174 | #+end_src 175 | 176 | Those notes are links and are highlighted as such, so internally they look like this: 177 | 178 | #+begin_src org 179 | ,* See also 180 | 181 | - [[denote:20231205T202124][An amazing note]] 182 | - [[denote:20230720T154224][Another amazing note]] 183 | - [[denote:20230719T194132][Yet another amazing note]] 184 | #+end_src 185 | 186 | That ~20231205T202124~ bit is the Denote ID. That's the only thing 187 | our command needs to recognize a note. So, you just need to select 188 | the section (with the mouse or ~C-SPC~, whichever you like the most) 189 | and call ~denote-search-files-referenced-in-region~. It will prompt 190 | for a regexp just like ~denote-search~, but it will only search the 191 | files selected. 192 | 193 | This is useful for searching in notes linked in Org dynamic blocks 194 | (first mark the block with ~org-babel-mark-block~), or for searching 195 | something in linked notes in general (first mark the whole buffer with 196 | ~mark-whole-buffer~, bound to ~C-x h~). 197 | 198 | This works everywhere. If you had notes with the exact same IDs as 199 | the ones depicted previously, you could select them in this very same 200 | Info buffer (assuming you are reading this in Emacs) and search 201 | something in them right away. 202 | 203 | As the Denote ID is included in file names, you can also use this 204 | command on Dired, on a shell output of ls from ~async-shell-command~, 205 | and so on. It's on those cases where you can grasp how powerful the 206 | Denote file-naming scheme is. 207 | 208 | * Navigating the search results 209 | 210 | To navigate the results buffer, you can use the standard Xref commands 211 | (see [[info:emacs#Xref Commands][Xref Commands]]). So, for instance, ~n~ moves you to the next hit 212 | and displays it in another window, and ~p~ does the same for the 213 | previous one. ~N~ moves you to the next file, while ~P~ moves you to 214 | the previous one. 215 | 216 | Aside from that, ~denote-search~ by default enables 217 | ~outline-minor-mode~ in the results buffer, and so additional 218 | facilities are available. You can fold file matches with TAB 219 | (~outline-cycle~), in a similar fashion as an Org tree. You can also 220 | navigate all the files using ~imenu~ or an enhanced front-end such as 221 | ~consult-imenu~. ~consult-outline~ also works here. 222 | 223 | You can press ~a~ (~outline-cycle-buffer~) to fold all files. This 224 | can give you a quick overlook of all the files that matched the 225 | search. If there are many, you can proceed to filter the output 226 | (see [[#filtering-the-search-results][filtering the search results]]). 227 | 228 | Press ~l~ (~recenter-current-error~) to recenter current search focus 229 | shown in the other window. Press ~o~ (~delete-other-windows~) to 230 | close other windows displayed in the frame. 231 | 232 | * Filtering the search results 233 | :PROPERTIES: 234 | :CUSTOM_ID: filtering-the-search-results 235 | :END: 236 | 237 | #+findex: denote-search-exclude-files 238 | On the results buffer, you can press ~x~ 239 | (~denote-search-exclude-files~) to exclude certain files from the 240 | search. The command will prompt for a regular expression. Once 241 | given, the last search query will be re-run, but excluding all the 242 | files that match the regular expression given. For instance, you can 243 | input =_philosophy= to exclude all the notes with the "philosophy" 244 | keyword. Or you can input =-emacs= to exclude all the notes that have 245 | "emacs" in their title. Or you can input =org$= to exclude Org files. 246 | And so on. 247 | 248 | #+findex: denote-search-include-files 249 | You can press ~i~ (~denote-search-only-include-files~) for the 250 | opposite operation; it will prompt for a regular expression, and then 251 | re-run the search, but only on the files matched by the regular 252 | expression given. 253 | 254 | These commands always act as if the files matched by the last search 255 | were all the Denote files in existence. This has a great advantage; 256 | you can chain them in any way you want. You can, for example, press 257 | ~i~ and input =_emacs=, and then press ~x~ and input =_philosophy=. 258 | The resulting buffer will have all the notes which have the keyword 259 | "emacs" but not the keyword "philosophy", and will then display the 260 | matches for the search query you made originally only for those 261 | specific files. You can of course keep filtering further. 262 | 263 | To "break the chain" and start a totally new search, you can simply 264 | call ~denote-search~, which is bound to ~s~ in the results buffer for 265 | convenience. 266 | 267 | It's possible that you don't want to start a new search, but rather to 268 | search something on the curated file list you got. See [[#focused-search][focused search]]. 269 | 270 | #+findex: denote-search-exclude-files-with-keywords 271 | #+findex: denote-search-only-include-files-with-keywords 272 | Filtering by keywords is such a common operation that two special 273 | commands exist just for that: ~X~ 274 | (~denote-search-exclude-files-with-keywords~) and ~I~ 275 | (~denote-search-only-include-files-with-keywords~). They are 276 | equivalent to calling its regular counterparts and issuing a word with 277 | a leading underscore; however, they also offer completion for 278 | available keywords (using ~denote-keywords~, so its actual behaviour 279 | is governed by the variables ~denote-infer-keywords~ and 280 | ~denote-known-keywords~). But the main advantage is that they allow 281 | issuing multiple keywords at once, separated by commas (or whatever 282 | the value of ~crm-separator~ is, which should be a comma). 283 | 284 | History is available when filtering. Press ~M-p~ 285 | (~previous-history-element~) to view past queries. This history is 286 | kept separately from that available when searching. In the case of 287 | keyword filtering, history is shared with other Denote keyword 288 | prompts. 289 | 290 | #+findex: denote-search-clean-all-filters 291 | To get rid of all filters, just type ~G~ 292 | (~denote-search-clean-all-filters~). This simply re-runs the last 293 | search on the full set of Denote files. Note that this differs from 294 | ~g~ (~revert-buffer~), which re-runs the last search on the same set 295 | of files (i.e. with filters applied). 296 | 297 | * Focused search 298 | :PROPERTIES: 299 | :CUSTOM_ID: focused-search 300 | :END: 301 | 302 | A "focused search" is a search which is run against a set of files 303 | matched by a previous search. There are many use-cases for this, 304 | including searching for a note that you know has two or three very 305 | specific words, probably on different lines. 306 | 307 | #+findex: denote-search-refine 308 | On the results buffer, press ~f~ (~denote-search-refine~) to start a 309 | focused search. The command will prompt for a regular expression. 310 | Once given, it will be searched in the files matched by the last 311 | search. The buffer will be properly updated and will show the matches 312 | found. 313 | 314 | Note that this feature, combined with the filtering capabilities 315 | offered by this package (see [[#filtering-the-search-results][filtering the search results]]), can be 316 | very powerful. 317 | 318 | Let's look at a complex example, which would be nearly impossible with 319 | other tools: search for all the mentions of "quantum mechanics" in 320 | notes with the "science" keyword, without the "personal" keyword, and 321 | which mention "Maxwell" somewhere in the text. The procedure is as 322 | follows: 323 | 324 | - =M-x denote-search RET maxwell RET= [fn:3] 325 | - =i _science RET= 326 | - =x _personal RET= 327 | - =f quantum mechanics RET= 328 | 329 | There it is, a really complex task is done in four straightforward 330 | steps. And all without external and platform-specific programs such 331 | as xapian! 332 | 333 | * Editing files 334 | 335 | ~denote-search~ is designed only for finding information in your 336 | knowledge database, not for changing it. You can open the files (with 337 | ~RET~, ~n~ or otherwise) and edit them as usual. 338 | 339 | There's a special editing feature offered by Xref, though. You can 340 | press ~r~ (~xref-query-replace-in-results~) to replace the search 341 | query (naturally as a regular expression) in the files matched; the 342 | interface is similar to that of ~query-replace-regexp~. This works in 343 | the files then displayed in the results buffer, so you can filter and 344 | fine-grain as usual to come with the replace command you wish. Maybe 345 | replace all the occurences of "Vim" with "Emacs" in notes with the 346 | keyword "programming" but not in notes with the keyword "personal", 347 | and only in files which mention "GNU"? The sky is the limit! 348 | 349 | * Customization 350 | 351 | Although ~denote-search~ is designed to be simple and require no 352 | special configuration, some options are available. 353 | 354 | ** Format of headings 355 | 356 | By default, ~denote-search~ uses the pretty title found in the 357 | front-matter to format note headings in the results buffer. This is 358 | pleasent to the eye and shouldn't impact performance (the bottleneck 359 | is always the search itself). 360 | 361 | #+vindex: denote-search-format-heading-function 362 | You can change how headings are formatted by customizing the 363 | ~denote-search-format-heading-function~ variable. It must be set to a 364 | function which takes a single argument, the file path, and returns the 365 | desired string for the heading. 366 | 367 | #+findex: denote-search-extract-title 368 | #+vindex: denote-search-untitled-string 369 | By default, ~denote-search-extract-title~ is used, which produces the 370 | aforementioned behaviour. If it fails to find a suitable title for a 371 | note, it uses the value of ~denote-search-untitled-string~. You can 372 | customize that, as well. 373 | 374 | #+findex: denote-search-format-heading-with-keywords 375 | This package also offers an alternative function, called 376 | ~denote-search-format-heading-with-keywords~. If used as the heading 377 | formatter, it adds keywords to the file title. This isn't the default 378 | merely to not clutter the view, but many users may prefer it. 379 | 380 | You can write custom functions to display pretty much everything you 381 | want in the headings. Just keep in mind that the function is called 382 | for every single matched file, so for large collection of notes, it 383 | can indeed impact performance if you use complex code. 384 | 385 | ** Other options 386 | 387 | #+vindex: denote-search-buffer-name 388 | You can customize the name of the buffer where results are put using 389 | the variable ~denote-search-buffer-name~. 390 | 391 | #+vindex: denote-search-help-string 392 | By default, the results buffer has a header line which displays 393 | information about the search and a short help string. Once you know 394 | the commands by heart, you can set the variable 395 | ~denote-search-help-string~ to nil or a void string to disable the 396 | help. 397 | 398 | * Working with silos 399 | 400 | If silos (see [[info:denote#Maintain separate directory silos for notes][denote#Maintain separate directory silos for notes]]) are 401 | set up correctly (that is, with a =.dir-locals.el= file that sets a 402 | value for ~denote-directory~), then ~denote-search~ should correctly 403 | search in the contents of the silo when inside of it, without 404 | additional configuration. 405 | 406 | * Installation 407 | 408 | ** GNU ELPA package 409 | 410 | The package is available as denote-search. Simply do: 411 | 412 | : M-x package-refresh-contents 413 | : M-x package-install 414 | 415 | And search for it. 416 | 417 | ** VC installation 418 | 419 | You can install the package from source by evaluating the following 420 | code: 421 | 422 | #+begin_src elisp 423 | (package-vc-install 424 | '(denote-search 425 | :url "https://github.com/lmq-10/denote-search" 426 | :doc "README.org")) 427 | #+end_src 428 | 429 | Alternatively, you can use the :vc keyword from use-package. 430 | 431 | ** Manual installation 432 | :PROPERTIES: 433 | :CUSTOM_ID: manual-installation 434 | :END: 435 | 436 | Assuming your Emacs files are found in =~/.emacs.d/=, execute the 437 | following commands in a shell prompt: 438 | 439 | #+begin_src sh 440 | cd ~/.emacs.d 441 | 442 | # Create a directory for manually-installed packages 443 | mkdir manual-packages 444 | 445 | # Go to the new directory 446 | cd manual-packages 447 | 448 | # Clone this repo, naming it "denote-search" 449 | git clone https://github.com/lmq-10/denote-search denote-search 450 | #+end_src 451 | 452 | Finally, in your =init.el= (or equivalent) evaluate this: 453 | 454 | #+begin_src emacs-lisp 455 | ;; Make Elisp files in that directory available to the user. 456 | (add-to-list 'load-path "~/.emacs.d/manual-packages/denote-search") 457 | #+end_src 458 | 459 | Everything is in place to set up the package. 460 | 461 | * Sample configuration 462 | :PROPERTIES: 463 | :CUSTOM_ID: sample-configuration 464 | :END: 465 | 466 | #+begin_src elisp 467 | (use-package denote-search 468 | :ensure t 469 | :bind 470 | ;; Customize keybindings to your liking 471 | (("C-c s s" . denote-search) 472 | ("C-c s d" . denote-search-marked-dired-files) 473 | ("C-c s r" . denote-search-files-referenced-in-region)) 474 | :custom 475 | ;; Disable help string (set it once you learn the commands) 476 | ;; (denote-search-help-string "") 477 | ;; Display keywords in results buffer 478 | (denote-search-format-heading-function #'denote-search-format-heading-with-keywords)) 479 | #+end_src 480 | 481 | * Troubleshooting 482 | 483 | Fixes for some common issues. 484 | 485 | ** Search is slow 486 | 487 | Search is not managed by ~denote-search~, but rather by ~xref~. Check 488 | the value of ~xref-search-program~. Changing it to =ripgrep= (after 489 | installing it of course) can improve the speed. 490 | 491 | * Acknowledgements 492 | 493 | ~denote-search~, just like Denote itself, is meant to be a collective 494 | effort. Every bit of help matters. 495 | 496 | + Author/maintainer :: Lucas Quintana. 497 | 498 | + Contributions to code :: Grant Rettke, Philip Kaludercic. 499 | 500 | If ~denote-search~ exists it's because Protesilaos Stavrou developed 501 | the incredible Denote package. Please consider donating to him.[fn:2] 502 | 503 | I also want to thank Richard Stallman (creator of GNU Emacs), Po Lu 504 | (who ported it to Android, allowing me to write the first version of 505 | ~denote-search~) and Hiraoka Kazuyuki (author of Howm, from which this 506 | package borrows some ideas). This wouldn't be possible without them, 507 | either. 508 | 509 | * GNU Free Documentation License 510 | :PROPERTIES: 511 | :APPENDIX: t 512 | :END: 513 | 514 | #+texinfo: @include doclicense.texi 515 | 516 | #+begin_export html 517 |
 518 | 
 519 |                 GNU Free Documentation License
 520 |                  Version 1.3, 3 November 2008
 521 | 
 522 | 
 523 |  Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
 524 |      
 525 |  Everyone is permitted to copy and distribute verbatim copies
 526 |  of this license document, but changing it is not allowed.
 527 | 
 528 | 0. PREAMBLE
 529 | 
 530 | The purpose of this License is to make a manual, textbook, or other
 531 | functional and useful document "free" in the sense of freedom: to
 532 | assure everyone the effective freedom to copy and redistribute it,
 533 | with or without modifying it, either commercially or noncommercially.
 534 | Secondarily, this License preserves for the author and publisher a way
 535 | to get credit for their work, while not being considered responsible
 536 | for modifications made by others.
 537 | 
 538 | This License is a kind of "copyleft", which means that derivative
 539 | works of the document must themselves be free in the same sense.  It
 540 | complements the GNU General Public License, which is a copyleft
 541 | license designed for free software.
 542 | 
 543 | We have designed this License in order to use it for manuals for free
 544 | software, because free software needs free documentation: a free
 545 | program should come with manuals providing the same freedoms that the
 546 | software does.  But this License is not limited to software manuals;
 547 | it can be used for any textual work, regardless of subject matter or
 548 | whether it is published as a printed book.  We recommend this License
 549 | principally for works whose purpose is instruction or reference.
 550 | 
 551 | 
 552 | 1. APPLICABILITY AND DEFINITIONS
 553 | 
 554 | This License applies to any manual or other work, in any medium, that
 555 | contains a notice placed by the copyright holder saying it can be
 556 | distributed under the terms of this License.  Such a notice grants a
 557 | world-wide, royalty-free license, unlimited in duration, to use that
 558 | work under the conditions stated herein.  The "Document", below,
 559 | refers to any such manual or work.  Any member of the public is a
 560 | licensee, and is addressed as "you".  You accept the license if you
 561 | copy, modify or distribute the work in a way requiring permission
 562 | under copyright law.
 563 | 
 564 | A "Modified Version" of the Document means any work containing the
 565 | Document or a portion of it, either copied verbatim, or with
 566 | modifications and/or translated into another language.
 567 | 
 568 | A "Secondary Section" is a named appendix or a front-matter section of
 569 | the Document that deals exclusively with the relationship of the
 570 | publishers or authors of the Document to the Document's overall
 571 | subject (or to related matters) and contains nothing that could fall
 572 | directly within that overall subject.  (Thus, if the Document is in
 573 | part a textbook of mathematics, a Secondary Section may not explain
 574 | any mathematics.)  The relationship could be a matter of historical
 575 | connection with the subject or with related matters, or of legal,
 576 | commercial, philosophical, ethical or political position regarding
 577 | them.
 578 | 
 579 | The "Invariant Sections" are certain Secondary Sections whose titles
 580 | are designated, as being those of Invariant Sections, in the notice
 581 | that says that the Document is released under this License.  If a
 582 | section does not fit the above definition of Secondary then it is not
 583 | allowed to be designated as Invariant.  The Document may contain zero
 584 | Invariant Sections.  If the Document does not identify any Invariant
 585 | Sections then there are none.
 586 | 
 587 | The "Cover Texts" are certain short passages of text that are listed,
 588 | as Front-Cover Texts or Back-Cover Texts, in the notice that says that
 589 | the Document is released under this License.  A Front-Cover Text may
 590 | be at most 5 words, and a Back-Cover Text may be at most 25 words.
 591 | 
 592 | A "Transparent" copy of the Document means a machine-readable copy,
 593 | represented in a format whose specification is available to the
 594 | general public, that is suitable for revising the document
 595 | straightforwardly with generic text editors or (for images composed of
 596 | pixels) generic paint programs or (for drawings) some widely available
 597 | drawing editor, and that is suitable for input to text formatters or
 598 | for automatic translation to a variety of formats suitable for input
 599 | to text formatters.  A copy made in an otherwise Transparent file
 600 | format whose markup, or absence of markup, has been arranged to thwart
 601 | or discourage subsequent modification by readers is not Transparent.
 602 | An image format is not Transparent if used for any substantial amount
 603 | of text.  A copy that is not "Transparent" is called "Opaque".
 604 | 
 605 | Examples of suitable formats for Transparent copies include plain
 606 | ASCII without markup, Texinfo input format, LaTeX input format, SGML
 607 | or XML using a publicly available DTD, and standard-conforming simple
 608 | HTML, PostScript or PDF designed for human modification.  Examples of
 609 | transparent image formats include PNG, XCF and JPG.  Opaque formats
 610 | include proprietary formats that can be read and edited only by
 611 | proprietary word processors, SGML or XML for which the DTD and/or
 612 | processing tools are not generally available, and the
 613 | machine-generated HTML, PostScript or PDF produced by some word
 614 | processors for output purposes only.
 615 | 
 616 | The "Title Page" means, for a printed book, the title page itself,
 617 | plus such following pages as are needed to hold, legibly, the material
 618 | this License requires to appear in the title page.  For works in
 619 | formats which do not have any title page as such, "Title Page" means
 620 | the text near the most prominent appearance of the work's title,
 621 | preceding the beginning of the body of the text.
 622 | 
 623 | The "publisher" means any person or entity that distributes copies of
 624 | the Document to the public.
 625 | 
 626 | A section "Entitled XYZ" means a named subunit of the Document whose
 627 | title either is precisely XYZ or contains XYZ in parentheses following
 628 | text that translates XYZ in another language.  (Here XYZ stands for a
 629 | specific section name mentioned below, such as "Acknowledgements",
 630 | "Dedications", "Endorsements", or "History".)  To "Preserve the Title"
 631 | of such a section when you modify the Document means that it remains a
 632 | section "Entitled XYZ" according to this definition.
 633 | 
 634 | The Document may include Warranty Disclaimers next to the notice which
 635 | states that this License applies to the Document.  These Warranty
 636 | Disclaimers are considered to be included by reference in this
 637 | License, but only as regards disclaiming warranties: any other
 638 | implication that these Warranty Disclaimers may have is void and has
 639 | no effect on the meaning of this License.
 640 | 
 641 | 2. VERBATIM COPYING
 642 | 
 643 | You may copy and distribute the Document in any medium, either
 644 | commercially or noncommercially, provided that this License, the
 645 | copyright notices, and the license notice saying this License applies
 646 | to the Document are reproduced in all copies, and that you add no
 647 | other conditions whatsoever to those of this License.  You may not use
 648 | technical measures to obstruct or control the reading or further
 649 | copying of the copies you make or distribute.  However, you may accept
 650 | compensation in exchange for copies.  If you distribute a large enough
 651 | number of copies you must also follow the conditions in section 3.
 652 | 
 653 | You may also lend copies, under the same conditions stated above, and
 654 | you may publicly display copies.
 655 | 
 656 | 
 657 | 3. COPYING IN QUANTITY
 658 | 
 659 | If you publish printed copies (or copies in media that commonly have
 660 | printed covers) of the Document, numbering more than 100, and the
 661 | Document's license notice requires Cover Texts, you must enclose the
 662 | copies in covers that carry, clearly and legibly, all these Cover
 663 | Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
 664 | the back cover.  Both covers must also clearly and legibly identify
 665 | you as the publisher of these copies.  The front cover must present
 666 | the full title with all words of the title equally prominent and
 667 | visible.  You may add other material on the covers in addition.
 668 | Copying with changes limited to the covers, as long as they preserve
 669 | the title of the Document and satisfy these conditions, can be treated
 670 | as verbatim copying in other respects.
 671 | 
 672 | If the required texts for either cover are too voluminous to fit
 673 | legibly, you should put the first ones listed (as many as fit
 674 | reasonably) on the actual cover, and continue the rest onto adjacent
 675 | pages.
 676 | 
 677 | If you publish or distribute Opaque copies of the Document numbering
 678 | more than 100, you must either include a machine-readable Transparent
 679 | copy along with each Opaque copy, or state in or with each Opaque copy
 680 | a computer-network location from which the general network-using
 681 | public has access to download using public-standard network protocols
 682 | a complete Transparent copy of the Document, free of added material.
 683 | If you use the latter option, you must take reasonably prudent steps,
 684 | when you begin distribution of Opaque copies in quantity, to ensure
 685 | that this Transparent copy will remain thus accessible at the stated
 686 | location until at least one year after the last time you distribute an
 687 | Opaque copy (directly or through your agents or retailers) of that
 688 | edition to the public.
 689 | 
 690 | It is requested, but not required, that you contact the authors of the
 691 | Document well before redistributing any large number of copies, to
 692 | give them a chance to provide you with an updated version of the
 693 | Document.
 694 | 
 695 | 
 696 | 4. MODIFICATIONS
 697 | 
 698 | You may copy and distribute a Modified Version of the Document under
 699 | the conditions of sections 2 and 3 above, provided that you release
 700 | the Modified Version under precisely this License, with the Modified
 701 | Version filling the role of the Document, thus licensing distribution
 702 | and modification of the Modified Version to whoever possesses a copy
 703 | of it.  In addition, you must do these things in the Modified Version:
 704 | 
 705 | A. Use in the Title Page (and on the covers, if any) a title distinct
 706 |    from that of the Document, and from those of previous versions
 707 |    (which should, if there were any, be listed in the History section
 708 |    of the Document).  You may use the same title as a previous version
 709 |    if the original publisher of that version gives permission.
 710 | B. List on the Title Page, as authors, one or more persons or entities
 711 |    responsible for authorship of the modifications in the Modified
 712 |    Version, together with at least five of the principal authors of the
 713 |    Document (all of its principal authors, if it has fewer than five),
 714 |    unless they release you from this requirement.
 715 | C. State on the Title page the name of the publisher of the
 716 |    Modified Version, as the publisher.
 717 | D. Preserve all the copyright notices of the Document.
 718 | E. Add an appropriate copyright notice for your modifications
 719 |    adjacent to the other copyright notices.
 720 | F. Include, immediately after the copyright notices, a license notice
 721 |    giving the public permission to use the Modified Version under the
 722 |    terms of this License, in the form shown in the Addendum below.
 723 | G. Preserve in that license notice the full lists of Invariant Sections
 724 |    and required Cover Texts given in the Document's license notice.
 725 | H. Include an unaltered copy of this License.
 726 | I. Preserve the section Entitled "History", Preserve its Title, and add
 727 |    to it an item stating at least the title, year, new authors, and
 728 |    publisher of the Modified Version as given on the Title Page.  If
 729 |    there is no section Entitled "History" in the Document, create one
 730 |    stating the title, year, authors, and publisher of the Document as
 731 |    given on its Title Page, then add an item describing the Modified
 732 |    Version as stated in the previous sentence.
 733 | J. Preserve the network location, if any, given in the Document for
 734 |    public access to a Transparent copy of the Document, and likewise
 735 |    the network locations given in the Document for previous versions
 736 |    it was based on.  These may be placed in the "History" section.
 737 |    You may omit a network location for a work that was published at
 738 |    least four years before the Document itself, or if the original
 739 |    publisher of the version it refers to gives permission.
 740 | K. For any section Entitled "Acknowledgements" or "Dedications",
 741 |    Preserve the Title of the section, and preserve in the section all
 742 |    the substance and tone of each of the contributor acknowledgements
 743 |    and/or dedications given therein.
 744 | L. Preserve all the Invariant Sections of the Document,
 745 |    unaltered in their text and in their titles.  Section numbers
 746 |    or the equivalent are not considered part of the section titles.
 747 | M. Delete any section Entitled "Endorsements".  Such a section
 748 |    may not be included in the Modified Version.
 749 | N. Do not retitle any existing section to be Entitled "Endorsements"
 750 |    or to conflict in title with any Invariant Section.
 751 | O. Preserve any Warranty Disclaimers.
 752 | 
 753 | If the Modified Version includes new front-matter sections or
 754 | appendices that qualify as Secondary Sections and contain no material
 755 | copied from the Document, you may at your option designate some or all
 756 | of these sections as invariant.  To do this, add their titles to the
 757 | list of Invariant Sections in the Modified Version's license notice.
 758 | These titles must be distinct from any other section titles.
 759 | 
 760 | You may add a section Entitled "Endorsements", provided it contains
 761 | nothing but endorsements of your Modified Version by various
 762 | parties--for example, statements of peer review or that the text has
 763 | been approved by an organization as the authoritative definition of a
 764 | standard.
 765 | 
 766 | You may add a passage of up to five words as a Front-Cover Text, and a
 767 | passage of up to 25 words as a Back-Cover Text, to the end of the list
 768 | of Cover Texts in the Modified Version.  Only one passage of
 769 | Front-Cover Text and one of Back-Cover Text may be added by (or
 770 | through arrangements made by) any one entity.  If the Document already
 771 | includes a cover text for the same cover, previously added by you or
 772 | by arrangement made by the same entity you are acting on behalf of,
 773 | you may not add another; but you may replace the old one, on explicit
 774 | permission from the previous publisher that added the old one.
 775 | 
 776 | The author(s) and publisher(s) of the Document do not by this License
 777 | give permission to use their names for publicity for or to assert or
 778 | imply endorsement of any Modified Version.
 779 | 
 780 | 
 781 | 5. COMBINING DOCUMENTS
 782 | 
 783 | You may combine the Document with other documents released under this
 784 | License, under the terms defined in section 4 above for modified
 785 | versions, provided that you include in the combination all of the
 786 | Invariant Sections of all of the original documents, unmodified, and
 787 | list them all as Invariant Sections of your combined work in its
 788 | license notice, and that you preserve all their Warranty Disclaimers.
 789 | 
 790 | The combined work need only contain one copy of this License, and
 791 | multiple identical Invariant Sections may be replaced with a single
 792 | copy.  If there are multiple Invariant Sections with the same name but
 793 | different contents, make the title of each such section unique by
 794 | adding at the end of it, in parentheses, the name of the original
 795 | author or publisher of that section if known, or else a unique number.
 796 | Make the same adjustment to the section titles in the list of
 797 | Invariant Sections in the license notice of the combined work.
 798 | 
 799 | In the combination, you must combine any sections Entitled "History"
 800 | in the various original documents, forming one section Entitled
 801 | "History"; likewise combine any sections Entitled "Acknowledgements",
 802 | and any sections Entitled "Dedications".  You must delete all sections
 803 | Entitled "Endorsements".
 804 | 
 805 | 
 806 | 6. COLLECTIONS OF DOCUMENTS
 807 | 
 808 | You may make a collection consisting of the Document and other
 809 | documents released under this License, and replace the individual
 810 | copies of this License in the various documents with a single copy
 811 | that is included in the collection, provided that you follow the rules
 812 | of this License for verbatim copying of each of the documents in all
 813 | other respects.
 814 | 
 815 | You may extract a single document from such a collection, and
 816 | distribute it individually under this License, provided you insert a
 817 | copy of this License into the extracted document, and follow this
 818 | License in all other respects regarding verbatim copying of that
 819 | document.
 820 | 
 821 | 
 822 | 7. AGGREGATION WITH INDEPENDENT WORKS
 823 | 
 824 | A compilation of the Document or its derivatives with other separate
 825 | and independent documents or works, in or on a volume of a storage or
 826 | distribution medium, is called an "aggregate" if the copyright
 827 | resulting from the compilation is not used to limit the legal rights
 828 | of the compilation's users beyond what the individual works permit.
 829 | When the Document is included in an aggregate, this License does not
 830 | apply to the other works in the aggregate which are not themselves
 831 | derivative works of the Document.
 832 | 
 833 | If the Cover Text requirement of section 3 is applicable to these
 834 | copies of the Document, then if the Document is less than one half of
 835 | the entire aggregate, the Document's Cover Texts may be placed on
 836 | covers that bracket the Document within the aggregate, or the
 837 | electronic equivalent of covers if the Document is in electronic form.
 838 | Otherwise they must appear on printed covers that bracket the whole
 839 | aggregate.
 840 | 
 841 | 
 842 | 8. TRANSLATION
 843 | 
 844 | Translation is considered a kind of modification, so you may
 845 | distribute translations of the Document under the terms of section 4.
 846 | Replacing Invariant Sections with translations requires special
 847 | permission from their copyright holders, but you may include
 848 | translations of some or all Invariant Sections in addition to the
 849 | original versions of these Invariant Sections.  You may include a
 850 | translation of this License, and all the license notices in the
 851 | Document, and any Warranty Disclaimers, provided that you also include
 852 | the original English version of this License and the original versions
 853 | of those notices and disclaimers.  In case of a disagreement between
 854 | the translation and the original version of this License or a notice
 855 | or disclaimer, the original version will prevail.
 856 | 
 857 | If a section in the Document is Entitled "Acknowledgements",
 858 | "Dedications", or "History", the requirement (section 4) to Preserve
 859 | its Title (section 1) will typically require changing the actual
 860 | title.
 861 | 
 862 | 
 863 | 9. TERMINATION
 864 | 
 865 | You may not copy, modify, sublicense, or distribute the Document
 866 | except as expressly provided under this License.  Any attempt
 867 | otherwise to copy, modify, sublicense, or distribute it is void, and
 868 | will automatically terminate your rights under this License.
 869 | 
 870 | However, if you cease all violation of this License, then your license
 871 | from a particular copyright holder is reinstated (a) provisionally,
 872 | unless and until the copyright holder explicitly and finally
 873 | terminates your license, and (b) permanently, if the copyright holder
 874 | fails to notify you of the violation by some reasonable means prior to
 875 | 60 days after the cessation.
 876 | 
 877 | Moreover, your license from a particular copyright holder is
 878 | reinstated permanently if the copyright holder notifies you of the
 879 | violation by some reasonable means, this is the first time you have
 880 | received notice of violation of this License (for any work) from that
 881 | copyright holder, and you cure the violation prior to 30 days after
 882 | your receipt of the notice.
 883 | 
 884 | Termination of your rights under this section does not terminate the
 885 | licenses of parties who have received copies or rights from you under
 886 | this License.  If your rights have been terminated and not permanently
 887 | reinstated, receipt of a copy of some or all of the same material does
 888 | not give you any rights to use it.
 889 | 
 890 | 
 891 | 10. FUTURE REVISIONS OF THIS LICENSE
 892 | 
 893 | The Free Software Foundation may publish new, revised versions of the
 894 | GNU Free Documentation License from time to time.  Such new versions
 895 | will be similar in spirit to the present version, but may differ in
 896 | detail to address new problems or concerns.  See
 897 | https://www.gnu.org/licenses/.
 898 | 
 899 | Each version of the License is given a distinguishing version number.
 900 | If the Document specifies that a particular numbered version of this
 901 | License "or any later version" applies to it, you have the option of
 902 | following the terms and conditions either of that specified version or
 903 | of any later version that has been published (not as a draft) by the
 904 | Free Software Foundation.  If the Document does not specify a version
 905 | number of this License, you may choose any version ever published (not
 906 | as a draft) by the Free Software Foundation.  If the Document
 907 | specifies that a proxy can decide which future versions of this
 908 | License can be used, that proxy's public statement of acceptance of a
 909 | version permanently authorizes you to choose that version for the
 910 | Document.
 911 | 
 912 | 11. RELICENSING
 913 | 
 914 | "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
 915 | World Wide Web server that publishes copyrightable works and also
 916 | provides prominent facilities for anybody to edit those works.  A
 917 | public wiki that anybody can edit is an example of such a server.  A
 918 | "Massive Multiauthor Collaboration" (or "MMC") contained in the site
 919 | means any set of copyrightable works thus published on the MMC site.
 920 | 
 921 | "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
 922 | license published by Creative Commons Corporation, a not-for-profit
 923 | corporation with a principal place of business in San Francisco,
 924 | California, as well as future copyleft versions of that license
 925 | published by that same organization.
 926 | 
 927 | "Incorporate" means to publish or republish a Document, in whole or in
 928 | part, as part of another Document.
 929 | 
 930 | An MMC is "eligible for relicensing" if it is licensed under this
 931 | License, and if all works that were first published under this License
 932 | somewhere other than this MMC, and subsequently incorporated in whole or
 933 | in part into the MMC, (1) had no cover texts or invariant sections, and
 934 | (2) were thus incorporated prior to November 1, 2008.
 935 | 
 936 | The operator of an MMC Site may republish an MMC contained in the site
 937 | under CC-BY-SA on the same site at any time before August 1, 2009,
 938 | provided the MMC is eligible for relicensing.
 939 | 
 940 | 
 941 | ADDENDUM: How to use this License for your documents
 942 | 
 943 | To use this License in a document you have written, include a copy of
 944 | the License in the document and put the following copyright and
 945 | license notices just after the title page:
 946 | 
 947 |     Copyright (c)  YEAR  YOUR NAME.
 948 |     Permission is granted to copy, distribute and/or modify this document
 949 |     under the terms of the GNU Free Documentation License, Version 1.3
 950 |     or any later version published by the Free Software Foundation;
 951 |     with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
 952 |     A copy of the license is included in the section entitled "GNU
 953 |     Free Documentation License".
 954 | 
 955 | If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
 956 | replace the "with...Texts." line with this:
 957 | 
 958 |     with the Invariant Sections being LIST THEIR TITLES, with the
 959 |     Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
 960 | 
 961 | If you have Invariant Sections without Cover Texts, or some other
 962 | combination of the three, merge those two alternatives to suit the
 963 | situation.
 964 | 
 965 | If your document contains nontrivial examples of program code, we
 966 | recommend releasing these examples in parallel under your choice of
 967 | free software license, such as the GNU General Public License,
 968 | to permit their use in free software.
 969 | 
970 | #+end_export 971 | 972 | #+html: 994 | 995 | * Footnotes 996 | [fn:3] You'll probably bind ~denote-search~ to something comfortable, see [[#sample-configuration][Sample configuration]] 997 | 998 | [fn:1] https://kaorahi.github.io/howm/ 999 | 1000 | [fn:2] https://protesilaos.com/donations/ 1001 | --------------------------------------------------------------------------------