all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Showing text in a buffer only when point is in a region
Date: Sat, 28 Jan 2017 13:46:10 +0100	[thread overview]
Message-ID: <20170128124610.GB7072@tuxteam.de> (raw)
In-Reply-To: <87mveb4b4a.fsf@gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, Jan 28, 2017 at 06:03:57PM +0530, Narendra Joshi wrote:
> 
> Hi,
> 
> I want to be able to keep some text visible in a buffer only when the
> point is in a region. The moment the point leaves that region, I would
> like to make the text invisible. How can I do this? I don't want to run
> a timer which checks if the point is in the region or outside.

See "Overlays" or "Text Properties" in the Emacs Lisp manual. You can set
"point-entered" and "point-left" special properties (see "Properties with
Special Meanings", which are hooks to be called at those events.

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAliMkpIACgkQBcgs9XrR2kZouwCfbsifIUe6EbXLmXRUR2DLT0xE
sqQAn1zxVcu0QAgeE7BrIW59syIqRN8k
=IsGC
-----END PGP SIGNATURE-----



  reply	other threads:[~2017-01-28 12:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-28 12:33 Showing text in a buffer only when point is in a region Narendra Joshi
2017-01-28 12:46 ` tomas [this message]
2017-01-28 14:45   ` Stephen Berman
2017-01-28 15:26     ` tomas

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=20170128124610.GB7072@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=help-gnu-emacs@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.