emacs-orgmode
[Top][All Lists]
Advanced

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

[BUG] Make source block auto-completion work for all the loaded babel ba


From: Ihor Radchenko
Subject: [BUG] Make source block auto-completion work for all the loaded babel backends (was: 2 'echo' bash instructions produce a table)
Date: Tue, 22 Nov 2022 08:37:04 +0000

Alain.Cochard@unistra.fr writes:

> PS 2: Reading the ob-doc-shell.html page, I understood (kind of) what
> was so far a mystery to me : that a "#+begin_src bash" group works as
> expected while "#+begin_src ba + C-M-i" fails to complete "ba" to
> "bash": namely that all the shells fall inside the "shell" umbrella
> keyword.  Still, would not it make sense that the completion mechanism
> also work for all those particular shells?

It would indeed make sense.

The current implementation of completion is somewhat awkward.
It resides in lisp/org-pcomplete.el
(pcomplete/org-mode/block-option/src) and relies on pre-defined known
values in `org-babel-load-languages' (see :type keyword of the
defcustom).

Such design is not reliable.

Ideally, we should examine the available function symbols
org-babel-execute:* and derive the completions from there.

Patches welcome!

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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