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:43:28 +0200 Message-ID: References: <87zgwsx5r3.fsf@ericabrahamsen.net> <20210518110743.GC11623@tuxteam.de> <20210518120238.GD11623@tuxteam.de> <20210518122740.GE11623@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="10542"; 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:46:06 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 1liz6s-0002ZN-5G for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 14:46:06 +0200 Original-Received: from localhost ([::1]:33740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liz6q-0004hr-Nj for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 08:46:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liz4b-0004ev-BQ for help-gnu-emacs@gnu.org; Tue, 18 May 2021 08:43:45 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:37771) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liz4V-0005ds-1o for help-gnu-emacs@gnu.org; Tue, 18 May 2021 08:43:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621341809; bh=DaRbGlkgr3LplVYZulO4c+rNOl/2JoaWr/yYcW28D3o=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=KJZzpAbtkwhbqZ0W3Ec1pA4+lQqLm0L2hXdZjNghtWR9NJ4p0CJkSDYLXt6QwFSQS kf6ogppSQRsxlKmUEAm6O1h/IuTkdNrfa2/88xiOhaITV4w8NaA0imtbO9bHhKFKFJ F36BfP53OTNzCmXKYwz6dHCdaGKZ4x0e4HGEhXkg= 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:43:28 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <20210518122740.GE11623@tuxteam.de> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:JxzkAfAO8hPiTDShDo/4CbkVuG/sLZKG7Gb+yubqwYX0k1xgZC1PYLxVp0eVEkXQltPDT pxHqTqrd12rSOHjqxT3Oer6D+eYckb3KHNjcN/f39oHTWQTxn8hVgnfL9jx46kLE4bNR0t+8sh2+ ZzfWJV4M6X+5g8j/nsvBCS73fIkwvmKaI0EUWwORgJ/+9j5theid6nBHCgR6XvPGd6XSel2m7UJG syQxNr9ZvkPeMDdXHdR2d5mKZa3qkxhgL0z1gK0NKrfWkPDPJ/ktuiSvZQjpKSYBIO5DNO4eWl7F 1Y= X-UI-Out-Filterresults: notjunk:1;V03:K0:plzYOTTUQA8=:w+Y61KbfJ75lFcawLmC1pD srD4Dl8p586NHwVuMV+FE/phhVqcHUIjCvNhvNnnxxCvrczWh0eyTlK+61NtoA6qmqq2hQs8c H93TE3jww5ta9Yf1xdCbnCMpFafgyoPwkIPiBy1uwucw0q/uj1tw+HVr+wr5hMJBgKM6anNrO rwos+F8siu90P0CzAKQT50wkI2ORt5iIejTT25jsn+IaCiHHECoBTo9AjA2jxJYfR/Ey8mQNV OB9+SdjDlfHom1bdDsE5FdgMKCx5clTpL1B+tgqSnqI2mJgZvVxtZUJl33zFnOpZWQBjPchIa vhY3KlpWjQpbdMydNrrT2N/Bp+fuE/qqViYZ0mt42Mc/cYZ8J9FgHJ9MqXJsWFrZUWix2QXX7 mHZpMHV2Cp35Z3SOw6vjPTahAH8dDsRXNkDzk4+dI7Tm9CV4XYqC7pcWafkY8MyvNy6EDL1AK dOYOJ/I1azXMSMQaz1wkSjei5fHyV91ta0RH23yQahooI/C1Kad30WarNEqxI4e5+iIvGBSto i2P5QWQHhk0CHCf+tkM8VrxBIsji+WbpKV0EJ982wFGIy+mSAChpMzQDZkT7maH2xh7nU+nMC 3d3VTBMh4yX5kl9N6Pdj9wGjvCPhI7MbBJk8NFgxFtuK/1RLJgBFBe8Bn0U8eFqGhNOA71eOq MHUb4lcJe9yhIDBu6ZjAbp/lWUDlSnk0CnOalRIFavwRkarwsNXHa2uYqZWRNHQREotLUwGIV AKWcmekoGONNLds7UR5klFs1bUTEkWW88P0o73Nod5evigS9pi6gAUNWYjrMQH7eOM4KYOyS 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:129879 Archived-At: > Sent: Wednesday, May 19, 2021 at 12:27 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 02:15:27PM +0200, Christopher Dimech wrote: > > [...] > > > string-match looks as though it returns the index of the last match be= cause > > > > (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 > > Sorry. I still don't understand. > > - You send string-match to find a non-blank character > It does find one. If you don't specify more, that > will be the first one, i.e. the "A". > > - Thus the value is 2. This is your first result. > > - You negate that in your second setup (not ...). By > convention, in Lisp, 'nil' is the false value, everything > else is considered 'true'. Thus, (not (...)) evaluates > to (not 2) evaluates to nil. This is your second result. > > Now what /is/ your problem? Your posts are sometimes... inscrutable > (to me, at least). There is no problem, had misinterpreted "^" to mean beginning of line. Thusly, everything seemed to be the other way round. > Cheers > - t >