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: stardiviner
Subject: Re: [RFC] Let Org Mode's completion support all Babel header arguments
Date: Thu, 14 May 2020 12:05:26 +0800
User-agent: mu4e 1.4; emacs 28.0.50

Nicolas Goaziou <address@hidden> writes:

> Hello,
>
> stardiviner <address@hidden> writes:
>
>> Add a test for Babel src block languages and header arguments.
>
> Thank you.

Glad this test is simple to write and passed.

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

I see. Thanks.

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

Fixed

>
>> +  (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

Done.

>
>> +  (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.

Ditto.

I attached the new patch.

>
> Regards,


-- 
[ 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
      

Attachment: 0001-org-pcomplete.el-improve-header-arguments-completion.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

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