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

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

Re: Widgets and text-changing


From: MON KEY
Subject: Re: Widgets and text-changing
Date: Fri, 19 Jun 2009 11:11:20 -0400

On Fri, Jun 19, 2009 at 8:56 AM, Pierre
Lorenzon<devel@pollock-nageoire.net> wrote:
>  buffer after it has been sorted ? First bind the
>  buffer-read-only variable to nil to allow sort-lines which is
>  meant to rewrite the buffer for instance :
>  (let ((buffer-read-only nil))
>    (sort-lines)
>    (widget-setup))
>

Before responding I had tried Stephen's example with a

 (setq inhibit-read-only t)

this alone didn't help.

Is this because there are overlays in effect not (just/only) text-props?

I didn't go any further setting additional buffer variables, but it
may be that a larger set of inhibitions is required (and perhaps
others as well) i.e. temporarily setting:

 (setq inhibit-read-only t
         inhibit-point-motion-hooks t
         inhibit-modification-hooks t)

This sort of approach works works with text-properties (and I have no
idea how it corelates with the widget library)

Would an alternative approach be to forgo the initial widget-insert
and assign text-properties on the buffer contents with the help of
some regexps and only widgetize according to a prop val once the
buffer's setup is finalized?

This prob. moves quite a bit further out from the OP intentions and
may well over complicate  what widgets were intended to simplify :{

s_P




reply via email to

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