all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Cc: Emacs-Devel <emacs-devel@gnu.org>
Subject: RE: Overlay before-string property
Date: Sat, 30 Sep 2006 23:55:54 -0700	[thread overview]
Message-ID: <EIENLHALHGIMHGDOLMIMOEKOCLAA.drew.adams@oracle.com> (raw)
In-Reply-To: <85sli84k9d.fsf@lola.goethe.zz>

    >     > I use this, from Miles Bader's minibuf-depth.el (or whatever
    >     > it's called now):
    >     >
    >     > ;; This function goes on minibuffer-setup-hook
    >     > (defun minibuf-depth-setup-minibuffer ()
    >     >   "Set up a minibuffer for `minibuffer-indicate-depth-mode'.
    >     > The prompt should already have been inserted."
    >     >   (when (> (minibuffer-depth) 1)
    >     >     (setq minibuf-depth-overlay
    >     >           (make-overlay (point-min) (1+ (point-min))))
    >     >     (overlay-put minibuf-depth-overlay 'before-string
    >     > 		     (format "%d) " (minibuffer-depth)))
    >     >     (overlay-put minibuf-depth-overlay 'evaporate t)))
    >     >
    >     > Does this have something to do with text-property
    >     > stickiness? I have not knowingly changed any sticky
    >     > properties, and the manual seems to say that text is,
    >     > by default, only rear sticky. The behavior seems
    >     > to be as if the prompt-string text were front-sticky
    >     > and the overlay were rear-sticky, IIUC.
    >
    >     You could read the DOC string of make-overlay.  It has optional
    >     arguments.
    >
    > Thanks, but I don't see how that helps. Perhaps I'm misreading it or
    > the text has changed since July (my build), however. It speaks of
    > FRONT-ADVANCE and REAR-ADVANCE, but I don't see how that would be
    > related to property stickiness. The manual says about the same thing
    > as the doc string.

    It is related to stickiness, but your description indeed made me do a
    wrong guess.  This has nothing to do with stickiness, it simply has to
    do with the overlay _covering_ the character in question.  Use
    (make-overlay (point-min) (point-min))
    instead.  It may be necessary to ise the 'display instead of the
    'before-string property for this to work; I don't remember the
    details.

OK, so it seems that is another way to change Miles's code to not get the
face bleeding (or overlay covering or whatever you want to call it, since it
is apparently not stickiness).

The questions I posed are these:

1) Should such a change be made to the Emacs code (Miles's code, which is
likely to be added to Emacs), to prevent this face bleeding? Or is there a
good reason why it is written that way?

2) If that code should remain as it is, is there another way to get the
effect I want (no bleeding), without changing the function definition? IOW,
how can a user prevent the bleeding, without rewriting the function (either
as you suggested or as Stefan suggested)?

  reply	other threads:[~2006-10-01  6:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-01  1:20 Overlay before-string property Drew Adams
2006-10-01  3:31 ` Stefan Monnier
2006-10-01  3:57   ` Drew Adams
2006-10-01  6:12 ` David Kastrup
2006-10-01  6:26   ` Drew Adams
2006-10-01  6:34     ` David Kastrup
2006-10-01  6:55       ` Drew Adams [this message]
2006-10-01 12:41 ` martin rudalics
2006-10-01 16:20   ` Drew Adams
2006-10-01 22:25   ` Richard Stallman
2006-10-07  9:56     ` martin rudalics

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=EIENLHALHGIMHGDOLMIMOEKOCLAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.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.