From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Determining existence of text following point Date: Tue, 18 May 2021 14:15:27 +0200 Message-ID: References: <87cztpx8oz.fsf@ericabrahamsen.net> <87zgwsx5r3.fsf@ericabrahamsen.net> <20210518110743.GC11623@tuxteam.de> <20210518120238.GD11623@tuxteam.de> 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="21197"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 18 14:24:42 2021 Return-path: Envelope-to: geh-help-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 1liymA-0005LJ-6T for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 14:24:42 +0200 Original-Received: from localhost ([::1]:59942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liym8-0000W8-Vo for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 08:24:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liydP-0002T5-VS for help-gnu-emacs@gnu.org; Tue, 18 May 2021 08:15:42 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:54627) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liydK-00070N-9P for help-gnu-emacs@gnu.org; Tue, 18 May 2021 08:15:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621340127; bh=qtMNqES/jfsZpnzRyk7FH1oeOBOcijhaOKlV+Lu9tpc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=bQvpPmCFrnpIDsBBX6N0sc6rECcMZRzJQuiw2maEUkoHnqv9yp6o3dE+rQfAC6dWY uOLg5gkEr4D04vJ60k7eMGmJPn0o7wvNlHNHDcThKZa7JdHSo3/ZPm0pfS6Q1owbJ6 IrYaheCK92cyKLkD1B8v3RQItd+RVQr/jc7nIf2E= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs13.server.lan [172.19.170.181]) (via HTTP); Tue, 18 May 2021 14:15:27 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <20210518120238.GD11623@tuxteam.de> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:emMsZA0iSJAAEqJeIjcX4DYM03amKt8G4FzQj1szOTueN+zWOxSJLNXw9997MC8PZzzST BLCRyHVmCRv28xiXSIwGHVDhmEJ2u1o9iVSAwSUpS43L/kdfX29ps2QiVkR/nqHFL1Erwq6RSvRu EkhEQVd45Kh4hBn8bBp1Mo2wuildRjSWmtYiJwUwzWWiA/2llFWhF2KwrOIGQMljKea8EkeVWBwG daPYIr+uGp1uVyECqwx3sAf17/saF6xI1H7pvRNBmApGizRXSBpYvS52luO2+kjr/6yaqzRuOCch uU= X-UI-Out-Filterresults: notjunk:1;V03:K0:zpLHv7jW5wk=:ZEwxr5Ecorpw2y0E2cW8tN h8st8UIr8tZ+flkj9DYxGnUKGLLy4Af18Dz3hyUD97W5vmR2pDyZK0xvP4SSZgUcTme+2dAk+ Lo6SMShsz8VXb2vKE9Y4skeVE3qP+n6n6Ga5MkFkiP66Zq9i51k+7C1gkXCsILUjuASpWPd4b dAxkOybbMsSZHpd7Gh77w3fovQKMHs9zar+62rLexFoO1cedIXxNeBsobVSvq7d97e10Fb+jx ZbUjtQaW3e6P4Qk3TFVKIPcTIEaT0nFqxlCwLpyue+muQS1Nfxq0Jms7PvR6YNGaRoiXEqpsP BB9V4HIWTIQCKXvXelUAMmswtUXcDtyms3KtvQJwKUpYI/hFMQ8LecOJFYNnI2Egoat/5VN0h fOTUWmddFHQRzHhV4P2MBGdNbBk501r3FbHyls4GDNpEG3j5gjrmW9pf7xfx8ylx11L7oPo5F X/8e5Eja1/SqywANqWk58v5xlE9Vaf3AFZfkSMV4wZqSQPzNwP1lhSEBjEBlCpw5/odHkA779 YYq59GClluuuj65u2fFKsha4izujMWnLn/QuudOd4XBCcauQ/qG2JuSn3a9JkoNFc950LREtI fdiLGmyP6neAd2lLnb+dyRaCN2/lr1qMC2/BR7g5HBQRYIIX5inJx3nLx+jP8n7Z9Q8wLeMZ4 tEzZ1pk9y4EdsW/lf0QkuMb3MF/zoATsl/RByin7REJ/XNwLeeL0VtD/isdaUQehPHUXPv17/ /rSZQVSCOJ/8tVFJ1XWeFHYP/rAym4WDI82bed+mqmUrUYFTozINoDZTn+v6CJnnC5NRjUIs Received-SPF: pass client-ip=212.227.17.22; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:129873 Archived-At: > Sent: Wednesday, May 19, 2021 at 12:02 AM > From: tomas@tuxteam.de > To: "Christopher Dimech" > Cc: help-gnu-emacs@gnu.org > Subject: Re: Determining existence of text following point > > On Tue, May 18, 2021 at 01:26:12PM +0200, Christopher Dimech wrote: > > [...] > > > > On Tue, May 18, 2021 at 12:08:42PM +0200, Christopher Dimech wrote: > > > > How is it that the following returns nil? > > > > > > > > (setq sa (string-match "[^[:blank:]]" " ")) > > > > > > Because you stated to match any non-blank character and there > > > are only blank characters to match. > > > > The docstring for string-match is > > > > "Return index of start of first match for REGEXP in STRING, or nil." > > > > I find the description different from what string-match actually retur= ns. > > ? string-match looks as though it returns the index of the last match becaus= e (setq sa (string-match "[^[:blank:]]" " A neutrino is a fermion")) (setq sb (not (string-match "[^[:blank:]]" " A neutrino is a fermion"))) gives sa: 2 sb: nil > Cheers > - t >