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)

-----BEGIN PGP SIGNED MESSAGE-----
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|
#+end_src

#+begin_src python :ses|
#+end_src

#+begin_src C :resu|
#+end_src

#+begin_src R :fil|
#+end_src

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

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

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

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
#+end_src

#+begin_src sh :stdin :cmdline :separator
#+end_src

#+begin_src clojure :show-process :alias
#+end_src

#+begin_src scheme :scheme
#+end_src

#+begin_src python :prefix
#+end_src

#+begin_src R :colnames
#+end_src

#+begin_src sqlite :db
#+end_src

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

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

#+begin_src C++ :namespaces
#+end_src

#+begin_src java :classname :cmdargs :cmdline
#+end_src

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

*Conclusion*

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
      
-----BEGIN PGP SIGNATURE-----

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl62XNUUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsOxLAgAoAgXwRDspbE788Vt5FeZ/0INywZA
FH2RWlwxeENoBMkS9CmZ3/vEXq/C6SXs+OK7Hb9DxR00p+0wJJeDlbso+sL0/cPq
kgQCRgO4rIpBXHgP/vso6Ky8b/lpNRJmHtsdzG3Ymp5tTr2FXBrPYMHIbC7QgL/9
IOEs74bl3n8KIpo+Yy3uTq2ONg7x89uP4V7EodPvC4aRLfX5k/qytA9l2/C/0cgL
mIbeSwrjPFMBeH5eeCgIlP11ZT54U/kaBdegXojgsfA9KFNbcmY6YnZf7LYO4CnN
wZkCLJxs88BoQIC5rDSLg6fxXLKda1eFYOwHYqeqsVIWAJF4hvj69CrtOg==
=IwCf
-----END PGP SIGNATURE-----


             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:
  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=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' \
    /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

Code repositories for project(s) associated with this 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).