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

"Error running timer" when using helm-org-ql #191

Closed
schoettl opened this issue Feb 13, 2021 · 14 comments
Closed

"Error running timer" when using helm-org-ql #191

schoettl opened this issue Feb 13, 2021 · 14 comments

Comments

@schoettl
Copy link

schoettl commented Feb 13, 2021

Sorry, I can't help myself with this error. I have it for months and package upgrades never helped.

grafik

Error running timer: (error "In ‘helm-org-ql’ source: ‘#[0 \\303	!\\304\\305 !�\\205%\0r\\306 q\\210\\300�)\\3071#\0\\310\\300�\\311\\312�D$0\\202%\0\\210\\313\\207 [my.org helm-pattern helm-org-ql-buffers-files org-ql--query-string-to-sexp window-width helm-window helm-buffer-get (error) org-ql-select :action helm-org-ql--heading nil] 8]’ 

Any ideas? Thank you!

@yantar92
Copy link
Contributor

See #185

@schoettl
Copy link
Author

Thanks @yantar92. I just checked. I don't see how this problem is related to the peg package?

I still updated the peg package manually by extracting the files from the peg tar file into ~/.emacs.d/elpa/peg-2015... and restarted emacs. But that didn't help.

@yantar92
Copy link
Contributor

yantar92 commented Feb 13, 2021

You need newer version of peg. Did you use https://elpa.gnu.org/packages/peg-1.0.tar?

@schoettl
Copy link
Author

That is the one I just downloaded and installed, according to #185

@yantar92
Copy link
Contributor

The version I mentioned does have with-peg-rules function. You may need to check your load-path to make sure that you load peg. Also, make sure that you do not have multiple versions of peg present in load-path at the same time.

@schoettl
Copy link
Author

How can I check if it's in load-path? The output of load-path is shortened but there are many packages listed that are next to peg (~/.emacs.d/elpa/...).

I have only one version of peg installed and that contains in peg.el:

(defmacro with-peg-rules (rules &rest body)
  "Make PEG rules RULES available within the scope of BODY.
RULES is a list of rules of the form (NAME . PEXS), where PEXS is a sequence
of PEG expressions, implicitly combined with `and'."
...

Why do you think it's a peg problem?

@yantar92
Copy link
Contributor

Why do you think it's a peg problem?

Your error message said "void-function with-peg-rules", which means that with-peg-rules is not defined. That was the case in old versions of peg, thus my earlier suggestion.

I have only one version of peg installed and that contains in peg.el:

If you have with-peg-rules defined, you may need to re-compile org-ql. This is because macros in Emacs must be defined at compile time. org-ql in your case was compiled against old version of peg. Now, you need to re-compile (or reinstall) org-ql to make it use the new version of peg.

@schoettl
Copy link
Author

Why do you think it's a peg problem?

Your error message said "void-function with-peg-rules", which means that with-peg-rules is not defined. That was the case in old versions of peg, thus my earlier suggestion.

I don't read/find the word "peg" in my error message?

@schoettl
Copy link
Author

Now, you need to re-compile (or reinstall) org-ql to make it use the new version of peg.

Thanks, good point, I deleted all org-ql folders, restarted emacs, and re-installed org-ql. It didn't help.

@yantar92
Copy link
Contributor

I don't read/find the word "peg" in my error message?

On the image

@yantar92
Copy link
Contributor

yantar92 commented Feb 13, 2021

Thanks, good point, I deleted all org-ql folders, restarted emacs, and re-installed org-ql. It didn't help.

This is odd. The best I can suggest then is trying to run M-: (require 'peg) <RET> after restarting Emacs but before you re-installing org-ql. Though it should not be needed.

You may also try to check if with-peg-rules macro is actually defined: <F1> f with-peg-rules <RET>

@schoettl
Copy link
Author

I don't read/find the word "peg" in my error message?

On the image

Oh, I overlooked the last line and didn't copy it from *Messages*. My bad!

I think, peg.elc was not automatically recompiled because of source files' timestamps when extracting from peg tar archive! Now I got it run without errors.

Thank you!

But now it works for a small test.org file but not for my bigger org files... the helm result buffer stays empty no matter what query I input. And the message buffer shows no errors, except on emacs startup:

Error loading autoloads: (file-missing Cannot open load file No such file or directory /home/jakob/.emacs.d/elpa/peg-1.0/peg-autoloads)

This folder doesn't exist but which package or init line needs it?

@yantar92
Copy link
Contributor

This folder doesn't exist but which package or init line needs it?

That's because you unpacked the package into peg-2015 folder, which is not expected place for the new version of the package. It supposed to be peg-1.0 (though, you may need to tweak load-path if you install the package manually).

But now it works for a small test.org file but not for my bigger org files... the helm result buffer stays empty no matter what query I input. And the message buffer shows no errors, except on emacs startup:

The query may just take really long time when you have too many matches. See #160. I suggested a speed up in #162, but it is not merged yet. If you want, you can try my fork with that merge request (and few other tweaks) in place https://github.com/yantar92/org-ql/

@schoettl
Copy link
Author

Alright, I use your fork now and it works. The result appear almost immediately. Thank you!

This folder doesn't exist but which package or init line needs it?

That's because you unpacked the package into peg-2015 folder, which is not expected place for the new version of the package. It supposed to be peg-1.0 (though, you may need to tweak load-path if you install the package manually).

Hm actually, have only this in ~/.emacs.q:

$ find elpa/ -name peg\*
elpa/peg-1.0
elpa/peg-1.0/peg-pkg.el
elpa/peg-1.0/peg-tests.el
elpa/peg-1.0/peg.el

And load-path only contains that peg-1.0 folder.
But these kind of problems probably depend strongly on the package management and the init.el ...

Currently I have this setup:

(require 'package)
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
			             ("org" . "http://orgmode.org/elpa/")
                         ("melpa" . "https://melpa.org/packages/")))

(add-to-list 'load-path "~/.emacs.d/extra-packages/org-ql")

But thanks, you don't need to give further support. You already helped me a lot and I love using org-ql again :)
I just have to do some research and learn more about emacs and package management.

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

2 participants