-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Non-blocking start #93
Comments
Why? You don't have to start it right away. |
as long as it starting, one cannot do anything. i am not starting it right away. |
Yes, I can approve that - |
Here's a question. Suppose we have a new command, Would you still expect it to start the REPL in the background, or would it rely on the REPL being already launched? |
I too am interested in this feature, but I recognize there are some tradeoffs.
I'd prefer it to start the REPL in the background. The way I bump against this blocking behavior is usually (note: I use spacemacs):
I'd prefer for the editor to never be locked up, but I see that it might be jarring for a user to trigger a robe command, then get no indication that the command worked (while the console is loaded in the background), the suddenly have the effect of their command to happen several seconds later while they may have done several other things in the editor. Perhaps theres some way to have a loading indicator somewhere in the UI? As an alternative I may look into triggering |
Here is my personal settings for robe auto starting, hope this can help some people. ;; ruby-mode has keybinding [C-c C-s] for `inf-ruby'.
;; auto start robe `robe-start' after start `inf-ruby'.
(defun my-robe-start ()
(interactive)
(unless robe-running
(robe-start)))
(defadvice inf-ruby-console-auto (after inf-ruby-console-auto activate)
"Run `robe-start' after `inf-ruby-console-auto' started."
(my-robe-start))
(with-eval-after-load 'projectile-rails
(define-key projectile-rails-mode-map
[remap inf-ruby] 'inf-ruby-console-auto))
(defadvice inf-ruby (after inf-ruby activate)
"Run `robe-start' after `inf-ruby' started."
(my-robe-start))
(define-key enh-ruby-mode-map (kbd "C-c C-s") 'inf-ruby)
;; auto start robe process for completing
(defun my-robe-auto-start ()
(unless robe-running
(call-interactively 'inf-ruby)))
(add-hook 'enh-ruby-mode-hook #'my-robe-auto-start) |
@stardiviner Does that work in any way asynchronously? I imagine you still have to wait for it to start when the first Ruby file in a given session is opened. |
@dgutov Yes, just automate this start process for me for daily Ruby usage. |
@stardiviner Thanks for the clarification. Regarding your code:
|
All that aside, I have implemented the asynchronous version. But it ended up being fairly convoluted. Everybody interested, please check out the |
To clarify @vlymar: I can't imagine how it would work differently without causing weird behaviors if the user e.g. changes the window configuration. |
And if it does make your life better, please describe how. @dre-hh A thumbs-up is appreciated, but not enough, sorry. |
hi, how hard would it be to make robe not blocking the main emacs interface on starting. rails projects with a lot of gems tend to have really bad startup times?
The text was updated successfully, but these errors were encountered: