emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: alain.cochard@unistra.fr
Cc: Org Mode List <emacs-orgmode@gnu.org>
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	[thread overview]
Message-ID: <87r0xvidvz.fsf@localhost> (raw)
In-Reply-To: <25461.4423.734070.149776@gargle.gargle.HOWL>

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>


      parent reply	other threads:[~2022-11-22  8:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-06  6:58 2 'echo' bash instructions produce a table Alain.Cochard
2022-11-07  2:31 ` Ihor Radchenko
2022-11-13 20:41   ` Alain.Cochard
2022-11-14  3:59     ` Ihor Radchenko
2022-11-15  6:00       ` [RFC] :var x=list-name should be resolved into simple lists (item1 item2 ...); not nested ((item1) (item2) ...) (was: 2 'echo' bash instructions produce a table) Ihor Radchenko
2022-11-26  1:54         ` Ihor Radchenko
2022-11-16  1:24       ` 2 'echo' bash instructions produce a table Ihor Radchenko
2022-11-21  9:04         ` Ihor Radchenko
2022-11-21  9:05         ` Ihor Radchenko
2022-11-16 16:35       ` Alain.Cochard
2022-11-19 12:28         ` Rudolf Adamkovič
2022-11-20  5:05           ` Ihor Radchenko
2022-11-22  8:16         ` Ihor Radchenko
2022-11-22 19:13           ` Alain.Cochard
2022-11-24  1:55             ` Ihor Radchenko
2022-11-22  8:31         ` [RFC] Backend vs. back-end (was: 2 'echo' bash instructions produce a table) Ihor Radchenko
2023-02-20 10:07           ` Ihor Radchenko
2023-02-20 14:54             ` Alain.Cochard
2023-04-06  9:57               ` Ihor Radchenko
2023-04-20 12:17                 ` Ihor Radchenko
2023-04-06 23:43           ` Samuel Wales
2022-11-22  8:37         ` Ihor Radchenko [this message]

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=87r0xvidvz.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=alain.cochard@unistra.fr \
    --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).