magit / forge

Work with Git forges from the comfort of Magit
GNU General Public License v3.0
1.3k stars 113 forks source link

`forge-visit-this-topic` fails with "wrong-number-of-arguments" error #674

Closed benthamite closed 2 months ago

benthamite commented 2 months ago

To reproduce:

  1. M-x forge-list-notifications
  2. With point in any topic, RET.

Error:

Debugger entered--Lisp error: (wrong-number-of-arguments ((t) nil "Ensure that the read status of the issue at point in Forge matches GitHub’s.\nThe function tries to do does this by silently browsing the issue in a Firefox\ntab." (let* ((issue (forge-current-topic)) (url (forge-get-url issue))) (if (eq (eieio-oref issue 'status) 'unread) (progn (let ((shut-up-sink (generate-new-buffer " *shutup*")) (inhibit-message t)) (let* ((--cl-shut-up-current-output-- #'(lambda nil (or (shut-up-buffer-string shut-up-sink) "")))) (if shut-up-ignore (progn (shell-command (format "open -a Firefox --background %s" url))) (unwind-protect (let* ((vnew #'(lambda (char) (shut-up-insert-to-buffer char shut-up-sink))) (vnew #'(lambda (fmt &rest args) (if fmt (progn (let ((text (apply #'format fmt args))) (shut-up-insert-to-buffer (concat text "\n") shut-up-sink) text))))) (old (symbol-function 'load)) (old (symbol-function 'write-region)) (old (symbol-function 'message)) (standard-output vnew)) (unwind-protect (progn (fset 'load #'shut-up-load) (fset 'write-region #'shut-up-write-region) (fset 'message vnew) (shell-command (format "open -a Firefox --background %s" url))) (fset 'load old) (fset 'write-region old) (fset 'message old))) (and (buffer-name shut-up-sink) (kill-buffer shut-up-sink)))))))))) 1)
  forge-extras-sync-read-status(nil)
  apply(forge-extras-sync-read-status nil)
  forge-visit-this-topic(nil)
  funcall-interactively(forge-visit-this-topic nil)
  command-execute(forge-visit-this-topic)
tarsius commented 2 months ago

Sounds like you have to adjust your forge-extras-sync-read-status function for changes in Forge. Even after cloning your dotfiles, I could only find the definition of this function, but not how it is used. But I am guessing it is used as an advice, and the signature of the advised function changed. Or something along those lines.

benthamite commented 2 months ago

Oh, I'm sorry. I didn’t notice this was calling my function