From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#27158: 25.2; Eliminating old usage of completing-read from built-in files Date: Thu, 1 Jun 2017 23:53:28 +0300 Message-ID: <0edc70e8-2b43-887d-1c5d-022eb430dd44@yandex.ru> 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> <7c2b788f-8c34-4488-a3c2-223c94e876cb@default> <37139f10-a3de-f0f0-8453-67bedf78c7ec@yandex.ru> <7897022a-fea7-44cf-9781-8dd6a1da2f3e@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1496350455 7574 195.159.176.226 (1 Jun 2017 20:54:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Jun 2017 20:54:15 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Thunderbird/54.0 To: Drew Adams , 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 22:54: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 1dGX6d-0001Xo-J5 for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Jun 2017 22:54:07 +0200 Original-Received: from localhost ([::1]:46615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGX6i-0001N6-VL for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Jun 2017 16:54:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGX6d-0001LK-97 for bug-gnu-emacs@gnu.org; Thu, 01 Jun 2017 16:54:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGX6Y-0004Yy-Ah for bug-gnu-emacs@gnu.org; Thu, 01 Jun 2017 16:54:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47355) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dGX6Y-0004Yn-6l for bug-gnu-emacs@gnu.org; Thu, 01 Jun 2017 16:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dGX6Y-00082m-0V for bug-gnu-emacs@gnu.org; Thu, 01 Jun 2017 16:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Jun 2017 20:54: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.149635041930892 (code B ref 27158); Thu, 01 Jun 2017 20:54:01 +0000 Original-Received: (at 27158) by debbugs.gnu.org; 1 Jun 2017 20:53:39 +0000 Original-Received: from localhost ([127.0.0.1]:50032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGX6B-00082C-2q for submit@debbugs.gnu.org; Thu, 01 Jun 2017 16:53:39 -0400 Original-Received: from mail-wm0-f48.google.com ([74.125.82.48]:34399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGX69-00081y-FY for 27158@debbugs.gnu.org; Thu, 01 Jun 2017 16:53:37 -0400 Original-Received: by mail-wm0-f48.google.com with SMTP id 123so7281821wmg.1 for <27158@debbugs.gnu.org>; Thu, 01 Jun 2017 13:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=X2/8qr9OoHesDpPZHIVAvPEyhEs9tXZfVXwQv/CUNzE=; b=Asyg688U+NF3tAjSKSobiRzMKZ8bB/wRSqFxqa3FItfVRv/fnHimbKNoxOLGW2Mmcq 5jYRGpC4c+jwzVCzzNXUGFZ1Ckc8FZoJaykU3bKSBBNsIbSBsz/kxUzdX4pDlIOHuBHL lqc/DAc5HNofki41IoE1KdHTRbYx4pr/ahyrLOqlN/X/kLApC2zpsyc/ES8ESCeEu+oS Ib00Cxjz5gfNDM9H6IRV9s0i/ZfSeOnFSzkHWh9blM21xkXG3wvOfB6leDlHgvq4nRlO YMwj7szsf41dZ2EtgLMJpsNY9TdNXMazPF3pg5/feVjUTHqytqJBLYd6I+tM0sBtXijq geHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=X2/8qr9OoHesDpPZHIVAvPEyhEs9tXZfVXwQv/CUNzE=; b=cNvZBlNRgM3oKKFHb2dBO0A53OvpyOqDhIoqtTBGBhq8/U2Vc062wn5H4bK6ZYkorD DwHba9+0EP4EcQdr/3E0n5Fpwq/sipGVI46z1h/MDd1qpD0wcHTSDagvlhAC14aooOBt amCucleATi7BeBpUaH9BomMSE8Fcp16OEGgYZCZWztQnJB7zv/uG2xHj+JGdJ2ow5huk hOAbY7+KvWPVnFY8hHaq/inUQ2GS+YoQBknRB+ZAQMWU9C9yETb/k66LMAXDLf4gSCoV ez4aCgYpacPO5zlf9GC8bxl1V9hu/xkeAyESqypCAad3zkI3a0nseBvnaunNJj4RUSwW oflA== X-Gm-Message-State: AODbwcC+XR2XAHtfPYuPfVvRiZMg4P9lHKriuQ+uBbc3C+e0UjeacSzU yowcleLnzLh26E0FFQY= X-Received: by 10.223.171.20 with SMTP id q20mr2573714wrc.89.1496350411308; Thu, 01 Jun 2017 13:53:31 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id l30sm14468294wre.25.2017.06.01.13.53.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2017 13:53:30 -0700 (PDT) In-Reply-To: Content-Language: en-US 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:133143 Archived-At: On 6/1/17 5:57 PM, Drew Adams wrote: > `completing-read-function' needs to have the same signature > as `completing-read'. > > I am the one who requested `completing-read-function' and > pushed to have it added to Emacs. Thank you for that, but that doesn't mean it can't ever change. > Its purpose is to easily > let you change the _complete_ behavior of `completing-read', > just by binding a variable. Indeed. > That requires passing it exactly the same arguments, to do > as it pleases with them. No, it does not require that. > If, as in your case, it wants to > act as if DEF were in fact `(or DEF "")', it can do that. It _already is_, according to the contract of completing-read. And that is the problem. > Changing the signature of `completing-read-function' in the > way you suggest makes all uses of `completing-read-function' > follow the path you've outlined for `ido-ubiquitous-mode'. Nope. Like I said, the behavior of completing-read will not change. completing-read-function will change, but just a little. With the new benefit that it's now aware of whether the caller wants to have a default value or not. > And no need. You don't need that, to make your mode do > what you want. If you disagree, please show da codez: a > simple example that doesn't work and for which you see no > possible solution. The code is pointless here. Just read this again: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27158#32 >> Obviously not. Also not when it's not installed, in case you >> were wondering. > > In that case, it's obvious that you can do whatever you need > inside the mode. Nope. > There is a reason for the DEF argument, a reason for it to > be optional, and a reason for its default value to be "". > All of which I've gone over. Err, no. You didn't. > DEF was even expanded several releases ago, to allow a > value that is a list of default values. Those too likely > don't fit your narrow use case. Default values are > intentionally not completion candidates. And yes, in > general they are useful, even if not for your use case > of `completing-read'. Nobody is taking DEF away.