From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#17130: 24.4.50; Deficient Unicode case folding Date: Sat, 29 Mar 2014 20:37:38 +0300 Message-ID: <831txkewil.fsf@gnu.org> References: <87txair0g7.fsf@ivytech.edu> <83fvm2fhii.fsf@gnu.org> <87ob0qrugy.fsf@nbtrap.com> <83y4ztec5l.fsf@gnu.org> <87ob0pnptc.fsf@nbtrap.com> <83d2h5du2e.fsf@gnu.org> <87eh1lcdaj.fsf@nbtrap.com> <838urtdpwk.fsf@gnu.org> <87ioqxxbtk.fsf@nbtrap.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1396114704 14326 80.91.229.3 (29 Mar 2014 17:38:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Mar 2014 17:38:24 +0000 (UTC) Cc: 17130@debbugs.gnu.org To: Nathan Trapuzzano Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 29 18:38:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1WTxCz-0003Rt-SG for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Mar 2014 18:38:18 +0100 Original-Received: from localhost ([::1]:40346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTxCz-00006K-B2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Mar 2014 13:38:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTxCq-00005y-S7 for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2014 13:38:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTxCl-0001E0-H0 for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2014 13:38:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTxCl-0001Dw-DK for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2014 13:38:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WTxCk-0000gd-AR for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2014 13:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Mar 2014 17:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17130 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17130-submit@debbugs.gnu.org id=B17130.13961146642612 (code B ref 17130); Sat, 29 Mar 2014 17:38:02 +0000 Original-Received: (at 17130) by debbugs.gnu.org; 29 Mar 2014 17:37:44 +0000 Original-Received: from localhost ([127.0.0.1]:56345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTxCQ-0000g3-Od for submit@debbugs.gnu.org; Sat, 29 Mar 2014 13:37:43 -0400 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:43224) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTxCO-0000fs-0o for 17130@debbugs.gnu.org; Sat, 29 Mar 2014 13:37:41 -0400 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0N3700700KDF2400@mtaout26.012.net.il> for 17130@debbugs.gnu.org; Sat, 29 Mar 2014 20:36:29 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N37003YSKWTB650@mtaout26.012.net.il>; Sat, 29 Mar 2014 20:36:29 +0300 (IDT) In-reply-to: <87ioqxxbtk.fsf@nbtrap.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:87534 Archived-At: > From: Nathan Trapuzzano > Cc: 17130@debbugs.gnu.org > Date: Sat, 29 Mar 2014 11:29:43 -0400 > > Eli Zaretskii writes: > > >> σ, ς, and Σ would all have σ in the CANONICALIZE slot, since they all > >> fold to σ. > > > > So you would need to search all characters to find those which have σ > > in the CANONICALIZE slot -- not very efficient, to say the least. > > Doesn't this already happen? No, not when that slot is used for case-insensitive search. You just use it to get the canonical equivalent, i.e. use the one-way mapping that it provides. > If not, then what is the CANONICALIZE slot doing that couldn't be > done with the regular upcase/downcase slots by themselves? If that slot is "trivial", i.e. contains the lower-case variant of the character, then indeed this slot doesn't add information, I think, only utility. But it doesn't have to contain the lower-case variant. > > IOW, what you suggest will provide a one-way mapping, whereas we need > > a two-way mapping. > > Not sure I follow. Seems to me the CANONICALIZE slot is sufficient, at > least in principle. It is sufficient for mapping a character to its canonical equivalent, but not finding the non-canonical variants of a canonical character. IOW, it is not well suited to finding ς given just σ. > > Emacs should use this data for up-casing and down-casing as well, for > > example, so that M-l downcases Σ to ς, not σ, when it is at the end of > > the word. Wouldn't users of Greek expect that? > > Maybe. I'm just saying that Unicode itself doesn't prescribe or even > recommend such behavior. It defines case conversions independently of > ordering. > > That said, making M-l downcase terminal Σ to ς would be a nice feature > that could be enabled, e.g., by enabling a minor mode or by modifying > some *-functions variable of functions that get called before the normal > behavior of M-l is applied, etc. But it shouldn't have anything to do > with Unicode-compliant case-insensitive searching. For searching, you only need the CANONICALIZE slot. But what about replacing the search string while keeping the letter case in the replacement? For that, CANONICALIZE alone is not enough, you need the reverse mapping. > > Personally, I think we need an additional slot for what you want, and > > code to use it. > > Given the point about ß, you're probably right. Unless we can make > entries in the CANONICALIZE slot be strings rather than code points. This is Lisp; a vector slot can contain any Lisp object. But using CANONICALIZE for what you want would be wrong, I think, because it will screw up case-insensitive search, which expects to find there a single character.