Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refile fails within org-rifle #45

Open
epichub opened this issue Jan 15, 2020 · 2 comments
Open

Refile fails within org-rifle #45

epichub opened this issue Jan 15, 2020 · 2 comments

Comments

@epichub
Copy link

epichub commented Jan 15, 2020

I use helm-rifle to search and then mark heading then press "C-c C-w" to refile then I get this error message:

funcall-interactively: Wrong number of arguments: #[(candidate) "�\211�\211�\211A�\242�
�r�q\210b\210\305 -\207" [candidate input0 --dash-source-292-- buffer pos org-refile] 3 ("/home/epic/.emacs.d/elpa/develop/helm-org-rifle-20190809.1831/helm-org-rifle.elc" . 34399) nil], 0

I am running spacemacs develop. I also tested this on my coworkers emacs (also running spacemacs but with different config) with the same result.

This also happens if I mark one, mark several, mark none but have the cursor over one entry, all resulting in the same error message.

I would love to debug this myself, but I am not well versed in elisp debugging (or coding) - I have programmed lots of Java. python etc.. How do i set the debugger so that I can see what fails?

@alphapapa
Copy link
Owner

Hi,

Thanks for reporting. I don't use this feature often, so I'm not as likely to notice if something breaks. It's possible that a change in Helm or in Org has caused this.

I would be glad if you could help debug it! Here's what I'd suggest:

  1. The error you showed involves a byte-compiled function. You should get a more useful error if the function isn't byte-compiled. So open helm-org-rifle.el and eval-buffer it, then do the action again.
  2. Use toggle-debug-on-error to enable a full backtrace.

Together, that will probably be enough to locate the problem. If not, you can try using Edebug. Edebug is powerful but complicated. It's thoroughly described in the manual, but the simplest way to use it is:

  1. In the source code buffer, put point on or in a function you want to debug.
  2. C-u C-M-x for edebug-defun.
  3. Perform the action that runs the code. Execution will stop when reaching the debugged function. You can then step through it with n, SPC, o, g, etc, and q to exit.

However, note that debugging within Helm sessions can be tricky because of changing buffers, windows, etc. Sometimes it's necessary to C-g here or there, change the active window, etc. to exit the debugging session and restore control flow. I got the hang of it after a while, but it's hard to explain, more like a learned intuition. So in some cases, it may be easier to use old-fashioned message calls for debugging than Edebug.

BTW, I'd recommend doing the debugging first in a clean config. You can easily use https://github.com/alphapapa/makem.sh to set one up (I haven't added that script to this package yet). For example:

$ cp ../makem.sh/makem.sh .
$ mkdir sandbox
$ ./makem.sh --sandbox-dir sandbox --auto-install interactive

That will install the latest version of all dependencies (except Org, which you will need to update manually if you want a newer version) into a new, permanent sandbox directory and launch an interactive Emacs session with helm-org-rifle already loaded from the local repo. Then you can proceed with debugging it without local configuration getting in the way.

@Hurricos
Copy link

Hi there,

This is still an issue. I'll help debug if I find time -- my error is:

funcall-interactively: Wrong number of arguments: #[(candidate) "������A�¢�
�r�q�b�Š-�" [candidate input0 --dash-source-3-- buffer pos org-refile] 3 ("/home/mkennedy/.emacs.d/elpa/helm-org-rifle-20200512.1943/helm-org-rifle.elc" . 34384) nil], 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants