dajva / rg.el

Emacs search tool based on ripgrep
https://rgel.readthedocs.io
GNU General Public License v3.0
471 stars 38 forks source link

rg failing (wrong-number-of-arguments (1 . 1) 2) #116

Closed CsBigDataHub closed 3 years ago

CsBigDataHub commented 3 years ago

error when using rg-menu

Debugger entered--Lisp error: (wrong-number-of-arguments (1 . 1) 2)
  generate-new-buffer(" *temp*" t)
  rg-run("company-backends" "elisp" "/Users/mymac/.emacs.d/lisp/" t nil nil)
  rg-dwim-current-dir()
  funcall-interactively(rg-dwim-current-dir)
  call-interactively(rg-dwim-current-dir)
  rg-dwim-current-dir--transient()
  funcall-interactively(rg-dwim-current-dir--transient)
  call-interactively(rg-dwim-current-dir--transient nil nil)
  #f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\nOptional second arg RECORD-FLAG non-nil\nmeans unconditionally put this command in the variable `command-history'.\nOtherwise, that is done only if an arg is read using the minibuffer.\nThe argument KEYS specifies the value to use instead of (this-command-keys)\nwhen reading the arguments; if it is nil, (this-command-keys) is used.\nThe argument SPECIAL, if non-nil, means that this command is executing\na special event, so ignore the prefix argument and don't clear it." #<bytecode 0x446f220f>)(rg-dwim-current-dir--transient nil nil nil)
  ad-Advice-command-execute(#f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\nOptional second arg RECORD-FLAG non-nil\nmeans unconditionally put this command in the variable `command-history'.\nOtherwise, that is done only if an arg is read using the minibuffer.\nThe argument KEYS specifies the value to use instead of (this-command-keys)\nwhen reading the arguments; if it is nil, (this-command-keys) is used.\nThe argument SPECIAL, if non-nil, means that this command is executing\na special event, so ignore the prefix argument and don't clear it." #<bytecode 0x446f220f>) rg-dwim-current-dir--transient)
  apply(ad-Advice-command-execute #f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\nOptional second arg RECORD-FLAG non-nil\nmeans unconditionally put this command in the variable `command-history'.\nOtherwise, that is done only if an arg is read using the minibuffer.\nThe argument KEYS specifies the value to use instead of (this-command-keys)\nwhen reading the arguments; if it is nil, (this-command-keys) is used.\nThe argument SPECIAL, if non-nil, means that this command is executing\na special event, so ignore the prefix argument and don't clear it." #<bytecode 0x446f220f>) rg-dwim-current-dir--transient)
  command-execute(rg-dwim-current-dir--transient)

OS : Mac rg.el version : rg-20210217.1905 ripgrep version : 12.1.1 emacs version : 27.1 transient version: transient-20210221.2251

dajva commented 3 years ago

Can you reproduce this in a clean emacs without user files?

On linux I would do something like this:

$ mkdir /tmp/user-emacs
$ HOME=/tmp/user-emacs emacs

And then evaluate this in scratch buffer:

(package-initialize)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
(package-refresh-contents)
(package-install 'rg)
(rg-menu)
CsBigDataHub commented 3 years ago

Thanks @dajva , rg-menu working fine with clean environment and user config with the versions below. rg-20210227.1113 transient-20210228.1207