From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: Possible bug with Org Babel source code blocks and ESS integration Date: Thu, 11 Dec 2014 23:41:01 -0500 Message-ID: <877fxx4h0i.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzI2T-0000rV-Ks for emacs-orgmode@gnu.org; Thu, 11 Dec 2014 23:41:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzI2K-0001gv-KA for emacs-orgmode@gnu.org; Thu, 11 Dec 2014 23:41:13 -0500 Received: from mail-qg0-x231.google.com ([2607:f8b0:400d:c04::231]:60441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzI2K-0001gk-G6 for emacs-orgmode@gnu.org; Thu, 11 Dec 2014 23:41:04 -0500 Received: by mail-qg0-f49.google.com with SMTP id a108so4844647qge.8 for ; Thu, 11 Dec 2014 20:41:03 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Vikas Rawal Cc: Org-mode Hi Vikas, 2014ko abenudak 11an, Vikas Rawal-ek idatzi zuen: >=20 > I am having a strange problem with R Source Blocks. Let me explain (I > hope the explanation below makes sense). >=20 > When I am creating a source block, I typically create the #+BEGIN_SRC > and #+END_SRC lines, and then use C-c ' to enter ESS mode, fill the > block there, and return to my org buffer using C-c ' again. >=20 > While I am filling in my source block, I sometimes need to refer to my > full org file and some other source blocks in there. So my cursor in > the Org file moves. Then, if my code block is a little complex, I like > to save it while I am editing (C-x C-s). This is where the mess is > created. Instead of saving the code in the source block from where ESS > was called, the code is saved at the point where my cursor in the org > file at the moment is. As a result, I get a copy of the source code > text (without the BEGIN_SRC and END_SRC lines) at the place where my > cursor is. This obviously creates a total mess and I have to clean it > up. >=20 > Is this the intended behaviour? I have used source code blocks for > years and have not had this problem before. But I cannot say whether > this is a new behaviour in org or something in my behaviour has > changed. In the past, I perhaps never moved the cursor in my org > buffer while editing a source code block. I just pushed a change to master (398286a) which should fix this issue, and one other I discovered along the way. These bugs may have been dislodged by Nicolas=E2=80=99s recent rework of this code. (Not that I=E2= =80=99m complaining =E2=80=93 the new code seems a lot pleasanter, even with a coup= le transitory bugs. :P ) I assume that you=E2=80=99re using master, though you don=E2=80=99t say. C= ould you test the patch? Thanks, --=20 Aaron Ecay