thierryvolpiatto/psession

Error running timer ‘psession-save-all-async’: (wrong-number-of-arguments (1 . 3) 4)

Closed this issue · 3 comments

Runnning psession-save-all-async cause error below.

Error running timer ‘psession-save-all-async’: (wrong-number-of-arguments (1 . 3) 4)

Maybe, cause of this error is the code below on line 265 in file "psession.el".

(defun psession-save-all-async ()
  "Save current emacs session asynchronously."
  (message "Psession: auto saving session...")
  (psession-save-last-winconf)
  (psession--dump-some-buffers-to-list)
  (async-start
   `(lambda ()
      (add-to-list 'load-path
                   ,(file-name-directory (locate-library "psession")))
      (require 'psession)
      ;; Inject variables without properties.
      ,(async-inject-variables (format "\\`%s" (psession--get-variables-regexp))
                               nil nil 'noprops)
      ;; No need to treat properties here it is already done.
      (psession--dump-object-to-file-save-alist 'skip-props))
   (lambda (_result)
     (message "Psession: auto saving session done"))))

async-inject-variables can accept at most 3 arguments, but in psession-save-all-async, async-inject-variables is called with 4 arguments.

I understood.
I'm sorry for this unnecessary issue made from my missing update of "async".

Thanks.