From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#21140: 25.0.50; Isearch "char-fold" by default Date: Mon, 27 Jul 2015 18:16:47 -0700 Message-ID: <55B6D7FF.5070806@dancol.org> References: <86vbd5n27r.fsf@example.com> <866155mzyh.fsf@example.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="r9R0MjCdNcCR0MdGGNP08x8SBudn2TuCN" X-Trace: ger.gmane.org 1438046246 12248 80.91.229.3 (28 Jul 2015 01:17:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jul 2015 01:17:26 +0000 (UTC) Cc: 21140@debbugs.gnu.org To: bruce.connor.am@gmail.com, Sebastien Vauban Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 28 03:17:14 2015 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 1ZJtW4-0002EC-Pf for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Jul 2015 03:17:13 +0200 Original-Received: from localhost ([::1]:56616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJtW3-0004g7-Ld for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jul 2015 21:17:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJtVz-0004eP-Fz for bug-gnu-emacs@gnu.org; Mon, 27 Jul 2015 21:17:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJtVu-0002V9-V8 for bug-gnu-emacs@gnu.org; Mon, 27 Jul 2015 21:17:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJtVu-0002V2-P6 for bug-gnu-emacs@gnu.org; Mon, 27 Jul 2015 21:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZJtVu-0001A8-D7 for bug-gnu-emacs@gnu.org; Mon, 27 Jul 2015 21:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Jul 2015 01:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21140 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21140-submit@debbugs.gnu.org id=B21140.14380462184455 (code B ref 21140); Tue, 28 Jul 2015 01:17:02 +0000 Original-Received: (at 21140) by debbugs.gnu.org; 28 Jul 2015 01:16:58 +0000 Original-Received: from localhost ([127.0.0.1]:60551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZJtVq-00019n-5j for submit@debbugs.gnu.org; Mon, 27 Jul 2015 21:16:58 -0400 Original-Received: from dancol.org ([96.126.100.184]:60341) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZJtVo-00019f-AX for 21140@debbugs.gnu.org; Mon, 27 Jul 2015 21:16:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=UqgtXlynZgKqbwJ4SOiX43v4OjVvA2sWZWPSgdSvgt4=; b=JPFeuO3eZAFKHsCMZ46gKqH2vXGIfU4jh3Pc00Ofmq3g8Oeu3CGVEx8mARTpwVX7cV/7BY1XzeOspZ21Uj4RvO4M7Ne7HpVO7+YKnMr3Wt2DmzBEHjA2Voa89J7ylA7xSACrCQtG2X02zka/WxXPOnwsjjvOXAZuQh4IqOuP93X45voZVQ8wcKXqRtT2vSUid+361R4iOeQD849qzbsdiUp4nz6LbEosPkS06Vc9ly45spRhuPbh7Mn3VcDZpBf9p7wbU1dV7TAnOugfM4rIvyULF/2pIRgUqPHoQnYoTL0xZeycm2AiXv70QC5BiIV2dQ1El4WlxM2F/F7GKBkbNg==; Original-Received: from [2620:10d:c081:f80::c:c5a9] (helo=[IPv6:2620:10d:c083:10fb:2ab2:bdff:fe1c:db58]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1ZJtVm-0003Le-Kl; Mon, 27 Jul 2015 18:16:54 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 In-Reply-To: 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:105177 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --r9R0MjCdNcCR0MdGGNP08x8SBudn2TuCN Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/27/2015 07:50 AM, Artur Malabarba wrote: >> > Char fold search is a text search, not a regexp search. It does use >> > a regexp underneath, but that should be invisible to the user. You >> > type some text and it matches that text or similar texts. >> >> "Char fold" search is a "fuzzy" search, then, similar to >> https://github.com/auto-complete/fuzzy-el? >=20 > Not quite. It just allows simple ascii characters to match their comple= x > unicode counterparts. > For instance, if you search for "a" you will also match "=C3=A1" and "=C3= =A3". >=20 >> What comes the name "char fold" from? It's not very intuitive to me >> that it's some sort of fuzzy search; moreover, it looks like "case fol= d" >> search, which is again something different... >=20 > It is exactly like case fold. ;-) > Where case folding folds together "a" and "A", char folding folds > together "a", "=C3=A1" and "=C3=A3". >=20 > The name is also something under discussion. Suggestions of something > more intuitive are very much welcome. >=20 I've been using this bit of awfulness to solve the "char-fold" thing. It hides "char-fold" by default and displays "raw" if we've turned off char-folding. It still displays "raw regex isearch" though. I like the idea of taking over the modeline to display isearch state. (defun fix-isearch--describe-word-mode (word-mode &optional space-before)= (let ((description (cond ((eq word-mode 'character-fold-to-regexp) "") ((and (symbolp word-mode) (get word-mode 'isearch-message-prefix)) (get word-mode 'isearch-message-prefix)) (word-mode "word ") (t "raw ")))) (if space-before ;; Move space from the end to the beginning. (replace-regexp-in-string "\\(.*\\) \\'" " \\1" description) description))) (when (fboundp 'isearch--describe-word-mode) (advice-add 'isearch--describe-word-mode :override 'fix-isearch--describe-word-mode)) --r9R0MjCdNcCR0MdGGNP08x8SBudn2TuCN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJVttgAAAoJEN4WImmbpWBldSwP/jMD2qdiiDUZzIOLI0Cb2fcf mA8ta73mbNcP/T1HUjMhre2jol5QiCrK6pmL87jSE/1bBJ1DQj4xF6qPr6f1bmxm v9LRwhpWlti/9OC+cUmWsgpzAppBV9R1INJaEZcRNzeK+N5MEjUs5T/GOgGZAoSD cJbetRHROzyj6Yi19k7YniNsyrp65tcLtEC7OVRCxdsJpgGCvHrcWf4mKO3Akkzy duxHgb5Ek5F0qM53JathWx6gkmT7s9EggYcKReKrJh/aeR7ztGL9M+oUWL/7VMkz EdWeyEurnv18ylymzTiA76XvS8g+OXoyEHVeWNdP4JikPuRCE4bF+exuHaNE491Z Fh2maXpxXoPUhaR7q3ORwV/Hvh1HNo7PwSgVZ+a88XhbZSqYFE9Ykk2Fd++lHYes zVQDowTfKFvY6STZ18/jtIIaj3Pl+RHcapjoSVns+3y4ar1772g0Fp/XyMbm48eS gt2g8mPbIW1KQR8oBZgecBlnPG3KFAG7ItXA42qh5rjJIcyfHVRj+Wy7ZQG3FevO /Fjb/355O3pL4lSkTc0F+fqyzdV4hyf0WqGhUyjFxMiNTCFXZWJURRGDbUx2uYMf DFKHYdfElAbw/1kyct9gyQ1W1pfGDYHgqCSgF7RN/ZSPiCytIHBOS69U2hsMrwfC PQxHb+GFLNAaPQkPDVj7 =0yiX -----END PGP SIGNATURE----- --r9R0MjCdNcCR0MdGGNP08x8SBudn2TuCN--