Function: denote-query-contents-link

denote-query-contents-link is an autoloaded, interactive and byte-compiled function defined in denote.el.

Signature

(denote-query-contents-link QUERY)

Documentation

Insert query link for file contents.

Prompt for QUERY or use the text of the active region. When the user follows this link, place any matches in a separate buffer (using the built-in Xref mechanism). This is the equivalent of a Unix grep command across the variable denote-directory(var)/denote-directory(fun).

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
;;;###autoload
(defun denote-query-contents-link (query)
  "Insert query link for file contents.
Prompt for QUERY or use the text of the active region.  When the user
follows this link, place any matches in a separate buffer (using the
built-in Xref mechanism).  This is the equivalent of a Unix grep command
across the variable `denote-directory'."
  (interactive
   (list
    (or (denote--get-active-region-content)
        (denote-query-link-prompt nil "Query in file CONTENTS"))))
  (unless (or (denote--file-type-org-extra-p)
              (and buffer-file-name (denote-file-has-supported-extension-p buffer-file-name)))
    (user-error "The current file type is not recognized by Denote"))
  (denote--delete-active-region-content)
  (insert (denote--format-query-link 'query-contents query (denote-filetype-heuristics buffer-file-name))))