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: Tue, 12 May 2020 16:39:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

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)

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

(concat ...) -> (format ":%s" (car arg))

> +          headers)))))

It looks like you dropped the switches "-n", "-r", "-l".

Also, could you add a few tests in "test-org-pcomplete.el"?

Regards,

-- 
Nicolas Goaziou



reply via email to

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