unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: help-gnu-emacs@gnu.org
Subject: Re: (match-end 0) returns 1 instead of the actual position
Date: Fri, 23 Dec 2022 16:50:00 -0800	[thread overview]
Message-ID: <ABB34553-1268-444A-B526-E68FA07D7E60@gmail.com> (raw)
In-Reply-To: <jwvili3j8bj.fsf-monnier+emacs@gnu.org>



> On Dec 22, 2022, at 4:04 PM, Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> 
>> This doesn’t happen with vanilla Emacs, but I couldn’t tell which part of my
>> config is causing it. Basically if I run
>> 
>> (looking-at "xxx")
>> (match-end 0)
> 
> Define "run".
> 
> 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).
> 
>> It returns 1 instead of the end of xxx after point.
> 
> 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’s exactly it, I used M-; twice. That’s why I can’t bisect out anything meaningful. Thanks!

Yuan


      reply	other threads:[~2022-12-24  0:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22 23:18 (match-end 0) returns 1 instead of the actual position Yuan Fu
2022-12-22 23:24 ` Emanuel Berg
2022-12-24  0:51   ` Yuan Fu
2022-12-23  0:04 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-24  0:50   ` Yuan Fu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ABB34553-1268-444A-B526-E68FA07D7E60@gmail.com \
    --to=casouri@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).