From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Andr=C3=A9?= A. Gomes Newsgroups: gmane.emacs.bugs Subject: bug#56844: [PATCH] Refactor repunctuate-sentences to accommodate corner case. Date: Tue, 02 Aug 2022 14:41:32 +0300 Message-ID: <877d3qzxcj.fsf@gmail.com> References: <87r122eaqv.fsf@gmail.com> <87a68p4r5q.fsf@gnus.org> 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="40363"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) Cc: 56844@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 02 13:42:30 2022 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 1oIqI9-000AHq-U0 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Aug 2022 13:42:29 +0200 Original-Received: from localhost ([::1]:41670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIqI8-00006v-Jf for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Aug 2022 07:42:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIqHi-0008V8-Lh for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2022 07:42:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52908) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIqHi-0005hG-CU for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2022 07:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIqHi-0007Lv-8k for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2022 07:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Andr=C3=A9?= A. Gomes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Aug 2022 11:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56844 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch moreinfo Original-Received: via spool by 56844-submit@debbugs.gnu.org id=B56844.165944050728234 (code B ref 56844); Tue, 02 Aug 2022 11:42:02 +0000 Original-Received: (at 56844) by debbugs.gnu.org; 2 Aug 2022 11:41:47 +0000 Original-Received: from localhost ([127.0.0.1]:42657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIqHQ-0007LG-16 for submit@debbugs.gnu.org; Tue, 02 Aug 2022 07:41:47 -0400 Original-Received: from mail-lf1-f51.google.com ([209.85.167.51]:33750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIqHM-0007L2-C2 for 56844@debbugs.gnu.org; Tue, 02 Aug 2022 07:41:42 -0400 Original-Received: by mail-lf1-f51.google.com with SMTP id e15so11492377lfs.0 for <56844@debbugs.gnu.org>; Tue, 02 Aug 2022 04:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=1AOYfRSCxG1xaI1V8zBiJQaAQCvRgmIYwY/T2/weprY=; b=bZNqH/6V3EV4zkspE+mjPNZx5rpDWcjip9rXZJCzNyhCTr/FVIJdDjB4JlOaKZ0rla D55B7jJtLntldTuOGAfFpqYS7DO7jT9F7TlR1ON/Rh4USAlB6SaQhJQWGL9L/Jg1NEEx N9Zkj7T4a/HKitbeB1rDTipFMAYyBurFegMgvItjAqh/1Qd0il6Wz4Jybqjgr+Z0HlgH jxuiv4kfhzISbiOsH/X/J5hFNrS2fiwHFNS984uVdcjHHQsBBBTZ6oDEktKmBVtY/gnd xAZrS8hZ42yHLDBOYvwQ7XTY8m8bX8dNBGzhwgAbgN1agQYRKhtKizntIhKtSUgpHI70 5yXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=1AOYfRSCxG1xaI1V8zBiJQaAQCvRgmIYwY/T2/weprY=; b=zWlUpHe8QuWN/kAcw7f3yBcsNIZJzUhczsw19YCVKrRJu2tnJqIhKGrUrlLXvdqKEF S75cZP4QzxMIawgSA/M0bvUvgUmcmzG6q5PSR3aCFnRAIRHdYNTdKXztxbDk3uzBKkTs o4C9V2hJIt0J814MSKCkVSyp6krfNEE7AA2uPRhQE+sfs2JYqlMl89L5ZB0yQdnqHv4B McevUumilefET9vaF7H3Cs51GU1SByVS8vOajHkB1w95Xs8JVAmPuE8C0NvhPxE7l1+t vW3Ig42fmID9xOQz0OI+712P31Ug6ZgjM/bEEWO9zhibbNPTHJEy5fdcWjUFN9fGhGHs ZtUQ== X-Gm-Message-State: ACgBeo2x7lGSDlVohfLxrmQaWQX99GQqzAxqMkhcfWwqhtxSfBt2VL3q p2/TIu19D7p3/6pfxNpz6vG6s5vuI62pKxyC X-Google-Smtp-Source: AA6agR6DOIuh6OohQcxAdPXKDTK8usFoq4LU1gf/Kvm175Wiuer6ex52LXe4G3CoR0H08ZM1NXM/Tw== X-Received: by 2002:a05:6512:6d3:b0:48a:e68c:15c9 with SMTP id u19-20020a05651206d300b0048ae68c15c9mr6657973lff.488.1659440494127; Tue, 02 Aug 2022 04:41:34 -0700 (PDT) Original-Received: from guix-xps13 (95-29-44-11.broadband.corbina.ru. [95.29.44.11]) by smtp.gmail.com with ESMTPSA id o3-20020a2e9b43000000b0025e2cb58c6esm1901927ljj.37.2022.08.02.04.41.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 04:41:33 -0700 (PDT) In-Reply-To: <87a68p4r5q.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 31 Jul 2022 10:34:09 +0200") 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" Xref: news.gmane.io gmane.emacs.bugs:238534 Archived-At: Lars Ingebrigtsen writes: >> + (regexp "\\([]\"')]?\\)\\([.?!]\\)\\([]\"')]?\\) +\\([\"')[:upp= er:]]\\)") > > I'm not quite sure I understand this patch. Are you changing this to > only consider punctuation that's followed by an upper-case character to > be sentence-end punctuation? Yes. The patch section relative to testing is illustrative: --8<---------------cut here---------------start------------->8--- (ert-deftest paragraphs-tests-repunctuate-sentences () (with-temp-buffer - (insert "Just. Some. Sentences.") + (insert "Just. Some. Sentences. Yet another, e.g. this one.") (goto-char (point-min)) (repunctuate-sentences t) - (should (equal (buffer-string) "Just. Some. Sentences.")))) + (should (equal (buffer-string) + "Just. Some. Sentences. Yet another, e.g. this one."= )))) --8<---------------cut here---------------end--------------->8--- Thanks. =20 --=20 Andr=C3=A9 A. Gomes "You cannot even find the ruins..."