4

In most contexts, like Firefox of MS Office, if I have text that says, "It’s my birthday" (where the apostrophe has Unicode decimal code 8217) and I search for "It's my birthday" (with a simple apostrophe, decimal code 39) the search matches despite the fact that the two apostrophes are different Unicode characters. However, in Emacs text-mode, the two don't match. Is there a way I can get Emacs's search to consider the two apostrophes the same?

I'm using GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2013-03-13 on bob.porkrind.org on OS X Yosemite 10.10.5. I'm using a graphic display.

6
  • 1
    Emacs does this now, in development snapshots of Emacs 25 (Emacs 25 is not yet released). This "character folding" was introduced a few months ago, and it is turned on by default.
    – Drew
    Sep 26, 2015 at 6:34
  • @Drew, I tried with this text from the question and it doesn't seem to work in Emacs trunk. Sep 26, 2015 at 10:15
  • Provide an exact recipe of what you tried. Note too that you must search using the "canonical" member of the equivalence class of chars - e.g., plain ASCII apostrophe. Or else you need to use code such as what I provided, which lets you search using any of the class members for any of the other members of the class.
    – Drew
    Sep 26, 2015 at 16:30
  • @Drew, not sure if you're addressing me or Mark, but I'm just doing a standard incremental search. My query uses the canonical apostrophe.
    – kuzzooroo
    Sep 26, 2015 at 20:14
  • I was addressing you (no "@" sign). In any case, it works fine for me (and for others). But it's quite possible that what "it" is is something different for each of us. Hard to know, as you don't provide a recipe or cite a particular build (e.g. M-x emacs-version). You don't say anything about whether you are using a graphic display or only a terminal, what your platform is, or anything else that might be relevant.
    – Drew
    Sep 26, 2015 at 21:49

1 Answer 1

0

Based on Drew's comment I believe the answer is that the feature I'm seeking is available in Emacs 25 (which has yet to be released as of 2015-09-27), but I'm using Emacs 24.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.