Skip to content

Instantly share code, notes, and snippets.

@rtrppl
Created October 7, 2024 05:47
Show Gist options
  • Save rtrppl/55f33429b89f40004aa3b5ed20751a03 to your computer and use it in GitHub Desktop.
Save rtrppl/55f33429b89f40004aa3b5ed20751a03 to your computer and use it in GitHub Desktop.
Combine orgrr-search and metasearch-search-set
(defun lt/combined-search ()
"Combines orgrr-search and metasearch-search-set."
(interactive)
(let ((search-query))
(if (region-active-p)
(setq search-query (buffer-substring-no-properties (region-beginning)(region-end)))
(setq search-query (read-from-minibuffer "Search: ")))
(orgrr-search '(4) search-query)
(metasearch-search-set "Search" search-query)))
(global-set-key (kbd "C-c d c") 'lt/combined-search)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment