emacs-devel
[Top][All Lists]
Advanced

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

Re: Inhibiting read-only


From: Jambunathan K
Subject: Re: Inhibiting read-only
Date: Wed, 19 Jun 2013 21:54:04 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Juanma Barranquero <address@hidden> writes:

> On Wed, Jun 19, 2013 at 6:07 PM, Jambunathan K <address@hidden> wrote:
>
>> inhibit-read-only can be a list.
>
> Yes, but if I'm reading correctly the documentation
>
>  -- Variable: inhibit-read-only
>      If this variable is non-`nil', then read-only buffers and,
>      depending on the actual value, some or all read-only characters
>      may be modified.  Read-only characters in a buffer are those that
>      have a non-`nil' `read-only' text property.  *Note Special
>      Properties::, for more information about text properties.
>
> setting it to a list (or any non-nil value) will also have the effect
> of allowing writting in read-only-buffers.

Look at the last line of the docstring.

You selectively inhibit the some read only properties.  

inhibit-read-only:read-only::buffer-invisibility-spec:invisible.


,----[ C-h v inhibit-read-only RET ]
| inhibit-read-only is a variable defined in `C source code'.
| Its value is nil
| 
| Documentation:
| Non-nil means disregard read-only status of buffers or characters.
| If the value is t, disregard `buffer-read-only' and all `read-only'
| text properties.  If the value is a list, disregard `buffer-read-only'
| and disregard a `read-only' text property if the property value
| is a member of the list.
| 
| [back]
`----

Mark editable fields with  (... 'readonly 'editable).

Now to make those fields editable, you push 'editable to
inhibit-read-only.

By properly making the newly inserted characters having right stickiness
it should be possible to make forms selectively editable.

>    J



reply via email to

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