magithub icon indicating copy to clipboard operation
magithub copied to clipboard

Void magithub-completion-enable on commit

Open humitos opened this issue 7 years ago • 7 comments

Hi! Thanks!

Thanks again!

I'm using magithub from master branch. Yesterday I found that I'm not able to make a commit because when I c c from a magit status buffer an error is reported.

Log error from magit-process:

Waiting for Emacs...
*ERROR*: Symbol’s function definition is void: magithub-completion-enable
error: There was a problem with the editor '/usr/bin/emacsclient --socket-name=/tmp/emacs1000/server'.

I don't know what's happening and I didn't find anything wrong in my setup (I've using magithub for some months now without issues).

I don't have experience with toggle-debug-on-error -nothing was shown. So, let me know if I need to do something extra or that log is enough for now.

My solution for the moment was to disable magithub :(

humitos avatar Feb 18 '18 19:02 humitos

Yes, the company backend doesn't work well with standard debugging tools AFAICT. If you explicitly (require '(provide 'magithub-completion) in your config, does that resolve the issue? It may be as simple as a missing autoload.

vermiculus avatar Feb 18 '18 19:02 vermiculus

Actually, on further examination, all those definitions are autoloaded in magithub-completions.el. How did you install magithub?

vermiculus avatar Feb 18 '18 19:02 vermiculus

If you explicitly (require '(provide 'magithub-completion) in your config, does that resolve the issue?

Added this line

(require 'magithub-completion)

and worked.

How did you install magithub?

Configuration,

https://github.com/humitos/emacs-configuration/blob/3b44fa23679a7530bc6c5ada719c96dee9a4da31/startup.d/magithub.el

Loading,

https://github.com/humitos/emacs-configuration/blob/3b44fa23679a7530bc6c5ada719c96dee9a4da31/init.el#L4

https://github.com/humitos/emacs-configuration/tree/3b44fa23679a7530bc6c5ada719c96dee9a4da31/packages

https://github.com/humitos/emacs-configuration/blob/3b44fa23679a7530bc6c5ada719c96dee9a4da31/startup.d/magithub.el

Thank you a lot for the immediate reply! My original issue is fixed, close the issue if you consider.

humitos avatar Feb 18 '18 19:02 humitos

Glad it's working again :)

Do you compile everything (or at least generate autoloads)? I'm wondering whether I should require features instead of relying on autoloads.

vermiculus avatar Feb 19 '18 13:02 vermiculus

Yes. I compile everything with this command everytime that I update the emacs packages from their repositories

emacs -Q --batch -l "~/.emacs" -f batch-byte-compile packages/*.el 2>&1 | grep -C 4 "Error"

at

https://github.com/humitos/emacs-configuration/blob/cc5fd475988f5a51ba320093b5cb989845b2f937/bin/compile_el_files#L6

humitos avatar Feb 19 '18 14:02 humitos

Doesn't look like that alone will generate autoloads. I'm on the fence about adding require forms everywhere, but depending on its implementation (i.e., if it's fast enough), it can't hurt.

vermiculus avatar Feb 21 '18 13:02 vermiculus

update-directory-autoloads is an interactive function defined in autoload.el.gz.

Function Signature
(update-directory-autoloads &rest DIRS)

Function Documentation
Update autoload definitions for Lisp files in the directories DIRS.

In an interactive call, you must give one argument, the name of a
single directory.  In a call from Lisp, you can supply multiple
directories as separate arguments, but this usage is discouraged.

The function does NOT recursively descend into subdirectories of the
directory or directories specified.

In an interactive call, prompt for a default output file for the
autoload definitions, and temporarily bind the variable
generated-autoload-file to this value.  When called from Lisp,
use the existing value of generated-autoload-file.  If any Lisp
file binds generated-autoload-file as a file-local variable,
write its autoloads into the specified file instead.

View in manual

Key Bindings
This command is not in any keymaps.

References
References in autoload.el.gz:
(defun batch-update-autoloads ...) 1 reference

Find all references

Debugging
Enable edebug Enable tracing
Disassemble Forget

Aliases
update-autoloads-from-directories (obsolete since 22.1)
update-directory-autoloads

Source Code
;; Defined in /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/autoload.el.gz
update-directory-autoloads

Symbol Properties
autoload
  ("autoload" 791441 t nil)
event-symbol-element-mask
  (update-directory-autoloads 0)
event-symbol-elements
  (update-directory-autoloads)
modifier-cache
  ((0 . update-directory-autoloads))

vermiculus avatar Feb 21 '18 13:02 vermiculus