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: Wed, 13 May 2020 17:40:19 +0800
User-agent: mu4e 1.4; emacs 28.0.50

Nicolas Goaziou <address@hidden> writes:

> Hello,
>
> stardiviner <address@hidden> writes:
>
>> Subject: [PATCH] org-pcomplete.el: improve header arguments completion
>
> Thank you. Some comments follow.
>
>> -  (while (pcomplete-here
>> -      '("-n" "-r" "-l"
>> -        ":cache" ":colnames" ":comments" ":dir" ":eval" ":exports"
>> -        ":file" ":hlines" ":no-expand" ":noweb" ":results" ":rownames"
>> -        ":session" ":shebang" ":tangle" ":tangle-mode" ":var"))))
>> +  (let* ((info (org-babel-get-src-block-info 'light))
>> +     (lang (car info))
>> +     (lang-headers (intern (concat "org-babel-header-args:" lang)))
>> +     (headers (org-babel-combine-header-arg-lists
>> +               org-babel-common-header-args-w-values
>> +               (when (boundp lang-headers) (eval lang-headers t)))))
>
> (when ...)  -> (and (bounp lang-headers)) (symbol-value lang-headers)

Done.

>
>> +    (while (pcomplete-here
>> +        (mapcar
>> +             (lambda (arg) (concat ":" (symbol-name (car arg))))
>
> (concat ...) -> (format ":%s" (car arg))

Fixed

>
>> +         headers)))))
>
> It looks like you dropped the switches "-n", "-r", "-l".
>
> Also, could you add a few tests in "test-org-pcomplete.el"?

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

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

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