GNU bug report logs - #24510
25.1; Info: searching for ` does not find what looks like `

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Thu, 22 Sep 2016 17:05:01 UTC

Severity: minor

Tags: moreinfo

Found in versions 25.1, 24.5

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #104 received at 24510 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Drew Adams <drew.adams <at> oracle.com>, 24510 <at> debbugs.gnu.org
Subject: Re: bug#24510: 25.1; Info: searching for ` does not find what looks
 like `
Date: Fri, 29 Apr 2022 09:51:09 +0300
>> 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))




This bug report was last modified 3 years and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.