From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#51171: 27.2; `forward-word' w/arg bug in narrowed buffer Date: Mon, 12 Sep 2022 14:02:03 +0200 Message-ID: <87k0687qdg.fsf@gnus.org> References: <31D3ED6E-A1EB-4214-901F-FB62BF2A6922@shaw.ca> <83v920kljp.fsf@gnu.org> 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="17647"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51171@debbugs.gnu.org, Stefan Monnier , Ian Nehera To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 12 14:03:20 2022 Return-path: Envelope-to: geb-bug-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 1oXi9o-0004Ko-Io for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Sep 2022 14:03:20 +0200 Original-Received: from localhost ([::1]:43382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXi9n-0007s1-ED for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Sep 2022 08:03:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXi9W-0007on-9p for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2022 08:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oXi9V-00087e-Vj for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2022 08:03:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oXi9V-0006K8-RV for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2022 08:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Sep 2022 12:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51171 X-GNU-PR-Package: emacs Original-Received: via spool by 51171-submit@debbugs.gnu.org id=B51171.166298414124262 (code B ref 51171); Mon, 12 Sep 2022 12:03:01 +0000 Original-Received: (at 51171) by debbugs.gnu.org; 12 Sep 2022 12:02:21 +0000 Original-Received: from localhost ([127.0.0.1]:44454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXi8q-0006JF-RQ for submit@debbugs.gnu.org; Mon, 12 Sep 2022 08:02:21 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:51972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXi8p-0006J0-1a for 51171@debbugs.gnu.org; Mon, 12 Sep 2022 08:02:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=i5oXKlyWSBuZy52amOXh4jKHXOn4wsL/kPzaCRYy7Sw=; b=SUhhuZU2ZUBM0zUO/YgGGaLJxs hVxH3zzXuknHxsCDbZz7LBE/8rNOLWlTRaTYR9QLP890Tntt+AogFbsY2wOusqznQP0GJiTNNodtG vfvGPl80Mkbkn/QMagiOl1rEfauQZgov51Fk00jhu0Slbrs1rksjiZZyNTUSunmsmjS0=; Original-Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXi8e-0005re-05; Mon, 12 Sep 2022 14:02:10 +0200 In-Reply-To: <83v920kljp.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 14 Oct 2021 12:22:50 +0300") X-Now-Playing: Moor Mother's _Jazz Codes_: "Dust Together (feat Wolf Weston & Aquiles Navarro)" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:242252 Archived-At: Eli Zaretskii writes: >> To reproduce from 'emacs -Q /path/to/dcl.c=E2=80=99 (file attached): >> 1. M-x `subword-mode' (side question: should C-c C-w still use the >> obsolete alias `c-subword-mode'?). >> 2. Navigate to the function 'int dirdcl(void)' and use >> `narrow-to-defun' (C-x n d). >> 3. From the top of the buffer, use `forward-word' with an arg greater >> than 1 (like C-u 2 M-f). >> 4. Repeat this with C-x z z z z... until you get an error around the >> start of the while loop (2nd to last message in list below). >> 5. Moving point forward then trying the same command again will yield >> the last message with a number greater than `point-max' (5741). >>=20 >> Other notes: >> - The bug dissapears with a widened buffer or when narrowing to >> earlier functions. >> - `backward-word=E2=80=99 doesn=E2=80=99t seem to have the same pr= oblem. >> - I'm reporting this from OSX 10.14.6 (homebrew), but it also occu= rs on >> Arch Linux (emacs being installed from the standard pacman repos= ). > > Stefan, any suggestions wrt this? The backtrace is: Debugger entered--Lisp error: (error "Error in syntax_table logic for to-th= e-end interva...") forward-word(2) funcall-interactively(forward-word 2) call-interactively(forward-word nil nil) Slightly easier recipe: Open that file, `M-x subword-mode', and then navigate to while (gettoken() =3D=3D PARENS || TokenType =3D=3D BRACKETS) { `C-x n d', put point after BRACKETS and then say `M-2 M-f'. Then you get that error message. Just `M-f' works fine. I tried to narrow this down to a simpler file, but I was unable to -- it seems like the error depends on lots of state in that specific file.