From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Geoffrey Teale Newsgroups: gmane.emacs.bugs Subject: bug#70832: 30.0.50; repunctuate-sentences should respect sentence-end-double-space Date: Mon, 13 May 2024 09:39:52 +0200 Message-ID: References: <86eda83d12.fsf@gnu.org> <86bk5bzf85.fsf@mail.linkov.net> <867cfz1p8i.fsf@gnu.org> <86v83jxa9v.fsf@mail.linkov.net> <868r0fymk0.fsf@gnu.org> <86wmnytdkj.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004db89b061850fe8a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7523"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 70832@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 13 16:43:44 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 1s6Wtz-0001l6-Kk for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 May 2024 16:43:43 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s6WtM-0003KC-6k; Mon, 13 May 2024 10:43:04 -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 1s6WtK-0003Je-LZ for bug-gnu-emacs@gnu.org; Mon, 13 May 2024 10:43:02 -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 1s6WtK-0004Iw-Cg for bug-gnu-emacs@gnu.org; Mon, 13 May 2024 10:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s6WtK-0005DV-T1 for bug-gnu-emacs@gnu.org; Mon, 13 May 2024 10:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Geoffrey Teale Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 May 2024 14:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70832 X-GNU-PR-Package: emacs Original-Received: via spool by 70832-submit@debbugs.gnu.org id=B70832.171561137420026 (code B ref 70832); Mon, 13 May 2024 14:43:02 +0000 Original-Received: (at 70832) by debbugs.gnu.org; 13 May 2024 14:42:54 +0000 Original-Received: from localhost ([127.0.0.1]:33108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6Wt8-0005Cv-4A for submit@debbugs.gnu.org; Mon, 13 May 2024 10:42:54 -0400 Original-Received: from mail-yb1-f178.google.com ([209.85.219.178]:45457) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6QJ3-0000vz-Lq for 70832@debbugs.gnu.org; Mon, 13 May 2024 03:41:11 -0400 Original-Received: by mail-yb1-f178.google.com with SMTP id 3f1490d57ef6-de604ca3cfcso3899000276.3 for <70832@debbugs.gnu.org>; Mon, 13 May 2024 00:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715586003; x=1716190803; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=CxKad/8mfKC1L2qxoF1T42p0YEvTG3Pa0co44t12z8E=; b=hd9ytL8GvdrHByMA/6WtL+DXK1wRDSd8AALHnmcms5RGklZt0RZphAay1x0D8sUrM3 UUaSjdw39b1JLSMkr79Io9eLKjh1jIOoQoXia2udCa29M+8ZwfyONKrYm3mmr69mYUQS J4VXqwrRKiYEkWfC79CVUFuE18XEKrWEGySRvglEzPCF196QdSp8AntEV3cMP10GKA84 SKqU24KM5tRYGustPsnNXkjXr2q0Jr63IeDRrY0fgm5Lwk1TT9OyVdenKmpss8xLpwce 1yb2UcWwEJGp1fz1b9f8MVLmyRyMzjkAriDCfIi5jJ4w1fP23Og4Ts36UaOk/R3E0OVD S0bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715586003; x=1716190803; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CxKad/8mfKC1L2qxoF1T42p0YEvTG3Pa0co44t12z8E=; b=fAaPeC5sKOjwpAHRaXveUw8yu2uN6mENB5BRAPqgYCgrg0xlkwZfiTPS4XRM/G8d39 1eHum+38+SWHaNsQRSGC/FCupzUvupiuWzaaHeU87L8RqbyT9wW3V6NblCZ69rapxiT7 48H002gzfQEp6UH2DjUVwofFWK9WLqKbYO9qxSf3AQ1FzEPvZ3b1kMY8Eg7Pz0Ig5Gvr kUwAxViY5rurwqTGSZKwImYLbCARsjLleZLSxEgX1uhT2ahuPsj32USe+JSqougm6iim SGmyPTsd/0Rtb1JvphZhDsdDMdIkmPtYl2969oUsDhrb1UMxyMUjsiIMTeG2Msb8bHrI Ew3A== X-Forwarded-Encrypted: i=1; AJvYcCVIwYfm/8h2772CjEYYif3XtzjA2KcFX6VbwVkm/mQQB3Z3cFJwk1wqmnvD8G1LHS8d/IJc3KtF93shtHbsPhT9W+B6tMs= X-Gm-Message-State: AOJu0YznSxXUz7Oy7Hento/nygccb3EoTxQQjHfsw6Mbd0wllzZEWQVL OC69pJ3hreZF2mYKhOWuCTaOc1yaDJe6fQhLt0EHbEK9heMPpx3+BnsV4p6k6A+0DltEsuNAFnq CblM3ctiqNvYxV3ZITNC4YxDVfqU= X-Google-Smtp-Source: AGHT+IHhwryGPo+VAAD65t3LG9ZveXvIh2ZcnIB06RXxuW07MHH+rUDK61gRwz5OfJmJ5f2tLW8/Rp+ITX9dAtLWU64= X-Received: by 2002:a05:6902:72a:b0:dee:8834:4a1 with SMTP id 3f1490d57ef6-dee88340746mr2299135276.7.1715586003217; Mon, 13 May 2024 00:40:03 -0700 (PDT) In-Reply-To: <86wmnytdkj.fsf@mail.linkov.net> X-Mailman-Approved-At: Mon, 13 May 2024 10:42:48 -0400 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:284977 Archived-At: --0000000000004db89b061850fe8a Content-Type: text/plain; charset="UTF-8" On Mon, 13 May 2024 at 08:58, Juri Linkov wrote: > > So you are saying that query-replace already does the job? Fine by > > me; if no one else supports this bug report in a week or two, I will > > close. > > Actually there is another problem: whereas it's easy to rely on the > variable sentence-end-double-space as was asked by this request: > > diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el > index af99a96e045..974a83efdea 100644 > --- a/lisp/textmodes/paragraphs.el > +++ b/lisp/textmodes/paragraphs.el > @@ -532,7 +532,10 @@ repunctuate-sentences > (end (use-region-end)))) > (interactive (list nil (use-region-beginning) (use-region-end))) > (let ((regexp "\\([]\"')]?\\)\\([.?!]\\)\\([]\"')]?\\) +") > - (to-string "\\1\\2\\3 ")) > + (to-string (concat "\\1\\2\\3 " > + (if sentence-end-double-space > + " " > + "")))) > (if no-query > (progn > (when start (goto-char start)) > > But the problem is that when a user customized > sentence-end-double-space to nil, the user still > might want to put two spaces since the docstring says: > > "Put two spaces at the end of sentences" > > So using one space will contradict the docstring. > I was actually aware about the docstring when I raised the bug, but I assumed that changing that docstring would be part of the fix. If I get to the essence of the issue: two spaces at the end of a sentence is no longer considered correct in most prose-authoring contexts. In that sense what I really wanted is the ability to automatically remove any such instances from an Org or Markdown file, for example. When I went looking for that in emacs this seemed like the correct tool for the job, and it is a little bit glaring that there's such a variable that one can set, but this function, defined in the same file, doesn't respect it. That said, yes of course one could easily use query-replace as suggested above. -- --0000000000004db89b061850fe8a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Mon, 13 May 2024 at 08:58, Juri Linkov= <juri@linkov.net> wrote:
<= /div>
> So you are sayi= ng that query-replace already does the job?=C2=A0 Fine by
> me; if no one else supports this bug report in a week or two, I will > close.

