Dear Jorge,
> Hi, Antoine. You probably want to add the whole LaTeX-math-keymap to ` in the isearch-mode-map:
> #+BEGIN_SRC emacs-lisp
> (define-key isearch-mode-map (LaTeX-math-abbrev-prefix) LaTeX-math-keymap)
> #+END_SRC
> Although I am not sure with isearch if this will work as it has a rather complicated mode-map. Also probably you might want to do that only if the isearch is coming from LaTeX file.
Unfortunately that doesn't work: as you said, isearch has a pretty complicated behavior: LaTeX-math-keymap calls (insert), which inserts in the buffer, instead of the isearch minibuffer. I got away with:
(when (eq (buffer-local-value 'major-mode (current-buffer)) 'latex-mode)
(set (make-local-variable 'LaTeX-math-insert-function) (lambda (s) (isearch-process-search-string (concat "\\" s) (concat "\\" s)))))
in isearch-mode-hook. Thanks!