From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.devel Subject: Re: Counting sentences in `count-words' Date: Wed, 25 May 2022 13:13:18 +0300 Message-ID: References: <87o7zsiekm.fsf@elite.giraud> <83y1yv8cdp.fsf@gnu.org> <878rquizld.fsf@elite.giraud> <83czg694ft.fsf@gnu.org> <87y1ytd9if.fsf@elite.giraud> <87r14lh5lr.fsf@gmail.com> <87mtf8acl5.fsf@elite.giraud> <83bkvo7bkf.fsf@gnu.org> <874k1go68k.fsf@gnus.org> <878rqsa144.fsf@elite.giraud> <83zgj85spj.fsf@gnu.org> <871qwk9ykq.fsf@elite.giraud> <87o7zm58mh.fsf@elite.giraud> 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="26371"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) Cc: Eli Zaretskii , larsi@gnus.org, emacs-devel@gnu.org To: Manuel Giraud Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 25 12:16:47 2022 Return-path: Envelope-to: ged-emacs-devel@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 1nto4M-0006cx-21 for ged-emacs-devel@m.gmane-mx.org; Wed, 25 May 2022 12:16:47 +0200 Original-Received: from localhost ([::1]:45326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nto4K-00045r-IZ for ged-emacs-devel@m.gmane-mx.org; Wed, 25 May 2022 06:16:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nto18-0002pC-JV for emacs-devel@gnu.org; Wed, 25 May 2022 06:13:26 -0400 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:51225) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nto16-0005s9-Gn; Wed, 25 May 2022 06:13:26 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1BB0B32008FE; Wed, 25 May 2022 06:13:22 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 25 May 2022 06:13:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1653473601; x= 1653560001; bh=zuyKyfMEZJhSNOp2bdnlPJWVF/NwLMfLs79MG4U9vB4=; b=L 6tbP5qxXsqPmckQHWucimC6SQiwyzesv3bPdvGTYhI/dQrlqsy7C9AOmP4KRb8bC c/aAWguFeXVC0cPIxT6VDwsGMDkaaKikHKNqizZwBAcu1+MlzA9jyfaAoj7aBbVw kWuruTr6jDel8xKeu3oppgwnbpqyWqW9ADU4IMDX7K5+l2djUVGfSgELOkVlRM60 2oj/LQuhMK1MxFzPqXDyFB0rylTF0qCDwsV2SOP+hIzUzKoiF5aFe0ZjUUJsc5Qs sOQkWj7Pv62UAUjsFo7yx4IIq/zlkaarr7aGZ+p+Uil3qPzgg3MhRhjxQDMX2Tij BJed9mC6R3lLkc0vSrSEg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1653473601; x= 1653560001; bh=zuyKyfMEZJhSNOp2bdnlPJWVF/NwLMfLs79MG4U9vB4=; b=K UfDSdPY0KHBe9CMaUIgm0jyS+MhOv8DX0z0UIwL/AmewhyPFlMa006/MdPnH+QTH HXNsU0GwJrnG9hOwCVyMf4t7J4+lv23wNe++UbpWqcwQDHHt5ppOZmvHeGd1D2uJ JQ5mjcmixseSR4TYmS4OISncOxwiSx4fJ9Y5XTRorQ/Gvxp6aLSodlo0SNlH4vkk XOQA7ThN0xwXL6HpY3TJ25LHN7be3dp6YkXaqu1KCl6dCQ+T+4ORDYu7bgkr+ftp QYR5XM96q7iEC5CbFJxLt1UIC8kNd3/aVHW2MZmwwBEuTX9zCPMMFXfwzxVjWzu0 cVxYGVtZm6B2gnfbLhcAw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrjeehgddvhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufgjfhgffffkgggtgfesthhqredttderjeenucfhrhhomhephfhilhhi phhpucfiuhhnsghinhcuoehfghhunhgsihhnsehfrghsthhmrghilhdrfhhmqeenucggtf frrghtthgvrhhnpeefleefffetieetuedvtedtgfehgeevtefhueevjeehjeelueeigfev tdeihfeugeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehfghhunhgsihhnsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: id48c41f1:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 May 2022 06:13:20 -0400 (EDT) In-Reply-To: <87o7zm58mh.fsf@elite.giraud> (Manuel Giraud's message of "Wed, 25 May 2022 10:17:26 +0200") Mail-Followup-To: Manuel Giraud , Eli Zaretskii , larsi@gnus.org, emacs-devel@gnu.org Received-SPF: pass client-ip=64.147.123.21; envelope-from=fgunbin@fastmail.fm; helo=wout5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:290240 Archived-At: On 25/05/2022 10:17 +0200, Manuel Giraud wrote: > Filipp Gunbin writes: > >> With just a single newline in file, (count-sentences (point-min) >> (point-max)) loops indefinitely. > > Hi Filipp, > > I'm not able to reproduce. For me=E2=84=A2, it returns 0. I've tried with= both > DOS and Unix line terminator. > >> I guess there're two options for safe movement: >> >> - Either rely on what movement function returns - in this case >> forward-sentence doesn't specify return value, so no luck >> >> - Or track the point yourself, and check whether you've moved. I think >> you should do this here. > > Maybe you're right, I can then avoid modifying 'forward-sentence'. Ah, sorry, I tried just the count-sentences, without modification of forward-sentence. Filipp