Issue #286 invalid

evil-search with smart evil-ex-search-case fails with Emacs trunk

epich
created an issue

As of commit [1] on the Emacs trunk, evil-search doesn't work when using lower case to search for capitalized terms.

To reproduce, define ~/emacs-evil-search.el:

(add-to-list 'load-path "~/.emacs.d/evil")
(require 'evil)
(setq evil-search-module 'evil-search)
(evil-mode 1)

Then ./src/emacs -Q --load ~/emacs-evil-search.el switch to *Messages* buffer, search for gnu. Expected to find "GNU" string, which is in the Messages buffer, but it was not found.

I'm using latest Evil: bad90df299ee01f679452cbf76807330d447a83f

[1] Offending commit from Emacs Savannah Git repo:

b7139a2e8b2dc9c06507909cd863d0c124388f91 is the first bad commit
commit b7139a2e8b2dc9c06507909cd863d0c124388f91
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Date:   Wed Mar 27 10:33:03 2013 -0400

    * lisp/case-table.el (case-table-get-table): New function.
    * lisp/case-table.el: Use lexical-binding.
    (case-table-get-table): New function.
    (get-upcase-table): Use it.  Mark as obsolete.  Adjust callers.
    * src/casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
    the upcase table.

Comments (5)

  1. Frank Fischer repo owner
    • changed status to open

    Hm, very strange. It seems to work in other buffers, e.g. in *scratch* searching for "this" matches "This".

    Interestingly, the following code does not work in the *Message* buffer as expected (in a clean emacs -Q)

    (let ((case-fold-search t)) (re-search-forward "g"))
    

    Although the variable case-fold-search should be responsible for case-insensitive search. And this does work in other buffers. So I wonder if this is really an Evil bug or an Emacs bug.

  2. Log in to comment