From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Inhibiting read-only Date: Thu, 20 Jun 2013 10:44:25 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1371717891 12693 80.91.229.3 (20 Jun 2013 08:44:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Jun 2013 08:44:51 +0000 (UTC) Cc: James Cloos , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 20 10:44:51 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 1UpaU7-0002zv-2m for ged-emacs-devel@m.gmane.org; Thu, 20 Jun 2013 10:44:51 +0200 Original-Received: from localhost ([::1]:38239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpaU6-00023K-Lf for ged-emacs-devel@m.gmane.org; Thu, 20 Jun 2013 04:44:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpaU0-00022l-Ls for emacs-devel@gnu.org; Thu, 20 Jun 2013 04:44:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UpaTy-00050s-66 for emacs-devel@gnu.org; Thu, 20 Jun 2013 04:44:44 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:57598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpaTx-00050b-Vz for emacs-devel@gnu.org; Thu, 20 Jun 2013 04:44:42 -0400 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UpaTh-0000zS-W6; Thu, 20 Jun 2013 10:44:26 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEX5sRrZeREOGGUQDlMb LnsOKIJgQ0ERBSguNGyqXhUNIHQKI4H4MXR5AAACQUlEQVQ4jVWTPYvbQBCGZ0t1u41h20AI+Epz OCRtDKnNbXNq4kZCrcVp89GFFCm1jWDqIxzYnY04uP1zeWcl2fLbSJpH87k75EQPX2ZyLo/xRM5N aDP8gAfIBcD49fdf/C32G/CwgtYfk30OtisP1at6IAL69LbyTQH59fcBbCmPvYvuebB3IPeJPFIU nZK9LAoufL2Rwh7hAX3wsHPXAZf1H2llm8Dbuil/GNOZAF7XQygBZ180RmUZBVNUpX9/yQGHHWXK KMMM8DSBN2QgUjviQMEi/QQQaUdEmkIAL0o/gdembEkkgLrS349g3RTJbgJbTYtOkgwgRaKMg7Em oPufI/DFN7IclCYAqWuP+RIG6YuWFAd4MGtj0LzLAfJTU2gJpQwctNHI7qJ4nMfcpCxbY2gE8QqQ nI2eg2rogkXBAGyuHlmreARo/Z+7ADWCzswBQmXSSnIwaVg5zuMs5WbSClt7BalBTQrza62VXgBy JO9lJBguU4auUe+iKusYJVSaFbFmBqh0V/m9eMQe062kLLuQ3BrTfYoJ5C+oVynGbC0bC/ArRozd OZTVZppbklExct8lj1zK2lGb4WBVcvCw5+P1KXSWTjBUcNjjOkuOPiKJHK6tKrk9SOHSSHqJVSKL HJVEykcgsXDlhFCXIl3BK9agYdmQ0ktNl/2AS1ocse+TYQJn2UBsGnS8AfHFj/ocbwGWKunT+Jlf QHyWdb4bP/oZmKufyj0cjrf2ARyg5XKGZDvp7XCE/d2g5eAp4D/r7+FFmxZ3QgAAAABJRU5ErkJg gg== X-Now-Playing: Various's _This May Be My Last Time Singing (3)_: "Deacon Williams + The Golder Stars - I Went To The House" X-Hashcash: 1:23:130620:cloos@jhcloos.com::JyxyJvzvGsgo9efj:000000000000000000000000000000000000000000002K5G X-Hashcash: 1:23:130620:monnier@iro.umontreal.ca::8uCvxFNmFkpzmmkR:0000000000000000000000000000000000000N4Dx X-Hashcash: 1:23:130620:emacs-devel@gnu.org::PpIKLE0dBW+atdI9:000000000000000000000000000000000000000000YAfO In-Reply-To: (Stefan Monnier's message of "Wed, 19 Jun 2013 16:25:38 -0400") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-MailScanner-ID: 1UpaTh-0000zS-W6 MailScanner-NULL-Check: 1372322666.31437@9H8mLE03pKRjCgKqTRjUEg X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 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:160736 Archived-At: Stefan Monnier writes: > LMI> I'd like to make the eww buffers read-only, but leave text input > LMI> fields editable. (And then do processing of the alterations with > LMI> `insert-behind-hooks' or `after-change-functions'.) >> That sounds like how the Customize buffers work, yes? > > Exactly, they set buffer-read-only to nil but then use > a before-change-function to signal an error when trying to modify > a non-text-widget area. I like `read-only' buffers -- they have an obvious interface. If the user decides to switch read-only off (which I sometimes do in otherwise non-editable buffers) to do some weird ad-hoc editing, there's a standard, convenient key-stroke for that. So if there were a `inhibit-read-only' text property, we could avoid doing all these tricks with `before-change-function' and the like -- we could just make the buffer read-only, put the text property on the bits that aren't read-only, and we'd be done. And there would be less user confusion. I can have a go at implementing this if it sounds like a workable idea, although that part of the code is completely unfamiliar to me... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/