emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mikhail Titov <mlt@gmx.us>
To: Bastien <bzg@gnu.org>
Cc: Andrew Young <youngar17@gmail.com>,
	emacs-orgmode@gnu.org, Eric Schulte <eric.schulte@gmx.com>
Subject: Re: [babel, ess] How can I make S-RET to be multi-session friendly?
Date: Thu, 16 Aug 2012 16:06:36 -0500	[thread overview]
Message-ID: <9q0fw7m7dib.fsf@gmx.us> (raw)
In-Reply-To: <878vdhyw27.fsf@gnu.org> (Bastien's message of "Tue, 14 Aug 2012 23:59:12 +0200")

Bastien <bzg@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.schulte@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

  reply	other threads:[~2012-08-16 21:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-09 18:44 [babel, ess] How can I make S-RET to be multi-session friendly? Mikhail Titov
2012-08-09 19:33 ` Achim Gratz
2012-08-10 12:42 ` Eric Schulte
2012-08-10 18:54   ` Mikhail Titov
2012-08-11  3:37     ` Eric Schulte
2012-08-11 14:33       ` Andrew Young
2012-08-14 13:17         ` Eric Schulte
2012-08-14 21:48           ` Mikhail Titov
2012-08-14 21:59             ` Bastien
2012-08-16 21:06               ` Mikhail Titov [this message]
2012-08-17 14:29                 ` Eric Schulte
2012-08-23 22:11                   ` Mikhail Titov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9q0fw7m7dib.fsf@gmx.us \
    --to=mlt@gmx.us \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric.schulte@gmx.com \
    --cc=youngar17@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).