From unknown Fri Jun 20 07:12:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#22819 <22819@debbugs.gnu.org> To: bug#22819 <22819@debbugs.gnu.org> Subject: Status: 25.0.91; Don't try to indent region if the buffer is read-only Reply-To: bug#22819 <22819@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:12:12 +0000 retitle 22819 25.0.91; Don't try to indent region if the buffer is read-only reassign 22819 emacs submitter 22819 Kaushal Modi severity 22819 wishlist tag 22819 patch wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 26 08:55:11 2016 Received: (at submit) by debbugs.gnu.org; 26 Feb 2016 13:55:11 +0000 Received: from localhost ([127.0.0.1]:47038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZIrP-00048M-65 for submit@debbugs.gnu.org; Fri, 26 Feb 2016 08:55:11 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52601) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZIrN-000485-85 for submit@debbugs.gnu.org; Fri, 26 Feb 2016 08:55:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZIrH-00072E-5U for submit@debbugs.gnu.org; Fri, 26 Feb 2016 08:55:04 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZIrH-00072A-2C for submit@debbugs.gnu.org; Fri, 26 Feb 2016 08:55:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZIrG-00064U-27 for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 08:55:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZIrF-00071I-05 for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 08:55:02 -0500 Received: from mail-ob0-x229.google.com ([2607:f8b0:4003:c01::229]:35936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZIrE-000710-Q5 for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 08:55:00 -0500 Received: by mail-ob0-x229.google.com with SMTP id s6so28110514obg.3 for ; Fri, 26 Feb 2016 05:55:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=wGkRYaNHMQcUevlFG1Fp297FydPl2lS3roGVAScQJsQ=; b=G7soRSZFtj0yvB3jyMuwg23QXLEAO23QlCghqAdPvb7lhEPsL3Nv8G/adIxTlDr/j6 /bWoWTyQutA9O/lz6ZllzsKuFID3PlF/NtZxcdgG4Wam+tLGu0KFgpAyEgeMvbkI2fe4 ponx0p+AKPpF96rH6CtIXKW9SbNMzDoS6LXZn5HFFuYaLOdYKIhZZ/468sL1lsOGWnhD /DjUPV4kDFZnsm2O3f3oEfKCoY3eblQSoeDW2Xse9Fow/RC9dnlq0UXkAjYDsuJeGjU6 kTx62r2KGnupAKO2Lu86COpLkhsbPsSPm5uqg7RUUgJB0ornPJPFOFLXPMvFrXPG4kpl 4hTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=wGkRYaNHMQcUevlFG1Fp297FydPl2lS3roGVAScQJsQ=; b=Mi4Y9lnwFwChIpey4Ev0MuOubN9Q82I34lZnAz6Plno9PpsS5f1rTiKdkbhDt9Doxz JsnT1hfWcaWWD6r2+2OuKGD335b40u3U8uGSCfY9Mc0Ah6D7TrR9YfXwLAfA3rS0LeNo EwQUr9GaBqSJCvZUdr5wUHhXWohXuF7PBZL06r/U/eyfr3KNkoj3gBIFGFJwJTWAGj69 SxEJx2haesYWG6SqrhYy/4qzt+SNCDgHtQ07MFEzGdqtEUorR5/dpBYzAEA6wsjHQXTr 1TmQlRyW9KdW+9rEts0tQmdtgUcwZ1WhlrbfSUV4iGZjxFtugfGt27Wzw7Lo+clfsXUF QY4A== X-Gm-Message-State: AD7BkJInn0hS/CQRTFj7t4+IirLNWyoYsGI8ynsN8Zba/3LUW4bopXkOLZaMxrrX08TXgZgjywV7QWFfVtbcFQ== X-Received: by 10.60.116.169 with SMTP id jx9mr1206004oeb.30.1456494899769; Fri, 26 Feb 2016 05:54:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.202.172.198 with HTTP; Fri, 26 Feb 2016 05:54:20 -0800 (PST) From: Kaushal Modi Date: Fri, 26 Feb 2016 08:54:20 -0500 Message-ID: Subject: 25.0.91; Don't try to indent region if the buffer is read-only To: "bug-gnu-emacs@gnu.org" Content-Type: multipart/alternative; boundary=089e0115f28e1e3baa052caca545 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --089e0115f28e1e3baa052caca545 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable --text follows this line-- 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. diff --git a/lisp/indent.el b/lisp/indent.el index 0bbb520..d525511 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -509,6 +509,7 @@ indent-region If the third argument COLUMN is an integer, it specifies the column to indent to; if it is nil, use one of the three methods above." (interactive "r\nP") + (barf-if-buffer-read-only) (cond ;; If a numeric prefix is given, indent to that column. (column In GNU Emacs 25.0.91.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23) of 2016-02-25 built on ... Repository revision: d2dd614716e34edb5891e58c029741cd6b32217d Windowing system distributor 'The X.Org Foundation', version 11.0.60900000 System Description: Red Hat Enterprise Linux Workstation release 6.6 (Santiago) Configured using: 'configure --prefix=3D/home/kmodi/usr_local/apps/6/emacs/emacs-25 'CPPFLAGS=3D-fgnu89-inline -I/home/kmodi/usr_local/6/include -I/usr/include/freetype2 -I/usr/include' 'CFLAGS=3D-ggdb3 -O0' 'CXXFLAGS=3D-ggdb3 -O0' 'LDFLAGS=3D-L/home/kmodi/usr_local/6/lib -L/home/kmodi/usr_local/6/lib64 -ggdb3' PKG_CONFIG_PATH=3D/home/kmodi/usr_local/6/lib/pkgconfig:/home/kmodi/usr_lo= cal/6/lib64/pkgconfig:/cad/adi/apps/gnu/linux/x86_64/6/lib/pkgconfig:/cad/a= di/apps/gnu/linux/x86_64/6/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pk= gconfig:/usr/share/pkgconfig:/lib/pkgconfig:/lib64/pkgconfig' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11 --089e0115f28e1e3baa052caca545 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
--text follows this line--

The current behavior of indent-region function is that it will first ind= ent the buffer and then throw an error at the end that it couldn't appl= y the indentation. Instead the below patch checks if the buffer if read-onl= y first before trying to indent.


