Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

paradox-menu-execute: Invalid function: async-start #28

Closed
bbigras opened this issue Dec 17, 2014 · 6 comments
Closed

paradox-menu-execute: Invalid function: async-start #28

bbigras opened this issue Dec 17, 2014 · 6 comments

Comments

@bbigras
Copy link

bbigras commented Dec 17, 2014

I installed async but I have paradox-menu-execute: Invalid function: async-start when I try to install packages.

async is an installed package.

     Status: Installed in `~/.emacs.d/elpa/async-20141001.151/' (unsigned).
    Archive: n/a
    Version: 20141001.151
    Summary: Asynchronous processing in Emacs
    Other versions: 20141001.151 (melpa).
@Malabarba
Copy link
Owner

That's really strange. Paradox only tries to call async-start if (require 'async) succeeds, so there's no reason this function might not be defined.

The only possibility that crosses my mind is that there might be more than one async package going around, but the description you have pasted there matches the description I have here.

Try evaluating the following snippet:

(async-start (lambda () t))

If it fails, then I think this is an issue we'll need to submit to async.

@colbell
Copy link

colbell commented Dec 17, 2014

I have the same issue with the same version of async. My Emacs is self compiled from the emacs-24 branch as at 2014-12-14 11:22 bb57c94d5f047cde106ffa71bf59f24b2b3027b8

(require 'async)
async

This succeeds but gives no response.

(async-start (lambda () t))

This writes the "Async process done" message to the messages buffer but not the "This is a test" message although it returns the correct result 222.

(async-start
   ;; What to do in the child process
   (lambda ()
     (message "This is a test")
     (sleep-for 3)
     222)

   ;; What to do when it finishes
   (lambda (result)
     (message "Async process done, result should be 222: %s" result)))

Async process done, result should be 222: 222

Part of the messages buffer.

Execute in the background? (see `paradox-execute-asynchronously') (y or n) y
paradox-menu-execute: Invalid function: async-start
Execute in the background? (see `paradox-execute-asynchronously') (y or n) n
Install package `anzu-20141216.146'? (y or n) y
Contacting host: melpa.org:80 [2 times]
Making version-control local to anzu-autoloads.el while let-bound!
Generating autoloads for ../../../../.emacs.d/elpa/anzu-20141216.146/anzu.el...
~/.emacs.d/elpa/anzu-20141216.146/anzu-autoloads.el and /home/colbell/dotfiles/emacs.d/elpa/anzu-20141216.146/anzu-autoloads.el are the same file
Generating autoloads for ../../../../.emacs.d/elpa/anzu-20141216.146/anzu.el...done
Saving file /home/colbell/dotfiles/emacs.d/elpa/anzu-20141216.146/anzu-autoloads.el...
Wrote /home/colbell/dotfiles/emacs.d/elpa/anzu-20141216.146/anzu-autoloads.el
(No changes need to be saved)
Loading async-bytecomp...done
Loading async...done
Started compiling asynchronously directory /home/colbell/.emacs.d/elpa/anzu-20141216.146...    

@colbell
Copy link

colbell commented Dec 18, 2014

Now it gets stranger. I just went into my ~/.emacs.d/elpa/paradox-20141214.934/ directory and removed the 2 .elc files (paradox-compat.elc and paradox.elc) and tried to upgrade a package. It succeeded.

I then ran C-u byte-recompile-drectory over ~/.emacs.d/elpa/paradox-20141214.934/ recreating the two .elc files, restarted Emacs and tried to upgrade a package and it suceeded.

I restored the original .elc files, restarted Emacs and tried to upgrade a package. It failed with the same paradox-menu-execute: Invalid function: async-start error.

I then removed paradox and re-installed it and then tried upgrading a package and it worked.

I have just converted my Emacs configuration to use use-package and this problem has only occurred since I blew away my elpa directory and re-installed everything via use-package. Thats probably just a coincidence.

This is my Paradox configuration.

 (use-package paradox
 :ensure paradox

:init
(progn
  (setq paradox-github-token t)  ;; Don't ask for Github integration.
  (setq paradox-display-download-count t)))

If you are not familiar with use-package the :ensure paradox line will install Paradox when Emacs is started if it isn't already installed.

If you're interested I've put 2 tar.gz files at https://drive.google.com/folderview?id=0B9XowPkZoONZNGppeXpESHR4a2s&usp=sharing

paradox-20141214.934-new-works.tar.gz is my current elpa/paradox-20141214.934 directory which works.
paradox-20141214.934.old-dosnt-work.tar.gz is the original elpa/paradox-20141214.934 directory that doesn't work.

@Malabarba
Copy link
Owner

Thanks guys, I have a pretty good idea of what's going on now. I'm not at a computer at the moment, but it seems async start is a macro, not a function.

That explains everything so far. And I should have thought of that sooner. I'll have a fix later today.

@Malabarba
Copy link
Owner

Should be fixed now. Let me know if it persists after the next upgrade.

@colbell
Copy link

colbell commented Dec 18, 2014

Looks good. I just blew away my elpa directory and stared Emacs letting use-package install all my packages. I then went and used paradox to install a new package and it worked fine.

Thanks for the quick fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants