From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#27158: 25.2; Eliminating old usage of completing-read from built-in files Date: Wed, 31 May 2017 16:16:05 -0700 (PDT) Message-ID: <7c2b788f-8c34-4488-a3c2-223c94e876cb@default> References: <24f4a025-ad7b-06e5-10ee-f122bef32402@thompsonclan.org> <0276a0cd-874b-47ee-a2dc-fe8ca08ece9d@default> <21029018-5890-e545-8b50-ee856bc2caec@yandex.ru> <562784bd-e22b-411d-8230-4f95fe2fa7db@default> <4dfcd02b-53bc-c430-89db-f93ad6b283c2@yandex.ru> <3d3bc85b-31d3-4701-8acd-45591d075253@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1496272634 22878 195.159.176.226 (31 May 2017 23:17:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 31 May 2017 23:17:14 +0000 (UTC) To: Dmitry Gutov , Ryan Thompson , 27158@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 01 01:17:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGCrU-0005d3-AM for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Jun 2017 01:17:08 +0200 Original-Received: from localhost ([::1]:34311 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGCrY-00008T-74 for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 May 2017 19:17:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGCrS-00008M-OR for bug-gnu-emacs@gnu.org; Wed, 31 May 2017 19:17:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGCrO-00039B-E4 for bug-gnu-emacs@gnu.org; Wed, 31 May 2017 19:17:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45429) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dGCrO-000395-AW for bug-gnu-emacs@gnu.org; Wed, 31 May 2017 19:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dGCrN-0000al-W3 for bug-gnu-emacs@gnu.org; Wed, 31 May 2017 19:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 May 2017 23:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27158 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27158-submit@debbugs.gnu.org id=B27158.14962725782220 (code B ref 27158); Wed, 31 May 2017 23:17:01 +0000 Original-Received: (at 27158) by debbugs.gnu.org; 31 May 2017 23:16:18 +0000 Original-Received: from localhost ([127.0.0.1]:48106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGCqg-0000Zj-EG for submit@debbugs.gnu.org; Wed, 31 May 2017 19:16:18 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:48698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGCqf-0000ZW-8y for 27158@debbugs.gnu.org; Wed, 31 May 2017 19:16:17 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v4VNGAZE015020 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 31 May 2017 23:16:10 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v4VNGAEP010538 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 31 May 2017 23:16:10 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v4VNG75W020223; Wed, 31 May 2017 23:16:07 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133109 Archived-At: > I think we should change the calling convention of > completion-read-function (while keeping completing-read the > same, it will call completing-read-function passing (or DEF "") > as the default). The value of that variable is supposed to accept the same args as `completing-read'. Understood is that `completing-read' just passes its args along to the value of `completing-read-function'. Anything else makes it impossible for `completing-read-function' to be as general as it should be. It should be able to do exactly what `completing-read' does now, if it wants. If your particular value of `completing-read-function' wants to consider the DEF arg value to really be `(or DEF "")' then it need only act that way, no? (setq def (or def "")) End of story, no? Why do you need to change the interface of `completing-read-function' itself? And if that is insufficient for some reason, can't you use `advice-add' to redefine `completing-read' (e.g. in some scope or for some duration) to do exactly what you need? I sense that you have a real problem, but I'm not sure what it is. A guess is that you would like `completing-read', within the scope of some mode (e.g. Ido Ubiquitous), behave as if the DEF arg it receives (where abscence is equivalent to receiving nil) were in fact `(or DEF "")'. What prevents you from making `completing-read' behave that way (or any other way) within your context? Why is it insufficient for you to do that in your value of `completing-read-function' or by advising `completing-read' for the duration? Why should your particular need be spread to everyone and every use of `completing-read'? Why should `completing-read' or `completing-read-function' be stunted in this way?