From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.bugs Subject: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only Date: Tue, 08 Aug 2017 13:06:52 +0000 Message-ID: References: <87vam26amc.fsf@users.sourceforge.net> <83lgmywlo4.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c0c884aae825005563da3de" X-Trace: blaine.gmane.org 1502197714 11457 195.159.176.226 (8 Aug 2017 13:08:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 8 Aug 2017 13:08:34 +0000 (UTC) Cc: 22819@debbugs.gnu.org To: Noam Postavsky , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 08 15:08:17 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1df4F4-0002AA-IB for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Aug 2017 15:08:14 +0200 Original-Received: from localhost ([::1]:42533 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1df4F9-0004SV-34 for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Aug 2017 09:08:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1df4Ex-0004OR-2V for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2017 09:08:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1df4Er-0008P4-UQ for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2017 09:08:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42472) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1df4Er-0008Os-Qp for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2017 09:08:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1df4Er-0004ne-Hz for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2017 09:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Modi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Aug 2017 13:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22819 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 22819-submit@debbugs.gnu.org id=B22819.150219763118381 (code B ref 22819); Tue, 08 Aug 2017 13:08:01 +0000 Original-Received: (at 22819) by debbugs.gnu.org; 8 Aug 2017 13:07:11 +0000 Original-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 Original-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 Original-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) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135572 Archived-At: --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--