alphapapa / org-ql

A searching tool for Org-mode, including custom query languages, commands, saved searches and agenda-like views, etc.
GNU General Public License v3.0
1.4k stars 110 forks source link

Installation Issue: Symbol’s function definition is void: byte-run--set-speed` #345

Closed Sinthoras7 closed 1 year ago

Sinthoras7 commented 1 year ago

I tried to install org-ql with the following code:

(use-package org-ql)

Then I get the following error: Error (use-package): org-ql/:catch: Symbol’s function definition is void: byte-run--set-speed.

Strangely, on my other machine, the installation worked just fine. (With the same init.el, but a newer version of Emacs and a different OS) I have deleted and reinstalled all my packages (it took quite some time), but it did not help.

Where could this error come from? Where does the function byte-run--set-speed come from?

alphapapa commented 1 year ago

I can't explain why you would get this error, but you haven't provided enough information to diagnose the problem, e.g. you haven't said what OS you're using, what version of Emacs, what version of org-ql, etc.

Note as well that (use-package org-ql) does not install packages by default; generally you should use package-install for that.

Anyway, this package doesn't refer to such a function, so the fact that you would get such a weird error suggests a problem in your Emacs installation. Since it's not a bug in this package, I'm going to close the issue, but feel free to continue discussing it here. Thanks.

Sinthoras7 commented 1 year ago

I was not sure, that this is not a bug in this package, but you are probably right – sorry.

I am using the straight package manager (https://github.com/radian-software/straight.el), with the code

(straight-use-package 'use-package)
(setq straight-use-package-by-default t) 

so use-package should install it. (It also works for the other packages).

My version of emacs is emacs 27.1 and my OS on this device is PopOs.

alphapapa commented 1 year ago

use-package does not install it--straight does.

And I'm afraid that straight is not something I can help you with. Please refer to an appropriate forum or chat room.

Sinthoras7 commented 1 year ago

Thank you nevertheless :)

alexkehayias commented 1 year ago

I also came across this—the stacktrace points to peg which this library depends on as of 1.0. https://github.com/emacsmirror/peg/blob/master/peg.el#L401

For reference, I noticed this in a GitHub CI action building org-ql with straight.el using Ubuntu and Emacs 27.2.

alphapapa commented 1 year ago

@alexkehayias Thanks. Maybe you should report it on emacs-devel or report an Emacs bug so the peg maintainers can take a look.

neeasade commented 1 year ago

For anyone wanting a temporary local workaround (I hit it installing org-ql with straight on emacs 27.2), I just stole the definition of byte-run--set-speed before installing org-ql and it "just worked":

(defalias 'byte-run--set-speed
  #'(lambda (f _args val)
      (list 'function-put (list 'quote f)
        ''speed (list 'quote val))))