unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: rms@gnu.org, drew.adams@oracle.com, emacs-devel@gnu.org
Subject: Re: how to control isearch for invisible text
Date: Mon, 14 Aug 2006 14:24:45 +0200	[thread overview]
Message-ID: <85d5b3tshe.fsf@lola.goethe.zz> (raw)
In-Reply-To: <jwvirkvtszn.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 14 Aug 2006 08:14:48 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> For reveal-mode, we should just provide a "pre-redisplay-hook" run,
>>> as the name indicates, just before doing redisplay.  That would
>>> allow reveal-mode to do the "show invisible text" even in
>>> query-replace and this without even changing query-replace's code.
>
>> That is a bit heavy-handed for my taste, at least for this purpose.
>> Such a hook would have to be global, as redisplay is not a
>> buffer-centric activity, and thus every function with a possible need
>> would have to register and unregister there, and check the state
>> across buffers for every redisplay.
>
> I doubt it's that hard to implement a proper pre-redisplay-hook which can be
> set buffer-locally.

This is pretty useless, since in your kind of application, it would be
important to know window-point rather than point.  The documentation
of window-point already states:

    window-point is a built-in function in `C source code'.
    (window-point &optional WINDOW)

    Return current value of point in WINDOW.
    For a nonselected window, this is the value point would have
    if that window were selected.

    Note that, when WINDOW is the selected window and its buffer
    is also currently selected, the value returned is the same as (point).
    It would be more strictly correct to return the `top-level' value
    of point, outside of any save-excursion forms.
    But that is hard to define.

    [back]

And that is precisely the same problem with reveal-mode: sit-for can
be called inside of save-excursions, and the current window-point need
not correspond with the point relevant at top-level.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2006-08-14 12:24 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-12  8:30 how to control isearch for invisible text Drew Adams
2006-08-12  8:49 ` David Kastrup
2006-08-12 17:09   ` Drew Adams
2006-08-12 17:16     ` David Kastrup
2006-08-12 17:56       ` Drew Adams
2006-08-12 19:21         ` David Kastrup
2006-08-12 20:54           ` Drew Adams
2006-08-12 21:02             ` David Kastrup
2006-08-12 21:17               ` Drew Adams
2006-08-12 21:34                 ` David Kastrup
2006-08-12 22:07                   ` Drew Adams
2006-08-12 22:27                     ` David Kastrup
2006-08-12 23:02                       ` Drew Adams
2006-08-13  0:28     ` Stefan Monnier
2006-08-13  7:14       ` David Kastrup
2006-08-13 17:52         ` Richard Stallman
2006-08-13 18:00           ` David Kastrup
2006-08-14  0:36           ` Stefan Monnier
2006-08-14  7:12             ` David Kastrup
2006-08-14 12:14               ` Stefan Monnier
2006-08-14 12:24                 ` David Kastrup [this message]
2006-08-14 12:59                   ` Stefan Monnier
2006-08-14 13:48                     ` David Kastrup
2006-08-14 14:43                       ` Stefan Monnier
2006-08-14 15:05                         ` David Kastrup
2006-08-14 15:23                           ` Drew Adams
2006-08-14 15:32                             ` David Kastrup
2006-08-15 12:41                             ` Richard Stallman
2006-08-15 12:40             ` Richard Stallman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=85d5b3tshe.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=rms@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).