help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using widgets and timers simultaneously


From: martin rudalics
Subject: Re: Using widgets and timers simultaneously
Date: Wed, 02 May 2007 10:36:39 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

>>I recall that widgets may get screwed up when text is replaced at text
>>boundaries.  In principle you should make sure yourself that mutable
>>text is surrounded by immutable one.
>
>
>   I suppose the point is here but I don't really understand !
>   Can you give me more details ?
>
>   Indeed I implemented the refresh method slightly differently
>   :
>
>   (defun refresh ()
>   (widget-value-set my-widget (current-time-string)))
>
>   It avoids the setq my-widget mentioned above and which was
>   not really good as you observed. But since the
>   widget-defaul-value-set still require the
>   widget-default-create method the problem with the
>   delete-backward-char which is not executed is still there !

You would have to give me a precise recipe to reproduce the failure.
Note that debugging widgets is a real pain, that's why I usually try to
avoid it.  You could try to edebug `widget-default-value-set' (according
to Richard there's a bug) and see for yourself.  Be sure to cancel the
timer before and invoke `refresh' manually.  It might be worth to edebug
the `widget-field-...' functions as well.

Does the character of the problem change when you set
`widget-field-add-space' to a non-nil value?  Does setting
`widget-field-use-before-change' to nil affect the problem?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]