aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2021-03-09 18:08:38 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2021-03-09 18:08:38 +0000
commit5d625c806871b9392e39d01f5592e22504ceae03 (patch)
treea3d8b03a948ca7244f6fbb4de852e029e967a275 /Emacs/.config/emacs
parent11764288885e2802c41df6cca9f1cb161222760a (diff)
downloaddotfiles-5d625c806871b9392e39d01f5592e22504ceae03.tar.gz
dotfiles-5d625c806871b9392e39d01f5592e22504ceae03.tar.bz2
dotfiles-5d625c806871b9392e39d01f5592e22504ceae03.zip
(Emacs)+rg.el command to search in new frame
rg.el uses the compilation system to manage and display results (similar to the *grep family of functions in Emacs). I'd like to be able to search in a separate frame (making that a 'searcher' frame) instead of the current frame sometimes, so make a command that does that for me.
Diffstat (limited to 'Emacs/.config/emacs')
-rw-r--r--Emacs/.config/emacs/config.org13
1 files changed, 11 insertions, 2 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org
index f22e5a4..326791f 100644
--- a/Emacs/.config/emacs/config.org
+++ b/Emacs/.config/emacs/config.org
@@ -1069,8 +1069,11 @@ most repositories nowadays.
*** rg
#+begin_src emacs-lisp
(use-package rg
+ :commands (+rg/search-in-new-frame)
:general
- (leader "sr" #'rg)
+ (leader
+ "sr" #'rg
+ "sR" #'+rg/search-in-new-frame)
(:keymaps 'rg-mode-map
"]]" #'rg-next-file
"[[" #'rg-prev-file
@@ -1082,7 +1085,13 @@ most repositories nowadays.
rg-show-header t
rg-custom-type-aliases nil
rg-default-alias-fallback "all"
- rg-buffer-name "*ripgrep*"))
+ rg-buffer-name "*ripgrep*")
+ :config
+ (defun +rg/search-in-new-frame ()
+ (interactive)
+ (let ((frame (make-frame)))
+ (select-frame frame)
+ (call-interactively #'rg))))
#+end_src
* Applications
** Dashboard