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: Wed, 11 Mar 2015 11:43:11 -0400 Message-ID: <5500628F.3020405@gmx.com> References: <54FCCC63.5080202@gmx.com> <54FD8C77.7040208@gmx.com> <54FF0EE8.5040107@gmx.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HwIdoHWxeemJ8H8mFc62t51RFEG0N9RwF" X-Trace: ger.gmane.org 1426088730 27593 80.91.229.3 (11 Mar 2015 15:45:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Mar 2015 15:45:30 +0000 (UTC) Cc: 20063@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 11 16:45:18 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 1YViow-0008St-IT for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Mar 2015 16:45:18 +0100 Original-Received: from localhost ([::1]:55453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YViow-0000G3-2S for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Mar 2015 11:45:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YViom-00005p-Fe for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2015 11:45:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVioh-0003xA-PS for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2015 11:45:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44369) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVioh-0003wU-My for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2015 11:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YVioh-00023U-31 for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2015 11:45:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Mar 2015 15:45:03 +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.14260886477809 (code B ref 20063); Wed, 11 Mar 2015 15:45:03 +0000 Original-Received: (at 20063) by debbugs.gnu.org; 11 Mar 2015 15:44:07 +0000 Original-Received: from localhost ([127.0.0.1]:42937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YVinm-00021r-LF for submit@debbugs.gnu.org; Wed, 11 Mar 2015 11:44:07 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:57737) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YVink-00021F-OX for 20063@debbugs.gnu.org; Wed, 11 Mar 2015 11:44:05 -0400 Original-Received: from [192.168.1.7] ([96.232.130.59]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LZzKf-1ZHPTY012j-00lmsO; Wed, 11 Mar 2015 16:43:53 +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:hxSGFb+rScsexIo//9fIgOipoUKyOAvasKUz5WVhBUsLyTl/KvN ztIqejMAuELDc/v/vb3SfuVIEDOFYzoniZQSh9+1M02PoZVGdb4XdFsPe/lMnfSRBQsr+T0 TW+FrA6XC+21wRouYatBiCqwsceX+Dh7MTfCdZHTeDwE14x7uR8qGm3600XoT4LWCOsjsCn U4PUUJwUj5UoHLkvrvnSQ== 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:100370 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HwIdoHWxeemJ8H8mFc62t51RFEG0N9RwF Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/11/2015 10:09 AM, Stefan Monnier wrote: >> but the benefit of this to the end-user is very limited, and has >> a downside if done simply. >=20 > If the benefit is limited, it means the problem you mention is > correspondingly minor. I was referring to the benefit of your idea to filter out !COLLECTION elements dynamically, not the bug that offers the user nonsense or unacceptable HIST elements in the mini-buffer. >> Once REQUIRE-MATCH=3Dt, nothing but elements of COLLECTION will ever b= e >> accepted, so `concat'-ing the filtered elements of HIST would present >> only legitimate options, in the sequence most recently used, but with >> potentially a lot of duplicate entries. >=20 > I'm not sure exactly what you mean here, but I suspect you assume > COLLECTION to be finite and small. The characterization of 'finite' isn't an assumption; it's a requirement - how could one REQUIRE-MATCH=3Dt against a COLLECTION of infinite size? OTOH, your characterization of 'small' (and the meaning of 'small' is always difficult) isn't an assumption of mine, but, who knows, it may have been an assumption of the designers of the mini-buffer functions. >> Using `add-to-list', starting with an empty list would avoid >> the duplications and present the elements in sequence >> most-recently-used. >=20 > Duplicate elements in the history are yet again orthogonal. > You probably want to set history-delete-duplicates to t. I wasn't advising what I want; I was trying to be helpful by pointing out a problem in the mini-buffer function. A user may normally want to retain duplicates in her general command history as a record of past activity, but not have those duplicates appear in mini-buffer selections that have REQUIRE-MATCH=3Dt. To illustrate, imagine yourself, as a user, scrolling back through a minbuffer history in order to see what your legitimate REQUIRE-MATCH=3Dt options are. When would you ever want duplicates to appear in your scrolling? It would only delay your ability to see all your options. >>> does provide the option of "no history". >> Which brings us full-circle to line 974 of `minibuf.c' >=20 > I don't understand this, since this code checks for a nil value, not > a t value. My report never discussed the undocumented HIST=3Dt option; that was your= contribution. The documentation does provide for HIST=3Dnil, which -IS- a= central element of the bug report. We've been covering a lot of ground, so its understandable that we may have started straying from the original bug report (see there), but that also can be useful and constructive if it helps inform a resolution. This is especially true since we're discussing very widely used functions= =2E It may be helpful to look at the issue from two perspectives: 1] 'bottom-up', starting from `read-from-minibuffer'. This would be the theoretical perspective; 2] 'top-down', starting from functions such as `toggle-option' and `highlight-regexp'. This would be the practical perspective. --=20 hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 --HwIdoHWxeemJ8H8mFc62t51RFEG0N9RwF 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 iQIcBAEBAgAGBQJVAGKPAAoJEDvrUfDmCx9LQRYQAJ4OkajYM14JfoCZhVgNUmkz JMVoUkprdphXj+lvH7oGzYX6LM9hYAANDiGMPwc8JqEP67QDhrniXcDUGYXXfTMW /ESPqSeYxQF3atM5ZSqNTYZC87dx+Pclj/qfBlwqmAdqsPgo+Y542eC+Z9sCaG4E qfzXEbYkVICDLWYPFi/ik/7ekGKlbOUIHOVYQDF3MroD/dCi1zMy5Pa8i2wYsCvr w8vhN0kyO77G+lE7wdO7gtR5QEycTdkwK/tckoNhh128e8F0I2Q6BoCTwG45E5EI GLT1w0hKMFOXYtieTwbdh1jbFtbK1dHBDfKP3DYomJQ9VU8JsI0oKnGlANNVQE7t KsDAGv29mvXJDJxpHIrdR9t7kjpDRfABKtgmsIP11UsH9qnzf2N+xAzelHx6XS7b XTor+c/GHduIdCDMYtooFLwFz98tCxFru54bG1+RTlDwXPQ7wKU4Ih3TQIjwiDIV 7sdPPiva9VoZoJjws1JpOyAIs+iaZ03/F3j4So7eZhWKlhUUi1W4v8SqmrmMujba ENTwd/Rer/LfX8IwrcT5NS41UPzrNfjh3/jUHbKHG52hGelnfkdwHgcjj2K0ph9/ aOAZJuzhFo3qYgbWI3ZMleSf7LcCfAZnplfaFmeHF8/R0/txXTPClihje+cycIU0 hR6/dxyvGdaLM8gq6lnJ =IKDl -----END PGP SIGNATURE----- --HwIdoHWxeemJ8H8mFc62t51RFEG0N9RwF--