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:50:00 -0800 Message-ID: References: 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="4503"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 24 01:50:40 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 1p8skK-0000zL-K7 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 24 Dec 2022 01:50:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8sjo-0004Xd-4Q; Fri, 23 Dec 2022 19:50:08 -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 1p8sjl-0004XG-VP for help-gnu-emacs@gnu.org; Fri, 23 Dec 2022 19:50:06 -0500 Original-Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p8sjk-0004MB-Bb for help-gnu-emacs@gnu.org; Fri, 23 Dec 2022 19:50:05 -0500 Original-Received: by mail-pl1-x62e.google.com with SMTP id 4so6275197plj.3 for ; Fri, 23 Dec 2022 16:50:03 -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=5DOoAZjf793cJ4aszsO1g0aE/Bsf7b+ClfUAo5G47Fk=; b=byMYxJUDplr2qERWoVkIeYnFfy4/9Y5fU/6RyqcwqH7VTf5a9jGRf+pIsFWi9zD7XU uwRdegNcnVIN+5XHEIt/hUoJGTPQKj2Kgl080NPj3/zVPIeqEb/1Pctb3qZJ5m15AFZB k7O3sDkyw9pIR62f7llmp5lX6BNr4eGMxQPjx94nQTqUBDuthTdhzifs0h+711AMQ6BC wLX6xh9kro5KrFXDQkp+gMR57ShN7VrXs0qKOUPY5kI/ljEk+2YyI2rsnBou8hNYqN9Q wSM37xd3yWdnFxNWqu2/SqnhNSagsEJqBFGcY9tvVAUZte3BLqJq+Bh0spvpH1ylUvxQ wg3w== 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=5DOoAZjf793cJ4aszsO1g0aE/Bsf7b+ClfUAo5G47Fk=; b=nhmZv2kmAAu91n8d+N/e71M3XqXPipdecbJt16JkQh7vrY7qiVkePXGBW2oR8QBuRl BIjDiu0OaQQ7oxtYW1+0fL7s2zV/5SLqc85C1yaGSK5iYb3EZ7SUw4VB40JeuOqlRZoe pUUSm6spEwC22j/vjsHtUjPMXBAjaOyAirfHk4BA+eduGHjJwMRbPGtehgxoQ7NVlmJe BbaI35qXZpAXWIC62qVaNP27kInZrWHfIZqN+puokPeDVknppFdH2cFZ8AT8v+JGhdLi 5fG7A/Lio21/hcsU9bXEQxIr5QdsBDBK07OHzW06lXZ9AfxagJIXe+XEH5s8nQbsnlsH y83Q== X-Gm-Message-State: AFqh2krHpI+Vdfvimsr4a4pqWXixCSAWg7NK7h1E9vrlwtzQfEnJvt21 eqYdO3MRS9AR4CwV6/g9zzo= X-Google-Smtp-Source: AMrXdXvrlV+XXwmIxA8z0TAJlbsoz1aX32UiQshPcW/9VnQqcJkqdzw1FWoH870Vd2WoEGoUfKdcrg== X-Received: by 2002:a17:90a:1955:b0:21b:c9b3:e94b with SMTP id 21-20020a17090a195500b0021bc9b3e94bmr13286566pjh.16.1671843002626; Fri, 23 Dec 2022 16:50:02 -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 a7-20020a17090a70c700b00219feae9486sm5208476pjm.7.2022.12.23.16.50.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Dec 2022 16:50:02 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=casouri@gmail.com; helo=mail-pl1-x62e.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:141918 Archived-At: > On Dec 22, 2022, at 4:04 PM, Stefan Monnier via Users list for the GNU = Emacs text editor 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 > Define "run". >=20 > These are 2 expressions and the result will depend on how you combine > them (more specifically it depends on what code might be run = in-between). >=20 >> It returns 1 instead of the end of xxx after point. >=20 > Any chance you used `C-x C-e` or `M-C-x` twice, meaning that a whole = lot > of things like timers, `post-command-hook`s and whatnot can/will run > between the two? Ah that=E2=80=99s exactly it, I used M-; twice. That=E2=80=99s why I = can=E2=80=99t bisect out anything meaningful. Thanks! Yuan=