ptrv / company-lua

company-mode completion backend for Lua
17 stars 4 forks source link

Active lua process when there is no lua interpreter #4

Closed rexim closed 8 years ago

rexim commented 8 years ago

System Information

Emacs says that there are active processes. And one of them is the lua process.

Expected

IMO Emacs should quit clearly.

Commentary

Well, I think I actually know why this happens. This is because when the user doesn't have the lua interpreter we put nil as the PROGRAM argument of the start-process function at company-lua.el#L83. And the docs say:

PROGRAM is the program file name. It is searched for in exec-path (which see). If nil, just associate a pty with the buffer. Remaining arguments are strings to give program as arguments.

This is probably what happens in our case. The question is what do we have to do when the lua interpreter is missing? Just silently do nothing or say "Hey! You don't have lua. Please install it to autocomplete things" somewhere in the *Messages*? I'd like to go with the second option. :)

ptrv commented 8 years ago

Thanks for pointing this out.

Fixed with https://github.com/ptrv/company-lua/commit/ba0a6bafdb479edb5c437b775c6f884472db5a94

rexim commented 8 years ago

Cool! Thank you very much!