From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: [BUG] in Release 8.2 - editing code in indirect buffer Date: Wed, 25 Sep 2013 08:53:37 +0200 Message-ID: References: <8F09B93E-FC4D-48B8-A9AB-3EDC0D81EEEF@gmail.com> <220E3767-24DA-494B-9512-9C4DA30CEA43@gmail.com> <86zjr2urcg.fsf@somewhere.org> <578DF849-8046-47A6-879C-FC5874BE591B@gmail.com> <86vc1qupo2.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOiyy-0001VL-Fc for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 02:54:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOiys-0004J5-UT for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 02:53:56 -0400 Received: from plane.gmane.org ([80.91.229.3]:34459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOiys-0004Iq-Nm for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 02:53:50 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VOiyr-00071b-WD for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 08:53:50 +0200 Received: from arn78-1-88-186-171-7.fbx.proxad.net ([88.186.171.7]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Sep 2013 08:53:49 +0200 Received: from Rainer by arn78-1-88-186-171-7.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Sep 2013 08:53:49 +0200 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: emacs-orgmode@gnu.org "Sebastien Vauban" writes: > Hi Carsten, > > Carsten Dominik wrote: >> On 24.9.2013, at 18:17, Sebastien Vauban wrote: >>> Carsten Dominik wrote: >>>> On 23.9.2013, at 09:40, Rainer M Krug wrote: >>>>> >>>>> When starting to edit a code block via C-c ' everything works as expected >>>>> and the code block is highlighted and an indirect buffer is opened. >>>>> >>>>> When I click into the highlighted block, I an "send" to the indirect buffer. >>>>> This behavior changes, after saving with C-s, even when nothing has been >>>>> edited: the area in the original org file looses its magic, and looks normal >>>>> again and can also be edited! >>>>> >>>>> The indirect buffer stays functional and, upon close via C-c ' saves the >>>>> changes into the original buffer and *overwrites* changes done in this block >>>>> in the org document. >>>> >>>> This is a bug which is difficult to fix in all generality. What should really >>>> happen is that the text in the original buffer is made read-only. But so far >>>> this does not happen in our implementation (due to Dan Davison IIRC). The >>>> reason for this is that read-only text properties left by accident in a >>>> buffer are difficult to get rid of. >>>> >>>> There are many things the user could go back and screw up the original. >>>> That's why Org choses to protect with highlighting with an overlay. Note that >>>> this is not a protection against editing, but it is a visual warning. >>> >>> I never knew that "your" goal was to make the code block read-only in the Org >>> buffer. Note that I would be really opposed to such a change. Editing code in >>> the prose would really become a pain to me -- please know that I NEVER use the >>> indirect buffer. >> >> I only mean while there is a special buffer also editing this block! > > Pfff! I'm relieved -- I should have understood it ;-) While we are at editing code blocks inline (I also do this quite often). This might have been asked before, but in code blocks we have - syntax highlighting - indenting using the code block language settings but would it be possible to have, when the cursor is in a code block, the menus and shortcuts for the language mode enabled, i.e. complete support for editing the code block language, as in the special buffer, but inline in org? Evaluationg single lines of code directly from the code block in org would be *brilliant*. Cheers, Rainer > > Best regards, > Seb <#secure method=pgpmime mode=sign> -- Rainer M. Krug email: RMKruggmailcom