[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [BUG] in Release 8.2 - editing code in indirect buffer

From: Eric Schulte
Subject: Re: [O] [BUG] in Release 8.2 - editing code in indirect buffer
Date: Wed, 25 Sep 2013 07:13:34 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

>>> 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.


Eric Schulte
PGP: 0x614CA05D

reply via email to

[Prev in Thread] Current Thread [Next in Thread]