[Top][All Lists]

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

Re: Helo for defun/macro arguments list in minibuffer when in org-babel

From: Tim Cross
Subject: Re: Helo for defun/macro arguments list in minibuffer when in org-babel src blocks?
Date: Sun, 25 Jul 2021 19:03:55 +1000
User-agent: mu4e 1.5.14; emacs 28.0.50

Arthur Miller <arthur.miller@live.com> writes:

> Tim Cross <theophilusx@gmail.com> writes:
>> Hi,
>> when you are editing source blocks are you using org-edit-special, normally
>> bound to C-c ') or are you just editing the source blocks directly within the
>> org buffer?
> No I don't narrow.

Note that org-edit-special isn't really narrowing. Rather, it opens a
new buffer (there are options to control how it does this i.e. replace
org buffer, split to open in new buffer, open in new frame etc) which puts the 
source block
into the native mode for the language being edited.  For example, if
your editing an emacs-lisp block, the edit special buffer will be in
emacs-lisp-mode and will have all the facilities you would normally have
when opening an emacs lisp file.

What it sounds like you want to do is just have all the (for example)
emacs-lisp mode and associated minor modes activated when your cursor is
within a source block within the org buffer. This is extremely difficult
to. Part of the problem is that modes like emacs-lisp-mode are designed
to operate on buffers. There are some 'special' packages, like mmm-mode
which try to support this type of functionality, but to be honest, I've
never found them very good and they often have significant performance

Of course, this is emacs and you can probably get something mostly
working, but it will take considerable effort and may well have
performance hits as well as other unexpected side effects. I think your
definitely 'swimming against the flow' and suspect that in the end, you
will spend far more time trying to maintain your hacks rather than
actually focusing on the work you want to get done. I originally went down a
similar path, but then realised, it was much easier just to get use to
using org-edit-special and focus on getting that to work just how I like
it. Now, I don't even notice/think about it. I just hit the key to open
the buffer, edit it and then exit. I have it setup so that the original
org buffer is still displayed, so I can see/scroll the org buffer in
case I need to reference other information in the buffer etc. All the
bits I want work just like they do when I edit 'native' buffers for the
language being edited (syntax, indentation, snippets/completion,
symbol/documentation lookup etc).

Anyway, good luck.

reply via email to

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