From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Davis Herring Newsgroups: gmane.emacs.devel Subject: Re: char equivalence classes in search - why not symmetric? Date: Tue, 01 Sep 2015 12:40:18 -0600 Organization: XCP-1 Message-ID: <55E5F112.3090908@lanl.gov> References: <2a7b9134-af2a-462d-af6c-d02bad60bbe8@default> <55E5C9AC.3010007@lanl.gov> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1441133335 11089 80.91.229.3 (1 Sep 2015 18:48:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Sep 2015 18:48:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 01 20:48:45 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZWqbs-00057o-ED for ged-emacs-devel@m.gmane.org; Tue, 01 Sep 2015 20:48:44 +0200 Original-Received: from localhost ([::1]:56906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWqbs-0004n7-3d for ged-emacs-devel@m.gmane.org; Tue, 01 Sep 2015 14:48:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWqTq-00007y-6U for emacs-devel@gnu.org; Tue, 01 Sep 2015 14:40:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWqTm-0007PH-5l for emacs-devel@gnu.org; Tue, 01 Sep 2015 14:40:26 -0400 Original-Received: from proofpoint5.lanl.gov ([2001:400:4210:400::a5]:34067) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWqTl-0007MU-Ss for emacs-devel@gnu.org; Tue, 01 Sep 2015 14:40:22 -0400 Original-Received: from mailrelay2.lanl.gov (mailrelay2.lanl.gov [128.165.4.103]) by mailgate5.lanl.gov (8.15.0.59/8.14.7) with ESMTP id t81IeIf6009671; Tue, 1 Sep 2015 12:40:18 -0600 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay2.lanl.gov (Postfix) with ESMTP id 8E49EEBC492; Tue, 1 Sep 2015 12:40:18 -0600 (MDT) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay2.lanl.gov Original-Received: from xray-r08.lanl.gov (xray-r08.lanl.gov [128.165.123.189]) by mailrelay2.lanl.gov (Postfix) with ESMTP id 79120EBC491; Tue, 1 Sep 2015 12:40:18 -0600 (MDT) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110717 Lanikai/3.1.11 In-Reply-To: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151, 1.0.33, 0.0.0000 definitions=2015-09-01_07:2015-08-31, 2015-09-01, 1970-01-01 signatures=0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:400:4210:400::a5 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189412 Archived-At: >> Because having both input characters mean the same thing >> uselessly deprives the user of expressive power. > > Examples/arguments/reasons, please. IOW, prove it. I'm sorry: I thought it was obvious. For case folding, there are three sets of characters that might be considered a match: [a], [A], and [aA]. The default Emacs behavior is to make "a" mean [aA] and "A" mean [A]. For the (relatively rare) case in which [a] is desired, one can turn case-fold-search off (e.g., with M-c). Then you gain [a] and lose [aA] as a choice (you can't have all three from just two characters!). With your suggestion (which addresses only case-fold-search, of course), we would have only [aA] available whether you typed "a" or "A". That is the less expressive power: the semantically distinct options available have been reduced. Of course, with more than one character there are yet other possibilities: for two characters there are 9, of which "ab" gives you [aA][bB] and each of the other three permutations give one (case-sensitive) match each. 4/9 isn't great, but it's better than 1/9! > IMO, more users have been tripped up than helped by the rule > that "An upper-case letter anywhere in the incremental search > string makes the search case-sensitive." (emacs) Search Case. How did that upper-case letter get there? Commands like C-w are careful not to add uppercase letters if there aren't already some. So the user must have typed it explicitly, and so they were paying attention to case and have no need for a case-insensitive search. The only harm is if they are inconsistent in their typing -- during something as brief as isearch. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.