From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#72704: 29.4; repunctuate-sentences ignores NO-QUERY Date: Sat, 24 Aug 2024 12:23:58 +0530 Message-ID: <87o75i76nt.fsf@gmail.com> References: <87r0alazj9.fsf@breatheoutbreathe.in> <86sev1hunf.fsf@mail.linkov.net> <87seuu300z.fsf@breatheoutbreathe.in> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12678"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: briandg@gmail.com, Juri Linkov , Richard Stallman , 72704@debbugs.gnu.org To: Joseph Turner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 24 08:55:38 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1shkgT-00036x-DW for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Aug 2024 08:55:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1shkg9-0006y0-Cj; Sat, 24 Aug 2024 02:55:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1shkg6-0006xk-JE for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 02:55:14 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1shkg6-0001Oo-9v for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 02:55:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=UI/IYIvv5GpK8hicK+OFjbXWpkTdGiGfwP5nUT3AGC8=; b=SUUmszWZWKIAVT10kHWnq8QLjrrYR8DBP5e8Ssr6KpGyGt43NbYs3eLu5H4lLFJoIWXgVDnHmi2EqNJK/PDO2i6y4Gh0xPgkpYniwmGeMo8vj0P/kICkNZT6McdgwW73Wx81fcCN/HqOuwT57nsfNxBHLSpygafnhKBYeI22cvRFAV4iHZGdnnXouG4XxJhhfUfFjbTiDeyUZKj/BagROkXSe0WRr3OmXlZdp0VmuLhci12rKBEaj7dxyn9w1oHCDL5UJ0bJSKFUqFEZOGVqQdDq9YW8dgYtmZxO1pIwl/qjKOzmkZmxYjveMY+XbiMlJ1Ca4MjJHwWgOyR2lrfabQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1shkgr-0004DS-VI for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 02:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Aug 2024 06:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72704 X-GNU-PR-Package: emacs Original-Received: via spool by 72704-submit@debbugs.gnu.org id=B72704.172448255916194 (code B ref 72704); Sat, 24 Aug 2024 06:56:01 +0000 Original-Received: (at 72704) by debbugs.gnu.org; 24 Aug 2024 06:55:59 +0000 Original-Received: from localhost ([127.0.0.1]:40322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shkgo-0004D8-Qk for submit@debbugs.gnu.org; Sat, 24 Aug 2024 02:55:59 -0400 Original-Received: from mail-pl1-f193.google.com ([209.85.214.193]:58464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shkgm-0004Ct-13 for 72704@debbugs.gnu.org; Sat, 24 Aug 2024 02:55:58 -0400 Original-Received: by mail-pl1-f193.google.com with SMTP id d9443c01a7336-202318c4f45so27511225ad.0 for <72704@debbugs.gnu.org>; Fri, 23 Aug 2024 23:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724482442; x=1725087242; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UI/IYIvv5GpK8hicK+OFjbXWpkTdGiGfwP5nUT3AGC8=; b=RFhh25h/e1ihlqMP5jTBsNapc6NBzr6pZCWZnzCYX1PHCzegPwgnNbWtKVcspJak9d DI14u4yWLLLpwYFSiG3vJV5Ld79lGYqEaG5PovJHAudBzWFFSVnM61pYw94FzzAtm1r9 JdsYksF4P/z3O/wAreTtOflOf467R1fVh5CjkvxjZq79Csa/pm2AfEB7vr/CeJf5VyQ4 8TZiMzAPaQdcoJQ9T6ztNCN1td01WvcMvzCEsoETLb7uKI4BiKnCQNAuCYHnFlClN0z6 xHwS2eI5eMsz5796xVZI70J1vf6KoxgdCW4CuLyA7LUoMxABcvtZAXL+oW8dU6mb+6lQ +vAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724482442; x=1725087242; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=UI/IYIvv5GpK8hicK+OFjbXWpkTdGiGfwP5nUT3AGC8=; b=ZjRSHM5IqITF9+B4GZy1Wnqbom719ayeZmI+X5CgYkgU5EXqRdcxVbVGVjN1mu6ZkD sSSKJvIafZ0zpmVhQpc8AJzZUW9lrRBFO6E+cXIgvieu7PuBTiEY7cD1kPSwCeSRqbub xWW+wOpb1zGXRzy5m9KXsGdud2L3YEnfzE3sMzOxEb7cJQqZS2pxGhgwVP0Ja1Xwq5zb gnxaDRKOIEbCPtU5urDfl8o9EhYjN39z086dleaSQhDOiBQ/SzJcMarpTpKFkkhlsdvn NBGQJZVKjMLSByPI/vB/Jw9NjMrMI8gRu00PgmydRPnjOZ3MHf0bvtUgl5GLopfK2vnA K+fg== X-Forwarded-Encrypted: i=1; AJvYcCXQ1DuIPZJtSwimTz6ZnCqKTsXuI5RkT0aEj7EuZk5uoQ5YjlmmcQojznGYKS/v/voypPpWEg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzZC8mYjKFvMN49hx1VRtMCHKommvUjwuc7sufoYpebxxssSjzr Pxa+nZXZ56Ejh4UVQHwRgWXAWr3BXZx2aQ/rz63YiYlQicXEv6/o X-Google-Smtp-Source: AGHT+IEka+fzgm490Ynbe9js1TpLgq5U/zyDe9WQWEWmTYeOg/8CPkUS3E1ETwgOhx969HRQymYUrw== X-Received: by 2002:a17:903:1c9:b0:202:3469:2c78 with SMTP id d9443c01a7336-2039e4ca965mr61552345ad.28.1724482441638; Fri, 23 Aug 2024 23:54:01 -0700 (PDT) Original-Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-203855816dcsm37451585ad.112.2024.08.23.23.54.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 23:54:01 -0700 (PDT) In-Reply-To: <87seuu300z.fsf@breatheoutbreathe.in> (Joseph Turner via's message of "Fri, 23 Aug 2024 23:30:52 -0700") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290626 Archived-At: [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=86=E0=AE=95= =E0=AE=B8=E0=AF=8D=E0=AE=9F=E0=AF=8D 23, 2024] Joseph Turner via "Bug repor= ts for GNU Emacs, the Swiss army knife of text editors" wrote: > [...] > Please see the attached patch, which makes repunctuate-sentences respect > the current prefix argument. > > Juri, do I need to update the interactive-args declaration? I'm not > totally clear on how that works. > > Thank you! > > Joseph > > From b5689dd1907fc8e2bd2752d8c8248f3747d52ff3 Mon Sep 17 00:00:00 2001 > From: Joseph Turner > Date: Fri, 23 Aug 2024 23:19:33 -0700 > Subject: [PATCH] Interpret prefix argument as NO-QUERY in > repunctuate-sentences > > * lisp/textmodes/paragraphs.el (repunctuate-sentences): Respect > current-prefix-arg. > * etc/NEWS: Announce changes. > --- > etc/NEWS | 4 ++++ > lisp/textmodes/paragraphs.el | 3 ++- > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/etc/NEWS b/etc/NEWS > index 2ddbab29528..5f9f86bce53 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -95,6 +95,10 @@ When using 'visual-wrap-prefix-mode' in buffers with v= ariable-pitch > fonts, the wrapped text will now be lined up correctly so that it's > exactly below the text after the prefix on the first line. >=20=20 > +--- > +** When invoked with a prefix argument, 'repunctuate-sentences' now > +replaces text without querying for confirmation. > + > > * Changes in Specialized Modes and Packages in Emacs 31.1 >=20=20 > diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el > index be741e6517b..79bfc7fab3c 100644 > --- a/lisp/textmodes/paragraphs.el > +++ b/lisp/textmodes/paragraphs.el > @@ -550,7 +550,8 @@ repunctuate-sentences > filters to skip occurrences of spaces that don't need to be replaced." Should you not update the docstring to say that interactively prefix argument implies a non-nil NO-QUERY argument? [ P.S. you forgot to include the bug number in the commit log. ] > (declare (interactive-args (start (use-region-beginning)) > (end (use-region-end)))) > - (interactive (list nil (use-region-beginning) (use-region-end))) > + (interactive > + (list current-prefix-arg (use-region-beginning) (use-region-end))) > (let ((regexp "\\([]\"')]?\\)\\([.?!]\\)\\([]\"')]?\\) +") > (to-string "\\1\\2\\3 ")) > (if no-query