vermiculus / magithub

**DEPRECATED - please use Forge instead!** -- Magit-based interfaces to GitHub
GNU General Public License v3.0
579 stars 63 forks source link

Void magithub-completion-enable on commit #286

Open humitos opened 6 years ago

humitos commented 6 years ago

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 :(

vermiculus commented 6 years ago

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 commented 6 years ago

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

humitos commented 6 years ago

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.

vermiculus commented 6 years ago

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.

humitos commented 6 years ago

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

vermiculus commented 6 years ago

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 commented 6 years ago
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))