Interact with the links buffer
Denote commands, such as denote-grep, denote-backlinks, and denote-query-contents-link, produce an Xref buffer with search results (Speed up backlinks’ or query links’ buffer creation?). Matching lines are grouped by the file name they belong to. File names are formatted according to the function bound to the user option denote-query-format-heading-function. By default, file names are rendered relative to the denote-directory.
This buffer uses the major mode denote-query-mode. It binds commands to keys in the denote-query-mode-map. Those allow users to filter the output of the last search. Here, “last search” refers to the list of files that were returned by whichever command produced the buffer (e.g. the last denote-grep).
denote-query-focus-last-search
Perform a search in the contents of files that were matched by the last search.
denote-query-exclude-files
Exclude files from the last search whose name matches the given input.
denote-query-only-include-files
Only keep files from the last search whose name matches the given input.
denote-query-exclude-files-with-keywords
Exclude files from the last search whose name includes the given keywords.
denote-query-only-include-files-with-keywords
Only keep files from the last search whose name includes the given keywords.
denote-query-clear-all-filters
Clear all the applied filters.
denote-query-sort-last-search
Change the sorting of files from the last search. The user option denote-query-sorting controlls the default sort (Control the default sort of a query buffer).
Remember that these are easy to use even without knowledge of regular expressions, thanks to the efficiency of the Denote file-naming scheme (Features of the file-naming scheme for searching or filtering). For instance, to exclude notes with the keyword ‘philosophy’ from current search buffer, use denote-query-exclude-files and then type ‘_philosophy’ as your input.
In addition to those filtering options, the denote-query-mode also allows provides an outline mechanism to hide or show the matches as these are grouped per file. There also are some of the default actions provided by the Xref infrastructure. Users can do ‘M-x describe-mode’ (‘C-h m’ with default key bindings) to learn about all the actions they can perform.