manateelazycat / awesome-tab

Emacs package to provide out-of-the-box configuration to use tabs.
384 stars 38 forks source link

invalid-function awesome-tab-kill-buffer-match-rule #90

Closed toinfty closed 4 years ago

toinfty commented 4 years ago

I have installed the package using use-package. After a restart of Emacs, when I open a lot of buffers and try to run awesome-tab-kill-all-buffers-in-current-group, I get the error message "invalid-function awesome-tab-kill-buffer-match-rule" with the following backtrace

Debugger entered--Lisp error: (invalid-function awesome-tab-kill-buffer-match-rule)
  awesome-tab-kill-buffer-match-rule(#f(compiled-function (buffer) #<bytecode 0x1ffcfe10f3f1>))
  awesome-tab-kill-all-buffers-in-current-group()
  funcall-interactively(awesome-tab-kill-all-buffers-in-current-group)
  call-interactively(awesome-tab-kill-all-buffers-in-current-group record nil)
  command-execute(awesome-tab-kill-all-buffers-in-current-group record)
  counsel-M-x-action("awesome-tab-kill-all-buffers-in-current-group")
  ivy-call()
  ivy-read("M-x " ("toggle-debug-on-error" "emacs-lisp-mode" "bookmark-set" "org-superstar-mode" "eval-buffer" "byte-recompile-file" "byte-recompile-directory" "awesome-tab-kill-match-buffers-in-current-group" ...) :predicate #f(compiled-function (x) #<bytecode 0x1ffcfcd9cff9>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  counsel-M-x()
  funcall-interactively(counsel-M-x)
  call-interactively(counsel-M-x nil nil)
  command-execute(counsel-M-x)

Then I open the awesome-tab.el file and eval the buffer. I can run the awesome-tab-kill-all-buffers-in-current-group command normally.

I notice that the function awesome-tab-kill-buffer-match-rule is a macro instead of a function. Are there any ways to fix this macro so that I do not have to eval buffer everytime I start Emacs?

toinfty commented 4 years ago

The issue was caused by a misconfiguration of use-package. Now the issue is resolved.

h3poteto commented 4 years ago

@toinfty I encountered the same error, could you please tell me how did you fix this issue? What did you change in your use-package?

toinfty commented 4 years ago

@h3poteto I solved the issue by using the recommended method in the Readme.md to load the package instead of using the github recipe in use-package.

But it seems that @klausweiss 's pull request solves the issue completely.

h3poteto commented 4 years ago

@toinfty @klausweiss Thank you! I was able to resolve it.