From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleh Krehel Subject: Re: Unclear org-icompleting-read interface Date: Thu, 25 Jun 2015 16:23:40 +0200 Message-ID: <874mlvvpcj.fsf@gmail.com> References: <87vbecudww.fsf@gmail.com> <877fqryjyh.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z88Af-0007w6-G9 for emacs-orgmode@gnu.org; Thu, 25 Jun 2015 10:30:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z88Aa-0008DN-H0 for emacs-orgmode@gnu.org; Thu, 25 Jun 2015 10:30:29 -0400 Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]:34509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z88Aa-0008AO-1T for emacs-orgmode@gnu.org; Thu, 25 Jun 2015 10:30:24 -0400 Received: by wgqq4 with SMTP id q4so64306146wgq.1 for ; Thu, 25 Jun 2015 07:30:23 -0700 (PDT) Received: from firefly (dyn069045.nbw.tue.nl. [131.155.69.45]) by mx.google.com with ESMTPSA id lk5sm7891477wic.24.2015.06.25.07.30.22 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 25 Jun 2015 07:30:22 -0700 (PDT) In-Reply-To: <877fqryjyh.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Thu, 25 Jun 2015 15:51:50 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nicolas Goaziou 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)