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 09:38:41 +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> <4B85FCE2-E97D-429F-87C2-A553025F1D96@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOjgX-000655-1R for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 03:39:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOjgR-00005L-BQ for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 03:38:56 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:64431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOjgR-00005B-38 for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 03:38:51 -0400 Received: by mail-wg0-f47.google.com with SMTP id f12so5568195wgh.2 for ; Wed, 25 Sep 2013 00:38:50 -0700 (PDT) In-Reply-To: <4B85FCE2-E97D-429F-87C2-A553025F1D96@gmail.com> (Carsten Dominik's message of "Wed, 25 Sep 2013 09:09:52 +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: Carsten Dominik Cc: emacs-orgmode@gnu.org, Eric Schulte --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Carsten Dominik writes: > 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 wro= te: >>>>> 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 ex= pected >>>>>>> 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 indirec= t 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 loo= ks normal >>>>>>> again and can also be edited! >>>>>>>=20 >>>>>>> The indirect buffer stays functional and, upon close via C-c ' save= s the >>>>>>> changes into the original buffer and *overwrites* changes done in t= his block >>>>>>> in the org document. >>>>>>=20 >>>>>> This is a bug which is difficult to fix in all generality. What shou= ld really >>>>>> happen is that the text in the original buffer is made read-only. Bu= t 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 i= n a >>>>>> buffer are difficult to get rid of. >>>>>>=20 >>>>>> There are many things the user could go back and screw up the origin= al. >>>>>> 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 NEVE= R 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. This is definitely not an easy task, but which I think would be an very useful feature, making the work-flow of using embedded code much faster. > > However, I think this is really a question to Eric Schulte (in CC). Would be great, if there is would be a way of implementing this in the medium future. Cheers, Rainer > > - 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 > =2D-=20 Rainer M. Krug email: RMKruggmailcom --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (Darwin) iQEbBAEBAgAGBQJSQpMCAAoJENvXNx4PUvmCDTUH+PV1KFQ2FzNL582zRWJYWBPy MInWUZSf7njklslyzyl8BayQ6s0rss6SQkUIWI2iPhgeZtprHUEEdi4IdXpG2m+B 22hCrPFx3OqVKUvHLbI+1c8w+1dEOhGyg1KqDwDc1izoY+w5My5gSaCXbAl9Urzo Bo74OhuwM8HVeaKLI834HkP8UVdBhD/KKPz6BzgctiXZSxog0utkBhsppKHKd0mP hpnPQqRMTmHrmZeBsWRkg+OUNQXWM0kHaYdvM5DRScOvX4FY2eNBTxqv9B0z1vJi KJziKxx1WZD1yCIutRVz0uwGIGwl1RcNMQQTbAnRytNgXo+ipF0tknEb6366Mg== =E1LQ -----END PGP SIGNATURE----- --=-=-=--