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

Some commands fail to load #2608

Closed
1 task done
MyFedora opened this issue Jul 31, 2023 · 25 comments
Closed
1 task done

Some commands fail to load #2608

MyFedora opened this issue Jul 31, 2023 · 25 comments
Labels

Comments

@MyFedora
Copy link

MyFedora commented Jul 31, 2023

What happened?

I launched Emacs to search for an info article using Helm. But I got greeted with (wrong-type-argument commandp helm-info-emacs) instead of a Helm prompt.

How to reproduce?

  1. Use the following init.el file with Vanilla Emacs:
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
  '(package-archives
   '(("gnu" . "https://elpa.gnu.org/packages/")
     ("nongnu" . "https://elpa.nongnu.org/nongnu/")
     ("melpa" . "https://melpa.org/packages/")))
 '(package-selected-packages
   '(helm)))

(require 'package)
(package-initialize)

(require 'helm-core)
(require 'helm)
  1. M-x package-refresh-contents
  2. M-x package-install-selected-packages
  3. Restart
  4. C-x c h r to generate error
  5. C-x c a works as usual, and loads the missing commands for some reason
  6. C-x c h r now works

Helm Version

Melpa or NonGnuElpa

Emacs Version

Emacs-28/29

OS

GNU/Linux

Relevant backtrace (if possible)

Debugger entered--Lisp error: (wrong-type-argument commandp helm-info-emacs)
  call-interactively(helm-info-emacs nil nil)
  command-execute(helm-info-emacs)

Minimal configuration

  • I agree using a minimal configuration
@MyFedora MyFedora added the bug label Jul 31, 2023
@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Jul 31, 2023 via email

@rhoit
Copy link

rhoit commented Aug 1, 2023

@thierryvolpiatto is this the change 3a861fb which fixes this, if it is, I'm still having issue.

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Aug 1, 2023 via email

@MyFedora
Copy link
Author

MyFedora commented Aug 1, 2023

I updated the helm packages, and it appears like helm completely broke for me? Broke as in errors out during the initialization, the helm prefix is gone, etc.

helm 20230731.1852
helm-core 20230801.522

Debugger entered--Lisp error: (void-variable helm-info-source)
  byte-code("\301\10\302 \303\304\305\306\"\307\305\310\"\311\305\312\"\313\305\314\"$#\207" [helm-info-source defclass helm-source-in-buffer (info-file :initarg :info-file :initform nil :custom 'string) init :initform helm-info-init display-to-real helm-info-display-to-real get-line buffer-substring action (("Goto node" . helm-info-goto))] 10)
  require(helm-info)
  byte-code("\300\301!\210\300\302!\210\303\304\305\306\307\310%\210\311\312\313\314\315DD\316\317\320\321\322&\7\207" [require helm-lib helm-info custom-declare-group helm-global-bindings nil "Global bindings for Helm." :group helm custom-declare-variable helm-command-prefix-key funcall function #f(compiled-function () #<bytecode -0x85ca020d28a6ab6>) "The prefix key used to call Helm commands from the..." :type (choice (string :tag "Key") (const :tag "no binding")) :set #f(compiled-function (var key) #<bytecode 0x125edfd5dd41d9b3>)] 8)
  require(helm-global-bindings)
  byte-code("\300\301!\210\300\302!\210\303\304!\207" [require helm-core helm-global-bindings provide helm] 2)
  require(helm)
  eval-buffer(#<buffer  *load*> nil "/home/user/.config/emacs/init.el" nil t)  ; Reading at buffer position 1844
  load-with-code-conversion("/home/user/.config/emacs/init.el" "/home/user/.config/emacs/init.el" t t)
  load("/home/user/.config/emacs/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0x1873abf6cf4a5ca5>) #f(compiled-function () #<bytecode 0x18318643ffd2ed5f>) t)
  command-line()
  normal-top-level()

I switched to straight.el and pinned helm to 3a861fb, but I get the same error.

see #2609

@pobermei
Copy link

pobermei commented Aug 1, 2023

@thierryvolpiatto

3a861fb works for me as expected.

However, your latest commit on master 35b293c breaks it again:

Error (use-package): helm-bibtex/:init: Symbol’s value as variable is void: helm-info-source
Error (use-package): helm-bibtex/:catch: Symbol’s value as variable is void: helm-info-source
Error (use-package): org-ref-helm/:catch: Symbol’s value as variable is void: helm-info-source
Error (use-package): helm-org-ql/:catch: Symbol’s value as variable is void: helm-info-source

Update/Correction: also 3a861fb causes this problem

@thierryvolpiatto
Copy link
Member

I have reverted for now 3a861fb even if it seems the right fix.
For now @MyFedora you will have to require helm-info before calling one of its commands or calling (helm-mode 1).

thierryvolpiatto added a commit that referenced this issue Aug 1, 2023
Previous attempt to fix this bug was requiring helm-info from
helm-global-bindings; This should work as expected, but I suspect some
external helm package or some init files to require directly
helm-global-bindings or helm-info without loading other helm files in
right order.

So let's try to fix this by requiring helm-info from helm.el.
NOTE: Fixing this blindly as I can't reproduce.
@thierryvolpiatto
Copy link
Member

Now trying to require helm-info from helm.el.
Let me know if it works.
Note that I am trying to fix this blindly for now as I can't reproduce reliabily.
I will try to install from package tomorrow to see if I can reproduce (I am always installing helm from source with make).

@pobermei
Copy link

pobermei commented Aug 1, 2023

Now trying to require helm-info from helm.el. Let me know if it works. Note that I am trying to fix this blindly for now as I can't reproduce reliabily. I will try to install from package tomorrow to see if I can reproduce (I am always installing helm from source with make).

Thank you for your effort!

FWIW, I tried e3894eb , but encountered the same error messages as mentioned above. I also tested a minimal config only requesting

(use-package helm :straight t :demand t)

with the same result.

The errors disappeared when reverting back to fef7bb1

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Aug 1, 2023 via email

@michael-heerdegen
Copy link
Contributor

michael-heerdegen commented Aug 2, 2023 via email

@michael-heerdegen
Copy link
Contributor

michael-heerdegen commented Aug 2, 2023 via email

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Aug 2, 2023 via email

@michael-heerdegen
Copy link
Contributor

michael-heerdegen commented Aug 2, 2023 via email

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Aug 2, 2023 via email

@thierryvolpiatto
Copy link
Member

Here some recipes:

I) From source:

  1. Download helm or get it with git clone.
  2. cd to helm dir and make && sudo make install
  3. emacs -q (-q not -Q)
  4. in scratch buffer (require 'helm)
  5. C-x c h r

II) from package installation:

  1. Install helm with package-install from your main emacs
  2. run emacs -Q
  3. eval (package-initialize)
  4. (require 'helm)
  5. C-x c h r

Is one of these two recipes work?
NOTE: For second recipe please wait Melpa update before installing Helm.

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Aug 2, 2023 via email

@rhoit
Copy link

rhoit commented Aug 2, 2023

Here some recipes:

I) From source:

1. Download helm or get it with git clone.

2. cd to helm dir and make && sudo make install

3. emacs -q (-q not -Q)

4. in scratch buffer `(require 'helm)`

5. `C-x c h r`

II) from package installation:

1. Install helm with package-install from your main emacs

2. run emacs -Q

3. eval `(package-initialize)`

4. `(require 'helm)`

5. `C-x c h r`

Is one of these two recipes work? NOTE: For second recipe please wait Melpa update before installing Helm.

Really great full for your effort, its works 🥳, for me from melpa.

@rhoit
Copy link

rhoit commented Aug 2, 2023

there seems to be problem with helm-ring, here is the backtrace

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "helm-ring")
  (helm-show-kill-ring)
  (progn (undo-only) (if (= (point) repetitive_yank_region_point) (progn (progn (goto-char repetitive_yank_region_mark) (set-mark-command nil) (goto-char repetitive_yank_region_point) (delete-selection-helper "yank")))) (helm-show-kill-ring))
  (if (string= last-command "yank") (progn (undo-only) (if (= (point) repetitive_yank_region_point) (progn (progn (goto-char repetitive_yank_region_mark) (set-mark-command nil) (goto-char repetitive_yank_region_point) (delete-selection-helper "yank")))) (helm-show-kill-ring)) (progn (if (use-region-p) (progn (setq repetitive_yank_region_mark (mark)) (setq repetitive_yank_region_point (point)) (message "%s" repetitive_yank_region_point) (delete-selection-helper "yank"))) (yank)))
  repetitive-yanking()
  funcall-interactively(repetitive-yanking)
  command-execute(repetitive-yanking)

for now I have directly loaded the helm-ring.el to get things working

(load "/home/rho/.config/emacs/elpa/helm-20230802.1453/helm-ring.el")

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Aug 2, 2023 via email

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Aug 2, 2023 via email

@rhoit
Copy link

rhoit commented Aug 2, 2023

rho @.***> writes:

  1. ( ) text/plain () text/html there seems to be problem with helm-ring, here is the backtrace Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "helm-ring") (helm-show-kill-ring) (progn (undo-only) (if (= (point) repetitive_yank_region_point) (progn (progn (goto-char repetitive_yank_region_mark) (set-mark-command nil) (goto-char repetitive_yank_region_point) (delete-selection-helper "yank")))) (helm-show-kill-ring)) (if (string= last-command "yank") (progn (undo-only) (if (= (point) repetitive_yank_region_point) (progn (progn (goto-char repetitive_yank_region_mark) (set-mark-command nil) (goto-char repetitive_yank_region_point) (delete-selection-helper "yank")))) (helm-show-kill-ring)) (progn (if (use-region-p) (progn (setq repetitive_yank_region_mark (mark)) (setq repetitive_yank_region_point (point)) (message "%s" repetitive_yank_region_point) (delete-selection-helper "yank"))) (yank))) repetitive-yanking() funcall-interactively(repetitive-yanking) command-execute(repetitive-yanking)
    Where is repetitive-yanking command coming from?

    for now I have directly loaded the helm-ring.el to get things working (load "/home/rho/.config/emacs/elpa/helm-20230802.1453/helm-ring.el") — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.
    *>
    -- Thierry

oops! that was on me, thanks for pointing something from my config, everything looks good now!

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Aug 2, 2023 via email

@rhoit
Copy link

rhoit commented Aug 2, 2023

😆 thanks for giving feedback of my config, its more like mess of snippets every where, lisp is not my thing.

@michael-heerdegen
Copy link
Contributor

michael-heerdegen commented Aug 3, 2023 via email

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Aug 3, 2023 via email

thierryvolpiatto added a commit that referenced this issue Aug 3, 2023
The benefits are that helm-info can be required directly because it
keeps its dependency as before without creating recursive requires and
we avoid loading and building all helm-info* commands and sources at
startup (faster).

This is done by adding explicit autoload calls in helm.el instead of
requiring helm-info there without its dependencies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants