dev: merge branch 'master' into emenel
This commit is contained in:
commit
e9b11dc6f4
22 changed files with 226 additions and 126 deletions
|
@ -211,6 +211,21 @@ results buffer.")
|
|||
(when (stringp counsel-rg-base-command)
|
||||
(setq counsel-rg-base-command (split-string counsel-rg-base-command)))
|
||||
|
||||
;; REVIEW: See abo-abo/swiper#2339.
|
||||
(defadvice! +counsel-rg-suppress-error-code-a (fn &rest args)
|
||||
"Ripgrep returns a non-zero exit code if it encounters any trouble (e.g. you
|
||||
don't have the needed permissions for a couple files/directories in a project).
|
||||
Even if rg continues to produce workable results, that non-zero exit code causes
|
||||
counsel-rg to discard the rest of the output to display an error.
|
||||
|
||||
This advice suppresses the error code, so you can still operate on whatever
|
||||
workable results ripgrep produces, despite the error."
|
||||
:around #'counsel-rg
|
||||
(letf! (defun process-exit-status (proc)
|
||||
(let ((code (funcall process-exit-status proc)))
|
||||
(if (= code 2) 0 code)))
|
||||
(apply fn args)))
|
||||
|
||||
;; Integrate with `helpful'
|
||||
(setq counsel-describe-function-function #'helpful-callable
|
||||
counsel-describe-variable-function #'helpful-variable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue