emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: stardiviner <numbchild@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [RFC] Let Org Mode's completion support all Babel header arguments
Date: Sat, 09 May 2020 15:33:41 +0800	[thread overview]
Message-ID: <87mu6hsgtm.fsf@gmail.com> (raw)

Hash: SHA256

I found Org Mode's completion (from ~completion-at-point-functions~ which is
provided by ~pcomplete-completions-at-point~) can complete in bellowing places
(the "|" represent cursor point):

#+begin_src pyt|

#+begin_src python :ses|

#+begin_src C :resu|

#+begin_src R :fil|

#+begin_src sh :eva| :expo| :cac| :sheb| :tang| :comm| :no-ex|

But don't support completing some header arguments, like bellowing examples:

#+begin_src sh :wra| :pos :prolo| :epilo| :padli| :mkd| :sep| :file-|

We can see, all bellowing list of header arguments are standard header arguments of Babel.

- - var :: Pass arguments to code blocks.
- - results :: Specify the type of results and how they will be collected and handled.
- - file :: Specify a path for file output.
- - file-desc :: Specify a description for file results.
- - file-ext :: Specify an extension for file output.
- - output-dir :: Specify a directory to write file output to.
- - dir :: Specify the default (possibly remote) directory for code block execution.
- - exports :: Export code and/or results.
- - tangle :: Toggle tangling and specify file name.
- - mkdirp :: Toggle creation of parent directories of target files during tangling.
- - comments :: Toggle insertion of comments in tangled code files.
- - padline :: Control insertion of padding lines in tangled code files.
- - no-expand :: Turn off variable assignment and noweb expansion during tangling.
- - session :: Preserve the state of code evaluation.
- - noweb :: Toggle expansion of noweb references.
- - noweb-ref :: Specify block's noweb reference resolution target.
- - noweb-sep :: String used to separate noweb references.
- - cache :: Avoid re-evaluating unchanged code blocks by a src block content hash.
- - sep :: Delimiter for writing tabular results outside Org.
- - hlines :: Handle horizontal lines in tables.
- - colnames :: Handle column names in tables.
- - rownames :: Handle row names in tables.
- - shebang :: Make tangled files executable.
- - tangle-mode :: Set permission of tangled files.
- - eval :: Limit evaluation of specific code blocks.
- - wrap :: Mark source block evaluation results.
- - post :: Post processing of code block results.
- - prologue :: Text to prepend to code block body.
- - epilogue :: Text to append to code block body.

There are some header arguments are special to Babel language. Like

#+begin_src emacs-lisp :lexical

#+begin_src sh :stdin :cmdline :separator

#+begin_src clojure :show-process :alias

#+begin_src scheme :scheme

#+begin_src python :prefix

#+begin_src R :colnames

#+begin_src sqlite :db

#+begin_src sql :engine :dbconnection :dbhost :dbuser :dbbase :columes :cmdline

#+begin_src C :libs :includes :defines :flags :cmdline

#+begin_src C++ :namespaces

#+begin_src java :classname :cmdargs :cmdline

And there some extra Org Babel extensions might use some new header arguments keywords.


So I think Org Mode need an union API to manage those keywords. WDYT?

- -- 
[ stardiviner ]
       I try to make every word tell the meaning that I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


             reply	other threads:[~2020-05-09  7:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-09  7:33 stardiviner [this message]
2020-05-10 12:35 ` Nicolas Goaziou
2020-05-12 13:48   ` stardiviner
2020-05-12 14:39     ` Nicolas Goaziou
2020-05-13  9:40       ` stardiviner
2020-05-13 17:04         ` Nicolas Goaziou
2020-05-14  4:05           ` stardiviner
2020-05-14 12:59             ` Nicolas Goaziou

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:

  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=87mu6hsgtm.fsf@gmail.com \
    --to=numbchild@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: [RFC] Let Org Mode'\''s completion support all Babel header arguments' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


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