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: Wed, 03 May 2006 23:27:29 +0300 Organization: JURTA Message-ID: <87lktirgzy.fsf@jurta.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1146688418 26795 80.91.229.2 (3 May 2006 20:33:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 May 2006 20:33:38 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 03 22:33:37 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 1FbO2M-0004kE-8i for ged-emacs-devel@m.gmane.org; Wed, 03 May 2006 22:33:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbO2L-0006X4-M7 for ged-emacs-devel@m.gmane.org; Wed, 03 May 2006 16:33:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbO1b-00069g-Nn for emacs-devel@gnu.org; Wed, 03 May 2006 16:32:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbO1a-00069A-OZ for emacs-devel@gnu.org; Wed, 03 May 2006 16:32:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbO1a-000697-K1 for emacs-devel@gnu.org; Wed, 03 May 2006 16:32:42 -0400 Original-Received: from [217.25.160.1] (helo=relay1.binet.com.ua) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FbO22-0003EN-Fy for emacs-devel@gnu.org; Wed, 03 May 2006 16:33:10 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by relay1.binet.com.ua (Postfix) with ESMTP id 7732A77D58; Wed, 3 May 2006 23:32:40 +0300 (EEST) Original-Received: from mail.binet.com.ua (i3.dialup.binet.com.ua [217.25.161.67]) by relay1.binet.com.ua (Postfix) with ESMTP id DCFF077D42; Wed, 3 May 2006 23:32:38 +0300 (EEST) Original-To: "Drew Adams" In-Reply-To: (Drew Adams's message of "Wed, 3 May 2006 08:54:45 -0700") 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:53869 Archived-At: > I think that for most uses of a history it makes no sense to keep > duplicates. I'd vote for making the default value be t and letting those few > modes where duplicates might make sense (e.g. shell-mode?) bind it to nil > unless the user has explicitly specified otherwise. > > IOW the option values could be: > > nil - means never remove duplicates > t (default) - means remove duplicates, but this can be > overridden by a mode (e.g. shell-mode) > non-nil, non-t - means always remove duplicates (never override) > > This would require code changes only for those few modes that want to > override the default (t). Plus a change to the defcustom. A related feature that specifies the maximum length of the history list uses the `history-length' _property_ of the history list _symbol_ to override the default value of the _variable_ `history-length' for a particular history list. Exactly the same thing could be implemented for `history-delete-duplicates', i.e. the property `history-delete-duplicates' would override its default value for a particular history list. -- Juri Linkov http://www.jurta.org/emacs/