From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Boruch Baum Newsgroups: gmane.emacs.bugs Subject: bug#20063: 24.4: read-from-minibuffer improperly setting hist parameter Date: Mon, 09 Mar 2015 08:05:11 -0400 Message-ID: <54FD8C77.7040208@gmx.com> References: <54FCCC63.5080202@gmx.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x6JRUCo5uFQSOjFcw6fB1nN8jI7DUvn4r" X-Trace: ger.gmane.org 1425902847 11662 80.91.229.3 (9 Mar 2015 12:07:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Mar 2015 12:07:27 +0000 (UTC) Cc: 20063@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 09 13:07:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YUwSo-0004UU-1n for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Mar 2015 13:07:14 +0100 Original-Received: from localhost ([::1]:43035 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUwSn-0003QE-8a for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Mar 2015 08:07:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUwSi-0003PG-2o for bug-gnu-emacs@gnu.org; Mon, 09 Mar 2015 08:07:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUwSd-000687-11 for bug-gnu-emacs@gnu.org; Mon, 09 Mar 2015 08:07:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41617) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUwSc-000681-UB for bug-gnu-emacs@gnu.org; Mon, 09 Mar 2015 08:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YUwSc-0007v9-Ee for bug-gnu-emacs@gnu.org; Mon, 09 Mar 2015 08:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Mar 2015 12:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20063 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20063-submit@debbugs.gnu.org id=B20063.142590278730406 (code B ref 20063); Mon, 09 Mar 2015 12:07:02 +0000 Original-Received: (at 20063) by debbugs.gnu.org; 9 Mar 2015 12:06:27 +0000 Original-Received: from localhost ([127.0.0.1]:40185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YUwS2-0007uM-Pk for submit@debbugs.gnu.org; Mon, 09 Mar 2015 08:06:27 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:59547) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YUwS0-0007u6-91 for 20063@debbugs.gnu.org; Mon, 09 Mar 2015 08:06:25 -0400 Original-Received: from [192.168.1.5] ([96.232.130.59]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MXEs5-1XyszX0Aon-00WIJT; Mon, 09 Mar 2015 13:06:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0 In-Reply-To: OpenPGP: url=hkp://keys.gnupg.net X-Provags-ID: V03:K0:x0Yi8xKfRujDviUMYP08EWJzpUi7vQDiCw/tzcOb8fQF20Poqcq nelcsfbS8G9Xqevamp/q2zDg6fbhCXl80LU98kaSExOlkn06f0zL3du7H03VdMaZCzV3/NU g3+Iq6gaARzeUaci0AjLega97xfPLq643ejw5j8ipWZcPerSplI2oizT52hGK7I8A3wRL4f kh/AeLSRqlxRrqPReX3Pg== X-UI-Out-Filterresults: notjunk:1; X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:100323 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --x6JRUCo5uFQSOjFcw6fB1nN8jI7DUvn4r Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Three reasons I think this should be considered a bug, and changed - two from a programmer's perspective, and one from a user's perspective. For both, consider the cases of functions `toggle-option' (this bug report) and `highlight-regexp' (bug #19877). 1] From a programmer's perspective, forcing a HIST when the programmer asks for COLLECTION =3D !nil and HIST =3D nil, creates a conflict when parameter REQUIRE-MATCH is set to `t', because the mini-buffer will offer entries, from HIST, that are not in COLLECTION, and those entries will then just be rejected due to REQUIRE-MATCH. 2] From a programmer's perspective, there are four legitimate combinations of COLLECTION and HIST, and the current state denies a programmer the freedom to offer a specific COLLECTION without some general HIST. 3] From a user's perspective (and this is how I came across both instances of this issue), I don't want invalid or nonsense options being presented to me by emacs. They just confuse, invite unwanted outcomes, and delay finishing the task at hand. In the case of `toggle-option', the current situation has the mini-buffer offering the user options that, should the user select, will be rejected as invalid by the mini-buffer. In the case of `highlight-regexp', the choices that the mini-buffer offer from HIST are accepted, but are undesirable, lead to confusion in selection, and confusion in navigating amongst the desirable elements, ie. those in COLLECTION. On 03/08/2015 09:08 PM, Glenn Morris wrote: > Boruch Baum wrote: >=20 >> Function `toggle-option' calls `completing-read', without providing >> parameters REQUIRE-MATCH or HIST. `completing-read' calls >> `completing-read-default' in `minibuffer.el'. `completing-read-default= ' >> calls `read-from-minibuffer' in `minibuf.c'. There, on line 974 of >> `minibuf.c:' >> >> if (NILP (histvar)) >> histvar =3D Qminibuffer_history; >> >> If I understand this correctly, this says that even if the caller >> explicitly says that there should be no history used (condition nil), >> the Qminibuffer_history should be used anyway. >=20 > Nil means use the default history list. Eg see "Minibuffer History" in > the elisp manual: >=20 > If you don't specify HISTORY, then the default history list > `minibuffer-history' is used. >=20 > I don't see a bug here, other than perhaps the doc of completing-read > could stand to be more explicit, like the elisp manual is. >=20 --=20 hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 --x6JRUCo5uFQSOjFcw6fB1nN8jI7DUvn4r Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJU/YyFAAoJEDvrUfDmCx9Lh5cP/R5M3YtmMQ0d5YHO0wDn+Php mNqELBSiIUPYxB5njivLs8vERRcj0XtugEHcWoDa6LXBAaUZYI1h3U2Yecr3x2sF ELZ8h6ci2TwvN8Dx4Uwwg4x3o7rwMGPpXpFl2Yh4MmjivPpK3IpvqZZfCcCO3ej5 zLWzqY5B5iyOivyXFU7O8NKGEPNZOzSlXPJbF3XWmBmQ0856yKpsfn74Q+mSz6lu E3RRqvQI37OtOJtRMf7Pbcs6NAB6gqwmEiWoo6HBpwKm7MH+XLmFcJG7NYSpMHEM Dj5LCoNy1bGpbkSWLdrOe4Q6RoL2Dkhj2TH749MThZliWSixU9mTM8JlPayL8pF3 EnywbrHX8ziH5QBNQ2UwH8zPWg4H7nEa+0psqvzV6nAT3rAwAwf5Q/7/ilkI4Fvw xtx2zxFobABEXorxkQuV1ImqAdjGOoH15YqS5bCaYQHAyDUn/3QOzTfRaosPuClg 0KQhRXcDJPJOqus7gWx2C24FueDrXw4ih1tmV34+hL6wjVu0AtXPDNhk2oUyH07b Y18CvUnoBFk71CyBrMIkJyVAwHpfJ/qVw2Qt4qWFJFrCuLXsyQ15r9Ks6bVNZ/gg dhDcBD/EXhZo1Vz+DdfkLxzdxWMHeMZM7XLD+avN6fS7YvIG8JbG9+Xbng1OYes4 tpJkFB+Jg/c+ODgSmF33 =FVcx -----END PGP SIGNATURE----- --x6JRUCo5uFQSOjFcw6fB1nN8jI7DUvn4r--