all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: MON KEY <monkey@sandpframing.com>
To: Pierre Lorenzon <devel@pollock-nageoire.net>
Cc: help-gnu-emacs@gnu.org, stephen.berman@gmx.net
Subject: Re: Widgets and text-changing
Date: Fri, 19 Jun 2009 11:11:20 -0400	[thread overview]
Message-ID: <d2afcfda0906190811o17e510edoacbbe59828328661@mail.gmail.com> (raw)
In-Reply-To: <20090619.145655.258112025.devel@pollock-nageoire.net>

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




      parent reply	other threads:[~2009-06-19 15:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-17 23:03 Widgets and text-changing Stephen Berman
2009-06-18 20:02 ` MON KEY
2009-06-19  2:58   ` MON KEY
2009-06-19  7:45   ` Stephen Berman
     [not found]   ` <20090619.145655.258112025.devel@pollock-nageoire.net>
2009-06-19 15:11     ` MON KEY [this message]

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=d2afcfda0906190811o17e510edoacbbe59828328661@mail.gmail.com \
    --to=monkey@sandpframing.com \
    --cc=devel@pollock-nageoire.net \
    --cc=help-gnu-emacs@gnu.org \
    --cc=stephen.berman@gmx.net \
    /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.