From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [BUG] in Release 8.2 - editing code in indirect buffer Date: Wed, 25 Sep 2013 09:09:52 +0200 Message-ID: <4B85FCE2-E97D-429F-87C2-A553025F1D96@gmail.com> 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 (Mac OS X Mail 6.6 \(1510\)) Content-Type: multipart/signed; boundary="Apple-Mail=_993F1B95-ADAB-4536-BA75-FA0296F79461"; protocol="application/pgp-signature"; micalg=pgp-sha1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOjEd-0005ok-Gd for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 03:10:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOjEY-0000Pp-H3 for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 03:10:07 -0400 Received: from mail-we0-x22d.google.com ([2a00:1450:400c:c03::22d]:47708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOjEY-0000MB-6g for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 03:10:02 -0400 Received: by mail-we0-f173.google.com with SMTP id w62so5692545wes.32 for ; Wed, 25 Sep 2013 00:10:01 -0700 (PDT) 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: Rainer M Krug Cc: emacs-orgmode@gnu.org, Eric Schulte --Apple-Mail=_993F1B95-ADAB-4536-BA75-FA0296F79461 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 25.9.2013, at 08:53, Rainer M Krug wrote: > "Sebastien Vauban" > writes: >=20 >> Hi Carsten, >>=20 >> 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: >>>>>>=20 >>>>>> 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. >>>>>>=20 >>>>>> 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! >>>>>>=20 >>>>>> 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. >>>>>=20 >>>>> 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. >>>>>=20 >>>>> 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. >>>>=20 >>>> 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. >>>=20 >>> I only mean while there is a special buffer also editing this block! >>=20 >> Pfff! I'm relieved -- I should have understood it ;-) >=20 > While we are at editing code blocks inline (I also do this quite = often). >=20 > This might have been asked before, but in code blocks we have >=20 > - syntax highlighting > - indenting using the code block language settings >=20 > 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*. This is very complicated, because such functionality needs the entire environment of a mode. I think there are some solutions which allow multiple major modes - but I don't think we will go there with Org. However, I think this is really a question to Eric Schulte (in CC). - Carsten >=20 > Cheers, >=20 > Rainer >=20 >>=20 >> Best regards, >> Seb > <#secure method=3Dpgpmime mode=3Dsign> >=20 > --=20 > Rainer M. Krug >=20 > email: RMKruggmailcom >=20 >=20 --Apple-Mail=_993F1B95-ADAB-4536-BA75-FA0296F79461 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJSQoxBAAoJEO+gg/nAZuwMGOYIAIQ3rNnN/HQHyDYfYOmi/ZiZ lt9QjQSOVjPI+FHcKMeGdFVZ5EDPOXUuyGjd4pJeaB4mxj8FSnz7X63l1IdaSOA7 IUfiTQ7xhSoeyNWfotV0jdeL0aSrNcZN7f6mSZSYmF+wM8Ddt4wC4E9BZdpWzVpM QRo85vPf6tdwN0KVnEXrhjxAEGO7+aha3RZIgcaVDp0Va3FbO4n3yJxgst8wAiG0 52AzhC++VDL2gG3WemuT06ZsvEZ4nlhx04Xfi7qJ+FOSZIK5Fu+ngKMCji2GrfAJ MpK4v5IGZs5zusl4riB8aOtgcla2QmV8lwsiLOJv1OnhnEEeRezzPBme3/5Q0d8= =Tl0O -----END PGP SIGNATURE----- --Apple-Mail=_993F1B95-ADAB-4536-BA75-FA0296F79461--