From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: [RFC] Do indent-region only on editable buffers Date: Mon, 7 Aug 2017 10:46:57 -0700 (PDT) Message-ID: <798abe90-2eb4-46e3-a897-1dc75c959880@default> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1502128078 15876 195.159.176.226 (7 Aug 2017 17:47:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 7 Aug 2017 17:47:58 +0000 (UTC) To: Kaushal Modi , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 07 19:47:44 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dem7x-0003LD-Ee for ged-emacs-devel@m.gmane.org; Mon, 07 Aug 2017 19:47:41 +0200 Original-Received: from localhost ([::1]:38701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dem83-0005Wx-Ly for ged-emacs-devel@m.gmane.org; Mon, 07 Aug 2017 13:47:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dem7Q-0005WS-Nn for emacs-devel@gnu.org; Mon, 07 Aug 2017 13:47:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dem7M-0007sh-2J for emacs-devel@gnu.org; Mon, 07 Aug 2017 13:47:08 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:49482) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dem7L-0007qs-PO for emacs-devel@gnu.org; Mon, 07 Aug 2017 13:47:04 -0400 Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v77HkwQd011219 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Aug 2017 17:46:59 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v77HkwC5016354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Aug 2017 17:46:58 GMT Original-Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v77Hkw1P020891; Mon, 7 Aug 2017 17:46:58 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6774.5000 (x86)] X-Source-IP: userv0021.oracle.com [156.151.31.71] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 141.146.126.69 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:217361 Archived-At: > - Are there any objections to doing the buffer read-only check before > doing the indent? Dunno what the right approach/solution is in this particular case. But note that we don't do what you suggest in general - we don't do it for most other editing operations: insert or delete a character, yank a string, kill the region,... Instead, we let an error be raised, telling the user that the buffer is read-only.