Juri Linkov

Results 10 comments of Juri Linkov

Do you really think that nothing could be improved in inf-ruby? In this case the following ugly workaround is possible in Org: ```patch diff --git a/lisp/org/ob-ruby.el b/lisp/org/ob-ruby.el index 1b8088eaee..559de16a63 100644...

> Maybe something could. In any case, someone should first try to implement correct behavior in Org. The patch above implements correct behavior in Org, but it uses ugly hack...

> > The desired behavior is to use the same buffer name as the value of header argument :session. It creates one buffer per session. > > Does it try...

The root of the problem is at the end of the function `run-ruby`: ```ruby (or (inf-ruby-buffer) inf-ruby-buffer))) ``` It always insists on using the existing buffer, even when the user...

Great, this is exactly what is needed! Do you see a problem with such a patch? ```patch diff --git a/lisp/org/ob-ruby.el b/lisp/org/ob-ruby.el index aa28bf1899..0fbd4ecbb7 100644 --- a/lisp/org/ob-ruby.el +++ b/lisp/org/ob-ruby.el @@ -159,7...

When `get-buffer` returns non-nil existing buffer, and sets `buffer`, then this is used for `session-buffer` without calling `run-ruby-or-pop-to-buffer`. If no buffer found then it's created with the help of `run-ruby-or-pop-to-buffer`.

It's still needed to use `run-ruby-or-pop-to-buffer` because when `session` is `nil`, then better to reuse the same buffer from the same root dir (returned by the function `inf-ruby-buffer`), i.e. to...

Why would it do this? The users explicitly asked `session` to be `nil` to reuse the buffer corresponding to `nil` among other code blocks where `session` is `nil`.

I see no problem with checking command names in run-ruby-or-pop-to-buffer. If a user uses different commands in case of nil `session` then it's fine to check that the commands should...

But this will load the whole TRAMP package even when the user has no intention to use commands that require TRAMP functions. A nicer thing would be to ask TRAMP...