From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#45623: 28.0.50; widget-backward sometimes skips one widget Date: Sun, 03 Jan 2021 11:16:01 -0300 Message-ID: <5ff1d1a3.1c69fb81.41cd3.92bc@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19658"; mail-complaints-to="usenet@ciao.gmane.io" To: 45623@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 03 15:17:16 2021 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 1kw4C4-000521-HG for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Jan 2021 15:17:16 +0100 Original-Received: from localhost ([::1]:51560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kw4C3-0005Hq-JY for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Jan 2021 09:17:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kw4Bq-000585-EI for bug-gnu-emacs@gnu.org; Sun, 03 Jan 2021 09:17:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53916) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kw4Bq-0000va-6o for bug-gnu-emacs@gnu.org; Sun, 03 Jan 2021 09:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kw4Bq-0002Vk-2z for bug-gnu-emacs@gnu.org; Sun, 03 Jan 2021 09:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Jan 2021 14:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45623 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16096833709585 (code B ref -1); Sun, 03 Jan 2021 14:17:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Jan 2021 14:16:10 +0000 Original-Received: from localhost ([127.0.0.1]:37229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kw4Az-0002UW-IS for submit@debbugs.gnu.org; Sun, 03 Jan 2021 09:16:09 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:45182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kw4Ay-0002UQ-MT for submit@debbugs.gnu.org; Sun, 03 Jan 2021 09:16:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kw4Ay-0004zL-Hs for bug-gnu-emacs@gnu.org; Sun, 03 Jan 2021 09:16:08 -0500 Original-Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]:44053) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kw4Aw-0000fZ-Jn for bug-gnu-emacs@gnu.org; Sun, 03 Jan 2021 09:16:08 -0500 Original-Received: by mail-qt1-x832.google.com with SMTP id u21so16774310qtw.11 for ; Sun, 03 Jan 2021 06:16:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:from:to:subject:date:mime-version; bh=aw579XVeqct5lpOershT9OkT2jB9ApJXRVDfRxuYPNg=; b=JsHhKAYSYC7tn1og90wZOhNQLdH1P2ncgmgzoaS8E6jcOWUzl7QGhel0NbsRn7qvOU tKwfGWlexnVkjdhNyLtHv1RKuBRqE9lHIXoKnpyRX0vRKupRe9o6dmZwX3VGy03SId2k frvve+RvoheeOL0IpkSa7jcFAivLVLefGk/WZIfXWJxMnaVAlWphvxnC+WRVaP6uq6z/ wjcJk+IG+qAcfo3CaCkSOa+u0OjmWZGpkQTh6+vSMPHEd0OA7LGPpGzsQbo6GvZ3FGuX uCm1nV5di9cIQklhoG6xCB30UHNKmkDBYc5mkFF8gXNuNCBeJxBj4HSv6TlEsFnt7BiC LwkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:from:to:subject:date:mime-version; bh=aw579XVeqct5lpOershT9OkT2jB9ApJXRVDfRxuYPNg=; b=iqmeBYGTcshtSWIqJwsrw3OrGRNUzp+AejLR37tauochcHZMm04suTjg6dpUkwIeFS nUMJRQKNhqouHQ8C4tO7W8ztU1DC5Rq5vwLtmU7OsQaOTG39NkT1FkYwrCP4ojeDZFtl ECY93yhUGYup6mX1bJQA6otYCAUMJh09iv51IkhTPRD3aDQIwa3rJhZsZDjZSRcyD3aI TIdzqGqM5p7W7WscJU80//f+JbVfgf9vCSHF+q+fQyDQNueKiMv2FAmrJN+Ry2Yl+6yE rBdvQo4d35U6lEUkLn5nq14HgIaKH8GGPo5ZiOZhQLKST6RfkRQfeU9lojmJgMf4aHLS eXFw== X-Gm-Message-State: AOAM532RlcEGe0exbt85QCw3XPIVwRVQKfbfayuULyjKT5hLmFKsdk96 Txq9H2NYQkv862Qp3NExHL4TiLFgJzE= X-Google-Smtp-Source: ABdhPJx/7scOtO9kTmISeJjqn8ItljWfkKAANolGo6NKKXEJvRmgr9fohq3Ps/6g6VX8vNNPHCwDkA== X-Received: by 2002:aed:2ac1:: with SMTP id t59mr67476015qtd.165.1609683364406; Sun, 03 Jan 2021 06:16:04 -0800 (PST) Original-Received: from tbb-desktop ([201.213.132.172]) by smtp.gmail.com with ESMTPSA id a203sm29347486qkb.31.2021.01.03.06.16.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Jan 2021 06:16:03 -0800 (PST) X-Google-Original-Message-ID: <87ble6ayxq.fsf@maurooaranda@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::832; envelope-from=maurooaranda@gmail.com; helo=mail-qt1-x832.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: 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:197245 Archived-At: Starting from emacs -Q: 1. Eval the following code: (require 'wid-edit) (defun test-widget-backward () (interactive) (switch-to-buffer "*Widget Test*") (kill-all-local-variables) (let ((inhibit-read-only t)) (erase-buffer)) (remove-overlays) (widget-insert "Testing widget movement commands.\n\n") (dolist (el '("First" "Second" "Third")) (widget-create 'push-button el)) (widget-insert "\n") (goto-char (point-min)) (use-local-map widget-keymap) (widget-setup)) 2. C-u 3 C-i to move to the start of the button labeled Third: 3. C-M-i to run the widget-backward command. Point moves to the start of the button labeled First, not to the start of the button labeled Second. I expected point to move to the start of the button labeled Second. If instead I use buttons from button.el, moving point with backward-button (the analogous to widget-backward) behaves as I expected. The very first line of widget-move is: (or (bobp) (> arg 0) (backward-char)) That backward-char moves point from the third button to the second button before starting to look for the previous widget, so that's the reason point ends up at the start of the first button. I don't understand why that call to backward-char is there. Does anyone know of a situation where it is useful? In GNU Emacs 28.0.50 (build 8, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10) of 2021-01-03 built on tbb-desktop Repository revision: 825b4ec338e82869dc656c7041ab2483b6c22479 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Ubuntu 18.04.5 LTS Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS PDUMPER Important settings: value of $LC_MONETARY: es_AR.UTF-8 value of $LC_NUMERIC: es_AR.UTF-8 value of $LC_TIME: es_AR.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml easymenu mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils wid-edit cl-loaddefs cl-lib iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 54440 9138) (symbols 48 7084 1) (strings 32 19227 1450) (string-bytes 1 632153) (vectors 16 12046) (vector-slots 8 168478 8434) (floats 8 23 47) (intervals 56 240 0) (buffers 984 12))