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: Case mapping of sharp s Date: Mon, 30 Nov 2009 14:01:04 +0200 Organization: JURTA Message-ID: <87y6loxkx7.fsf@mail.jurta.org> References: <4B05A11F.5000700@gmx.de> <4B05D3EE.2000101@gmx.de> <4B0759BA.2010303@gmx.de> <19207.50135.691132.983395@a1i15.kph.uni-mainz.de> <4B0C32BF.2020708@gmx.de> <87ljhpau88.fsf@mail.jurta.org> <19219.28108.775726.216289@a1i15.kph.uni-mainz.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1259585156 14774 80.91.229.12 (30 Nov 2009 12:45:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2009 12:45:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ulrich Mueller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 30 13:45:44 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NF5dQ-0002f6-61 for ged-emacs-devel@m.gmane.org; Mon, 30 Nov 2009 13:45:44 +0100 Original-Received: from localhost ([127.0.0.1]:38829 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NF5dP-0005cy-PO for ged-emacs-devel@m.gmane.org; Mon, 30 Nov 2009 07:45:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NF5cf-00054T-Rr for emacs-devel@gnu.org; Mon, 30 Nov 2009 07:44:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NF5cc-00050p-0G for emacs-devel@gnu.org; Mon, 30 Nov 2009 07:44:57 -0500 Original-Received: from [199.232.76.173] (port=40142 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NF5cb-00050d-Mt for emacs-devel@gnu.org; Mon, 30 Nov 2009 07:44:53 -0500 Original-Received: from smtp-out3.starman.ee ([85.253.0.5]:40087 helo=mx1.starman.ee) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NF5cb-0001CJ-Ii for emacs-devel@gnu.org; Mon, 30 Nov 2009 07:44:53 -0500 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.52.137.cable.starman.ee [82.131.52.137]) by mx1.starman.ee (Postfix) with ESMTP id 1C8153F40C0; Mon, 30 Nov 2009 14:44:47 +0200 (EET) In-Reply-To: <19219.28108.775726.216289@a1i15.kph.uni-mainz.de> (Ulrich Mueller's message of "Mon, 30 Nov 2009 08:01:32 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:117964 Archived-At: > I'm not sure if it's exactly what you need, but I use the following to > search for characters while ignoring any accents: > > (let ((eqv-list '("aA=E0=C0=E1=C1=E2=C2=E3=C3=E4=C4=E5=C5" > "cC=E7=C7" > "eE=E8=C8=E9=C9=EA=CA=EB=CB" > "iI=EC=CC=ED=CD=EE=CE=EF=CF" > "nN=F1=D1" > "oO=F2=D2=F3=D3=F4=D4=F5=D5=F6=D6=F8=D8" > "uU=F9=D9=FA=DA=FB=DB=FC=DC" > "yY=FD=DD=FF")) > (table (standard-case-table)) > canon) > (setq canon (copy-sequence table)) > (mapcar (lambda (s) > (mapcar (lambda (c) (aset canon c (aref s 0))) s)) > eqv-list) > (set-char-table-extra-slot table 1 canon) > (set-char-table-extra-slot table 2 nil) > (set-standard-case-table table)) > > I don't know if there is a simpler way to achieve this. This is exactly what I need - to ignore accents while searching. I wonder why there is no mode like `search-ignore-accents-mode' that does this. --=20 Juri Linkov http://www.jurta.org/emacs/