all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alin Soare <as1789@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Incremental search with face-remapping-alist does not always work
Date: Sun, 8 Dec 2013 08:39:16 +0200	[thread overview]
Message-ID: <CA+Xtq3VaxorychGYpga5AM2Vf41_5BTPwZ+hdOZFWnr7R0EbZg@mail.gmail.com> (raw)
In-Reply-To: <CA+Xtq3Vq0Kkbg3hTBT=syzE2J_HdtaOEK=jjKiF_n67XTmBUag@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]

Yes.

Everything was done lovely.

The problem was that in the *Info* mode I should not have put :height on
the 'default face, because the lazy-highlight and isearch faces were
derived temporarly from it.

I debugged a little isearch.el to realize that.

No more help needed.



2013/12/8 Alin Soare <as1789@gmail.com>

>
> I tried to configure the faces of isearch-mode, given that for each major
> mode I defined a face-remapping-alist.
>
>
> Here is my problem:
>
> 1. take the code below.
>
> 2. After evaluation, isearch seems to work nice.
>
> 3. Goto into the *Info* buffer.
>
> 4. Search the string from the title. (a string from a positon with
> Info-title-1 face)
>
> 5. PROBLEM: the string of the title will get very small, and will change
> the font.
>
> 6. QUESTION: How can this be avoided, and the expected behaviour be
> accomplished ?
>
>
>
> (defun isearch-setup ()
>   (setq-local
>    lazy-highlight-face
>    (face-remap-add-relative 'lazy-highlight  '(:foreground "red")
> 'default))
>   (setq-local
>    isearch-face
>    (face-remap-add-relative 'isearch  '(:strike-through "white") 'default))
>   )
>
> (defun isearch-exit ()
>   (face-remap-remove-relative lazy-highlight-face)
>   (face-remap-remove-relative isearch-face)
>   (with-current-buffer (get-buffer " *Echo Area 0*")
>     (face-remap-remove-relative echo-area-isearch-fail-face)
>     )
>   (with-current-buffer (get-buffer " *Echo Area 1*")
>     (face-remap-remove-relative echo-area-isearch-fail-face)
>     )
>   )
>
> (add-hook 'isearch-mode-hook 'isearch-setup)
>
> (add-hook 'isearch-mode-end-hook 'isearch-exit)
>
>

[-- Attachment #2: Type: text/html, Size: 2604 bytes --]

      reply	other threads:[~2013-12-08  6:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-08  6:19 Incremental search with face-remapping-alist does not always work Alin Soare
2013-12-08  6:39 ` Alin Soare [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+Xtq3VaxorychGYpga5AM2Vf41_5BTPwZ+hdOZFWnr7R0EbZg@mail.gmail.com \
    --to=as1789@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.