unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: controlling echo during mouse-dragging
       [not found] <GRkCc.770$Pc.184@fe1.texas.rr.com>
@ 2004-06-23 21:07 ` John Paul Wallington
       [not found]   ` <sIoCc.966$Pc.886@fe1.texas.rr.com>
  0 siblings, 1 reply; 6+ messages in thread
From: John Paul Wallington @ 2004-06-23 21:07 UTC (permalink / raw)


"David Vanderschel" <DJV4@Austin.RR.com> writes:

> Is there any way I can prevent that uninformative "down-mouse-2-"
> echo from obliterating my infrequent attempts at informing the user?

Try binding `echo-keystrokes' to 0.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: controlling echo during mouse-dragging
       [not found]   ` <sIoCc.966$Pc.886@fe1.texas.rr.com>
@ 2004-06-24 15:46     ` John Paul Wallington
  2004-06-24 22:52       ` David Vanderschel
  0 siblings, 1 reply; 6+ messages in thread
From: John Paul Wallington @ 2004-06-24 15:46 UTC (permalink / raw)


"David Vanderschel" <DJV4@Austin.RR.com> writes:

>> > Is there any way I can prevent that uninformative "down-mouse-2-"
>> > echo from obliterating my infrequent attempts at informing the user?
>
>> Try binding `echo-keystrokes' to 0.
>
> OK, I tried that.  I made echo-keystrokes buffer-local
> and set it to 0.

Hm.  I meant `let' binding it when appropriate, but maybe that's
tricky -- are you tracking the mouse yourself or binding commands to
drag events, or something else ?

> This does prevent the "down-mouse-1-" 'keystroke' from appearing in
> the echo area.

Good :)

>  However, my own messages are still being obliterated
> (with blankness) as soon as the cursor moves off of the character it
> was on when my program realized that it needed to offer new advice.
> Unfortunately, that is not satisfactory, as I do not want to have to
> repeat the message every time the mouse moves - just when it gets to
> certain special places (which is not too often).
>
> So I still have an obliteration problem; and now I do
> not even know what is causing it.

Please post some example code, preferably pared-down to essentials,
that demonstrates the problem.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: controlling echo during mouse-dragging
  2004-06-24 15:46     ` John Paul Wallington
@ 2004-06-24 22:52       ` David Vanderschel
  2004-06-24 22:58         ` John Paul Wallington
  0 siblings, 1 reply; 6+ messages in thread
From: David Vanderschel @ 2004-06-24 22:52 UTC (permalink / raw)


"John Paul Wallington" <jpw@gnu.org> wrote in message
news:<87acyt2c3j.fsf@indigo.shootybangbang.com>...
> "David Vanderschel" <DJV4@Austin.RR.com> writes:
>
> >> > Is there any way I can prevent that uninformative "down-mouse-2-"
> >> > echo from obliterating my infrequent attempts at informing the user?
> >
> >> Try binding `echo-keystrokes' to 0.
> >
> > OK, I tried that.  I made echo-keystrokes buffer-local
> > and set it to 0.
>
> Hm.  I meant `let' binding it when appropriate, but maybe that's
> tricky -- 

No.  A let binding would have been OK also; but this
is a buffer which is read-only to the user and over
which my program exerts full control.  It made just as
much sense to set it once and for all during
initialization.  I never want to see those echoes for
the buffer this program is managing.  I was happy to
learn about the echo-keystrokes variable.

>are you tracking the mouse yourself or binding
>commands to drag events, or something else ?

I have implemented my own track-mouse loop.  (It is
tricky to get right!)

> > So I still have an obliteration problem; and now I do
> > not even know what is causing it.

> Please post some example code, preferably pared-down to essentials,
> that demonstrates the problem.

Actually, I am close to giving up now.  I think I
understand the problem.  The fact is that any message
in the echo area is erased on occurrence of the next
input event.  Normally mouse movement is not treated
as an event, so one is not used to it causing erasure
in the echo area.  However, having invoked
track-mouse, I am saying that mouse movement _is_ an
event, so the echo area gets erased every time the
cursor moves to a new character position.  I do not
see how to get around it.

There is one thing I could hope: namely to get control
of the string that emacs is using, for example, to
display the useless "down-mouse-1-" indication when I
am allowing it.  That is not even a "message" in the
sense that it is logged in the *Messages* buffer -
which is good as far as I am concerned.

Regards,
  David V.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: controlling echo during mouse-dragging
  2004-06-24 22:52       ` David Vanderschel
