Bastien <b...@gnu.org> writes: >> I would say that after applying changes to my-ess-eval and to >> org-babel-edit-prep:R as suggested by Andrew, it looks like everything >> is working right for me. > > I'v been bold and I pushed the change Andrew suggested. > > Thanks for reporting this and for testing around -- and thanks > to Andrew for the exploration and the fix!
Though not related to Org, I noticed that ess-make-buffer-current calls (update-ess-process-name-list) thus making a call for it in my-ess-eval, probably, somewhat redundant, right? Another thing that somewhat bugs me is that if R process quits (or probably dies as well) when editing source code block in a separate buffer, the subsequent S-RET will silently execute a line in a wrong buffer/process. If there are no buffers with R process, it will create the default *R* named buffer. It might be exotic but I think it is an issue. Does it mean that there is a bug in ess-make-buffer-current function somewhere? Something, probably, re-associates a buffer to another process, does it? I think it might be relevant that code editing buffer local variable ess-local-process-name is non-nil when associated process quits. This results in first ess-make-buffer-current in my-ess-eval silently launching *R*. I'm not sure if it is too much to fix. Perhaps hitting C-c ' twice to re-start editing is a reasonable workaround. Eric Schulte <eric.schu...@gmx.com> writes: > You can find the name of the original org-mode buffer by running the > following snippet of elisp within the edit buffer. > > ;; -*- emacs-lisp -*- > (marker-buffer org-edit-src-beg-marker) > > The `org-src-in-org-buffer' macro may be used from an edit buffer to run > elisp inside the code block, in the org-mode buffer of the edit buffer. > e.g., the following > > ;; -*- emacs-lisp -*- > (org-src-in-org-buffer (message "-->%S" (org-babel-get-src-block-info))) Where is org-src-in-org-buffer macro defined. Searching all dot el files in org folder does not show anything neither does C-h f show anything similar. -- Mikhail