From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id YGF3K8Fetl5nbQAA0tVLHw (envelope-from ) for ; Sat, 09 May 2020 07:41:53 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mOaOKc5etl6bbQAAbx9fmQ (envelope-from ) for ; Sat, 09 May 2020 07:42:06 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 87104940448 for ; Sat, 9 May 2020 07:42:04 +0000 (UTC) Received: from localhost ([::1]:46506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXK7Y-0005bl-5l for larch@yhetil.org; Sat, 09 May 2020 03:42:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXK76-0005au-ND for emacs-orgmode@gnu.org; Sat, 09 May 2020 03:41:36 -0400 Received: from [183.249.138.107] (port=9416 helo=dark.localdomain) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXK75-00033s-OC for emacs-orgmode@gnu.org; Sat, 09 May 2020 03:41:36 -0400 Received: by dark.localdomain (Postfix, from userid 1000) id A63CD241330; Sat, 9 May 2020 15:33:44 +0800 (HKT) User-agent: mu4e 1.4; emacs 28.0.50 From: stardiviner To: Org Mode Subject: [RFC] Let Org Mode's completion support all Babel header arguments Date: Sat, 09 May 2020 15:33:41 +0800 Message-ID: <87mu6hsgtm.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 183.249.138.107 (deferred) Received-SPF: softfail client-ip=183.249.138.107; envelope-from=numbchild@gmail.com; helo=dark.localdomain X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/09 03:33:45 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: 15 X-Spam_score: 1.5 X-Spam_bar: + X-Spam_report: (1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9, RDNS_NONE=0.793, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: numbchild@gmail.com Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 X-Spam-Score: 1.59 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Scan-Result: default: False [1.59 / 13.00]; HAS_REPLYTO(0.00)[numbchild@gmail.com]; GENERIC_REPUTATION(0.00)[-0.540334017141]; DWL_DNSWL_BLOCKED(0.00)[209.51.188.17:from]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; FREEMAIL_FROM(0.00)[gmail.com]; REPLYTO_ADDR_EQ_FROM(0.00)[]; R_MISSING_CHARSET(2.50)[]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.09), country: US(-0.00), ip: 209.51.188.17(-0.54)]; FROM_NEQ_ENVFROM(0.00)[numbchild@gmail.com,emacs-orgmode-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[stardiviner.github.io:url]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[gmail.com]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.51.188.17:from]; FORGED_SENDER_MAILLIST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none] X-TUID: oXOPOZdo0VBH =2D----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 pla= ces (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 argu= ments of Babel. =2D - var :: Pass arguments to code blocks. =2D - results :: Specify the type of results and how they will be collected= and handled. =2D - file :: Specify a path for file output. =2D - file-desc :: Specify a description for file results. =2D - file-ext :: Specify an extension for file output. =2D - output-dir :: Specify a directory to write file output to. =2D - dir :: Specify the default (possibly remote) directory for code block= execution. =2D - exports :: Export code and/or results. =2D - tangle :: Toggle tangling and specify file name. =2D - mkdirp :: Toggle creation of parent directories of target files durin= g tangling. =2D - comments :: Toggle insertion of comments in tangled code files. =2D - padline :: Control insertion of padding lines in tangled code files. =2D - no-expand :: Turn off variable assignment and noweb expansion during = tangling. =2D - session :: Preserve the state of code evaluation. =2D - noweb :: Toggle expansion of noweb references. =2D - noweb-ref :: Specify block's noweb reference resolution target. =2D - noweb-sep :: String used to separate noweb references. =2D - cache :: Avoid re-evaluating unchanged code blocks by a src block con= tent hash. =2D - sep :: Delimiter for writing tabular results outside Org. =2D - hlines :: Handle horizontal lines in tables. =2D - colnames :: Handle column names in tables. =2D - rownames :: Handle row names in tables. =2D - shebang :: Make tangled files executable. =2D - tangle-mode :: Set permission of tangled files. =2D - eval :: Limit evaluation of specific code blocks. =2D - wrap :: Mark source block evaluation results. =2D - post :: Post processing of code block results. =2D - prologue :: Text to prepend to code block body. =2D - 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 :cmd= line #+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 argumen= ts keywords. *Conclusion* So I think Org Mode need an union API to manage those keywords. WDYT? =2D --=20 [ 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 =20=20=20=20=20=20 =2D----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=3D=3D =3DIwCf =2D----END PGP SIGNATURE-----