kubel icon indicating copy to clipboard operation
kubel copied to clipboard

Fix tramp-error Method 'kubectl' is not known.

Open EdmondFrank opened this issue 2 years ago • 2 comments

I encountered the same problem as #28, and solved it in this way.

EdmondFrank avatar Jun 14 '22 13:06 EdmondFrank

Thank you for submitting this! Would you be able to explain the reasoning behind this? Also this is failing in CI

Entering directory '/kubel/'
kubel.el:1253:1: warning: `eval-after-load' is for use in configurations, and should rarely be used in packages

abrochard avatar Jun 15 '22 02:06 abrochard

Thank you for submitting this! Would you be able to explain the reasoning behind this? Also this is failing in CI

Entering directory '/kubel/'
kubel.el:1253:1: warning: `eval-after-load' is for use in configurations, and should rarely be used in packages

Thank you for your reply.

Would you be able to explain the reasoning behind this?

The reason may be that emacs will restore the recently opened buffer list when starts. If user had used kubel-exec-shell-pod before, there is a kubel related buffer in the recently opened list. After the buffer is restored, there will be a kubel buffer in the buffer list, but tramp-methods list does not contain the kubel method at this time.

Also this is failing in CI

Yes, as the ci description says, eval-after-load is more recommended in user config than in package, but I haven't found a better alternative either.

EdmondFrank avatar Jun 15 '22 03:06 EdmondFrank