emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: Arthur Miller <arthur.miller@live.com>
Cc: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <874kciivu6.fsf@gmail.com> (raw)
In-Reply-To: <DB9PR09MB49869671F514CE13214DEA1E96E79@DB9PR09MB4986.eurprd09.prod.outlook.com>


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

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	other threads:[~2021-07-25  9:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-24 19:50 Helo for defun/macro arguments list in minibuffer when in org-babel src blocks? Arthur Miller
2021-07-25  0:05 ` Tim Cross
2021-07-25  8:50   ` Arthur Miller
2021-07-25  9:03     ` Tim Cross [this message]
2021-07-25  9:48       ` Arthur Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kciivu6.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=arthur.miller@live.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).