From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#24510: 25.1; Info: searching for ` does not find what looks like ` Date: Fri, 29 Apr 2022 09:51:09 +0300 Organization: LINKOV.NET Message-ID: <86fslwxuxe.fsf@mail.linkov.net> References: <6905ca6f-0573-4a2b-b346-d5df47862e09@default> <87zgk5mqkm.fsf@gnus.org> <86levp6rce.fsf@mail.linkov.net> <8735hxjcqj.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32474"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 24510@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 29 09:09:50 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nkKlC-0008K5-AD for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Apr 2022 09:09:50 +0200 Original-Received: from localhost ([::1]:38818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkKlA-0007Zq-LJ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Apr 2022 03:09:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkKjV-0007Z4-Qj for bug-gnu-emacs@gnu.org; Fri, 29 Apr 2022 03:08:13 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkKjR-0000Ht-Re for bug-gnu-emacs@gnu.org; Fri, 29 Apr 2022 03:08:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nkKjR-0001Wo-M7 for bug-gnu-emacs@gnu.org; Fri, 29 Apr 2022 03:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Apr 2022 07:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24510 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 24510-submit@debbugs.gnu.org id=B24510.16512160335817 (code B ref 24510); Fri, 29 Apr 2022 07:08:01 +0000 Original-Received: (at 24510) by debbugs.gnu.org; 29 Apr 2022 07:07:13 +0000 Original-Received: from localhost ([127.0.0.1]:50756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkKie-0001Vl-Lf for submit@debbugs.gnu.org; Fri, 29 Apr 2022 03:07:12 -0400 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:55445) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkKid-0001VW-1g for 24510@debbugs.gnu.org; Fri, 29 Apr 2022 03:07:11 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 77AA0100011; Fri, 29 Apr 2022 07:07:02 +0000 (UTC) In-Reply-To: <8735hxjcqj.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 28 Apr 2022 20:15:32 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:230929 Archived-At: >> It's possible to enable char-fold search only in Info mode, >> but probably this should be left for user customization, >> because this problem is not Info-specific: most likely the user >> might want ` and ‘ to be treated equivalently pretty much everywhere. > > My thorough research shows that 99.7% of Emacs users don't see a ‘ > outside of *Help* and *info*, so doing something special there seems > useful. > >> But still if the user want this only in Info, it's very easy to type >> C-s M-s ' `list. > > That does more than just fold `' with ‘’, though. So only folding `' with ‘’ is required? Then it's easy to do: diff --git a/lisp/info.el b/lisp/info.el index 8ca6c54979..656a3b0b11 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -41,7 +41,9 @@ ;;; Code: -(eval-when-compile (require 'cl-lib)) +(eval-when-compile + (require 'cl-lib) + (require 'subr-x)) (defgroup info nil "Info subsystem." @@ -2147,7 +2149,10 @@ Info-isearch-search (funcall isearch-regexp-function string lax) (word-search-regexp string lax)))) (isearch-regexp string) - (t (regexp-quote string))) + (t (thread-last + (regexp-quote string) + (replace-regexp-in-string "`" "[`‘]") + (replace-regexp-in-string "'" "['’]")))) bound noerror count (unless isearch-forward 'backward))) (point))