Nicolas Goaziou <m...@nicolasgoaziou.fr> writes:

> Moreover,
> `org-icompleting-read' is not harder to read as `completing-read'
> anyway.

I disagree on this. `completing-read' at least declares its own argument
list. So it's possible to distinguish which argument is which, albeit
with some effort for a large amount of arguments.

For example, in this case there are 5 args, the first two I know by
heart. Not the other three.

    (setq prop (org-icompleting-read
                "Property: " (mapcar 'list (org-buffer-property-keys t nil t))
                nil nil prop))

And the arglist: "&rest args", instead of "prompt collection predicate
require-match initial-input hist def inherit-input-method".

Here's how it would look like for a `cl-defun' variant:

    (org-icompleting-read
     "Property: " (mapcar 'list (org-buffer-property-keys t nil t))
     :initial-input prop)

Down to 3 arguments from 5, and the last one is very easy to understand,
even without eldoc.

In any case this also solves the problem of the argument list:

    (define-obsolete-function-alias
        'org-icompleting-read 'completing-read)


Reply via email to