From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [BUG] in Release 8.2 - editing code in indirect buffer Date: Wed, 25 Sep 2013 07:13:34 -0600 Message-ID: <87ob7huix8.fsf@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> <4B85FCE2-E97D-429F-87C2-A553025F1D96@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOpBx-0004Dz-EE for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 09:31:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOpBs-00046e-8Y for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 09:31:45 -0400 Received: from mail-pd0-x230.google.com ([2607:f8b0:400e:c02::230]:40401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOpBs-00046P-1Z for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 09:31:40 -0400 Received: by mail-pd0-f176.google.com with SMTP id q10so6084653pdj.35 for ; Wed, 25 Sep 2013 06:31:39 -0700 (PDT) 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, Carsten Dominik >>> >>> 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*. >> >> 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. > I don't think this is an attainable goal. Major modes assume that they are the sole owners of the current buffer and of the related state. Breaking this assumption would open a deep can of major-mode-specific problems which would each require major-mode-specific solutions. The only solution I see would be to somehow give each code block it's own buffer, and then trick Emacs into treating multiple buffers as a single buffer for purposes of display and cursor movement. If someone wanted to develop such functionality I think it would best be done independent of Org-mode. Best, -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D