Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Handle multiple instances of emacs #22

Open
lytex opened this issue Apr 6, 2023 · 2 comments
Open

[Suggestion] Handle multiple instances of emacs #22

lytex opened this issue Apr 6, 2023 · 2 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@lytex
Copy link

lytex commented Apr 6, 2023

Currently if I open two instances of emacs, the use-package call fails because the address is already in use:

Cannot bind server socket: Address already in use

The example README.md could be modified to wrap the use-package call within a with-demoted-errors so that emacs starts up normally, but then org-hyperscheduler-open can be called only from the first instance of emacs.

Should there be an unique server per machine? One server per instance of emacs? Is this wrapper enough?

@dmitrym0 dmitrym0 added bug Something isn't working enhancement New feature or request labels Apr 8, 2023
@dmitrym0
Copy link
Owner

dmitrym0 commented Apr 8, 2023

Ideally there should be a server per emacs instance.

Are you suggesting something like

(with-demoted-errors "Failed to bind.." 
   (use-package 'org-hyperscheulder...))

@natejlong
Copy link

One workaround for this could also be to use emacs in its own server-client mode. If you just want multiple emacs editor windows, then running multiple emacsclient windows that all connect to the single emacs server daemon works extremely well and has other benefits (clients open near instantly, all emacs windows share buffers/state, etc.) So for this problem, the emacs daemon would run the hyperscheduler server, and calls to org-hyperscheduler-open would just open the existing server rather than run a new server.

info on how to use the emacs client/server model, it's very easy to use by default!:
https://www.emacswiki.org/emacs/EmacsClient#h5o-4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants