Wrapper a sync API of Emacs side and uncomment some unuseful code
- The usage of self.event_queue is confusing for newbies such me.
- Wrapper the sync API for less people who need it.
- Add *~ in .gitignore.
We should add sync in python-bridge, you should call Python function async, then pass elisp callback, call eval_in_emacs when your Python function finish compute.
Which function is the elisp callback? If elisp side needs the retval from python function, eval_in_emacs maybe couldn't do this. I want to use python-bridge to finish some little but more functions instead of elisp language. I need sync feature and async to arrive this.
Besides, could you tell you which one you are using in org mode to complete English and show translation in its comment?
I suggest that you pass the Elisp function string as a parameter of the Python asynchronous calling function, and then call the Elisp function callback through eval_in_emacs after the Python function is executed.
The advantage of dividing the Elisp start part and the Elisp callback part into two parts is that Emacs will never get stuck due to too long execution time on the Python side. For specific best practices, please refer to lsp-bridge.
If you can't resist the temptation to call Python functions synchronously, Emacs will be stuck once the Python function takes too long to execute, and Emacs is single-threaded. Introducing the Python synchronous calling method will cause python-bridge to still get stuck in Emacs, and this is not the case. The purpose of creating the python-bridge project is to completely avoid Emacs getting stuck.
Besides, could you tell you which one you are using in org mode to complete English and show translation in its comment? 另外,你能告诉你你在组织模式下使用哪一个来完成英文并在其评论中显示翻译吗?
Completion english use lsp-bridge, translate comment use insert-translated-name