From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only Date: Sat, 05 Aug 2017 09:52:59 +0300 Message-ID: <83lgmywlo4.fsf@gnu.org> References: <87vam26amc.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1501916058 23762 195.159.176.226 (5 Aug 2017 06:54:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 5 Aug 2017 06:54:18 +0000 (UTC) Cc: 22819@debbugs.gnu.org, kaushal.modi@gmail.com To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 05 08:54:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ddsyR-0005Yz-LP for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Aug 2017 08:54:11 +0200 Original-Received: from localhost ([::1]:55586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddsyU-0006U5-G4 for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Aug 2017 02:54:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddsyL-0006Tl-0f for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2017 02:54:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddsyH-0002TD-U8 for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2017 02:54:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39707) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ddsyH-0002T7-Rq for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2017 02:54:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ddsyH-0001yb-Jd for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2017 02:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Aug 2017 06:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22819 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 22819-submit@debbugs.gnu.org id=B22819.15019159977545 (code B ref 22819); Sat, 05 Aug 2017 06:54:01 +0000 Original-Received: (at 22819) by debbugs.gnu.org; 5 Aug 2017 06:53:17 +0000 Original-Received: from localhost ([127.0.0.1]:42384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddsxZ-0001xd-7Q for submit@debbugs.gnu.org; Sat, 05 Aug 2017 02:53:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddsxY-0001xR-7Y for 22819@debbugs.gnu.org; Sat, 05 Aug 2017 02:53:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddsxQ-0001mg-11 for 22819@debbugs.gnu.org; Sat, 05 Aug 2017 02:53:11 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddsxP-0001mb-UA; Sat, 05 Aug 2017 02:53:07 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1075 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ddsxP-0001Pd-Ad; Sat, 05 Aug 2017 02:53:07 -0400 In-reply-to: <87vam26amc.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135384 Archived-At: > From: npostavs@users.sourceforge.net > Date: Fri, 04 Aug 2017 21:56:11 -0400 > Cc: 22819@debbugs.gnu.org > > Kaushal Modi writes: > > > The current behavior of indent-region function is that it will first indent > > the buffer and then throw an error at the end that it couldn't apply the > > indentation. Instead the below patch checks if the buffer if read-only > > first before trying to indent. > > I wonder if someone will complain that they were relying on this > behaviour to check indentation in read-only buffers (currently if the > indentation is already correct there is no error). The original submission provided no rationale for the change, so it's hard to reason about its advantages. The clear disadvantage is that this goes against veteran Emacs behavior regarding read-only text, behavior that is present in several other commands, and that AFAIR resulted from some past discussions. If the rationale is user surprise, then I'd suggest to leave the current behavior unchanged.