Actually there is another problem: whereas it's easy to rely on the
variable sentence-end-double-space as was asked by this request:

diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index af99a96e045..974a83efdea 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -532,7 +532,10 @@ repunctuate-sentences
=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 (end (use-region-end))))
=C2=A0 =C2=A0(interactive (list nil (use-region-beginning) (use-region-end)= ))
=C2=A0 =C2=A0(let ((regexp "\\([]\"')]?\\)\\([.?!]\\)\\([]\&q= uot;')]?\\) +")
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 (to-string "\\1\\2\\3=C2=A0 "))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 (to-string (concat "\\1\\2\\3 "
+=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(if sentence-end-double-space
+=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=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(if no-query
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(progn
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when start (goto-char start))

But the problem is that when a user customized
sentence-end-double-space to nil, the user still
might want to put two spaces since the docstring says:

=C2=A0 "Put two spaces at the end of sentences"

So using one space will contradict the docstring.

=
I was actually aware about the docstring when I raised the bug, = but I assumed that changing that docstring would be part of the fix.=C2=A0 = If I get to the essence of the issue: two spaces at the end of a sentence i= s no longer=C2=A0considered correct in most prose-authoring contexts.=C2=A0= In that sense what I really wanted is the ability to automatically remove = any such instances from an Org or Markdown file, for example.=C2=A0 When I = went looking for that in emacs this seemed like the correct tool for the jo= b, and it is a little bit glaring that there's such a variable that one= can set, but this function, defined in the same file, doesn't respect = it.=C2=A0=C2=A0

That said, yes of course one could= easily use query-replace as suggested above.=C2=A0

--=C2=A0

--0000000000004db89b061850fe8a--