I found a weird behaviour with rgrep
. The following is tested under emacs 26.3
with emacs -Q
.
- Evaluate
(rgrep "test" "*.org" "~/Org/wiki")
gives me astring-match("<C>" nil)
error:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("<C>" nil)
grep-expand-template(nil "test" "\\( -name \\*.org \\)" nil "-type d \\( -path \\*/SCCS -o -path \\*/RCS -o -path \\*/CVS -o -path \\*/MCVS -o -path \\*/.src -o -path \\*/.svn -o -path \\*/.git -o -path \\*/.hg -o -path \\*/.bzr -o -path \\*/_MTN -o -path \\*/_darcs -o -path \\*/\\{arch\\} \\) -prune -o \\! -type d \\( -name .\\#\\* -o -name \\*.pho -o -name \\*.phi -o -name \\*.glob -o -name \\*.vo -o -name \\*.o -o -name \\*\\~ -o -name \\*.bin -o -name \\*.lbin -o -name \\*.so -o -name \\*.a -o -name \\*.ln -o -name \\*.blg -o -name \\*.bbl -o -name \\*.elc -o -name \\*.lof -o -name \\*.glo -o -name \\*.idx -o -name \\*.lot -o -name \\*.fmt -o -name \\*.tfm -o -name \\*.class -o -name \\*.fas -o -name \\*.lib -o -name \\*.mem -o -name \\*.x86f -o -name \\*.sparcf -o -name \\*.dfsl -o -name \\*.pfsl -o -name \\*.d64fsl -o -name \\*.p64fsl -o -name \\*.lx64fsl -o -name \\*.lx32fsl -o -name \\*.dx64fsl -o -name \\*.dx32fsl -o -name \\*.fx64fsl -o -name \\*.fx32fsl -o -name \\*.sx64fsl -o -name \\*.sx32fsl -o -name \\*.wx64fsl -o -name \\*.wx32fsl -o -name \\*.fasl -o -name \\*.ufsl -o -name \\*.fsl -o -name \\*.dxl -o -name \\*.lo -o -name \\*.la -o -name \\*.gmo -o -name \\*.mo -o -name \\*.toc -o -name \\*.aux -o -name \\*.cp -o -name \\*.fn -o -name \\*.ky -o -name \\*.pg -o -name \\*.tp -o -name \\*.vr -o -name \\*.cps -o -name \\*.fns -o -name \\*.kys -o -name \\*.pgs -o -name \\*.tps -o -name \\*.vrs -o -name \\*.pyc -o -name \\*.pyo \\) -prune -o ")
rgrep-default-command("test" "*.org" nil)
rgrep("test" "*.org" "~/Org/wiki")
eval((rgrep "test" "*.org" "~/Org/wiki") nil)
eval-expression((rgrep "test" "*.org" "~/Org/wiki") nil nil 127)
funcall-interactively(eval-expression (rgrep "test" "*.org" "~/Org/wiki") nil nil 127)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
read-from-minibuffer("Eval: " nil (keymap (9 . completion-at-point) (27 keymap (9 . completion-at-point)) keymap (18 . counsel-minibuffer-history) (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the minibuffer") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuffer") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "\015" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . minibuffer-keyboard-quit) (C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous-history-element) (up . previous-line-or-history-element) (prior . previous-history-element) (XF86Forward . next-history-element) (down . next-line-or-history-element) (next . next-history-element) (27 keymap (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) t read-expression-history)
read--expression("Eval: ")
byte-code("\301\302!\303\010!B\207" [current-prefix-arg read--expression "Eval: " eval-expression-get-print-arguments] 3)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
- Then evaluate
(rgrep "test" "*.org")
gives the same error. - BUT evaluate
(rgrep "test")
works without any error. The most weird comes:
(rgrep "test" "*.org" "~/Org/wiki")
now works correctly.