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: Re: should search ring contain duplicates? Date: Thu, 11 May 2006 01:55:47 +0300 Organization: JURTA Message-ID: <87ejz1mqvg.fsf@jurta.org> References: <200605030727.k437R2Wx009975@amrm2.ics.uci.edu> <87bqufwbls.fsf@jurta.org> <8764kezswj.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 1147302408 3818 80.91.229.2 (10 May 2006 23:06:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 May 2006 23:06:48 +0000 (UTC) Cc: dann@ics.uci.edu, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 11 01:06:43 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fdxkd-00088x-Eb for ged-emacs-devel@m.gmane.org; Thu, 11 May 2006 01:05:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fdxkc-0001gM-S8 for ged-emacs-devel@m.gmane.org; Wed, 10 May 2006 19:05:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdxkP-0001f1-JK for emacs-devel@gnu.org; Wed, 10 May 2006 19:05:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdxkN-0001em-LB for emacs-devel@gnu.org; Wed, 10 May 2006 19:05:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdxkN-0001eh-62 for emacs-devel@gnu.org; Wed, 10 May 2006 19:05:35 -0400 Original-Received: from [217.25.160.1] (helo=relay1.binet.com.ua) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fdxlj-0000ST-Qg for emacs-devel@gnu.org; Wed, 10 May 2006 19:07:00 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by relay1.binet.com.ua (Postfix) with ESMTP id 452EC77D49; Thu, 11 May 2006 02:05:24 +0300 (EEST) Original-Received: from mail.binet.com.ua (i58.dialup.binet.com.ua [217.25.161.122]) by relay1.binet.com.ua (Postfix) with ESMTP id 34D3277D39; Thu, 11 May 2006 02:05:21 +0300 (EEST) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Wed, 10 May 2006 11:34:41 +0200") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by ClamAv at binet.com.ua 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:54208 Archived-At: >>> Below is a tested patch that removes `keep-all' from `read-from-minibuffer', > > Did you test that with your changes, it still fixes the original problem > which was the reason for the original change? > > http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00287.html I tested it with all test cases from this thread, but that was before adding add-to-history to CVS. > But pls. consider using add-to-history instead of explicitly testing > for history-delete-duplicates. To use add-to-history there should be a way to tell read-from-minibuffer not to add new elements to the history list, so add-to-history could undertake this task itself later. nil as the `hist' argument of read-from-minibuffer doesn't count because the history list should be available for M-p. > BTW, add-to-history should probably be fixed to _not_ add an element > which is already at the head of the history. Then it becomes a complete duplicate of C code. Isn't then better to call the Lisp function add-to-history from the C implementation of read_minibuf? -- Juri Linkov http://www.jurta.org/emacs/