[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 22:47:39 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Lars Magne Ingebrigtsen <address@hidden> writes:
> Jambunathan K <address@hidden> writes:
>
>> Mark editable fields with (... 'readonly 'editable).
>
> So you're suggesting making the buffer read-onlu, but then putting
> 'read-only 'editable on the input fields? And then setting
> `inhibit-read-only' to `(editable)' in that buffer? If that works,
> that's pretty twisty. :-)
How about something like this to make first line editable and second and
third lines not editable.
(with-current-buffer (generate-new-buffer "read-only")
(pop-to-buffer (current-buffer))
(insert "first line\nsecond line\nthird line")
(add-text-properties (point-min) (point-max) '(read-only read-only))
(let ((inhibit-read-only '(read-only)))
(goto-char (point-min))
(add-text-properties (point-at-bol) (point-at-eol) '(read-only
editable)))
(setq inhibit-read-only '(editable)))
- Inhibiting read-only, Lars Magne Ingebrigtsen, 2013/06/19
- Re: Inhibiting read-only, Jambunathan K, 2013/06/19
- Re: Inhibiting read-only, Juanma Barranquero, 2013/06/19
- Re: Inhibiting read-only, Juanma Barranquero, 2013/06/19
- Re: Inhibiting read-only, Jambunathan K, 2013/06/19
- Re: Inhibiting read-only, Juanma Barranquero, 2013/06/19
- Re: Inhibiting read-only, Lars Magne Ingebrigtsen, 2013/06/19
- Re: Inhibiting read-only, Juanma Barranquero, 2013/06/19
- Re: Inhibiting read-only, Lars Magne Ingebrigtsen, 2013/06/19
- Re: Inhibiting read-only, Jambunathan K, 2013/06/19
Re: Inhibiting read-only, Juanma Barranquero, 2013/06/19
Re: Inhibiting read-only, James Cloos, 2013/06/19