@ 2004-06-24 22:58         ` John Paul Wallington
  2004-06-25  0:10           ` David Vanderschel
  2004-06-25  0:11           ` David Vanderschel
  0 siblings, 2 replies; 6+ messages in thread
From: John Paul Wallington @ 2004-06-24 22:58 UTC (permalink / raw)


"David Vanderschel" <DJV4@Austin.RR.com> writes:

>> Please post some example code, preferably pared-down to essentials,
>> that demonstrates the problem.
>
> Actually, I am close to giving up now.  I think I
> understand the problem.  The fact is that any message
> in the echo area is erased on occurrence of the next
> input event.  Normally mouse movement is not treated
> as an event, so one is not used to it causing erasure
> in the echo area.  However, having invoked
> track-mouse, I am saying that mouse movement _is_ an
> event, so the echo area gets erased every time the
> cursor moves to a new character position.  I do not
> see how to get around it.

Maybe you could display your message in the minibuffer rather than the
echo area?  See `emerge-show-file-name' for example.  It's hard to
tell whether that would make a difference without a concrete example
though.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: controlling echo during mouse-dragging
  2004-06-24 22:58         ` John Paul Wallington
@ 2004-06-25  0:10           ` David Vanderschel
  2004-06-25  0:11           ` David Vanderschel
  1 sibling, 0 replies; 6+ messages in thread
From: David Vanderschel @ 2004-06-25  0:10 UTC (permalink / raw)


"John Paul Wallington" <jpw@gnu.org> wrote in message
news:87smckk1he.fsf@indigo.shootybangbang.com...
> Maybe you could display your message in the minibuffer rather than the
> echo area?  See `emerge-show-file-name' for example.  It's hard to
> tell whether that would make a difference without a concrete example
> though.

I tried it.  I can display text in a minibuffer.
However, when I execute the same code inside the
track-mouse loop, nothing happens.  OTOH, invocations
of the message function do have effect - if only
ephemeral.

I will probably just break down and offer my advice by
modifying the content of the buffer itself.  I had
thought the echo area was the logical place for it,
but it won't be a big problem in the buffer.  Just a
bit more work for me.

Thanks,
  David V.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: controlling echo during mouse-dragging
  2004-06-24 22:58         ` John Paul Wallington
  2004-06-25  0:10           ` David Vanderschel
@ 2004-06-25  0:11           ` David Vanderschel
  1 sibling, 0 replies; 6+ messages in thread
From: David Vanderschel @ 2004-06-25  0:11 UTC (permalink / raw)


"John Paul Wallington" <jpw@gnu.org> wrote in message
news:87smckk1he.fsf@indigo.shootybangbang.com...
> Maybe you could display your message in the minibuffer rather than the
> echo area?  See `emerge-show-file-name' for example.  It's hard to
> tell whether that would make a difference without a concrete example
> though.

I tried it.  I can display text in a minibuffer.
However, when I execute the same code inside the
track-mouse loop, nothing happens.  OTOH, invocations
of the message function do have effect - if only
ephemeral.

I will probably just break down and offer my advice by
modifying the content of the buffer itself.  I had
thought the echo area was the logical place for it,
but it won't be a big problem in the buffer.  Just a
bit more work for me.

Thanks,
  David V.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-06-25  0:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <GRkCc.770$Pc.184@fe1.texas.rr.com>
2004-06-23 21:07 ` controlling echo during mouse-dragging John Paul Wallington
     [not found]   ` <sIoCc.966$Pc.886@fe1.texas.rr.com>
2004-06-24 15:46     ` John Paul Wallington
2004-06-24 22:52       ` David Vanderschel
2004-06-24 22:58         ` John Paul Wallington
2004-06-25  0:10           ` David Vanderschel
2004-06-25  0:11           ` David Vanderschel

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).