GNU bug report logs - #22819
25.0.91; Don't try to indent region if the buffer is read-only

Previous Next

Package: emacs;

Reported by: Kaushal Modi <kaushal.modi <at> gmail.com>

Date: Fri, 26 Feb 2016 13:56:02 UTC

Severity: wishlist

Tags: patch, wontfix

Found in version 25.0.91

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: npostavs <at> users.sourceforge.net
Cc: 22819 <at> debbugs.gnu.org, kaushal.modi <at> gmail.com
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
> From: npostavs <at> users.sourceforge.net
> Date: Fri, 04 Aug 2017 21:56:11 -0400
> Cc: 22819 <at> debbugs.gnu.org
> 
> Kaushal Modi <kaushal.modi <at> gmail.com> 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.




This bug report was last modified 5 years and 332 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.