emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [RFC] Let Org Mode's completion support all Babel header arguments


From: Nicolas Goaziou
Subject: Re: [RFC] Let Org Mode's completion support all Babel header arguments
Date: Wed, 13 May 2020 19:04:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hello,

stardiviner <address@hidden> writes:

> Add a test for Babel src block languages and header arguments.

Thank you.

> I'm wandering how to complete header argument values? Do you have any
> hints?

You can use, again, `org-babel-common-header-args-w-values' for some
parameters. However, most of them specify `:any', which means the value
can be anything, and, therefore, cannot be completed.

You may want to have a look at `org-lint-wrong-header-value' for an
example on how to treat

> +(ert-deftest test-org-pcomplete/src-block ()
> +  "Test Babel src block header arguments completion."

"source block" instead of "src block".

> +  (should
> +   (string-prefix-p
> +    "#+begin_src emacs-lisp"
> +    (org-test-with-temp-text "#+begin_src emac<point>"
> +      (pcomplete)
> +      (buffer-string))
> +    t))

You can remove the t

> +  (should
> +   (string-prefix-p
> +    "#+begin_src emacs-lisp :session"
> +    (org-test-with-temp-text "#+begin_src emacs-lisp :sess<point>"
> +      (pcomplete)
> +      (buffer-string))
> +    t)))

Ditto.

Regards,

-- 
Nicolas Goaziou



reply via email to

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