From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud Newsgroups: gmane.emacs.devel Subject: Re: Counting sentences in `count-words' Date: Wed, 25 May 2022 10:17:26 +0200 Message-ID: <87o7zm58mh.fsf@elite.giraud> 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> 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="17233"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (berkeley-unix) Cc: larsi@gnus.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 25 10:23:11 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 1ntmIR-0004G3-2l for ged-emacs-devel@m.gmane-mx.org; Wed, 25 May 2022 10:23:11 +0200 Original-Received: from localhost ([::1]:38456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntmIP-0000b2-Mr for ged-emacs-devel@m.gmane-mx.org; Wed, 25 May 2022 04:23:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntmD0-0004OM-Tw for emacs-devel@gnu.org; Wed, 25 May 2022 04:17:35 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]:2276) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntmCx-0004BB-1W; Wed, 25 May 2022 04:17:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=coby/BKdTnSAdN0B mCDUMFs50l8J8Jdhzc8Nvn5xoaU=; h=in-reply-to:date:references:subject: cc:to:from; d=ledu-giraud.fr; b=BJd7Ex8B63kc3fxPlesoML4+FAm/NtRffbxS3J QtJK7U3DJWg1X67dbjVXI6Az5nYdqXjXbVxjB7svNg+NGVlXqi8uBCDY7uZ4zmcAq/ZJzU +0gzqMhoscX/ReyJrbk9FP5eShNJo4sPi+hvVsLUWgY4IcoxBvvVDAqO4r+eEgxM1BP4+8 8H/yLzQNyfgyih6hFI/6DZkGLgU43d95h6xuQsvkP5LPbhPzbiG8pi6WilnX0gEeBM+1h1 QXEyZ/6tV7sBUKZwcioG6QiVV7SFBcwRu8QE0KRA9DIC0owg2HmeS/fhLqkeLQElIW2MlN Bt5TyGdrwS7kqIEIxRbUoQQw== Original-Received: from elite.giraud ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id e78ca4a5 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 25 May 2022 10:17:26 +0200 (CEST) In-Reply-To: (Filipp Gunbin's message of "Tue, 24 May 2022 18:57:58 +0300") Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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:290238 Archived-At: 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 b= oth 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'. --=20 Manuel Giraud