all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: Info mutilates user overlays.
Date: Wed, 1 Oct 2003 16:11:11 -0500 (CDT)	[thread overview]
Message-ID: <200310012111.h91LBBG03258@raven.dms.auburn.edu> (raw)
In-Reply-To: <jwvfzicd9ix.fsf-monnier+emacs/devel@vor.iro.umontreal.ca> (message from Stefan Monnier on 01 Oct 2003 15:54:34 -0400)

Stefan Monnier wrote:

   Please: *how* do you highlight ?
   Did you create some commands similar to what is available under M-g
   but using overlays, or do you add the overlay from a hook, or ...

The user would use some interactive command, say 
`M-x scan-buf-char-property-regions', or a key sequence bound to it.
I have a command `scan-buf-update-char-region-overlays' that updates
_all_ highlighting produced by the previous and similar commands, in
the accessible portion of the current buffer.  (Except that I still
have to make the updating work better for narrowed buffers with
different pieces highlighted differently.)  Maybe just adding the
updating command to the right hook might solve the problem.  I will
take a look whether any hook is automatically called in the given
situation.  Otherwise, the user could call the updating command, if he
wants the highlighting restored.

I keep track of the overlays by giving them a "private"
'scan-buf-char-property-regions property, so I know which overlays
were made by the function and I can delete them as necessary.

The highlighting is actually _meant_ to be temporary (to get an idea
of which text properties are present in the buffer), but it is
somewhat inconvenient if it disappears after, say, quickly following a
reference and then a quick `l' to get back.  As I said though,
updating everything is convenient for the user and could be made
automatic using some hook.

I could set a timer, but in read-only buffers that would lead to a lot
of completely needless deletion and re-creation of overlays, generating
garbage to be collected and it will normally be obvious to the user
when the buffer has changed and needs to be updated.

Sincerely,

Luc.

  reply	other threads:[~2003-10-01 21:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-01  2:16 Info mutilates user overlays Luc Teirlinck
2003-10-01  2:26 ` Miles Bader
2003-10-01  2:40   ` Luc Teirlinck
2003-10-01  4:00   ` Luc Teirlinck
2003-10-01  4:37     ` Miles Bader
2003-10-01 12:22 ` Stefan Monnier
2003-10-01 14:49   ` Luc Teirlinck
2003-10-01 17:33     ` Stefan Monnier
2003-10-01 18:49       ` Luc Teirlinck
2003-10-01 20:00         ` Stefan Monnier
2003-10-02 13:45           ` Richard Stallman
2003-10-01 19:14       ` Luc Teirlinck
2003-10-01 19:54         ` Stefan Monnier
2003-10-01 21:11           ` Luc Teirlinck [this message]
2003-10-01 23:18             ` Luc Teirlinck
2003-10-02  0:38               ` Miles Bader
2003-10-01 15:10   ` Luc Teirlinck

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=200310012111.h91LBBG03258@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --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.