Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jamescherti/901ea7aa68f2051914e20bddbeb53178 to your computer and use it in GitHub Desktop.
Save jamescherti/901ea7aa68f2051914e20bddbeb53178 to your computer and use it in GitHub Desktop.
;; Emacs Consult snippet: Exclude *.asc files from Consult Preview
;;
;; The purpose of excluding ".asc" files in this case is to prevent the preview feature
;; from triggering password prompts each time navigation occurs within the list of files
;; displayed by Emacs consult.
;; The default regex: (setq consult-preview-excluded-files ("\\`/[^/|:]+:"))
;;
;; Author: James Cherti
;; GitHub Gist: https://gist.github.com/jamescherti/901ea7aa68f2051914e20bddbeb53178
;; License: MIT
;; The change introduces a logical OR operator (\\|), extending the regex to include files
;; ending with the ".asc" extension:
(setq consult-preview-excluded-files '("\\`/[^/|:]+:\\|\\.asc\\'"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment