From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70594: 30.0.50; Error when tabbing with only one active widget Date: Sat, 25 May 2024 10:42:33 +0300 Message-ID: <867cfi1gnq.fsf@gnu.org> References: <87r0esl2f5.fsf@gmx.net> <86y190xj4a.fsf@gnu.org> <86y18j78ke.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34448"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70594@debbugs.gnu.org To: stephen.berman@gmx.net, maurooaranda@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 25 09:43:03 2024 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 1sAm3T-0008lV-HG for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 May 2024 09:43:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAm3M-0003BM-9X; Sat, 25 May 2024 03:42:56 -0400 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 1sAm3K-0003B3-SK for bug-gnu-emacs@gnu.org; Sat, 25 May 2024 03:42:54 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAm3K-0006TG-Jb for bug-gnu-emacs@gnu.org; Sat, 25 May 2024 03:42:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sAm3R-0006sd-UV for bug-gnu-emacs@gnu.org; Sat, 25 May 2024 03:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 May 2024 07:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70594 X-GNU-PR-Package: emacs Original-Received: via spool by 70594-submit@debbugs.gnu.org id=B70594.171662297126439 (code B ref 70594); Sat, 25 May 2024 07:43:01 +0000 Original-Received: (at 70594) by debbugs.gnu.org; 25 May 2024 07:42:51 +0000 Original-Received: from localhost ([127.0.0.1]:41831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAm3G-0006sN-Mu for submit@debbugs.gnu.org; Sat, 25 May 2024 03:42:51 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAm3F-0006sH-8K for 70594@debbugs.gnu.org; Sat, 25 May 2024 03:42:49 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAm32-0006Pt-GP; Sat, 25 May 2024 03:42:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=4yM8PAeaqELr/R1Xko3+7j6+yHgci/Eets81mZQPbuY=; b=NEmxqgs/XVyo vlXjdUey84d/Evms6BezUzEEYKQi9aV7rNY5bz8QMFO7NuPDLkwDAigWNp1ceKIyqBVMiCesPu5cZ PVRcidsyzUJfa8Uxj47zOGNDosPWqD4e9huxAu75t/lB8Ps6/puXVu59tnS5rtljrBOo3FQIKO1ju 5wtDldyCDPfwy7aDZlLwDiXFygLnQThGwz7az4uSE/REQaw8+XttjsZy+jf0B0VCEuciDh0VSAtGY v9Pb9mxkPc+2YHcUyXGXDQ4qQ++1WT4KT/WT0OEmJOaDsm3tyFuJxsgQLxrYckJD11PlAlCZoySdA LqjQ8bCRz8X/7FemFawURQ==; In-Reply-To: <86y18j78ke.fsf@gnu.org> (message from Eli Zaretskii on Thu, 09 May 2024 10:23:13 +0300) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285827 Archived-At: Ping! Ping! Can we please make some progress here? > Cc: 70594@debbugs.gnu.org > Date: Thu, 09 May 2024 10:23:13 +0300 > From: Eli Zaretskii > > Ping! > > > Cc: 70594@debbugs.gnu.org > > Date: Fri, 26 Apr 2024 18:02:13 +0300 > > From: Eli Zaretskii > > > > > Date: Fri, 26 Apr 2024 14:43:42 +0200 > > > From: Stephen Berman via "Bug reports for GNU Emacs, > > > the Swiss army knife of text editors" > > > > > > Commit 91333dacfa1, which adds the feature of optionally skipping over > > > inactive widgets when tabbing (bug#70413), fails to handle buffers that > > > contain only one active widget; in that case, pressing TAB or S-TAB > > > raises the error "No buttons or fields found". To reproduce: > > > > > > 0. emacs -Q > > > 1. Load the attached file widget-test.el and then type `M-x > > > my-widget-test'. > > > 2. In the buffer "*My Widget Test*" repeatedly press TAB and S-TAB and > > > observe that point moves successively between the active radio > > > buttons labelled "One" and "Two" and the active push button "Submit", > > > but skips the inactive push button "Reset", since the user option > > > widget-skip-inactive is enabled. > > > 3. Now press (via RET or mouse-click) the "Submit" button, which makes > > > the radio buttons and the "Submit" button inactive and the "Reset" > > > button active. > > > 4. Pressing TAB once moves point to the "Reset" button, then pressing > > > TAB again moves point to BOB and raises the error "No buttons or > > > fields found". Likewise, pressing S-TAB once moves point to "Reset", > > > then pressing S-TAB again moves to EOB and raises the same error. > > > > > > The attached patched fixes this bug. In addition, when only one widget > > > is active and point is on it, since pressing TAB or S-TAB does not move > > > point, the informational message "Only one tabable widget" is displayed. > > > > > > The original code in widget-move contained separate loops to handle > > > forward and backward movement and this involved some code duplication. > > > The changes to this code to fix the bug would have required further > > > duplication, so I took the opportunity to parameterize the > > > directionality, allowing handling both directions in a single loop. > > > This shortens the code and IMO makes the similarities and differences in > > > the handling easier to see. > > > > Adding Mauro to the discussion. > > > > > > > > > > > >