You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On my machine, the output of ag --version is: ag version 2.2.0 Features: +jit +lzma +zlib
My Emacs version is: GNU Emacs 29.4
I'm using: Ubuntu 22
I use ag-regexp for simple searches rather than the ag function. It would be convenient if ag-regexp used ag/read-from-minibuffer as ag does, so that the active region is used as a default search.
Perhaps:
(defun ag-regexp (string directory)
"Search using ag in a given DIRECTORY for a given regexp.
The regexp should be in PCRE syntax, not Emacs regexp
syntax. STRING defaults to the symbol under point.
If called with a prefix, prompts for flags to pass to ag."
(interactive (list (ag/read-from-minibuffer "Search string")
(read-directory-name "Directory: ")))
(ag/search string directory :regexp t))
One catch is that an active region returned by ag/read-from-minibuffer will not be escaped to guarantee a matching regex.
The text was updated successfully, but these errors were encountered:
On my machine, the output of
ag --version
is: ag version 2.2.0 Features: +jit +lzma +zlibMy Emacs version is: GNU Emacs 29.4
I'm using: Ubuntu 22
I use
ag-regexp
for simple searches rather than theag
function. It would be convenient ifag-regexp
usedag/read-from-minibuffer
asag
does, so that the active region is used as a default search.Perhaps:
One catch is that an active region returned by
ag/read-from-minibuffer
will not be escaped to guarantee a matching regex.The text was updated successfully, but these errors were encountered: