all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#21148: 25.0.50; Huge problems with case-insensitive search
@ 2015-07-28  8:44 Sebastien Vauban
  2015-07-28 13:23 ` Artur Malabarba
       [not found] ` <mailman.7537.1438089852.904.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Sebastien Vauban @ 2015-07-28  8:44 UTC (permalink / raw)
  To: 21148-ubl+/3LiMTaZdePnXv/OxA

As you can see on the screencast http://screencast.com/t/nq7xkfJiy,
case-insensitive [1] searches are becoming very fuzzy to me.

Sample text file:

--8<---------------cut here---------------start------------->8---
Let's search for all case-insensitive occurrences of "workingd"...

#+begin_src shell :var workingDir=(file-name-directory (buffer-file-name))
# No init file.
cmd="$EMACS -q -l ${workingDir}.init.el"
#+end_src
--8<---------------cut here---------------end--------------->8---

Recipe:

- Incremantally search (with `C-s') for "workingd"

Problems:

- While point is at the beginning of the buffer, and while the string
  "workingd" exists in the buffer, Isearch tells me from the start that
  it fails finding my pattern!??

- As the search is case-insensitive, `C-s' should allow me to cycle
  between the 3 strings found (1 "workingd" and 2 "workingD"), but it
  finally only finds the exact match "workingd".

Note -- Anzu correctly reports me (in the modeline) that there are
        3 found strings...

In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
 of 2015-07-03 on LEG570
Repository revision: 2b848fadd51e805b2f46da64c5958ea7f009048a
Windowing system distributor `Microsoft Corp.', version 6.3.9600
Configured using:
 `configure --host=i686-pc-mingw32 --enable-checking=yes,glyphs'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS

[1]  ┌────
     │ case-fold-search is a variable defined in ‘C source code’.
     │ Its value is t
     │ 
     │   Automatically becomes buffer-local when set.
     │ 
     │ Documentation:
     │ Non-nil if searches and matches should ignore case.
     └────






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#21148: 25.0.50; Huge problems with case-insensitive search
  2015-07-28  8:44 bug#21148: 25.0.50; Huge problems with case-insensitive search Sebastien Vauban
@ 2015-07-28 13:23 ` Artur Malabarba
       [not found] ` <mailman.7537.1438089852.904.bug-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Artur Malabarba @ 2015-07-28 13:23 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: 21148

What value do you have for `isearch-search-fun-function'?

Also, could you see if all ofthese problems still happen when you
don't use anzu? (just to help narrow things down).





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#21148: 25.0.50; Huge problems with case-insensitive search
       [not found]   ` <mailman.7537.1438089852.904.bug-gnu-emacs-mXXj517/zsQ@public.gmane.org>
@ 2015-07-28 13:50     ` Sebastien Vauban
  2015-07-28 14:10       ` Artur Malabarba
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastien Vauban @ 2015-07-28 13:50 UTC (permalink / raw)
  To: Artur Malabarba; +Cc: 21148-ubl+/3LiMTaZdePnXv/OxA

Artur Malabarba <bruce.connor.am-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> What value do you have for `isearch-search-fun-function'?

  ┌────
  │ isearch-search-fun-function is a variable defined in ‘isearch.el’.
  │ Its value is fuzzy-isearch
  └────

> Also, could you see if all ofthese problems still happen when you
> don't use anzu? (just to help narrow things down).

I guess I'd better should try without using `fuzzy', then?

--8<---------------cut here---------------start------------->8---
    ;; fuzzy matching (must-have!)
    (with-eval-after-load "fuzzy-autoloads"
      (autoload 'turn-on-fuzzy-isearch "fuzzy" nil t)
      (add-hook 'isearch-mode-hook #'turn-on-fuzzy-isearch))
--8<---------------cut here---------------end--------------->8---

Indeed, removing that resolve this problem...

Though, fuzzy was quite useful. Is there a standard Emacs alternative to
it?

Best regards,
  Seb





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#21148: 25.0.50; Huge problems with case-insensitive search
  2015-07-28 13:50     ` Sebastien Vauban
@ 2015-07-28 14:10       ` Artur Malabarba
  2015-07-28 23:15         ` Artur Malabarba
  0 siblings, 1 reply; 5+ messages in thread
From: Artur Malabarba @ 2015-07-28 14:10 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: 21148

> --8<---------------cut here---------------start------------->8---
>     ;; fuzzy matching (must-have!)
>     (with-eval-after-load "fuzzy-autoloads"
>       (autoload 'turn-on-fuzzy-isearch "fuzzy" nil t)
>       (add-hook 'isearch-mode-hook #'turn-on-fuzzy-isearch))
> --8<---------------cut here---------------end--------------->8---
>
> Indeed, removing that resolve this problem...
>
> Though, fuzzy was quite useful. Is there a standard Emacs alternative to
> it?

Report an issue to fuzzy, I'm sure it's easy to solve. I had a very
similar problem with longlines-mode, and it was a very simple fix.
CC me in the issue report (If it's on Github ping me @Malabarba) and
I'll help sort it out.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#21148: 25.0.50; Huge problems with case-insensitive search
  2015-07-28 14:10       ` Artur Malabarba
@ 2015-07-28 23:15         ` Artur Malabarba
  0 siblings, 0 replies; 5+ messages in thread
From: Artur Malabarba @ 2015-07-28 23:15 UTC (permalink / raw)
  To: 21148-done

Marking this as fixed, it has been reported to fuzzy-el:
https://github.com/auto-complete/fuzzy-el/issues/8

For future, the problem here is that there are some search packages
which set the `isearch-search-fun-function' to their own
(poorly-written) function. In this case (and on longlines-mode) the
issue is that the function does the following check:

(cond (isearch-word
          (if isearch-forward 'word-search-forward 'word-search-backward))
         ...)

This assumes that `isearch-word' only ever has a boolean meaning, but
it's been a while now that this variable can also hold a function.
That's how symbol-isearch is implemented, in fact.
The reason these problems weren't reported before, is that the default
value of isearch-word was still nil up until now, but enabling
char-fold by default changed the default value to a function.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-28 23:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-28  8:44 bug#21148: 25.0.50; Huge problems with case-insensitive search Sebastien Vauban
2015-07-28 13:23 ` Artur Malabarba
     [not found] ` <mailman.7537.1438089852.904.bug-gnu-emacs@gnu.org>
     [not found]   ` <mailman.7537.1438089852.904.bug-gnu-emacs-mXXj517/zsQ@public.gmane.org>
2015-07-28 13:50     ` Sebastien Vauban
2015-07-28 14:10       ` Artur Malabarba
2015-07-28 23:15         ` Artur Malabarba

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.