From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: history-delete-duplicates and keep-all Date: Sat, 10 Dec 2005 12:29:08 +0200 Organization: JURTA Message-ID: <87mzj98eh1.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134215501 29640 80.91.229.2 (10 Dec 2005 11:51:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 10 Dec 2005 11:51:41 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 10 12:51:31 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1El3Eo-0008Pz-F7 for ged-emacs-devel@m.gmane.org; Sat, 10 Dec 2005 12:50:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1El2rP-0008TB-7N for ged-emacs-devel@m.gmane.org; Sat, 10 Dec 2005 06:25:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1El2De-00079r-MB for emacs-devel@gnu.org; Sat, 10 Dec 2005 05:44:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1El2CJ-00074W-Bv for emacs-devel@gnu.org; Sat, 10 Dec 2005 05:43:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1El2Bo-00072f-8r for emacs-devel@gnu.org; Sat, 10 Dec 2005 05:42:53 -0500 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1El2DA-0000xu-8P for emacs-devel@gnu.org; Sat, 10 Dec 2005 05:44:16 -0500 Original-Received: from mail.neti.ee (80-235-32-231-dsl.mus.estpak.ee [80.235.32.231]) by Relayhost1.neti.ee (Postfix) with ESMTP id EAB801CF5 for ; Sat, 10 Dec 2005 12:42:44 +0200 (EET) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:47379 Archived-At: Adding the arg `keep-all' to `read-from-minibuffer' a few months ago caused a bug for the case when `history-delete-duplicates' is t. While looking at fixing this bug, I realized that instead of using the new arg `keep-all', a cleaner solution would be to reuse the existing variable `history-delete-duplicates'. Its purpose is exactly the same: to control how input from the minibuffer is added to the history. So let-binding `history-delete-duplicates' in necessary places will make the arg `keep-all' obsolete. This arg also has another drawback: it is available only to one completion function `read-from-minibuffer' and is not available to all other completion functions. Currently `keep-all' is used only in `query-replace'. So it is not too late to let-bind `history-delete-duplicates' in this place instead. Thus `history-delete-duplicates' should support three different values: 1. to put all inputs in the history list, even empty and duplicate ones 2. to put input in the history list, unless it is identical to the most recent history item (this is the current default behavior) 3. to delete duplicate inputs from the history list (this happens when `history-delete-duplicates' is t) Also currently `call-interactively' doesn't respect the value of `history-delete-duplicates', and always puts all duplicate inputs in the `command-history'. It works as if `history-delete-duplicates' had the value's type 1 from the list above. This could be fixed as well. -- Juri Linkov http://www.jurta.org/emacs/