From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.devel Subject: Re: Inhibiting read-only Date: Wed, 19 Jun 2013 21:54:04 +0530 Message-ID: <87a9mm83x7.fsf@gmail.com> References: <87ehby84p1.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1371658994 12077 80.91.229.3 (19 Jun 2013 16:23:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Jun 2013 16:23:14 +0000 (UTC) Cc: Emacs developers To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 19 18:23:14 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UpLAA-0007BA-07 for ged-emacs-devel@m.gmane.org; Wed, 19 Jun 2013 18:23:14 +0200 Original-Received: from localhost ([::1]:47928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpLA9-0001yO-IC for ged-emacs-devel@m.gmane.org; Wed, 19 Jun 2013 12:23:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpLA4-0001xr-Oj for emacs-devel@gnu.org; Wed, 19 Jun 2013 12:23:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UpLA0-0001hs-5l for emacs-devel@gnu.org; Wed, 19 Jun 2013 12:23:08 -0400 Original-Received: from mail-pb0-x233.google.com ([2607:f8b0:400e:c01::233]:44165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpL9z-0001hn-W2 for emacs-devel@gnu.org; Wed, 19 Jun 2013 12:23:04 -0400 Original-Received: by mail-pb0-f51.google.com with SMTP id um15so5228161pbc.38 for ; Wed, 19 Jun 2013 09:23:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=h0Gpu0ctt4VzbXzZ5QGF6aQasvtf5LbGq+AugfznI4Q=; b=DY4RJ3VxasYO12mN+1wGYx9olQF/0JfgSmf9Vi7v9SW/DHCVRceccoxKRUD+G2DDbp LMFELGjoMAjJFgPUQvcyFKmAU6HuFAt8wOKvBd0w7ClSVtteS3aR3JA8ZoHYdhLtO8AX lrtjrxM7/VJgvC+Z3NB6daTLfZYFQzqLevhAaGGyYCkFd+FqBCWeq/nLQNNC+NPfK5eQ fh6zfzZEMtICPwN9gPQ2QXsDowjv1fUUuSKOVlnWpKBJ9sU9kpIViaEjkT74GWHjQgqi ckOFQ7NmhLBqwhPVI3rbTxGVw9dS4K0MBXYDK9K6YRkFPrIkFDwEE8OzZ0tdlw3UJiwu FZug== X-Received: by 10.66.163.38 with SMTP id yf6mr7444245pab.45.1371658982516; Wed, 19 Jun 2013 09:23:02 -0700 (PDT) Original-Received: from debian-6.05 ([115.242.219.48]) by mx.google.com with ESMTPSA id ib9sm23698492pbc.43.2013.06.19.09.22.59 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Wed, 19 Jun 2013 09:23:01 -0700 (PDT) In-Reply-To: (Juanma Barranquero's message of "Wed, 19 Jun 2013 18:10:41 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:160681 Archived-At: Juanma Barranquero writes: > On Wed, Jun 19, 2013 at 6:07 PM, Jambunathan K 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