diff --git a/lisp/indent.el b/lisp/indent.el
index 0bbb520..d5= 25511 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el<= /div>
@@ -509,6 +509,7 @@ indent-region
=C2=A0If the third ar= gument COLUMN is an integer, it specifies the
=C2=A0column to ind= ent to; if it is nil, use one of the three methods above."
= =C2=A0 =C2=A0(interactive "r\nP")
+ =C2=A0(barf-if-buff= er-read-only)
=C2=A0 =C2=A0(cond
=C2=A0 =C2=A0 ;; If a = numeric prefix is given, indent to that column.
=C2=A0 =C2=A0 (co= lumn



In GNU Em= acs 25.0.91.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23)
= =C2=A0of 2016-02-25 built on ...
Repository revision: d2dd614716e= 34edb5891e58c029741cd6b32217d
Windowing system distributor 'T= he X.Org Foundation', version 11.0.60900000
System Descriptio= n: Red Hat Enterprise Lin= ux Workstation release 6.6 (Santiago)

Configured u= sing:
=C2=A0'configure --prefix=3D/home/kmodi/usr_local/apps/= 6/emacs/emacs-25
=C2=A0'CPPFLAGS=3D-fgnu89-inline -I/home/kmo= di/usr_local/6/include
=C2=A0-I/usr/include/freetype2 -I/usr/incl= ude' 'CFLAGS=3D-ggdb3 -O0'
=C2=A0'CXXFLAGS=3D-ggd= b3 -O0' 'LDFLAGS=3D-L/home/kmodi/usr_local/6/lib
=C2=A0-L= /home/kmodi/usr_local/6/lib64 -ggdb3'
=C2=A0PKG_CONFIG_PATH= =3D/home/kmodi/usr_local/6/lib/pkgconfig:/home/kmodi/usr_local/6/lib64/pkgc= onfig:/cad/adi/apps/gnu/linux/x86_64/6/lib/pkgconfig:/cad/adi/apps/gnu/linu= x/x86_64/6/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/sha= re/pkgconfig:/lib/pkgconfig:/lib64/pkgconfig'

= Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND= GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FR= EETYPE LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11
--089e0115f28e1e3baa052caca545-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 03 01:08:04 2016 Received: (at control) by debbugs.gnu.org; 3 Mar 2016 06:08:04 +0000 Received: from localhost ([127.0.0.1]:58446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abMQe-0000Jo-08 for submit@debbugs.gnu.org; Thu, 03 Mar 2016 01:08:04 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:44418) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abMQc-0000Jh-TQ for control@debbugs.gnu.org; Thu, 03 Mar 2016 01:08:03 -0500 Received: from [31.55.6.3] (helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1abMQF-0003aa-1Q for control@debbugs.gnu.org; Thu, 03 Mar 2016 07:07:39 +0100 Date: Thu, 03 Mar 2016 06:07:38 +0000 Message-Id: <87egbsjdqt.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #22819 X-MailScanner-ID: 1abMQF-0003aa-1Q X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1457590059.2361@ujbwIuQPpew6MrJEkjvFow X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) tags 22819 patch From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 04 21:54:38 2017 Received: (at 22819) by debbugs.gnu.org; 5 Aug 2017 01:54:38 +0000 Received: from localhost ([127.0.0.1]:42221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddoIY-0001Y6-I0 for submit@debbugs.gnu.org; Fri, 04 Aug 2017 21:54:38 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:36336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddoIW-0001Xr-Ij for 22819@debbugs.gnu.org; Fri, 04 Aug 2017 21:54:36 -0400 Received: by mail-io0-f193.google.com with SMTP id j32so2118262iod.3 for <22819@debbugs.gnu.org>; Fri, 04 Aug 2017 18:54:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=K5adcaWk/+3M32QwqDYhg/M/Xym/+kqd48kL10e+l9k=; b=FX9XFg4664pkQCZro7hJe2xmG7Ar42jhhRwJyioVwllAhibHKKYHEYpAekkEmUvtnQ 8gVxbwNJPcO1kepBLY+57Z0LCEYKirFlSr96K9q9sjxRtu+dZO9zh6QLnJjt5Vm+hxrq LBl0hJZ9xwdsg0V5/z4v1A48MtyFa64OHrxp+g9dW6+VMAG4tB+dhKAsjXis/4rtpXGH XHw1mxB2ygIH73z/Q9zKjYFDGCvHotBVbgm2FMSHu3hIAzUZw0ZjIR8pLTv8aQvPiJ02 L1Mp3trOlg8/tVb/B9dLpsb8Nv3cnVGctGE4AV6HwwrFilhbeHIdVcDkkN1THyNHT8Ua dY5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=K5adcaWk/+3M32QwqDYhg/M/Xym/+kqd48kL10e+l9k=; b=fl4l5qfPSpNncntOjGzlV6vjVBQxIRJMIOR5Pcwtqm8jiwq1TK+Ui7J5sfjus/4abz mDMuad4x2zfPYEPl8YV/X51rRCghWWxAUAwQQ5jU27SFGY7OczrV9Z+ZGRdYOwSI6KLf bj//e+PPqIK7qgRNCwio+FbKEYYGrpN2GOjlnNrdZtqCt0RiTkTnflqLXCh72bTVkZst x86vSF828GZ4VmLYjXMv0Z56XhaiyDIpZhYIZ3GFKizs2eGFYLhrrDIPJ6ful2TYEdXs VluK5+73+/ovh3aNU46G4oZ+hB9nmgahxXKYw2UyN7Xx71DZV9ahHL93E0yTptCNNQNQ yQkQ== X-Gm-Message-State: AIVw113FPCjcMUxZL+nxN44w/1+CKM4jdcZuL5BPn/owRF+dM/2fzxcP aW+x2RgPs/sX5wHG X-Received: by 10.107.157.144 with SMTP id g138mr4901063ioe.200.1501898070827; Fri, 04 Aug 2017 18:54:30 -0700 (PDT) Received: from zony ([45.2.119.48]) by smtp.googlemail.com with ESMTPSA id b185sm1388549itc.1.2017.08.04.18.54.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Aug 2017 18:54:30 -0700 (PDT) From: npostavs@users.sourceforge.net To: Kaushal Modi Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only References: Date: Fri, 04 Aug 2017 21:56:11 -0400 In-Reply-To: (Kaushal Modi's message of "Fri, 26 Feb 2016 08:54:20 -0500") Message-ID: <87vam26amc.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --=-=-= Content-Type: text/plain 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 patch could be even simpler: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-lisp-indent.el-indent-region-Fail-fast-if-read-only-.patch Content-Description: patch >From 54d1b5cd62572dc35eaed6f07ab9d254313c8a58 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Thu, 6 Jul 2017 20:04:43 -0400 Subject: [PATCH] * lisp/indent.el (indent-region): Fail fast if read-only (Bug#22819). --- lisp/indent.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/indent.el b/lisp/indent.el index e7a30b885d..e9ed385faa 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -508,7 +508,7 @@ (defun indent-region (start end &optional column) Called from a program, START and END specify the region to indent. If the third argument COLUMN is an integer, it specifies the column to indent to; if it is nil, use one of the three methods above." - (interactive "r\nP") + (interactive "*r\nP") (cond ;; If a numeric prefix is given, indent to that column. (column -- 2.11.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 05 02:53:17 2017 Received: (at 22819) by debbugs.gnu.org; 5 Aug 2017 06:53:17 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 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 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 Date: Sat, 05 Aug 2017 09:52:59 +0300 Message-Id: <83lgmywlo4.fsf@gnu.org> From: Eli Zaretskii To: npostavs@users.sourceforge.net In-reply-to: <87vam26amc.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only References: <87vam26amc.fsf@users.sourceforge.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, kaushal.modi@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 05 07:51:19 2017 Received: (at 22819) by debbugs.gnu.org; 5 Aug 2017 11:51:19 +0000 Received: from localhost ([127.0.0.1]:42574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddxbz-0002Xx-3z for submit@debbugs.gnu.org; Sat, 05 Aug 2017 07:51:19 -0400 Received: from mail-lf0-f46.google.com ([209.85.215.46]:37745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddxbx-0002Xl-EG for 22819@debbugs.gnu.org; Sat, 05 Aug 2017 07:51:17 -0400 Received: by mail-lf0-f46.google.com with SMTP id m86so15594310lfi.4 for <22819@debbugs.gnu.org>; Sat, 05 Aug 2017 04:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IZpNvN/xXl7yNSx4K7ofNxxngnv2FHQztt71Z/c3Q9k=; b=n+rmLd7vfBQJkHSxUQwh63CbfFsLzgb4hBkdktqGxtQMyFh4aTOxg1UvDzRRx474QF /acZ8+LDLCKTXBHyTzVBbN8eBBHZVpNMa3NATjlK8Eaki6LclAegQrMVVGygy2mZao8h V63Y0/fNdzX82Ki+BY8Kiw1KXVvbBP0LtbIWhmie+uWFSpoLktlYiNPONsk8INuuTacs hueuVMvZ5u7kMhetRudAnH4/Iywptcw6Ss5ru0whagKNUGg/HCEsRbY0BlXJSze9juJF toX/WAFvUwoSKXF990vnJFN8UPki+bOtknkGvbh6SbmMmer7B4z5KgS+B/bryweNbby2 7qbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IZpNvN/xXl7yNSx4K7ofNxxngnv2FHQztt71Z/c3Q9k=; b=snj2+6HuEY//O5mKodwTtIBA9olF71wfsTV+8v47jbFtNtop+s1ugl6ybKKZ5/qToy etBy90lHcVx4MfAfNEmbs7vOuH5tJ0ramUXmo+v44SbKDMcWS4M1CBX3UnuedeJC7whN 00BPQ8PXLbZpKr4HjNbFoY2V4QIh0Zy7DqSckA/WwX5dqOCJm4HYwEfgcu4tgdRo+ub+ BnKeeZR/3Kofqacd09sjOiuDDH1omFrqrCisJkol6jB+NO4q6JAnq//k8LM7hCVHJfEL zP1twy//FD3qlZxoCRJCyT6kqgGEq+6MReURtfsYUr/DMUIHN/xALnRoNNUtTF2C4A0P /ByQ== X-Gm-Message-State: AHYfb5gSj15XX/yJbgwBYlUw4kEKtCtg0LdFkpC0YlyKMcE2HgBlkCvY Eq8BIN5daVNTAFnauXWzzjvsemf2og== X-Received: by 10.25.211.71 with SMTP id k68mr1488980lfg.43.1501933871420; Sat, 05 Aug 2017 04:51:11 -0700 (PDT) MIME-Version: 1.0 References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> In-Reply-To: <83lgmywlo4.fsf@gnu.org> From: Kaushal Modi Date: Sat, 05 Aug 2017 11:50:59 +0000 Message-ID: Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only To: Eli Zaretskii , Noam Postavsky Content-Type: multipart/alternative; boundary="001a114205e4e1dd500556003ae3" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --001a114205e4e1dd500556003ae3 Content-Type: text/plain; charset="UTF-8" On Sat, Aug 5, 2017, 2:53 AM Eli Zaretskii wrote: > > From: npostavs@users.sourceforge.net > > Date: Fri, 04 Aug 2017 21:56:11 -0400 > > Cc: 22819@debbugs.gnu.org > > > > 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). > Thanks Noam for reviewing this. I am away from PC for a few days. I'll review your patch next week on Tuesday. The act of indenting is an editing action. So the buffer should be checked if it's editable before attempting an indent. If the buffer is read-only and no indentation change is required, then good. But what if indentation change is required? Here's what's will happen: 1. User: Try indentation 2. User: Could take several seconds or few minutes (depending on major mode and file size) 3. Emacs: "Bummer, couldn't save all that indentation because the buffer is read-only". 4. User: Make buffer editable. It's not a simple act of chmod. In my case, the buffer was read-only because the file is part of a centralized version control system (Cliosoft SOS). In "checked in" state, the file is just a symlink to the cached version in server, and thus read-only. To make it editable, I need to "check out" the file. That act replaces the symlink link with a physical file copy. 5. User: Re-do that several seconds/minutes long indentation. My commit saves the user from wasting that time in Step 2 above. The original submission provided no rationale for the change, so it's > hard to reason about its advantages. Please consider the above use case. The clear disadvantage is that > this goes > I am failing to see the disadvantage. Before: Do indent > Attempt to write that indent to buffer After (my patch): Check if buffer is writable > Do indent > Attempt to write that indent. Isn't it just logical that if you need to do an expensive indentation, the buffer should be checked if it's editable to prevent spending that time twice? >against veteran Emacs behavior regarding read->only text, >behavior that is present in several other >commands, and that AFAIR >resulted from some past discussions. This is the only one that provided me this surprise in about a decade of Emacs use. Which other commands do the text manipulation, and then check the buffer read-only status? If the rationale is user surprise, then I'd suggest to leave the > current behavior unchanged. > The flip question is: How common is a workflow, where a buffer is read-only, user does indentation, and is fine with seeing that error after the fact? > -- Kaushal Modi --001a114205e4e1dd500556003ae3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Aug 5, 2017, 2:53 AM El= i Zaretskii <eliz@gnu.org> wrote:=
> From: npostavs@users.sourceforge.net=
> Date: Fri, 04 Aug 2017 21:56:11 -0400
> Cc: 22819@d= ebbugs.gnu.org
>
> I wonder if someone will complain that they were relying on this
> behaviour to check indentation in read-only buffers (currently if the<= br> > indentation is already correct there is no error).

Thanks Noam for reviewing this. I am away from PC fo= r a few days. I'll review your patch next week on Tuesday.=C2=A0
<= div>
The act of indenting is an editing action. So the buffer= should be checked if it's editable before attempting an indent. If the= buffer is read-only and no indentation change is required, then good. But = what if indentation change is required? Here's what's will happen:<= /div>

1. User: Try indentation
2. User: Could = take several seconds or few minutes (depending on major mode and file size)=
3. Emacs: "Bummer, couldn't save all that indentation b= ecause the buffer is read-only".
4. User: Make buffer editab= le. It's not a simple act of chmod. In my case, the buffer was read-onl= y because the file is part of a centralized version control system (Cliosof= t SOS). In "checked in" state, the file is just a symlink to the = cached version in server, and thus read-only. To make it editable, I need t= o "check out" the file. That act replaces the symlink link with a= physical file copy.=C2=A0
5. User: Re-do that several seconds/mi= nutes long indentation.

My commit saves the user f= rom wasting that time in Step 2 above.=C2=A0

The original submission pro= vided no rationale for the change, so it's
hard to reason about its advantages.

= Please consider the above use case.=C2=A0

The
clear disadvantage is that
this goes=C2=A0

I am failing to s= ee the disadvantage. =C2=A0

Before: Do indent >= Attempt to write that indent to buffer

After (my = patch): Check if buffer is writable > Do indent > Attempt to write th= at indent.=C2=A0

Isn't it just logical that if= you need to do an expensive indentation, the buffer should be checked if i= t's editable to prevent spending that time twice?

<= div>>against veteran Emacs behavior regarding read->only text,
>= ;behavior that is present in several other >commands, and that AFAIR
= >resulted from some past discussions.

This = is the only one that provided me this surprise in about a decade of Emacs u= se. Which other commands do the text manipulation, and then check the buffe= r read-only status?=C2=A0

If
=C2= =A0the rationale is user surprise, then I'd suggest to leave the
current behavior unchanged.

The f= lip question is: How common is a workflow, where a buffer is read-only, use= r does indentation, and is fine with seeing that error after the fact?
--

Kaushal Modi

--001a114205e4e1dd500556003ae3-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 05 08:10:43 2017 Received: (at 22819) by debbugs.gnu.org; 5 Aug 2017 12:10:43 +0000 Received: from localhost ([127.0.0.1]:42591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddxuk-000301-Vn for submit@debbugs.gnu.org; Sat, 05 Aug 2017 08:10:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddxui-0002zn-DB for 22819@debbugs.gnu.org; Sat, 05 Aug 2017 08:10:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddxuY-0003Gp-DJ for 22819@debbugs.gnu.org; Sat, 05 Aug 2017 08:10:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48453) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddxuY-0003Gj-9B; Sat, 05 Aug 2017 08:10:30 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1679 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ddxuX-0006X0-Le; Sat, 05 Aug 2017 08:10:30 -0400 Date: Sat, 05 Aug 2017 15:10:22 +0300 Message-Id: <83r2wqusep.fsf@gnu.org> From: Eli Zaretskii To: Kaushal Modi In-reply-to: (message from Kaushal Modi on Sat, 05 Aug 2017 11:50:59 +0000) Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Kaushal Modi > Date: Sat, 05 Aug 2017 11:50:59 +0000 > Cc: 22819@debbugs.gnu.org > > 1. User: Try indentation > 2. User: Could take several seconds or few minutes (depending on major mode and file size) > 3. Emacs: "Bummer, couldn't save all that indentation because the buffer is read-only". > 4. User: Make buffer editable. It's not a simple act of chmod. In my case, the buffer was read-only because the > file is part of a centralized version control system (Cliosoft SOS). In "checked in" state, the file is just a > symlink to the cached version in server, and thus read-only. To make it editable, I need to "check out" the file. > That act replaces the symlink link with a physical file copy. > 5. User: Re-do that several seconds/minutes long indentation. > > My commit saves the user from wasting that time in Step 2 above. > > The original submission provided no rationale for the change, so it's > hard to reason about its advantages. > > Please consider the above use case. I see no problem in it, sorry. And why was the user not aware of the read-only status of the buffer to begin with? How plausible is such a scenario? Are we trying to change Emacs behavior to cater to a clear cockpit error? > >against veteran Emacs behavior regarding read->only text, > >behavior that is present in several other >commands, and that AFAIR > >resulted from some past discussions. > > This is the only one that provided me this surprise in about a decade of Emacs use. Which other commands > do the text manipulation, and then check the buffer read-only status? C-w, to name just one. IOW, a command could have useful side effects that are produced even if the buffer is read-only and its text cannot be changed, thus preventing the main effect of the command from happening. > The flip question is: How common is a workflow, where a buffer is read-only, user does indentation, and is fine > with seeing that error after the fact? This goes both ways: if it's uncommon enough to be unimportant, then changing the behavior is not important as well. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 05 08:29:35 2017 Received: (at 22819) by debbugs.gnu.org; 5 Aug 2017 12:29:35 +0000 Received: from localhost ([127.0.0.1]:42597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddyD1-0003QX-6I for submit@debbugs.gnu.org; Sat, 05 Aug 2017 08:29:35 -0400 Received: from mail-lf0-f42.google.com ([209.85.215.42]:36631) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddyCz-0003QL-Pr for 22819@debbugs.gnu.org; Sat, 05 Aug 2017 08:29:34 -0400 Received: by mail-lf0-f42.google.com with SMTP id o85so15799821lff.3 for <22819@debbugs.gnu.org>; Sat, 05 Aug 2017 05:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QohJ7Gh2Fa5+PalL4CS9G/tjEfhd43LtifH+jRkV/YU=; b=Km4BtRStVwvtZqIhmCQYMuVzifT24m1c74pFSGWSZX1XLAPdgP6no8yM0fnT32qeZa hIfcyTUrL41lkb+yaZwHx+749om50gTojh6zmn9bKZATrq3nO8KlRKz7F9FeYfKrlqyX l2OsmY1J/4jKCf47AvGcvHkseC7Ccx3Q6CBz6R/7s4+z1FlkMYH5W+y/0BveIGQsB21q XQ1s5KVLqTgRaRXUwbbXN+mrI23Wk6i3RdNrRESDWOohhl4LGLrEq0yYS6xg+Thxc65S n44GgQ7yB9Q/YmrH18Hh6fgwlDjuQzMkchyRrS2bxJs99oIp9cPPV5X0Rci5TTJdBi+t cy5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QohJ7Gh2Fa5+PalL4CS9G/tjEfhd43LtifH+jRkV/YU=; b=b2b0D9wKEYBHJNVARuA2RfmViXLsEowZhvS60njJUjkNRqEfJKQ91FrduF9PAq5Tj6 qQ7ppQgw8Zy37T9mu/qM2WBvwpsbF+s7iZTn8+Xxz3+BSn4kPLqYxFBZtmbpIdaOdpPK Bj7+arM6snVbGfUEZrSWH9Wh5TGM8NAGLbH3Js4Lp3jXCDs9xVXvinP8vc9ZpzHMt8l+ RBPNyVRS729AQ35SXQNrAMkjZ2rDzhqfhak6UgKcCAVbjXXBcY36N77kziXnYlblkmJO uf6ij3UWewQ+CSCHab149O7IktIYRuTCtNXeNrQl7ylduZDm7Vr+muaXazxzZ9MNzxbD AIlQ== X-Gm-Message-State: AHYfb5j/EmaC5EMSHne7yYDEGxFCDdTWAlE/SOqSQF00l+3oqyCdN1JJ Lbf7H8ifSi7COnmQ5jAW5KUbXcd6fA== X-Received: by 10.25.221.196 with SMTP id w65mr1665501lfi.91.1501936167737; Sat, 05 Aug 2017 05:29:27 -0700 (PDT) MIME-Version: 1.0 References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> <83r2wqusep.fsf@gnu.org> In-Reply-To: <83r2wqusep.fsf@gnu.org> From: Kaushal Modi Date: Sat, 05 Aug 2017 12:29:15 +0000 Message-ID: Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only To: Eli Zaretskii Content-Type: multipart/alternative; boundary="94eb2c0c884ac0e080055600c31f" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --94eb2c0c884ac0e080055600c31f Content-Type: text/plain; charset="UTF-8" On Sat, Aug 5, 2017, 8:10 AM Eli Zaretskii wrote: > > I see no problem in it, sorry. And why was the user not aware of the > read-only status of the buffer to begin with? Cockpit error, as you say later. It's easy to forget if you are working on a DVCS (like git) controlled file or CVCS (like SOS). How plausible is such a > scenario? I resorted to writing this patch because it frustrated me quite a few times. Are we trying to change Emacs behavior to cater to a clear > cockpit error? > Isn't it better to alert user of an operation that will not succeed anyways beforehand, especially if the operation can be expensive like this one? > >against veteran Emacs behavior regarding read->only text, > > >behavior that is present in several other >commands, and that AFAIR > > >resulted from some past discussions. > > > > This is the only one that provided me this surprise in about a decade of > Emacs use. Which other commands > > do the text manipulation, and then check the buffer read-only status? > > C-w, to name just one. > OK, it would be unnoticeable in that case as I have yet to see a kill operation that can take couple of minutes. IOW, a command could have useful side effects that are produced even > if the buffer is read-only and its text cannot be changed, thus > preventing the main effect of the command from happening. > > > The flip question is: How common is a workflow, where a buffer is > read-only, user does indentation, and is fine > > with seeing that error after the fact? > > This goes both ways: if it's uncommon enough to be unimportant, then > changing the behavior is not important as well. > Would it be OK to open this up to emacs-devel to understand what workflows can break because of this change? > -- Kaushal Modi --94eb2c0c884ac0e080055600c31f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Aug 5, 2017, 8:10 AM El= i Zaretskii <eliz@gnu.org> wrote:=

I see no problem in it, sorry.=C2=A0 And why was the user not aware of the<= br> read-only status of the buffer to begin with?

<= /div>
Cockpit error, as you say later. It's easy to forget if you a= re working on a DVCS (like git) controlled file or CVCS (like SOS).=C2=A0

How
plausible is such a
scenario?

I resorted to writing this = patch because it frustrated me quite a few times.=C2=A0

=C2=A0Are
we trying to change Emacs behavior to ca= ter to a clear
cockpit error?

Isn't it bette= r to alert user of an operation that will not succeed anyways beforehand, e= specially if the operation can be expensive like this one?

> >agai= nst veteran Emacs behavior regarding read->only text,
> >behavior that is present in several other >commands, and that A= FAIR
> >resulted from some past discussions.
>
> This is the only one that provided me this surprise in about a decade = of Emacs use. Which other commands
> do the text manipulation, and then check the buffer read-only status?<= br>
C-w, to name just one.

OK, it wou= ld be unnoticeable in that case as I have yet to see a kill operation that = can take couple of minutes.=C2=A0

IOW, a command could have useful side = effects that are produced even
if the buffer is read-only and its text cannot be changed, thus
preventing the main effect of the command from happening.

> The flip question is: How common is a workflow, where a buffer is read= -only, user does indentation, and is fine
> with seeing that error after the fact?

This goes both ways: if it's uncommon enough to be unimportant, then changing the behavior is not important as well.
=
Would it be OK to open this up to emacs-devel to understand = what workflows can break because of this change?
--

Kaushal Modi

--94eb2c0c884ac0e080055600c31f-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 05 08:37:50 2017 Received: (at 22819) by debbugs.gnu.org; 5 Aug 2017 12:37:50 +0000 Received: from localhost ([127.0.0.1]:42601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddyL0-0003cg-3i for submit@debbugs.gnu.org; Sat, 05 Aug 2017 08:37:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddyKy-0003cT-7q for 22819@debbugs.gnu.org; Sat, 05 Aug 2017 08:37:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddyKp-0005rH-Ks for 22819@debbugs.gnu.org; Sat, 05 Aug 2017 08:37:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddyKZ-0005lS-Gn; Sat, 05 Aug 2017 08:37:23 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2347 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ddyKY-00074e-US; Sat, 05 Aug 2017 08:37:23 -0400 Date: Sat, 05 Aug 2017 15:37:15 +0300 Message-Id: <83o9ruur5w.fsf@gnu.org> From: Eli Zaretskii To: Kaushal Modi In-reply-to: (message from Kaushal Modi on Sat, 05 Aug 2017 12:29:15 +0000) Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> <83r2wqusep.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Kaushal Modi > Date: Sat, 05 Aug 2017 12:29:15 +0000 > Cc: 22819@debbugs.gnu.org, Noam Postavsky > > Would it be OK to open this up to emacs-devel to understand what workflows can break because of this > change? You don't need my permission to start a discussion. I'll probably shut up about that anyway, as it's clear my opinions on this do not have any weight at all. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 05 08:46:06 2017 Received: (at 22819) by debbugs.gnu.org; 5 Aug 2017 12:46:06 +0000 Received: from localhost ([127.0.0.1]:42606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddyT0-0003oe-14 for submit@debbugs.gnu.org; Sat, 05 Aug 2017 08:46:06 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:38511) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddySy-0003nv-FU for 22819@debbugs.gnu.org; Sat, 05 Aug 2017 08:46:04 -0400 Received: by mail-io0-f193.google.com with SMTP id o9so2637596iod.5 for <22819@debbugs.gnu.org>; Sat, 05 Aug 2017 05:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=vj9G17l+YRdg885nSj3Y9Itd5+Lzy88qO4J0kFQkv8E=; b=iD29q9bAYiwfllFxtXlW/kL6oaX3Whw0FF9s83qUAJxargqkg5EYd+zI7o4MTJopPy ZoHdJAm7dTM6pfC9GjoNIkdHb6MwOiP1J9RsuM8Jy+zEP7u50o9psBKmonqR/wGvvHYK aDqDIzQJaBxVKyh0ILRZ/QbzozKxp3P0Y+RyjXyymz5a6ahzI/cHAFYvm1NHN1qjfGYf H2Dod3Ae23CR9eFKciqSC0Ct11uVDcdaMC6X+I65UM2hljdI+CAtrHbdxL2i2XN1t+j5 fbKpSNnP9M4ortBhkSVKnjUBdZ+1iq7igSuADCl3rsX3UUfXOXasFXr7WII+Xv52JVVQ ay4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=vj9G17l+YRdg885nSj3Y9Itd5+Lzy88qO4J0kFQkv8E=; b=kmY0fKMCx8FWEHEZvH6H0m6cj1cq76SjidCAKRJ5+F/8K+/4aknZInI9aUqTryDjh3 06/vg8XB1ONwYU2ODlhlXaoxWnhqY80B++z2gKtl2bqnH62sOStMnnZ2EHcMKFoRgyqb UkxawwdGbmIeiINpe8mKUnq/qG59XEcrfJmRY3rGnPpzvbirp+RMKLl3orEYkIIIQLhV Ad8CYxVUp/8NaZ/7noYYcwksVFU/MZG5aKE2K4zYIc9Q/Fb7AXSXHlIrnE6uJzyXeCJ7 TjSTTEroS0lZtJl+NGLLoAVDpt03uesQq4+MAuC2I4gSlin/brjRqMHAuWJ8qf+f7kqb LZLw== X-Gm-Message-State: AHYfb5g3s0bCwM+HppHiYgonAsoglWcFPt55BtOPyBAd/E+hr8yqOCPr yj11+Kbbdb56HRMZ X-Received: by 10.107.152.197 with SMTP id a188mr5444107ioe.124.1501937158627; Sat, 05 Aug 2017 05:45:58 -0700 (PDT) Received: from zony ([45.2.119.48]) by smtp.googlemail.com with ESMTPSA id y4sm1804841ita.42.2017.08.05.05.45.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Aug 2017 05:45:57 -0700 (PDT) From: npostavs@users.sourceforge.net To: Eli Zaretskii Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> <83r2wqusep.fsf@gnu.org> Date: Sat, 05 Aug 2017 08:47:37 -0400 In-Reply-To: <83r2wqusep.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 05 Aug 2017 15:10:22 +0300") Message-ID: <87k22i5ggm.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, Kaushal Modi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Eli Zaretskii writes: >> >against veteran Emacs behavior regarding read-only text, behavior >> >that is present in several other commands, and that AFAIR resulted >> >from some past discussions. >> >> This is the only one that provided me this surprise in about a decade of Emacs use. Which other commands >> do the text manipulation, and then check the buffer read-only status? > > C-w, to name just one. That seems like a bit of a special case, as there is `kill-read-only-ok' which specifically controls this behaviour. > IOW, a command could have useful side effects that are produced even > if the buffer is read-only and its text cannot be changed, thus > preventing the main effect of the command from happening. indent-region doesn't have any side-effects though, right? There are lots of other commands which check read-only status at the beginning: M-x rgrep barf-if-buffer-read-only\|(interactive "\* From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 05 09:14:04 2017 Received: (at 22819) by debbugs.gnu.org; 5 Aug 2017 13:14:04 +0000 Received: from localhost ([127.0.0.1]:42632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddyu4-0004Wq-9Q for submit@debbugs.gnu.org; Sat, 05 Aug 2017 09:14:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45167) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddyu2-0004WF-5R for 22819@debbugs.gnu.org; Sat, 05 Aug 2017 09:14:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddyts-0002GR-4G for 22819@debbugs.gnu.org; Sat, 05 Aug 2017 09:13:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddyts-0002GJ-0Y; Sat, 05 Aug 2017 09:13:52 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2363 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ddytr-00008T-DG; Sat, 05 Aug 2017 09:13:51 -0400 Date: Sat, 05 Aug 2017 16:13:43 +0300 Message-Id: <83ini2uph4.fsf@gnu.org> From: Eli Zaretskii To: npostavs@users.sourceforge.net In-reply-to: <87k22i5ggm.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> <83r2wqusep.fsf@gnu.org> <87k22i5ggm.fsf@users.sourceforge.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, kaushal.modi@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: npostavs@users.sourceforge.net > Cc: Kaushal Modi , 22819@debbugs.gnu.org > Date: Sat, 05 Aug 2017 08:47:37 -0400 > > indent-region doesn't have any side-effects though, right? That depends on whether indent-region-function is nil, and what it does if non-nil. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 07 13:45:55 2017 Received: (at 22819) by debbugs.gnu.org; 7 Aug 2017 17:45:55 +0000 Received: from localhost ([127.0.0.1]:50667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dem6F-000257-72 for submit@debbugs.gnu.org; Mon, 07 Aug 2017 13:45:55 -0400 Received: from mail-lf0-f52.google.com ([209.85.215.52]:36308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dem6D-00024r-01 for 22819@debbugs.gnu.org; Mon, 07 Aug 2017 13:45:53 -0400 Received: by mail-lf0-f52.google.com with SMTP id o85so4940781lff.3 for <22819@debbugs.gnu.org>; Mon, 07 Aug 2017 10:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IAff/opN885PbVTpq1wetsrPN8o/yvcLQiXiTZhpRSg=; b=MzuS7ZhPxFiKjdr0ub1qwxtTpiTDz0uK2UiGP5h062US6ZTmHVxUBxwRZIWqh86MkR Bi2nJoAk/sCOgxaI+7hyfkxaJVz1Z0tsCZRp+PePg/CP1+pobtGAwQ44bqFe525DZD82 koToNZCMJIkm0DCjBZdiSOAG6peejy/XzAtNpBqZb9SjdKp5qwG4BqJKcamWz7sK2iCc disQEAu8ibMv7Ve2+hu+1wFnD36I3HhSLg0+Pgcbm+fIbSYxVxExK/hSbJiFAtA9Mxt/ AvHLPyaMhq803P7xEZWc3TsKkagIW2BISb5DrLho+buYjFeKVQ9iMyxjW1iR6Cb1WD3O kZwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IAff/opN885PbVTpq1wetsrPN8o/yvcLQiXiTZhpRSg=; b=cLr+H5C/YQfqwmbdkL+VB61WHwjdMrdK4ESedJyIO4qCrw/5y1ol+610BOZ4DhlfXb RxiFLtQoXbDQHez2V8txXHh942hmYA75urB4cujbL7CsdOkaFqzJI8Xp70cHNPdLKgXM BKABQfyVKNJPfCfKtER9klzHlPaaFcEMnJVZeUAWmTmJFYdunzYTO9YoCPs8K6itmG6E VT+xus15vjZK310NJdvIV3WEXwju/xv9AzZhzZidbjKL4DWJ9/KScRwCwNUkuMCl4gBs 7VwAV6489rcWxIgENwy8rloDGY0m8Q3eBDRxnjriZRWnscA8LjUHZtH8yJyQAtHlIaSV TyyA== X-Gm-Message-State: AHYfb5htxexkJUceXZu4ImVXXpJi5Aw/9HuwiJMU+N1zAPWBWad14Giw maCVDU5FS0peoGuEaas0BMstoBAhtw== X-Received: by 10.25.72.21 with SMTP id v21mr362221lfa.201.1502127946964; Mon, 07 Aug 2017 10:45:46 -0700 (PDT) MIME-Version: 1.0 References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> In-Reply-To: From: Kaushal Modi Date: Mon, 07 Aug 2017 17:45:36 +0000 Message-ID: Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only To: Noam Postavsky Content-Type: multipart/alternative; boundary="94eb2c1a1e94afa88a05562d6a80" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --94eb2c1a1e94afa88a05562d6a80 Content-Type: text/plain; charset="UTF-8" On Sat, Aug 5, 2017 at 7:50 AM Kaushal Modi wrote: > > Thanks Noam for reviewing this. I am away from PC for a few days. I'll > review your patch next week on Tuesday. > Hi Noam, I was able to try the patch sooner. I use verilog-mode and tried out your patch on a huge SystemVerilog file, which usually takes a tangible amount of time (10's of seconds) to indent the whole file -- C-x h C-M-\ When using (barf-if-buffer-read-only): - The failure due to a buffer being read-only is instantaneous. - As soon as I do C-x h C-M-\, I get: == *Messages* == Buffer is read-only: # ===== When using (interactive "*r\nP"): - The failure happens soon, but not instantaneously.. I start seeing the progress percentage of the indentation happening, and then the read-only error shows. - After I do C-x h C-M-\, I get the below after a second or two: == *Messages* == indent-region Indenting region...45% verilog-do-indent: Buffer is read-only: # ===== So looks like the read-only check based on interactive form is kicked in some time after the user calls indent-region.. I tried looking at verilog-do-indent code in verilog-mode.el[1], but I couldn't understand why interactive * based error is delayed. [1]: http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/verilog-mode.el -- Kaushal Modi --94eb2c1a1e94afa88a05562d6a80 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Aug 5,= 2017 at 7:50 AM Kaushal Modi <kaushal.modi@gmail.com> wrote:

Thanks= Noam for reviewing this. I am away from PC for a few days. I'll review= your patch next week on Tuesday.

Hi = Noam,

I was able to try the patch sooner.

I use verilog-mode and tried out your patch on a huge Syst= emVerilog file, which usually takes a tangible amount of time (10's of = seconds) to indent the whole file -- C-x h C-M-\

W= hen using=C2=A0(barf-if-buffer-read-only):
- The failure due to a = buffer being read-only is instantaneous.
- As soon as I do C-x h C-M-\, I get:

=3D=3D *Messages* =3D=3D
Buffer is read-only: #<buffer file.sv>
=3D=3D= =3D=3D=3D

=
When using (interactive "*r\nP"):
- The failure happ= ens soon, but not instantaneously.. I start seeing the progress percentage = of the indentation happening, and then the read-only error shows.
- After I do C-x h C-M-\, I get the below after a second or two:
=3D=3D = *Messages* =3D=3D
indent-region
Indenting regio= n...45%
verilog-do-indent: Buffer is read-only: #<buffer file.sv>
= =3D=3D=3D=3D=3D

So looks like the read-only check based on interacti= ve form is kicked in some time after the user calls indent-region.. I tried= looking at verilog-do-indent code in verilog-mode.el[1], but I couldn'= t understand why interactive * based error is delayed.

=
--=

Kaushal Modi

--94eb2c1a1e94afa88a05562d6a80-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 07 13:53:09 2017 Received: (at 22819) by debbugs.gnu.org; 7 Aug 2017 17:53:09 +0000 Received: from localhost ([127.0.0.1]:50685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1demDF-0002IB-Bc for submit@debbugs.gnu.org; Mon, 07 Aug 2017 13:53:09 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:33693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1demDE-0002Hx-31 for 22819@debbugs.gnu.org; Mon, 07 Aug 2017 13:53:08 -0400 Received: by mail-oi0-f45.google.com with SMTP id d71so11169671oih.0 for <22819@debbugs.gnu.org>; Mon, 07 Aug 2017 10:53:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=xBTVOff85tiIGGTXK9UHkY93GKju7lHMYYz1QH/WlvA=; b=e0bX9j0s9aG052gAp8JYCNtoc+1SDlTAoG8+EpaDYpIx9wrHPNLDSazj3ELVd0uHf0 1ODFddOgayrD2s0YkRj+FUQ7aHh88id8P3ZuIir0WR5IGvOdZqS1142YGlMfg65lk2xy iR54crOQ3yn5zRnTOPKiqqEy3GcwBYJ85XBlC9M2p0f1P+94mTw/cvDk3QtCaM01L00T B3UjNboEYfTBTQzXexweiOsjg9n9SnYX7M7lJUQ2Xx9WtB3jR2qhdqQRN7fbahJMiFKs xw9fx+/7qnUWAsSNm5gBtNTZDV3Pff/Xr/ZGnCXp8onkg/ByiboNm63qgm14LH6tKj3Z CZ8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=xBTVOff85tiIGGTXK9UHkY93GKju7lHMYYz1QH/WlvA=; b=HQ3ZbgzCwbfAHkb2w3fQPb+mBXiJfzyLVuMeXJs7j2FadqbK2vqHiQxNSWa9UhxYt/ q0UuarQcikDEjecRhe9ud5I25RJVNe7mqkkxNIhNIPgGkzG/6IWBeePmbjQPaToM9Fjd T7uoTObrM5GBt/Gr/SUoE7DPqhHsKnHYpT9vx8a1QE+5m4saNbjqTbSeHrDlLieYwV99 0x2eIOuvhz9YRL7IH+ADd+gQaXRgOZnH+/BStYGhOGjBf5f+MhejRzZcsz4FW/O6NsHN aK/W/MdIZyuMOLtBNR2EDRE+1znLvrz/JVME/FvT05y+l25oM3HqqwQrPN/NVTCO/2rg 67uw== X-Gm-Message-State: AHYfb5g+jIpojUpP/Hq8y4rwn2y8xBvBctA+TJKf/ddDQDonQqNHJYFq BNhahkD/SlENu53IAi2aobN3qwqiHw== X-Received: by 10.202.95.139 with SMTP id t133mr1052064oib.207.1502128382332; Mon, 07 Aug 2017 10:53:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.18.129 with HTTP; Mon, 7 Aug 2017 10:53:01 -0700 (PDT) In-Reply-To: References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> From: Noam Postavsky Date: Mon, 7 Aug 2017 13:53:01 -0400 X-Google-Sender-Auth: rEmPUo0I3V2xz6JbyamJ-PFfWQo Message-ID: Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only To: Kaushal Modi Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) On Mon, Aug 7, 2017 at 1:45 PM, Kaushal Modi wrote: > - After I do C-x h C-M-\, I get the below after a second or two: > > == *Messages* == > indent-region > Indenting region...45% > verilog-do-indent: Buffer is read-only: # > ===== hmm, I can't reproduce here, but is it possible you have bound C-M-\ to some other command which calls indent-region non-interactively? From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 07 14:02:39 2017 Received: (at 22819) by debbugs.gnu.org; 7 Aug 2017 18:02:39 +0000 Received: from localhost ([127.0.0.1]:50690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1demMR-0002Y1-7h for submit@debbugs.gnu.org; Mon, 07 Aug 2017 14:02:39 -0400 Received: from mail-lf0-f45.google.com ([209.85.215.45]:34564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1demMQ-0002Xp-5C for 22819@debbugs.gnu.org; Mon, 07 Aug 2017 14:02:38 -0400 Received: by mail-lf0-f45.google.com with SMTP id g25so5179155lfh.1 for <22819@debbugs.gnu.org>; Mon, 07 Aug 2017 11:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Z7rpR8BkehrhSQ5szTWY+qRfncmTTZsQRTIZSTmWwI8=; b=I1VX5JB0Ei1KLYH7Us70uRAiNIsFGxyioC9Zldy/cPy7kwGBkQgZe31NvTxe/89vl6 nhtdjLzzM7ZRr9fkvVOxXUzu5OnSR1/i7VD656nQyEA+UUwfAdEEgVqJb4JMPSSRn2JH 59GSCRwarY1lPvXpAL1qHJmlS79MO7iwjmligNi07s1PUivQ+dJArIQ4ye+VEZqrrDTS jk2Pv8iRxGA+ST9Uthf2M8hFL/iFdZih5axz5CtZYVgrRKRXy2uYYQPRtyTbeEkavnc+ gWTkjTteN6eBFf/qBX5dB5JXCPh7/djIziO5Pfnk72ZiTw8qjUIBiCzlT/hf8xjBe+aF 4KHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Z7rpR8BkehrhSQ5szTWY+qRfncmTTZsQRTIZSTmWwI8=; b=BQATdHQfNYqxsAB8Iv3j8rKAEBTTNQlCqZJ8LMpEPbnj9wRw79AMwPPY9o978xE9YT 23ZrO6bUeSw2pqLBHW//p0pnW9dvmwGjc8NkHAPuhSO5qptKzCAdBMGKeU6rf5nXI6Zh SKWjiMaQTbSNurFBua9e8VneRqgkW7qBxp1Ng2wz1SQ82H64CFZBQ8g+vaTRCzRIeX0U wPFaNEDjot45iFZc9qONo2FJsC4Nmkod2BOB609aYzitb3YXbGijHCr6AR4ZIhtTcgle PxOtNStaE5ibMnPNg63hu58VHCub43sB4oWPnbInrvOHowX0kP2P0AoKIhT6v5GpBxOp ByZg== X-Gm-Message-State: AHYfb5jj0axGRwnZX2SavNo7QuJUGcem+oCLUBwPqvAmVfVvriDqg3Uh URDh7ZLDan+JGwxIf1G7Yu43EVkipA== X-Received: by 10.46.69.136 with SMTP id s130mr481731lja.6.1502128952232; Mon, 07 Aug 2017 11:02:32 -0700 (PDT) MIME-Version: 1.0 References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> In-Reply-To: From: Kaushal Modi Date: Mon, 07 Aug 2017 18:02:21 +0000 Message-ID: Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only To: Noam Postavsky Content-Type: multipart/alternative; boundary="001a114b123a9ad06f05562da6f4" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --001a114b123a9ad06f05562da6f4 Content-Type: text/plain; charset="UTF-8" On Mon, Aug 7, 2017 at 1:53 PM Noam Postavsky < npostavs@users.sourceforge.net> wrote: > > hmm, I can't reproduce here, but is it possible you have bound C-M-\ > to some other command which calls indent-region non-interactively? > Thanks for verifying. Of course it was my config.. This deviates from this bug report.. but I am open to suggestions on how I could retain the * property of the interactive form while setting the region boundaries as I do in the below advice. I confirm that your suggestion also works fine if I remove the below advice from my config. ===== (defvar modi/region-or-whole-fns '(indent-region eval-region) "List of functions to act on the whole buffer if no region is selected.") (defun modi/advice-region-or-whole (orig-fun &rest args) "Advice function that applies ORIG-FUN to the whole buffer if no region is selected. http://thread.gmane.org/gmane.emacs.help/109025/focus=109102 " ;; Required to override the "r" argument of `interactive' in functions like ;; `indent-region' so that they can be called without an active region. (interactive (if (use-region-p) (list (region-beginning) (region-end)) (list (point-min) (point-max)))) ;; (message "Args: %S R: %S I: %S" ;; args (use-region-p) (called-interactively-p 'interactive)) (prog1 ; Return value of the advising fn needs to be the same as ORIG-FUN (apply orig-fun args) (when (and (called-interactively-p 'interactive) (not (use-region-p))) (message "Executed %s on the whole buffer." (propertize (symbol-name this-command) 'face 'font-lock-function-name-face))))) (dolist (fn modi/region-or-whole-fns) (advice-add fn :around #'modi/advice-region-or-whole) ;; (advice-remove fn #'modi/advice-region-or-whole) ) ===== -- Kaushal Modi --001a114b123a9ad06f05562da6f4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Aug 7,= 2017 at 1:53 PM Noam Postavsky <npostavs@users.sourceforge.net> wrote:

hmm, I can't reproduce here, but is it possible you have bound C-M-\ to some other command which calls indent-region non-interactively?

Thanks for verifying. Of course it was my confi= g..

This deviates from this bug report.. but I am = open to suggestions on how I could retain the * property of the interactive= form while setting the region boundaries as I do in the below advice.

I confirm that your suggestion also works fine if I re= move the below advice from my config.

=3D=3D=3D=3D= =3D
(defvar modi/region-or-whole-fns '(indent-region
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0eval-region)
= =C2=A0 "List of functions to act on the whole buffer if no region is s= elected.")

(defun modi/advice-region-or-whole= (orig-fun &rest args)
=C2=A0 "Advice function that appl= ies ORIG-FUN to the whole buffer if no region is
selected.
<= div>http://thread.gmane.org/gmane.emacs.help/109025/focus=3D109102 &quo= t;
=C2=A0 ;; Required to override the "r" argument of `= interactive' in functions like
=C2=A0 ;; `indent-region' = so that they can be called without an active region.
=C2=A0 (inte= ractive (if (use-region-p)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(list (region-beginning) (region-end))
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(list (p= oint-min) (point-max))))
=C2=A0 ;; (message "Args: %S R: %S = I: %S"
=C2=A0 ;; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0args (use= -region-p) (called-interactively-p 'interactive))
=C2=A0 (pro= g1 ; Return value of the advising fn needs to be the same as ORIG-FUN
=
=C2=A0 =C2=A0 =C2=A0 (apply orig-fun args)
=C2=A0 =C2=A0 (wh= en (and (called-interactively-p 'interactive)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(not (use-region-p)))
= =C2=A0 =C2=A0 =C2=A0 (message "Executed %s on the whole buffer."<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(propertiz= e (symbol-name this-command)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'face = 9;font-lock-function-name-face)))))

(dolist (fn mo= di/region-or-whole-fns)
=C2=A0 (advice-add fn :around #'modi/= advice-region-or-whole)
=C2=A0 ;; (advice-remove fn #'modi/ad= vice-region-or-whole)
=C2=A0 )=C2=A0
=3D=3D=3D=3D=3D
--

Kaushal Modi

--001a114b123a9ad06f05562da6f4-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 07 14:11:46 2017 Received: (at 22819) by debbugs.gnu.org; 7 Aug 2017 18:11:46 +0000 Received: from localhost ([127.0.0.1]:50704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1demVF-0002nt-N0 for submit@debbugs.gnu.org; Mon, 07 Aug 2017 14:11:46 -0400 Received: from mail-oi0-f41.google.com ([209.85.218.41]:35811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1demVE-0002nY-3e for 22819@debbugs.gnu.org; Mon, 07 Aug 2017 14:11:44 -0400 Received: by mail-oi0-f41.google.com with SMTP id e124so11620331oig.2 for <22819@debbugs.gnu.org>; Mon, 07 Aug 2017 11:11:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=SormnkYPrROKJMs3IZOBifH491kc6irjlymlmdeoc9U=; b=vSFDfsdAKO+shCEgLivzRqTei7b/XzhZ9cqJiHqxDHmFew/avxeU0pQEQXOWzeeLct h82rWCyBB900c6NX+SqzO8e2ASssRma8Y2BUpWBbQhPtPANI52wn4/kuFCbNOIdF8zoi DJXkvGiCwDAbALGp/23otReEJnA43Hf7ossKfzhJEcRp/AC9+IXhNVLxBO4tnJbdWKzz VE8pQX3X1PYvUs1u2d6ywSGaMVWydBnj+HXuPNoUdxM9ew4b9IDvHPBRXmKm0Sh+wkaG NjsZzdFZmN2QqZuMNIgbtfx2HT8qiTGJuok7fKXUn8NuqLqb2W1vDxzB1aRbIYD5+I4k 6tiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=SormnkYPrROKJMs3IZOBifH491kc6irjlymlmdeoc9U=; b=eEPXkAReqtigpwFqcULcwIzaRubZJZwkBXSbfJ5tHgYYeVXs20NXRI7YhoPGA1Z+F5 m8Rd6GVW1i7sRlLh5+2bDvNH4Fp4U1DwwRnDKvJYf0y3HLRrAnjPCRk5AUwP+IPtonsS gHCTvFoTWG5EYTwFRPITQ7nauEK8ZZb0zCNXp9ceqHtUruFAQbvkLdQI8tWsFN+Pio1k p1PosYdYr+lSf5CXizlQa72X44l53L4ZJJb9EcARBd3q/25TowbgBqTPGdMToPnL1ec1 EITukUCi8E0AN9nvwf8A1tM2wxw9YO3Z+HJcr5AKYxxTIGEyldmeGDi8VYeO2GMbJyx1 jE4Q== X-Gm-Message-State: AHYfb5gv1rSM2uflaOd5oNXLy0qww6R7U+quCe++6vzbviU82CMaDfCp 4g59Qb4Its/1KFDNp26I0df1F+eZcQ== X-Received: by 10.202.232.77 with SMTP id f74mr910052oih.247.1502129498575; Mon, 07 Aug 2017 11:11:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.18.129 with HTTP; Mon, 7 Aug 2017 11:11:38 -0700 (PDT) In-Reply-To: References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> From: Noam Postavsky Date: Mon, 7 Aug 2017 14:11:38 -0400 X-Google-Sender-Auth: XR5GUCrjXVWW4NuFVQ5YjqCilLY Message-ID: Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only To: Kaushal Modi Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) On Mon, Aug 7, 2017 at 2:02 PM, Kaushal Modi wrote: > On Mon, Aug 7, 2017 at 1:53 PM Noam Postavsky > wrote: >> >> hmm, I can't reproduce here, but is it possible you have bound C-M-\ >> to some other command which calls indent-region non-interactively? > > This deviates from this bug report.. but I am open to suggestions on how I > could retain the * property of the interactive form while setting the region > boundaries as I do in the below advice. Ah, well since you're replacing the interactive form, I suppose the replacement should then make sure to check the read-only status as well. (interactive (progn (barf-if-buffer-read-only) ...)) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 08 09:07:11 2017 Received: (at 22819) by debbugs.gnu.org; 8 Aug 2017 13:07:11 +0000 Received: from localhost ([127.0.0.1]:51153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1df4E2-0004mP-Gn for submit@debbugs.gnu.org; Tue, 08 Aug 2017 09:07:10 -0400 Received: from mail-lf0-f54.google.com ([209.85.215.54]:35713) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1df4E0-0004mC-M8 for 22819@debbugs.gnu.org; Tue, 08 Aug 2017 09:07:09 -0400 Received: by mail-lf0-f54.google.com with SMTP id t128so14634323lff.2 for <22819@debbugs.gnu.org>; Tue, 08 Aug 2017 06:07:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NFzMvGo4QAIajFrCUMpWA/lakrdL828gXg+Cle92WLU=; b=peiixIWHwzQZw0TdGHx6F6JMcrcUTasb3LHFeP9dj+R1aMppH/2TEmphMJt3AA91qC uYQncoFIyevzQhVtGLuhTCx+BBQpFL4dirrVs9MkxmbATZwH2Wlcy6bIoZFXGy337w1n 6Vr/pRLzXP3mubk9cma9tOuPyxC7yaaajZa/OVA5uRKkLeJz58ex8NNWU+jhsv8XG83V bK0EoSp81mgBnc64V4EBMdlm7M61kEiZO5i0JZNuSVanpUaPBZNrpC7gjkz9+YjKSiyJ KYe8cXobRg7rUxn1UINxgH5hd28/vrzc6h6RHhJXh05SU7OmcTozEY57/mzovNwiJ6JT a0Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NFzMvGo4QAIajFrCUMpWA/lakrdL828gXg+Cle92WLU=; b=YQn757A9aJ+1B8Vka+GEQk47Re0ErO3qcGUzYoZqo2RDDLlILaemajQD0isKKVbXbU HU5uG9YDC5YP7br29fC1dTADAXyj+GLUS8lb2PSathtpuX+noFtNXI6V+I3fvn3MJBMC lZosgJtLUSkR+LmDOqyLw3h4pytQ84h6dT+mpP65CGeWMAW0GftSYg559gRfUXfPfcsT rdIxuLSQqG0gYIh/MI0I3wHq9VD5tmxmLYvGHRk/wECP1343Daor5+qfLt6PpDq7OKQK cw+/JogXn4SFTunvvT+0fTM3GFZ9tanch+MgexDfq1vHx06BX0ONgZDFINq39h2wLlPU p8sA== X-Gm-Message-State: AHYfb5hbadMRfT0ohCIniaJF+o0WJTPugngSlaIN3RYXHhp/mnuQqidJ LDLsPGmSg7TWRyDlzy/5L8cb5sf2yA== X-Received: by 10.25.221.196 with SMTP id w65mr1426373lfi.91.1502197622668; Tue, 08 Aug 2017 06:07:02 -0700 (PDT) MIME-Version: 1.0 References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> In-Reply-To: From: Kaushal Modi Date: Tue, 08 Aug 2017 13:06:52 +0000 Message-ID: Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only To: Noam Postavsky , Eli Zaretskii Content-Type: multipart/alternative; boundary="94eb2c0c884aae825005563da3de" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --94eb2c0c884aae825005563da3de Content-Type: text/plain; charset="UTF-8" On Mon, Aug 7, 2017 at 2:11 PM Noam Postavsky < npostavs@users.sourceforge.net> wrote: > Ah, well since you're replacing the interactive form, I suppose the > replacement should then make sure to check the read-only status as > well. > > (interactive (progn (barf-if-buffer-read-only) ...)) > The advice gets tricky because I want to add barf-if-buffer-read-only only if the original fn's interactive form had "*". I am using the same advice fn for eval-region and indent-region.. so I don't need the barf fn call for eval-region. @Eli: Based on the discussion[1] on emacs-devel, there isn't any opposition to doing what's proposed in this bug thread. So if it's alright by you, and if there is no strong reason to use the more concise alternative i.e. if both barf-if-buffer-read-only and interactive "*.." are equally correct, can the former approach be committed? Thanks. [1]: http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00168.html -- Kaushal Modi --94eb2c0c884aae825005563da3de Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Aug 7,= 2017 at 2:11 PM Noam Postavsky <npostavs@users.sourceforge.net> wrote:
Ah, well since you're replacing the interactive f= orm, I suppose the
replacement should then make sure to check the read-only status as
well.

=C2=A0 =C2=A0(interactive (progn (barf-if-buffer-read-only) ...))

The advice gets tricky because I want to add bar= f-if-buffer-read-only only if the original fn's interactive form had &q= uot;*".

I am using the same advice fn for eva= l-region and indent-region.. so I don't need the barf fn call for eval-= region.

@Eli: Based on the discussion[1] on emacs-= devel, there isn't any opposition to doing what's proposed in this = bug thread. So if it's alright by you, and if there is no strong reason= to use the more concise alternative i.e. if both barf-if-buffer-read-only = and interactive "*.." are equally correct, can the former approac= h be committed?=C2=A0

Thanks.

=
--

Kaus= hal Modi

--94eb2c0c884aae825005563da3de-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 08 09:14:05 2017 Received: (at 22819) by debbugs.gnu.org; 8 Aug 2017 13:14:05 +0000 Received: from localhost ([127.0.0.1]:51157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1df4Kj-0004wV-Gb for submit@debbugs.gnu.org; Tue, 08 Aug 2017 09:14:05 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:33263) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1df4Ki-0004vw-Dw for 22819@debbugs.gnu.org; Tue, 08 Aug 2017 09:14:04 -0400 Received: by mail-it0-f67.google.com with SMTP id m34so2563025iti.0 for <22819@debbugs.gnu.org>; Tue, 08 Aug 2017 06:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=3uEZBZdICucuUwSFcST3vjUcVUOs6foYmJneLK6yB80=; b=dkB2cCY+jvYW6Bz9o5L/J+gRptfpMzaujPqK5lGfDNLolL3Exyjxt9dWOtF7/85bkZ E3tREg2HXPG8wMBtWAa4mh3qcPDhXuWUbqKa2Z1ZSOmlxEI0eo+WrZl7fYYs/e4jCQh7 p9BB8a9kr7JBumN43vpss2aX511g3hHIS1R84k6KMsBP/GPWaIO5A+6TT75RJ0whDr6d Olf9Bd/nDMQC5rKm4L4FGv3DSNcU/elR6orD420Eezv6B8gW97e6o0mI2ab79ZOApE+n QmQ+3Te8vR8b0uAzWTCvzokNuzwKFuZRsdgICYJD3Lw0f/Ztf6DVXgMnWlW0+BMuI6u1 OlAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=3uEZBZdICucuUwSFcST3vjUcVUOs6foYmJneLK6yB80=; b=kQn2f1gte58OUBXqE2uFqrgkkuGKjToYmkBtI77bOEeD+V2Cqsn3PDPKgKZgccF+pC p9VFfOTGCpnQGbSTFbUimolP8j2Okmm+xOA4eE4qCA451lrqhoijX53fuDFvj79KiSr8 TiGYTJ4xFDG0AOSWCxAFoGP2D8DcnTHjCcO6cL2O6umSY44NWmUwkmjJ4dAfriM6LCm3 kAhVA/RASkcEC2YmTwp5WZk4XWOa00z7jPOzgEbKqrrfs1tOKITjXsWdxODS1z1t3njv twIbgSv7eLR0fwc809MfPC2M/EnHurYyk3MJL84LENicLFJ1i06xx7ZGa3842pA5H7Y1 z69A== X-Gm-Message-State: AHYfb5jwuGvXI77qgWPXj8JtVVznGPMK83DCqoLyImjMFqupLd9uJCFB JiCCv8JGMZIdVXOW X-Received: by 10.36.17.216 with SMTP id 207mr3571167itf.86.1502198038614; Tue, 08 Aug 2017 06:13:58 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id b83sm697400iod.35.2017.08.08.06.13.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Aug 2017 06:13:57 -0700 (PDT) From: npostavs@users.sourceforge.net To: Kaushal Modi Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> Date: Tue, 08 Aug 2017 09:15:34 -0400 In-Reply-To: (Kaushal Modi's message of "Tue, 08 Aug 2017 13:06:52 +0000") Message-ID: <87y3qu2oax.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Kaushal Modi writes: > The advice gets tricky because I want to add barf-if-buffer-read-only > only if the original fn's interactive form had "*". > > I am using the same advice fn for eval-region and indent-region.. so I > don't need the barf fn call for eval-region. Possibly you could do something with `interactive-form' and `advice-eval-interactive-spec', but yes it's a bit tricky. > @Eli: Based on the discussion[1] on emacs-devel, there isn't any > opposition to doing what's proposed in this bug thread. So if it's > alright by you, and if there is no strong reason to use the more > concise alternative i.e. if both barf-if-buffer-read-only and > interactive "*.." are equally correct, can the former approach be > committed? The choice is not between "*.." and `barf-if-buffer-read-only' as such, "*.." is merely the string version of `barf-if-buffer-read-only'. The choice is between calling `barf-if-buffer-read-only' inside the `interactive' form or inside the function itself. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 08 15:06:29 2017 Received: (at 22819) by debbugs.gnu.org; 8 Aug 2017 19:06:30 +0000 Received: from localhost ([127.0.0.1]:52221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1df9pl-000794-PP for submit@debbugs.gnu.org; Tue, 08 Aug 2017 15:06:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1df9pk-00078s-MJ for 22819@debbugs.gnu.org; Tue, 08 Aug 2017 15:06:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1df9pc-000258-E7 for 22819@debbugs.gnu.org; Tue, 08 Aug 2017 15:06:23 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1df9pc-000254-AK; Tue, 08 Aug 2017 15:06:20 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1418 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1df9pZ-0003BI-O5; Tue, 08 Aug 2017 15:06:20 -0400 Date: Tue, 08 Aug 2017 22:05:40 +0300 Message-Id: <83y3qtswvv.fsf@gnu.org> From: Eli Zaretskii To: Kaushal Modi In-reply-to: (message from Kaushal Modi on Tue, 08 Aug 2017 13:06:52 +0000) Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Kaushal Modi > Date: Tue, 08 Aug 2017 13:06:52 +0000 > Cc: 22819@debbugs.gnu.org > > @Eli: Based on the discussion[1] on emacs-devel, there isn't any opposition to doing what's proposed in this > bug thread. So if it's alright by you, and if there is no strong reason to use the more concise alternative i.e. if > both barf-if-buffer-read-only and interactive "*.." are equally correct, can the former approach be committed? I'm not sure what is it that you are asking me. You already know my opinion on this proposal, and it hasn't changed. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 08 15:19:50 2017 Received: (at 22819) by debbugs.gnu.org; 8 Aug 2017 19:19:50 +0000 Received: from localhost ([127.0.0.1]:52228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfA2f-0007S1-V8 for submit@debbugs.gnu.org; Tue, 08 Aug 2017 15:19:50 -0400 Received: from mail-lf0-f45.google.com ([209.85.215.45]:32912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfA2e-0007Rm-AE for 22819@debbugs.gnu.org; Tue, 08 Aug 2017 15:19:48 -0400 Received: by mail-lf0-f45.google.com with SMTP id d17so19132852lfe.0 for <22819@debbugs.gnu.org>; Tue, 08 Aug 2017 12:19:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4C2doeA3UG/jQO4M0S61l/hk+nDaUUvKqymNP8QPixw=; b=A2GyxoyWGu5npr16hlNQfTOaJQ+nzwUzbcecdrsDHXJ3fNnZVnv/jpRr1yj7UosU2n MQLgAqjEFQEgRJ1s7//adzziha9NIzs40ry8KUsun6OGo5WYxGmKS2WDY0rIrSCue1pq iMdyl5y3PHtGi662hAkENIV1pqY/CDYSIw+X9OAyf0hS9gZFOpysPn2KDX4oub+fTobC 5xufaRRf00URcVSN2UouG4eMfXaPdG8Y09pRiI3VGpM+352vW/vsWcPXVrMpRWlxajIo xdDVa4R+l/M8p01W5e8g0stqHB9oUG2jqlNlSiPIfdsT9h9S/M0kcrad+8MCnSzdjyot sRlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4C2doeA3UG/jQO4M0S61l/hk+nDaUUvKqymNP8QPixw=; b=LfSM0IwiETBbsO+K5HqltepY98OXeWkAdA7XqWvKTkdD6hWQf/lexbOX0tmMwv8Ir+ R1RHuf3n445EaRp2an48Wjlj5AtVsDWUjPrZE4+/SPwfgQoUmRImCl6u1VUt6GctVTOW pIPkjftiY/5mhEY8bAsVOI1cugOJm1kNo+BmkGyHBCQkapoy2MeE4MuMWbpHpkQiav0h NxzssZPpBPje9fULim1QDB5x6ogpKHXBRk8SuHKF+vlYglmUuw4yAQ8c9LjUMWcY7Cmx ZsC8robrUHunKt+l/s5FuH8ToZRtUA2mseXTRB49vS5Ot7xACI2zC9g3THzr3/PhuP5r 5DBw== X-Gm-Message-State: AHYfb5jM/3B9/gr8a7lEBaQhJmA6gEvSsOc7IfUfvb77E7hUhmEIpydf lZOWqVH+IZvO5dBzNUhFk9uufe1e7g== X-Received: by 10.25.72.21 with SMTP id v21mr1583105lfa.201.1502219982438; Tue, 08 Aug 2017 12:19:42 -0700 (PDT) MIME-Version: 1.0 References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> <83y3qtswvv.fsf@gnu.org> In-Reply-To: <83y3qtswvv.fsf@gnu.org> From: Kaushal Modi Date: Tue, 08 Aug 2017 19:19:31 +0000 Message-ID: Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only To: Eli Zaretskii Content-Type: multipart/alternative; boundary="94eb2c1a1e946d8563055642d876" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --94eb2c1a1e946d8563055642d876 Content-Type: text/plain; charset="UTF-8" On Tue, Aug 8, 2017 at 3:06 PM Eli Zaretskii wrote: > > I'm not sure what is it that you are asking me. You already know my > opinion on this proposal, and it hasn't changed. > I don't know what the outcome should be in this case: - No one raised any issue moving forward with this in that emacs-devel. - The concern you raised about indent-region having side-effects doesn't seem practical. Indenting is a buffer-editing act for which the buffer should not be read-only. If there are some side-effects other than that, then that's a different problem. Also no one has presented a real scenario where this proposal would cause an issue. - Talking about pilot-error, this proposal simply alerts the user of the pilot-error (doing indentation in read-only buffer) sooner rather than later, thus saving the user's time. So I don't know how differences are resolved in cases like this. The proposal in this thread is to solve a real-life time-consuming annoyance, where-as the against-point is about side-effects getting masked, and which do not have any real-life examples. -- Kaushal Modi --94eb2c1a1e946d8563055642d876 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Aug 8,= 2017 at 3:06 PM Eli Zaretskii <eliz@gnu= .org> wrote:

I'm not sure what is it that you are asking me.=C2=A0 You already know = my
opinion on this proposal, and it hasn't changed.
<= br>
I don't know what the outcome should be in this case:
- No one raised any issue moving forward with this in that emacs-dev= el.
- The concern you raised about indent-region having side-effe= cts doesn't seem practical. Indenting is a buffer-editing act for which= the buffer should not be read-only. If there are some side-effects other t= han that, then that's a different problem. Also no one has presented a = real scenario where this proposal would cause an issue.
- Talking= about pilot-error, this proposal simply alerts the user of the pilot-error= (doing indentation in read-only buffer) sooner rather than later, thus sav= ing the user's time.

So I don't know how d= ifferences are resolved in cases like this. The proposal in this thread is = to solve a real-life time-consuming annoyance, where-as the against-point i= s about side-effects getting masked, and which do not have any real-life ex= amples.
--

Kaushal Modi

--94eb2c1a1e946d8563055642d876-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 08 17:32:01 2017 Received: (at 22819) by debbugs.gnu.org; 8 Aug 2017 21:32:01 +0000 Received: from localhost ([127.0.0.1]:52307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfC6a-00040d-Qs for submit@debbugs.gnu.org; Tue, 08 Aug 2017 17:32:01 -0400 Received: from mail-pg0-f41.google.com ([74.125.83.41]:38159) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfC6Z-0003tU-1r for 22819@debbugs.gnu.org; Tue, 08 Aug 2017 17:31:59 -0400 Received: by mail-pg0-f41.google.com with SMTP id l64so19629622pge.5 for <22819@debbugs.gnu.org>; Tue, 08 Aug 2017 14:31:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version; bh=gmrwGz4DxhLYpP5J/seoqGxFOh9BCYzrAE3rcE+4YmI=; b=AIAmnnXc7IA0LrPOhP7IJtYnguwsTSUubx3v5M4FM6UZ8+gbnvr7Nhz50bJGd2WCgj HpHAWOiNydLnduCKearqGVXLScodhxiomkwUGNHXqzS/N/BLEWHEf8D8NTJc8gbpLwsL IPuW2fvvDdEByr+UGNm2aqQOAvrcn6oL7G0exHPQ1pXswXSSimIfX62t+My+eJcDo9Le ll1Q19SF46MEP52bTeJoD63bHErWJeK7xYt++1kF8WRH2x+/PGxoGOQvSEU6PcmYHai+ taAsNsfplbvEoktQMMv4M9jihS68RryDWDzmhlHoLYk+uKMgIXAGMz20tQLyvoGCUz0Y iqrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :references:user-agent:mime-version; bh=gmrwGz4DxhLYpP5J/seoqGxFOh9BCYzrAE3rcE+4YmI=; b=aiV8TlyTc/EF10GJjyODAUPfeFQG7iDJnVpREzVtMQ3K181+hdxXPBcJn7R2bJwArm 2ShhAFt5WS8dm77W4goCKwkbsaPgWFj7y0jrP0/6d3EfdVPi5rBdlGEg6h47DfgsZC2V YSj+tTeRtQBHeca1VnFbrjwK9rV08MxDWbANdfffb5LQYxuBqiFOU0h00qOezZaimgPv XfjoRTeQ7ebG9urX8GknrY9OmhwFr6ig3JZnXmMddR/crk+8aDrxqKe+muGpn3C2sNBq jmfGFbLzwW6p8lyPecdXYBXgETxvlDj6qP9asCGx0+pauvdwAglBBkb4aar/ealOgj4W cyvQ== X-Gm-Message-State: AHYfb5hgi5UAMRmBJoZ+vqVwHLV2IOyQMLy0ceiqJzPk8pU4uSlXSQ8+ SF9z6xIyV4fFjdcXwQA= X-Received: by 10.84.177.67 with SMTP id w61mr6542817plb.112.1502227912876; Tue, 08 Aug 2017 14:31:52 -0700 (PDT) Received: from Vulcan.local (76-234-69-149.lightspeed.frokca.sbcglobal.net. [76.234.69.149]) by smtp.gmail.com with ESMTPSA id v9sm3815660pgo.39.2017.08.08.14.31.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 14:31:51 -0700 (PDT) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Vulcan.local (Postfix, from userid 501) id 2E3B57880AB1; Tue, 8 Aug 2017 14:31:50 -0700 (PDT) To: Kaushal Modi Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only In-Reply-To: (Kaushal Modi's message of "Tue, 08 Aug 2017 19:19:31 +0000") Date: Tue, 08 Aug 2017 14:31:38 -0700 Message-ID: References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> <83y3qtswvv.fsf@gnu.org> User-Agent: Gnus/5.130016 (Ma Gnus v0.16) Emacs/25.2.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, Eli Zaretskii , npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) >>>>> "KM" == Kaushal Modi writes: KM> I don't know what the outcome should be in this case: KM> - No one raised any issue moving forward with this in that emacs-devel. Hello, Kaushal. It should be pointed out here that maintenance of Emacs is at the maintainers' discretion. Even though we do take the opinions of others into account, just because emacs-devel "hasn't raised an issue", does not mean that a change will happen. If Eli and I don't like it, the issue must wait for the next round of maintainers. There are a few factors why this change is being rejected now: a. It is a long-standing behavior, however less than ideal it is. We don't know what effect changing it will have, as obvious as it may seem. Our strongly-held policy is to avoid changes in long-standing behavior unless the reason to do so is compelling. b. The main force of your argument is that we waste CPU time when we don't need to, because we could just check before doing the indentation. I have no argument with that, and you're quite right. However, in all my years of using Emacs I've never run into this case, so I don't buy the argument that it is a change that needs to happen right now, for everyone. c. Emacs is designed to be extensible. Advise the indentation functions so they perform this check for you. It doesn't need to happen in core Emacs for you to get the behavior you want. If your wish is to defend the interests of the "silent majority", who all, without knowing it, would benefit from this change, then I appreciate your concern. However, as maintainers, and given the lack of other voices *asking* for this change, we prefer to retain the status quo, however far from perfect it may be. Plenty of projects on the Net strive to make every breaking change necessary to approximate the best version of what they're trying to accomplish. That's not how it is here. We want a stable, well-functioning Emacs with predictable behavior, and sometimes that means keeping things as they have been for decades -- even if, in hindsight, it shouldn't have been done that way. What I'm interested to learn is how many other cases like this exist, and whether a more general approach would make it less likely for it to occur. What if we could know, for example, whether a function will try to change the buffer, and simply stop the evaluation before it starts... -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 09 07:03:54 2017 Received: (at 22819) by debbugs.gnu.org; 9 Aug 2017 11:03:55 +0000 Received: from localhost ([127.0.0.1]:52692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfOmH-0003eK-Ek for submit@debbugs.gnu.org; Wed, 09 Aug 2017 07:03:54 -0400 Received: from mail-yw0-f181.google.com ([209.85.161.181]:34058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfOmF-0003e7-Do for 22819@debbugs.gnu.org; Wed, 09 Aug 2017 07:03:52 -0400 Received: by mail-yw0-f181.google.com with SMTP id s143so37602231ywg.1 for <22819@debbugs.gnu.org>; Wed, 09 Aug 2017 04:03:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rsBjot38ORkXd9K2PfqGB2+Wauccfi9xn4Kx1MRILA8=; b=abGYarVK2dJzSQVDWJjIqQ9MGcROPhkF8IFn8JX1lWD4ekwBmZD6CTpNxg1q3rIjv2 jtxbsDzWa6gxYA24ZOm0j3Udpdi+dqM9K+SRWvo+R7j3vlifU3lBDVecyXwe52nsT2s2 zwy40erVCcsqZjCKahFgd5gCvIy55dpuFhbVQ/5Ay87ddfemCjT9VZwEGqhqhIZFBu7m 9dk1pzkTB2O9n8kAVLseHQgp2qqArG2zJSjaEC2c3OL6ela1dYgecVA5ZRQS6ORMsqid l22AKvwLEMFrAsb4t1i18doMscZJUrdjX2Txn/2caiwZheoS7KRGHAFPhZkKPDrP8zif CdaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rsBjot38ORkXd9K2PfqGB2+Wauccfi9xn4Kx1MRILA8=; b=Vfofd+yDdk8wAWbVj8KdPRh3+Ttt9Ez3bhI+omhEZYArj5ZB/lDTlUyhTwdsALkaNs /6bgtuG27xic0R9FYIX9usDvR/m44N6NsxCcRGKlcQv3OrT8alRyjK4BswghP+tW9yoG EtggbteVxQBInlwQ7ig/CWo8EQnHpYzzmieKz7ew+885NesZ//3Yf0EMzwPtN3WCbinr UdtjXOndwyUVqQ0Z6NLGyh2+3q2jyzhHrQrFGlLyZu3ISaMvZWhIJ1q5VgS0LdZgAHcy ota4c33gMATNAqD+QrY/z/b3jK6gJJL2M8YxpKu4YzgWiqWhnxaKbJK8maQ3cABdAGbx R0jw== X-Gm-Message-State: AHYfb5hshPo1G8SiDk0JFIlQwGeU8zShzMj4z9j7yERGEaXDrNYaUedT trvBOoRBI39+N4OR7Y6iey327cnT7Q== X-Received: by 10.129.124.87 with SMTP id x84mr6486893ywc.170.1502276625622; Wed, 09 Aug 2017 04:03:45 -0700 (PDT) MIME-Version: 1.0 References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> <83y3qtswvv.fsf@gnu.org> In-Reply-To: From: Kaushal Modi Date: Wed, 09 Aug 2017 11:03:34 +0000 Message-ID: Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only To: John Wiegley Content-Type: multipart/alternative; boundary="001a114942cc9fef02055650082c" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, Eli Zaretskii , npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --001a114942cc9fef02055650082c Content-Type: text/plain; charset="UTF-8" On Tue, Aug 8, 2017, 5:31 PM John Wiegley wrote: > > Hello, Kaushal. > Hi John, thanks for your input. It should be pointed out here that maintenance of Emacs is at the > maintainers' > discretion. Even though we do take the opinions of others into account, > just > because emacs-devel "hasn't raised an issue", does not mean that a change > will > happen. If Eli and I don't like it, the issue must wait for the next round > of > maintainers. > Understood. My only hope that I can convince the maintainers with my reason that this proposal fixes a real-life problem with the help democratic voting system (if the opinions asked on emacs-devel matter and can be called that). There are a few factors why this change is being rejected now: > > a. It is a long-standing behavior, however less than ideal it is. We > don't > know what effect changing it will have, as obvious as it may seem. Our > strongly-held policy is to avoid changes in long-standing behavior > unless > the reason to do so is compelling. > Wouldn't the master branch be a good playground for this? If it affects people negatively, it's just a one-line commit and thus easy to revert. b. The main force of your argument is that we waste CPU time when I should have used the term "wall time". This issue has wasted quite a few minutes for me. we don't > need to, because we could just check before doing the indentation. I > have > no argument with that, and you're quite right. However , in all my years > of using Emacs I've never run into this case, so I don't buy the > argument > that it is a change that needs to happen right now, for everyone. > This change can be truly tested and appreciated only by people dealing with read-only files everyday. This would be mostly people working with a central version control system that makes all the files yet to be checked-out as read-only symbolic links. I deal with dozens of read-only files everyday, with a mix of editable files that are managed by git. So I am likely to do the mistake of indenting a read-only file (i.e. indenting a CVCS file before checking it out). Again, the benefit of this change is not seen unless the indentation operation takes at least a few seconds (depends on file size and major mode). c. Emacs is designed to be extensible. Advise the indentation functions so > they perform this check for you. It doesn't need to happen in core > Emacs > for you to get the behavior you want. > Of course. I will do that. I was just hoping the "right fix" would get in. (Otherwise why would anyone bother to submit bug reports and patches?) If your wish is to defend the interests of the "silent majority", who all, > without knowing it, would benefit from this change, then I appreciate your > concern. However, as maintainers, and given the lack of other voices *asking* > for this change, we prefer to retain the status quo, however far from > perfect > it may be. > I doubt that will ever change because my situation as I explained above, of working with primarily read-only files is not in majority. Plenty of projects on the Net strive to make every breaking change necessary > to approximate the best version of what they're trying to accomplish. I haven't yet got an answer to a real-life scenario that would break by this change. What kind of (i) side-effects would one be relying on (ii) while running indent-region (iii) on read-only files? It's a bit sad, I am presenting a solution to a real problem and the counter argument is just one, and hypothetical. That's not how it is here. We want a stable, well-functioning Emacs with > predictable > behavior, *predictable*: What should one expect to happen if one tried to indent-region in a read-only file? Would one be surprised if a read-only error is thrown? Emacs already does that.. just that this proposal does just that *before* the time-consuming indentation attempt is started. So this patch should bring no noticeable change to a majority of people. But people in minority like me -- (i) like to obsessively keep all files well-indented (ii) working with read-only files (iii) time-consuming indentation (major mode and file size dependent) -- would heavily appreciate this. and sometimes that means keeping things as they have been for > decades -- even if, in hindsight, it shouldn't have been done that way. What I'm interested to learn is how many other cases like this exist, I doubt if many still exist because the ones that affected most people are already fixed by using the same approach (as in this proposal) of using * interactive form or barf-if-buffer-read-only. and > whether a more general approach would make it less likely for it to occur. > What if we could know, for example, whether a function will try to change > the > buffer, and simply stop the evaluation before it starts... > This prolonged discussion makes me think "What's the point?". I can barely convince to commit this 1-line change to the master branch that can be easily reverted even if a single person complained. > -- Kaushal Modi --001a114942cc9fef02055650082c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Aug 8, 2017, 5:31 PM Jo= hn Wiegley <jwiegley@gmail.com= > wrote:

Hello, Kaushal.

Hi John, thanks f= or your input.=C2=A0

It should be pointed out here that maintenance of E= macs is at the maintainers'
discretion. Even though we do take the opinions of others into account, jus= t
because emacs-devel "hasn't raised an issue", does not mean t= hat a change will
happen. If Eli and I don't like it, the issue must wait for the next ro= und of
maintainers.

Understood. My only = hope that I can convince the maintainers with my reason that this proposal = fixes a real-life problem with the help democratic voting system (if the op= inions asked on emacs-devel matter and can be called that).=C2=A0

There = are a few factors why this change is being rejected now:

=C2=A0 a. It is a long-standing behavior, however less than ideal it is. We= don't
=C2=A0 =C2=A0 =C2=A0know what effect changing it will have, as obvious as i= t may seem. Our
=C2=A0 =C2=A0 =C2=A0strongly-held policy is to avoid changes in long-standi= ng behavior unless
=C2=A0 =C2=A0 =C2=A0the reason to do so is compelling.

Wouldn't the master branch be a good playground f= or this?=C2=A0 If it affects people negatively, it's just a one-line co= mmit and thus easy to revert.

=C2=A0 b. The main force of your argument = is that we waste CPU time when

I sh= ould have used the term "wall time". This issue has wasted quite = a few minutes for me.=C2=A0

=
=C2=A0we don't
=C2=A0 =C2=A0 =C2=A0need to, because we could just check before doing the i= ndentation. I have
=C2=A0 =C2=A0 =C2=A0no argument with that, and you're quite right.

=C2=A0However
, in all my years
=C2=A0 =C2=A0 =C2=A0of using Emacs I've never run into this case, so I = don't buy the argument
=C2=A0 =C2=A0 =C2=A0that it is a change that needs to happen right now, for= everyone.

This change can be tru= ly tested and appreciated only by people dealing with read-only files every= day. This would be mostly people working with a central version control sys= tem that makes all the files yet to be checked-out as read-only symbolic li= nks. I deal with dozens of read-only files everyday, with a mix of editable= files that are managed by git. So I am likely to do the mistake of indenti= ng a read-only file (i.e. indenting a CVCS file before checking it out). Ag= ain, the benefit of this change is not seen unless the indentation operatio= n takes at least a few seconds (depends on file size and major mode).
=

= =C2=A0c. Emacs is designed to be extensible. Advise the indentation functio= ns so
=C2=A0 =C2=A0 =C2=A0they perform this check for you. It doesn't need to= happen in core Emacs
=C2=A0 =C2=A0 =C2=A0for you to get the behavior you want.
<= /div>

Of course. I will do that. I was just hoping the &= quot;right fix" would get in. (Otherwise why would anyone bother to su= bmit bug reports and patches?)

If your wish is to defend the interests o= f the "silent majority", who all,
without knowing it, would benefit from this change, then I appreciate your<= br> concern.

However, as maintainers, and given the lack of ot= her voices *asking*
for this change, we prefer to retain the status quo, however far from perfe= ct
it may be.

I doubt that will ever= change because my situation as I explained above, of working with primaril= y read-only files is not in majority.=C2=A0

Plenty of projects on the N= et strive to make every breaking change necessary
to approximate the best version of what they're trying to accomplish.

I haven't yet got an answer to a r= eal-life scenario that would break by this change. What kind of (i) side-ef= fects would one be relying on (ii) while running indent-region (iii) on rea= d-only files?

It's a bit sad, I am presenting = a solution to a real problem and the counter argument is just one, and hypo= thetical.=C2=A0

=C2=A0That's
not how it is here. We want a stable, well-functioning Emacs with predictab= le
behavior,

*predictable*: What=C2=A0should one expect to happen if one tried to in= dent-region in a read-only file? Would one be surprised if a read-only erro= r is thrown? Emacs already does that.. just that this proposal does just th= at *before* the time-consuming indentation attempt is started.=C2=A0=

So this patch should bring no noticeable change to a ma= jority of people. But people in minority like me -- (i) like to obsessively= keep all files well-indented (ii) working with read-only files (iii) time-= consuming indentation (major mode and file size dependent) -- would heavily= appreciate this.=C2=A0

and sometimes that means keeping things = as they have been for
decades -- even if, in hindsight, it shouldn't have been done that way.=

What I'm interested to learn is how many other cases l= ike this exist,

I doubt if many still= exist because the ones that affected most people are already fixed by usin= g the same approach (as in this proposal) of using * interactive form or ba= rf-if-buffer-read-only.=C2=A0

and
whether a more general approach would make it less likely for it to occur.<= br> What if we could know, for example, whether a function will try to change t= he
buffer, and simply stop the evaluation before it starts...
=

This prolonged discussion makes me think "Wh= at's the point?". I can barely convince to commit this 1-line chan= ge to the master branch that can be easily reverted even if a single person= complained.=C2=A0
--

Kaushal Modi

--001a114942cc9fef02055650082c-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 09 17:15:07 2017 Received: (at 22819) by debbugs.gnu.org; 9 Aug 2017 21:15:07 +0000 Received: from localhost ([127.0.0.1]:53735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfYJj-00058K-JT for submit@debbugs.gnu.org; Wed, 09 Aug 2017 17:15:05 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:33741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfYJi-00057Z-7o for 22819@debbugs.gnu.org; Wed, 09 Aug 2017 17:15:02 -0400 Received: by mail-pf0-f173.google.com with SMTP id h68so32680243pfk.0 for <22819@debbugs.gnu.org>; Wed, 09 Aug 2017 14:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version; bh=ingx9J1Bx08hYcnK9Nshl9YbTeu97SFPDq/RrA9IYJY=; b=Fg3wHqYqwjZui2ICoCCUf3LQitoAuNMWhPY5mR2lJc5R1XAwDMqvzBrdFe2ki7KmGG hFMaHvTdLG+J1j+vGQ2DYHF8JRQGkLMGQLTcU+3Mch2LKOuj3jQK6+z88HNTXiBnWM0p EJ1n7iswcMEk5bB5i48+QQ1QNWtRvLzrPt1BeqQAzJMcbuV6+Kze4ECCFwS1xnaursNe COtgrupE/G/8WH91MexLP5Ccs6cwVfhjgR9iJ1n8WuyY3Un3EXPF8u2YTZAx1jKRwsSQ lTPVyvnBJZfALBu5gchmYYJoGwOpFzlpd4DYaFO41jG9E0LQvVeKsVntlv06zby8WllZ WWNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :references:user-agent:mime-version; bh=ingx9J1Bx08hYcnK9Nshl9YbTeu97SFPDq/RrA9IYJY=; b=TEXu1MIKlODiYRHLijNAbMHfd8zrKhuzJ388tweLaceuXf73ICh5Q4qePCTmtPGQdI vsztZupzpv6GYYY/QXDSBzZ2CMLUwG5qitZNrLPaL+JXwRQ1Zo0Nvg0gF2WhOOhcE7eZ QZdd9dwSHSO9f0zU/MR9LX3/pyOUa3dR5vBXUXd+IJ3M38RQr4CghRmGbMrtTIVqleTR gXhdQ5M5fPSuDmnvDLZ1Vr53Q4x4TO9grW1zyml8JjfiGYA8P0PURSU/3VbEbo+AwSoz TXXYyHNQ8rbQXRDHt4Uu5NT3i+HWVkRh9RRmbnU2bcIkZ+Seg7srXQB0JlhUOc4BmxFx uQbQ== X-Gm-Message-State: AHYfb5jLSU9jdVJEXd3lRIl/dzcSrU4wdpjdgLFuuc5h09/Fa73qfUYQ 76SpBFqd6u458afJp5o= X-Received: by 10.99.1.203 with SMTP id 194mr8852893pgb.315.1502313296063; Wed, 09 Aug 2017 14:14:56 -0700 (PDT) Received: from Vulcan.local (76-234-69-149.lightspeed.frokca.sbcglobal.net. [76.234.69.149]) by smtp.gmail.com with ESMTPSA id 66sm8736315pfq.20.2017.08.09.14.14.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Aug 2017 14:14:53 -0700 (PDT) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Vulcan.local (Postfix, from userid 501) id 9D45178E121C; Wed, 9 Aug 2017 14:14:52 -0700 (PDT) To: Kaushal Modi Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only In-Reply-To: (Kaushal Modi's message of "Wed, 09 Aug 2017 11:03:34 +0000") Date: Wed, 09 Aug 2017 14:14:45 -0700 Message-ID: References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> <83y3qtswvv.fsf@gnu.org> User-Agent: Gnus/5.130016 (Ma Gnus v0.16) Emacs/25.2.50 (darwin) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, Eli Zaretskii , npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable >>>>> Kaushal Modi writes: > Understood. My only hope that I can convince the maintainers with my reas= on > that this proposal fixes a real-life problem with the help democratic vot= ing > system (if the opinions asked on emacs-devel matter and can be called tha= t). That's fair, though we still need to be personally convinced. :) Ancient behavior has a mystique that requires a fair bit of motivation for us to change. It really just comes down to the fact that Eli and I are conservati= ve fellows in these things. > Wouldn't the master branch be a good playground for this? If it affects > people negatively, it's just a one-line commit and thus easy to revert. I'm not sure enough people use the master branch for it to determine how it will affect the majority. In all likelihood it won't affect anyone badly at all (I don't really see h= ow it could), it's just not something we need to do today. I'm fine with keepi= ng the issue open, though. My preference would be that another solution will solve this, and all similar issues, by way of a better design. Otherwise, we're picking at gnats in a sensitive area (i.e., long-held behavior). > I should have used the term "wall time". This issue has wasted quite a few > minutes for me. Understood. > Of course. I will do that. I was just hoping the "right fix" would get in. > (Otherwise why would anyone bother to submit bug reports and patches?) You're making us aware of bad implementation decisions made long ago, which are good to know about. There have been other, fairly long, debates on the meaning of the "read-only" bit, and when a buffer should get marked as modified. I'm sure these issues relate to yours as well. For example: shoul= d a buffer-modifying operation be aborted early even if the actual operation of the function won't change anything? People argue that M-q shouldn't mark a buffer as modified if the reformatting changes nothing: does that mean M-q should be allowed on a read-only buffer if it doesn't modify, or should it abort early because its makes no sense? And how many people have built up macros or customizations or custom functi= ons in their configuration that rely on ultimately-non-modifying operations bei= ng allowed in read-only buffers, rather than turning them into errors? Arguably their code is "wrong", but how much of their time should we waste by fixing this and causing their keyboard macros to break? I realize my argument tends toward "change nothing", but that's not what I mean. I'm only saying that there's a lot of users to be considered, so unle= ss we *need* to risk breakage, we prefer to avoid it. The current behavior has been around for a long, long time, and while it's painful for your use case= , I know you have the expertise to advise Emacs as needed. > I haven't yet got an answer to a real-life scenario that would break by t= his > change. What kind of (i) side-effects would one be relying on (ii) while > running indent-region (iii) on read-only files? >=20 > It's a bit sad, I am presenting a solution to a real problem and the coun= ter > argument is just one, and hypothetical. We don't normally have any counter-evidence that an old, bad behavior *shou= ld* be kept. It's more an argument that we don't change them until we're convin= ced it's time. =2D-=20 John Wiegley GPG fingerprint =3D 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCgAdFiEE3lW3afxXihSlvlQwwUTY9PGf5jAFAlmLe0UACgkQwUTY9PGf 5jBMnQv/VhrOeKL0kawJK5n6iQHQVHwhVbQD9/HcuWPB99p1vge+qSFb34T5C36H 0hD04Ytl9MDCZTbrLDf0ubHSCY2FQ/x4Xzx7EFbz8rvXZ99kMEHIrdP1DMqXcMjb uyYqo1LSnlUShzwe/wD1e3dXfcgOyK4a2oQL0n1Ee8W8oazDgSlF5ZToeLXXkXQR EjXJrK0WpL4/2DkXS7IMJulR7ItRPQrz/3h7dvjxrEalcn+bIGmYGn95H3HjFzu9 fdWvy0n2EqAyDDFzH8rLXbAEb82vetsQtTGsS2qNTgLz98qeUsMWHXN2sYhJIXoy 9D+TwSP6RDQvGXVDEkqOjOyOL0RlbPVODPuHNzjckaF9e5YTAcrVFsiO6yNzL5Jw Dxzm6dkOvCVuC+q0DW2CLL2hKTQW4lmlptQ9uIx+7qVlQrzUGK6eLpm0c+7SKdRL jX+0UpU5kfzekzhFCaFe18H41aa/r3eTF9L1ce8KVB7Hx9qvX1U1aLccBFe5t+Ow 9oqVLC1S =jLul -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 10:50:17 2017 Received: (at control) by debbugs.gnu.org; 26 Nov 2017 15:50:17 +0000 Received: from localhost ([127.0.0.1]:59493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIzCC-0007Ts-Sp for submit@debbugs.gnu.org; Sun, 26 Nov 2017 10:50:16 -0500 Received: from mail-io0-f180.google.com ([209.85.223.180]:34551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIzCA-0007Tf-TO for control@debbugs.gnu.org; Sun, 26 Nov 2017 10:50:15 -0500 Received: by mail-io0-f180.google.com with SMTP id q101so33733128ioi.1 for ; Sun, 26 Nov 2017 07:50:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version; bh=cTLEV6qxzboi6wTgVLIJiv2pPdbDML3Q/XTxQ3GsRA0=; b=shGZlaGB+OO+L64s1DzOflLlegF5cuz1i2HOMJckkTodtf+6gheg1ihxrpdAQAuLkB i6f6QoouPfdAfJgX1Y7cNIPP3r70Njz9hh+O0+ThGpcQm+1Y7XQbSOBVeYhEBeDvHsqZ eVXPFBZ4OEh1lu2CnEScb7cIywf7wd2SCwFGSVrqAxx0QLZEYpobc8K0VpkelYrPShBr i7URMaBL+ZQBVILRTdz4s8mH2JdqR/dVg1XdRiXEszQPhnMqDRCzZt31iKzp0EkzinjY uJYIW+/1Z/1+v6yk9iSuDUaXkHn+KWCZhLFG2xZypY63YZ2hTNXJisCtecf2cE0nFsH/ gdSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version; bh=cTLEV6qxzboi6wTgVLIJiv2pPdbDML3Q/XTxQ3GsRA0=; b=h14YPltr/nCiLw0GONMVyPiE07XoSXSBMEFWeBoqV/09jGy/K4SmIhOsR9XF8Q7Owr OFHBB+NNvVthqTb/STzFxB9T0UFGNx7bsHW1Mb4SY8YfvPWGqzU0PFjfbbVM9Tp1UVDG 3dg2yrm7AS06O9LVBPXXvOXbhzPOHZOoKJXoEDQjMeiB5AMgUmPXsNghm75g8zw8aZRX nrcxJ3G7NmsNeIKtXvvG8dMec5Xe3ls5bc0Gk2hbLqAQKvFaPLdsbB1xW8FBDDFTIrHT WX/adEUgZL6rqTblaenItcHbrS2pXynYkKBYQC2gE0IjyPbk8WkxXv239Twj/Mf5VSkL Beqw== X-Gm-Message-State: AJaThX5daZEW0fHvZwRNgxm9Uj860ps8HL2fZKR0Nk1Z+ScumBFL3cta Tzq6B9PfEo+7izsPSBdlvrh7ug== X-Google-Smtp-Source: AGs4zMbrcWh8fw0to/7KrVj71ckGQYJH7R/TsEBnSOu/4zEnCxDgwazyxK2zV1TeRuafujVnfEJNww== X-Received: by 10.107.131.99 with SMTP id f96mr37994348iod.215.1511711409047; Sun, 26 Nov 2017 07:50:09 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id l124sm6374427itd.40.2017.11.26.07.50.07 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 Nov 2017 07:50:08 -0800 (PST) From: Noam Postavsky To: control@debbugs.gnu.org Subject: control message #22819 "Don't try to indent region if the buffer is read-only" Date: Sun, 26 Nov 2017 10:50:07 -0500 Message-ID: <87mv39xcnk.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) # current status of discussion is that this won't be changed tags 22819 + wontfix quit From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 10:33:12 2019 Received: (at 22819) by debbugs.gnu.org; 25 Jun 2019 14:33:12 +0000 Received: from localhost ([127.0.0.1]:33164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfmVU-0002qd-J6 for submit@debbugs.gnu.org; Tue, 25 Jun 2019 10:33:12 -0400 Received: from quimby.gnus.org ([80.91.231.51]:50608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfmVR-0002qS-JU for 22819@debbugs.gnu.org; Tue, 25 Jun 2019 10:33:11 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfmVO-0000xE-8d; Tue, 25 Jun 2019 16:33:08 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> <83y3qtswvv.fsf@gnu.org> Date: Tue, 25 Jun 2019 16:33:06 +0200 In-Reply-To: <83y3qtswvv.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 08 Aug 2017 22:05:40 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> From: Kaushal Modi >> Date: Tue, 08 Aug 2017 13:06:52 +0000 >> Cc: 22819@debbugs.gnu.org >> >> @Eli: Based on the discussion[1] on emacs-devel, there isn't any >> oppositio [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, npostavs@users.sourceforge.net, Kaushal Modi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Kaushal Modi >> Date: Tue, 08 Aug 2017 13:06:52 +0000 >> Cc: 22819@debbugs.gnu.org >> >> @Eli: Based on the discussion[1] on emacs-devel, there isn't any >> opposition to doing what's proposed in this >> bug thread. So if it's alright by you, and if there is no strong >> reason to use the more concise alternative i.e. if >> both barf-if-buffer-read-only and interactive "*.." are equally >> correct, can the former approach be committed? > > I'm not sure what is it that you are asking me. You already know my > opinion on this proposal, and it hasn't changed. I think the rough consensus was that adding this special-casing to this command wasn't idea, so I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 10:33:17 2019 Received: (at control) by debbugs.gnu.org; 25 Jun 2019 14:33:17 +0000 Received: from localhost ([127.0.0.1]:33167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfmVY-0002qu-RS for submit@debbugs.gnu.org; Tue, 25 Jun 2019 10:33:17 -0400 Received: from quimby.gnus.org ([80.91.231.51]:50624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfmVX-0002qm-6F for control@debbugs.gnu.org; Tue, 25 Jun 2019 10:33:15 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfmVU-0000xN-Kd for control@debbugs.gnu.org; Tue, 25 Jun 2019 16:33:14 +0200 Date: Tue, 25 Jun 2019 16:33:12 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #22819 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 22819 wontfix close 22819 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 22819 wontfix close 22819 quit From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 10:36:14 2019 Received: (at 22819) by debbugs.gnu.org; 25 Jun 2019 14:36:14 +0000 Received: from localhost ([127.0.0.1]:33174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfmYQ-0002vs-Dk for submit@debbugs.gnu.org; Tue, 25 Jun 2019 10:36:14 -0400 Received: from mail-lf1-f54.google.com ([209.85.167.54]:35875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfmYM-0002vd-W3 for 22819@debbugs.gnu.org; Tue, 25 Jun 2019 10:36:12 -0400 Received: by mail-lf1-f54.google.com with SMTP id q26so12841621lfc.3 for <22819@debbugs.gnu.org>; Tue, 25 Jun 2019 07:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SK7n7K3yrVyvdAQbgt/PlzN8Q2UCnxmUjmFHG2yUpPY=; b=WCUZjMxlk9LnRUvBMSH8Wf2IeuFleZJTr/2M3uR6lIu/yNra/MEQNiwY5qTlCpeMPl V5OEIvTdz5rWB4xxxWpvk3vT96GiZYxvoS9Sr5aMlOzvt8SAw9VNg+Fo/dTDujy6JojB UbDsAVdNvuKeWT57EX+7SGq8FDoqBDF+X3OcyGveN/lTIJLo8oGx1tJvIcWiO3dYXvZK 3psbmW6Rff545VtiDvlZhwXZ2Ptp58z8TXkHW4UdVcWPpa0t86wb16QtN434lVq3iAlt SqQWvUhVz4zVlzPm+m2oRjNSh8CdUCOpYHm317965q+LmkxcJkUGHd9om2zW194jDItj vruA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SK7n7K3yrVyvdAQbgt/PlzN8Q2UCnxmUjmFHG2yUpPY=; b=aAFFzNcxPvVrShjH0UMxtp6wUyivDHqlcRu1v8yLWVDIBcDfhumBQuf6vW/EhPP1IW myXobRZi5hs7cUa1XTN9aAqWN8m9L3ZsnHUZrjR+4bE9SSHjIigq1nd5YwbRI05isOJI RTEJhCUJ+lM5Mu6FNdDejq+c3NVFgh+Ebfvpijwu9+VLIoHI78cP2+ITIjOH5DC0LGI/ EIX5qSlKUSQ5bxKeUDGX9pFTeQUl/JkH61nS1UUBq/jivTH4KZkKXfX2xCsOKiC0OY8L r+c9p33oRRC+5f3zlMLDO8u88sUIKv4J/yCpdMOpmIlqCzER9+XkoUSwfRFp+oFYtmsp W1HQ== X-Gm-Message-State: APjAAAWh0i05sXGbpfIOrQsOYdZN6tY5UFNUPjF3YbP4IJeSqorp0rEa SFIy8WdPsgTf46ZBzVI4Xlp1CstOQNn0433ZcVY= X-Google-Smtp-Source: APXvYqx+Gs14qM4X4IAJ6d5/3y/zk1GOdlR5HEQkbygRiBOyqpHoanIMtMjT6APptU0buiXZBauHDZfR5SKKQ8Ey7LM= X-Received: by 2002:a19:9e4b:: with SMTP id h72mr54266041lfe.21.1561473364604; Tue, 25 Jun 2019 07:36:04 -0700 (PDT) MIME-Version: 1.0 References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> <83y3qtswvv.fsf@gnu.org> In-Reply-To: From: Kaushal Modi Date: Tue, 25 Jun 2019 10:35:27 -0400 Message-ID: Subject: Re: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only To: Lars Ingebrigtsen Content-Type: multipart/alternative; boundary="000000000000393cc2058c26d955" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22819 Cc: 22819@debbugs.gnu.org, Eli Zaretskii , Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000393cc2058c26d955 Content-Type: text/plain; charset="UTF-8" On Tue, Jun 25, 2019 at 10:33 AM Lars Ingebrigtsen wrote: > I think the rough consensus was that adding this special-casing to this > command wasn't idea, so I'm closing this bug report. > OK.. that's fine. --000000000000393cc2058c26d955 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Jun 25, 2019 at 10:33 AM Lars Ingebrigtsen <larsi@gnus.org> wrote:
I think the rough consensus was that add= ing this special-casing to this
command wasn't idea, so I'm closing this bug report.

OK.. that's fine.
--000000000000393cc2058c26d955-- From unknown Fri Jun 20 07:12:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 24 Jul 2019 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator