From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.help Subject: Re: (match-end 0) returns 1 instead of the actual position Date: Fri, 23 Dec 2022 16:51:37 -0800 Message-ID: <2C24A6D7-3DBC-4576-A6E9-799974830AB9@gmail.com> References: <87k02jauog.fsf@dataswamp.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) 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="11669"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Emanuel Berg Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 24 01:52:08 2022 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 1p8slk-0002sf-If for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 24 Dec 2022 01:52:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8slP-0004wD-UT; Fri, 23 Dec 2022 19:51:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8slK-0004vv-8e for help-gnu-emacs@gnu.org; Fri, 23 Dec 2022 19:51:42 -0500 Original-Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p8slI-0004q5-CB for help-gnu-emacs@gnu.org; Fri, 23 Dec 2022 19:51:41 -0500 Original-Received: by mail-pg1-x536.google.com with SMTP id s196so4205576pgs.3 for ; Fri, 23 Dec 2022 16:51:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gjNWd2G1AhU9Qaa7PkCujzGhMppSoq1klWaOwadnbVY=; b=qQI1YtF9aIx3o2m3h/DEhj1l0+llOBHDEsSjHdEH+mEW6DRbJpBFQuR/hczeV+Rgt5 otX+UBxlfbmQEtatYILMKERKqgAc3KawXLnVCDXMafT0XiXvVaEvkNv74TT3S7jQaQub L1HSyNrhevFLENsicQ5AWhwfWesrpjWDzZQl4gw0GHGRP/PmEPy2vzn2SI83aUO93ZcY iGRGOunB0yhhJaf+56NI29N3xSnW7AyOWamsqFQqS5SQajAZFKYv9Hq/vLhFQkyzUwcy acFzdvQephjqxUm5iaAQFg23eh4BGMAx9URY2ztF8eNnWUkRuvxdNzldqbIMwiKxe8BM mmzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gjNWd2G1AhU9Qaa7PkCujzGhMppSoq1klWaOwadnbVY=; b=Qnnte+Xe4Im05RS0vizeph8RVv/rZgnM4j0l6i0965xCiaSdqGUGQPrEnc+0hUQHob jmAEJNdc6is3Kecz9o8VVCq/HyDokLkES8NGqmzirKfGUYJv1tvuNiUBT/8qQMTgI3bn d99g+vI+MS0VRcyzd+fj7crFChwj1jogZOJ7pAFgsWTkdFZqnFaNmuDe0D5DtkNkqtJf yhmLrIzu+u2RuQ9oPH3wVVlHVecTDsEeX1BuzX9iTIYnxeVNv1PuGSc180BvSaqzDYOe hebsbDnxwm7NV2ikhpO5+iXvOmdo6Xvvcp1K3Nym3nY1I/1hVVCoLsRyo6ubdU3G32CN m3GQ== X-Gm-Message-State: AFqh2krCLOS0hKCath6rD6WubElMo/EB/RDAeqocOReoFrWPK1mseJGR XqEiS2YfjXHZVS4yDpni2+W95BySvV8= X-Google-Smtp-Source: AMrXdXtjUySYT4pe5+YhNX2XT0GI+furzlRuu9uFOM9waNRNfw0HDStEoRym2iDCYuO9ViGBiF61OQ== X-Received: by 2002:a05:6a00:1c92:b0:576:f322:419f with SMTP id y18-20020a056a001c9200b00576f322419fmr11458821pfw.28.1671843098902; Fri, 23 Dec 2022 16:51:38 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id c72-20020a621c4b000000b0056262811c5fsm3075367pfc.59.2022.12.23.16.51.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Dec 2022 16:51:38 -0800 (PST) In-Reply-To: <87k02jauog.fsf@dataswamp.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=casouri@gmail.com; helo=mail-pg1-x536.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:141919 Archived-At: > On Dec 22, 2022, at 3:24 PM, Emanuel Berg wrote: >=20 > Yuan Fu wrote: >=20 >> This doesn=E2=80=99t happen with vanilla Emacs, but I couldn=E2=80=99t = tell >> which part of my config is causing it. Basically if I run >>=20 >> (looking-at "xxx") >> (match-end 0) >>=20 >> It returns 1 instead of the end of xxx after point. >>=20 >> Is there any user option that would affect this that I=E2=80=99m not = aware of? >>=20 >> I tried bisecting but the issue doesn=E2=80=99t always reproduce. >> (It reproduce reliably when I enable all configuration, but >> not when I comment out parts of the config ...) >=20 > ... we'll consider this a "slip", eh :) >=20 > Do the binary search algorithm of your code, Google that if > you don't know what it refers to in this contex, when you > understand it you'll see that you can pinpoint the bug or > misconfiguration very easily and quickly. >=20 > You can then tell us what it was, also! As Stefan pointed it out, it was my slip in how I ran the test. I did = try bisecting but that didn=E2=80=99t turn up anything because I ran the = code in the wrong way. Yuan=