From unknown Sat Jun 21 10:22:58 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#71415 <71415@debbugs.gnu.org> To: bug#71415 <71415@debbugs.gnu.org> Subject: Status: 30.0.50; vtable-current-object off by one Reply-To: bug#71415 <71415@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:22:58 +0000 retitle 71415 30.0.50; vtable-current-object off by one reassign 71415 emacs submitter 71415 john muhl severity 71415 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 07 10:15:34 2024 Received: (at submit) by debbugs.gnu.org; 7 Jun 2024 14:15:34 +0000 Received: from localhost ([127.0.0.1]:33470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFaNR-0000rQ-QX for submit@debbugs.gnu.org; Fri, 07 Jun 2024 10:15:34 -0400 Received: from lists.gnu.org ([209.51.188.17]:56072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFaNP-0000rG-F1 for submit@debbugs.gnu.org; Fri, 07 Jun 2024 10:15:32 -0400 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 1sFaN9-0003Su-QX for bug-gnu-emacs@gnu.org; Fri, 07 Jun 2024 10:15:15 -0400 Received: from fout6-smtp.messagingengine.com ([103.168.172.149]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFaN7-0006sZ-DT for bug-gnu-emacs@gnu.org; Fri, 07 Jun 2024 10:15:15 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id CE64A13800E6 for ; Fri, 7 Jun 2024 10:15:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 07 Jun 2024 10:15:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm1; t=1717769709; x=1717856109; bh=PMa2p1Odxz 6FVtfc3S7va9m5CxBqajDxF2If4yzsjic=; b=SlYLzYutDFJp3TQ3C61gKswK9L E8+jXcgU3kMHtffch6TV366oPbLntinCbThrMHw5hIUpdZhT8oO/s+O+ikAxc5zI pTyb/uSzzwwlc5NT4L4uex/uY3VFPujX6xcq9MDmpaYPH/WhNshc/EhlVhXjr1TI fQRxVSgb/+lGMBEYZCJgIy9U7b6bleEi7RH1vFxXCGvwpuGbxagxVPoE0q82fclq 5T9HeIcs+9QkXUy70aQpt8bHfnRxSJ7kQEumr730+61y1ZPw+26Yws02hjdcqlbQ NU+KDJ4ely9aljr5CRVg8Fs16j7oFIkWm1NdfwJJCbNe4qvI5SFkK7xpf3kQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1717769709; x=1717856109; bh=PMa2p1Odxz6FVtfc3S7va9m5CxBq ajDxF2If4yzsjic=; b=LNx4CfrLu126aukR1l0UUSMnafZk7M+53DemoXH8OSXD wxAQPNUawaOlu4cOM0XmwRlMO3BK9VaGDo9fw1xzuo/ybuOYicbmbcnLREvQ14Fo GWSjB+WekpMwSiOpOG50ThlOlZxllMBslq7pT8Yzawavzq5C4ERuVaEA2jxwCE3B +YrQA5ZXFhGLp9CWoZJq0SusgeMeWkqB4GnxsVVxWxZj54Yyae/UkAci9ZfJKV29 y/7MJzvekeG5kyK0N7sH1iM833hyAGc/Nz/WFqcuS/Yv59AusuMRTHLsqB0kPemg 20KtLXE/BldeDLZvOhng3ZMRl1CBUBKVFwU2CmWXAw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedtuddggeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtgfesthhqredttd dtjeenucfhrhhomhepjhhohhhnuchmuhhhlhcuoehjmhesphhusgdrphhinhhkqeenucgg tffrrghtthgvrhhnpeetuefhgfeuieejteekffejudettdeuueekueffkeeileekueegle efkefhgefhueenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehjmhesphhusgdrphhinhhk X-ME-Proxy: Feedback-ID: i74194916:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 7 Jun 2024 10:15:09 -0400 (EDT) From: john muhl To: bug-gnu-emacs@gnu.org Subject: 30.0.50; vtable-current-object off by one X-Debbugs-Cc: Date: Fri, 07 Jun 2024 09:15:07 -0500 Message-ID: <87h6e4u9ec.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=103.168.172.149; envelope-from=jm@pub.pink; helo=fout6-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) After updating an object, =E2=80=98vtable-current-object=E2=80=99 in the di= splayer and formatter functions points to the object after the one that was updated. Running the following: (with-current-buffer (get-buffer-create "vtable-demo") (require 'vtable) (erase-buffer) (make-vtable :columns '("Index" "Number") :objects `((1 ,(random)) (2 ,(random)) (3 ,(random))) :displayer (lambda (value &rest _) ;; vtable-current-object is off by one; e.g. ;; update the first row and v-c-o will be the second row; ;; update the final row and v-c-o will be nil. (message "%s %s" value (vtable-current-object)) (propertize (number-to-string value) 'face 'vtable))) (let* ((table (vtable-current-table)) (first (nth 0 (vtable-objects table))) (other (nth 1 (vtable-objects table))) (final (nth 2 (vtable-objects table)))) (setf (nth 1 first) 1) (setf (nth 1 other) 2) (setf (nth 1 final) 3) (vtable-update-object table first) (vtable-update-object table other) (vtable-update-object table final))) I see in the messages buffer: 1 (2 2) [2 times] 2 (3 3) [2 times] 3 nil [2 times] when I expect to see: 1 (1 1) [2 times] 2 (2 2) [2 times] 3 (3 3) [2 times] In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-05-26 built on thelio Repository revision: f2309557ff366a81183859bda88b9a0012a5d9d6 Repository branch: main System Description: Fedora Linux 39 (Thirty Nine) Configured using: 'configure --with-pgtk --prefix=3D/home/jm/.local' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: goto-address-mode: t whitespace-mode: t magit-auto-revert-mode: t global-git-commit-mode: t server-mode: t checkdoc-minor-mode: t which-function-mode: t ruler-mode: t flymake-mode: t winner-mode: t savehist-mode: t save-place-mode: t repeat-mode: t minibuffer-electric-default-mode: t midnight-mode: t kill-ring-deindent-mode: t global-visual-wrap-prefix-mode: t visual-wrap-prefix-mode: t global-paren-face-mode: t paren-face-mode: t global-auto-revert-mode: t electric-pair-mode: t dynamic-completion-mode: t desktop-save-mode: t delete-selection-mode: t coterm-mode: t blow-mode: t auto-insert-mode: t outline-minor-mode: t mu4e-modeline-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-quote-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t context-menu-mode: t global-font-lock-mode: t font-lock-mode: t minibuffer-regexp-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t auto-save-visited-mode: t Load-path shadows: None found. Features: (shadow emacsbug ibuf-ext ibuffer ibuffer-loaddefs term/xterm xterm eglot external-completion jsonrpc ert ewoc descr-text novice vtable package-vc calc-poly calc-arith calc-misc calc-alg calc-aent metar calc-units calc-ext calc calc-loaddefs rect calc-macs finder reposition cus-theme scheme csharp-mode xref files-x two-column debug backtrace magit-subtree magit-gitignore magit-ediff ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util goto-addr whitespace flyspell ispell vc dabbrev magit-patch cal-coptic cal-x calculator cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew cal-julian holidays holiday-loaddefs cal-move misc cc-bytecomp cc-langs cl-print shortdoc help-fns radix-tree tmm misearch multi-isearch network-stream url-http url-gw nsm url-cache url-auth qp sort gnus-cite shr-color mm-archive mail-extr textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check css-mode sgml-mode facemenu color thai-util thai-word display-line-numbers filecache magit-extras magit-imenu git-rebase face-remap magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log magit-diff magit-core magit-autorevert magit-margin magit-transient magit-process tabify apropos sh-script smie executable cursor-sensor oc-basic org-element org-persist org-id org-refile avl-tree generator ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect ol-docview doc-view ol-bibtex bibtex ol-bbdb ol-w3m ol-doi org-link-doi conf-mode git-commit log-edit pcvs-util add-log magit-mode transient edmacro kmacro magit-git magit-section magit-utils crm dash with-editor comp comp-cstr image-mode exif pcase emacs-news-mode dired-aux js c-ts-common treesit cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs server cus-start respect-theme unsp-theme most-faces cl-extra jka-compr smerge-mode diff vc-git diff-mode track-changes easy-mmode vc-dispatcher bug-reference checkdoc lisp-mnt help-mode which-func imenu ruler-mode flymake project warnings init winner savehist saveplace repeat minibuf-eldef midnight indent-aux visual-wrap paren-face autorevert filenotify elec-pair completion desktop frameset delsel coterm compat term disp-table shell ehelp blow autoinsert blow-autoloads coterm-autoloads debbugs-autoloads elpher-autoloads magit-autoloads git-commit-autoloads magit-section-autoloads dash-autoloads metar-autoloads paren-face-autoloads finder-inf unsp-autoloads most-faces-autoloads info with-editor-autoloads xr-autoloads package url-handlers early-init mu4e mu4e-org org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete pcomplete org-list org-footnote org-faces org-entities noutline outline ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs find-func org-version org-compat org-macs format-spec mu4e-notification notifications mu4e-main mu4e-view thingatpt gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus compile comint ansi-osc ansi-color ring comp-run comp-common gnus-cloud nnimap nnmail mail-source utf7 nnoo parse-time iso8601 gnus-spec gnus-int gnus-range gnus-win gnus nnheader range cal-menu calendar cal-loaddefs mu4e-headers mu4e-compose mu4e-draft mu4e-actions smtpmail mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message shr pixel-fill kinsoku url-file svg xml dom browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util flow-fill mule-util hl-line mu4e-contacts mu4e-update mu4e-folders mu4e-context mu4e-query-items mu4e-server mu4e-modeline mu4e-vars mu4e-helpers mu4e-config mu4e-window bookmark ido message sendmail mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader mu4e-obsolete rx auth-source-pass url-parse url-vars auth-source cl-seq eieio eieio-core cl-macs password-cache json map byte-opt gv bytecomp byte-compile subr-x cus-edit pp cus-load icons wid-edit cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win pgtk-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo gtk pgtk multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 3003423 1050394) (symbols 48 71255 2209) (strings 32 384264 44776) (string-bytes 1 11723127) (vectors 16 153369) (vector-slots 8 2666912 1228221) (floats 8 15228 49590) (intervals 56 344023 34775) (buffers 992 89)) From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 15 04:40:39 2024 Received: (at 71415) by debbugs.gnu.org; 15 Jun 2024 08:40:39 +0000 Received: from localhost ([127.0.0.1]:54593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIOxj-0005DC-4D for submit@debbugs.gnu.org; Sat, 15 Jun 2024 04:40:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIOxh-0005Cr-MX for 71415@debbugs.gnu.org; Sat, 15 Jun 2024 04:40:38 -0400 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 1sIOxb-0007e0-3a; Sat, 15 Jun 2024 04:40:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=jp/+5Zk5F/bPi3CB56b84VYt+fQvzUGxshClyHzWDNI=; b=cTDuFNjHG6bmEExMxBDm kjZK7jmYCz2BVJ0VtiddPEHdKZb31CUfmZSl9tYPXab4sPWoa2JmMuxil9Dqh5ehbkXhOv4WkdoB7 jpq2JS+htnSYnQK3hbFhxE+ZvJkVSH0FtoVN0fE7hXHdwyvBd8AEvmzXQ5P81L/RJnxrzoo8jIu1k C7oyw321zqb6joRUoQZ3gJ9lz+aURaPo6oc2P4n0XS6qzEp4dFGww7bmdh+DQAgYpHk/fGTf3pzDV oQhpz2id99mm18Ud+bCLN2eX20lux5LVHkJw89WUErjST8UALQtAynHH05P2tnFen9dh2INkIy0X8 tzAd8Zs9UNPgEQ==; Date: Sat, 15 Jun 2024 11:40:26 +0300 Message-Id: <86ikyavbt1.fsf@gnu.org> From: Eli Zaretskii To: john muhl , Adam Porter In-Reply-To: <87h6e4u9ec.fsf@pub.pink> (message from john muhl on Fri, 07 Jun 2024 09:15:07 -0500) Subject: Re: bug#71415: 30.0.50; vtable-current-object off by one References: <87h6e4u9ec.fsf@pub.pink> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71415 Cc: 71415@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: john muhl > Date: Fri, 07 Jun 2024 09:15:07 -0500 > > After updating an object, ‘vtable-current-object’ in the displayer > and formatter functions points to the object after the one that > was updated. Running the following: > > (with-current-buffer (get-buffer-create "vtable-demo") > (require 'vtable) > (erase-buffer) > (make-vtable > :columns '("Index" "Number") > :objects `((1 ,(random)) (2 ,(random)) (3 ,(random))) > :displayer (lambda (value &rest _) > ;; vtable-current-object is off by one; e.g. > ;; update the first row and v-c-o will be the second row; > ;; update the final row and v-c-o will be nil. > (message "%s %s" value (vtable-current-object)) > (propertize (number-to-string value) 'face 'vtable))) > (let* ((table (vtable-current-table)) > (first (nth 0 (vtable-objects table))) > (other (nth 1 (vtable-objects table))) > (final (nth 2 (vtable-objects table)))) > (setf (nth 1 first) 1) > (setf (nth 1 other) 2) > (setf (nth 1 final) 3) > (vtable-update-object table first) > (vtable-update-object table other) > (vtable-update-object table final))) > > I see in the messages buffer: > > 1 (2 2) [2 times] > 2 (3 3) [2 times] > 3 nil [2 times] > > when I expect to see: > > 1 (1 1) [2 times] > 2 (2 2) [2 times] > 3 (3 3) [2 times] Adam, any comments or suggestions? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 15 14:55:13 2024 Received: (at 71415-done) by debbugs.gnu.org; 15 Jun 2024 18:55:13 +0000 Received: from localhost ([127.0.0.1]:41209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIYYT-0002fL-BB for submit@debbugs.gnu.org; Sat, 15 Jun 2024 14:55:13 -0400 Received: from fout8-smtp.messagingengine.com ([103.168.172.151]:52385) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIYYR-0002ez-Ro for 71415-done@debbugs.gnu.org; Sat, 15 Jun 2024 14:55:12 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id BDAE1138017D; Sat, 15 Jun 2024 14:55:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 15 Jun 2024 14:55:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1718477705; x=1718564105; bh=FYeTQFvokYOF7Hby2S7FiHHymN+Fst9GynKEQzBdt3M=; b= EGn3jCCLUhty7qvzQw9lfWZ0KOihSVyH7YfeFEOgvIiilrvf1dWqm7Y68MKCQjW6 vT+c9wfBkHH5yenuhwxnBqQGmq7NTd/19ujzp36SLXwrYBWfeYw0ryn6YG7oaVwr yhCaMZGnvbwTLnUdQgJ8OUuL6KsKQeEO58VOkyS9pUAy/iNaCVo/2kmeUgSCZM/E t8RDfVNpFqL7n7X8tVA++j5rCIbPKAOMEHIayegmV66AYH8W+kuTEX+H2RshwpmU X8n/GIf1K5BUBpdd/OXPeTyvjRL9cuPKMaJiKkhdWKa+Ym8JFMdt/OX9Zx0Bne0+ jWm01kaMAMWwI2Lp8z1maw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718477705; x= 1718564105; bh=FYeTQFvokYOF7Hby2S7FiHHymN+Fst9GynKEQzBdt3M=; b=c BE+zDuiMrvC/Yiib2DDynZyr6kjnPYSvIT3Bn/ZQ7sYmuMmnt9bUxm03kc/c5m2T 1XQ68uszWzvh77bNPwpedvDzrpM2cm7hWLY+oS4oeczCLsus8KG6WIGJDszDMOLO 450ZQkTRUwjDhOJl1MipUzM1zxCK6f8XZ/TqLWYiC2eo7y0ZjVbWzYKXt+ksNKdd FOZfSHneOxUcMgqwjkiHMGTLCyKI51iKbsQwATIjZGlu6QKOkUs6yGv4nYn0qAQp I/u7Z3bGBw7ahUB+x8DKaJVEwL5KdC2YuCxnAlsinpH3waLRFoRjfxDut8fUMIFp 2QlPx/yO/HqEL71dn7JJw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedvuddgudeftdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufgjfhgffffkgggtgfesthhqredttderjeenucfhrhhomhepjhho hhhnuchmuhhhlhcuoehjmhesphhusgdrphhinhhkqeenucggtffrrghtthgvrhhnpeegve ehvddttedvkeduvddttdehhfdvgffgvdfgiedtjeduhefhffejtddvveevkeenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjmhesphhusgdrph hinhhk X-ME-Proxy: Feedback-ID: i74194916:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 15 Jun 2024 14:55:04 -0400 (EDT) From: john muhl To: Eli Zaretskii Subject: Re: bug#71415: 30.0.50; vtable-current-object off by one In-Reply-To: <86ikyavbt1.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 15 Jun 2024 11:40:26 +0300") References: <87h6e4u9ec.fsf@pub.pink> <86ikyavbt1.fsf@gnu.org> User-Agent: mu4e 1.12.1; emacs 30.0.50 Date: Sat, 15 Jun 2024 13:55:03 -0500 Message-ID: <87frte9gu0.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71415-done Cc: 71415-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) After looking at vtable.el I don=E2=80=99t think this is meant to work how I expected. Eli Zaretskii writes: >> From: john muhl >> Date: Fri, 07 Jun 2024 09:15:07 -0500 >>=20 >> After updating an object, =E2=80=98vtable-current-object=E2=80=99 in the= displayer >> and formatter functions points to the object after the one that >> was updated. Running the following: >>=20 >> (with-current-buffer (get-buffer-create "vtable-demo") >> (require 'vtable) >> (erase-buffer) >> (make-vtable >> :columns '("Index" "Number") >> :objects `((1 ,(random)) (2 ,(random)) (3 ,(random))) >> :displayer (lambda (value &rest _) >> ;; vtable-current-object is off by one; e.g. >> ;; update the first row and v-c-o will be the second r= ow; >> ;; update the final row and v-c-o will be nil. >> (message "%s %s" value (vtable-current-object)) >> (propertize (number-to-string value) 'face 'vtable))) >> (let* ((table (vtable-current-table)) >> (first (nth 0 (vtable-objects table))) >> (other (nth 1 (vtable-objects table))) >> (final (nth 2 (vtable-objects table)))) >> (setf (nth 1 first) 1) >> (setf (nth 1 other) 2) >> (setf (nth 1 final) 3) >> (vtable-update-object table first) >> (vtable-update-object table other) >> (vtable-update-object table final))) >>=20 >> I see in the messages buffer: >>=20 >> 1 (2 2) [2 times] >> 2 (3 3) [2 times] >> 3 nil [2 times] >>=20 >> when I expect to see: >>=20 >> 1 (1 1) [2 times] >> 2 (2 2) [2 times] >> 3 (3 3) [2 times] > > Adam, any comments or suggestions? > > Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 15 20:45:54 2024 Received: (at 71415) by debbugs.gnu.org; 16 Jun 2024 00:45:54 +0000 Received: from localhost ([127.0.0.1]:35094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIe1p-0003eU-Rz for submit@debbugs.gnu.org; Sat, 15 Jun 2024 20:45:54 -0400 Received: from blue.aspen.relay.mailchannels.net ([23.83.221.20]:56703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIe1m-0003eG-4M for 71415@debbugs.gnu.org; Sat, 15 Jun 2024 20:45:52 -0400 X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D9FD96C242C; Sun, 16 Jun 2024 00:45:46 +0000 (UTC) Received: from pdx1-sub0-mail-a220.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id BE3336C255C; Sun, 16 Jun 2024 00:45:45 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1718498745; a=rsa-sha256; cv=none; b=WDny4BZOuNfTqzvby6jI7D1+rNCnTJhwtCUJkhA5W7eT7UZVdBXjZwbOSY+Pvya1eEbtke aPlwruEUes/ig7VoAHDPG+0/7dtL29+cCCchrDhBT2WmqPZcMvl7UQDCy51HhncoeWDarf 8CpnT5HztgatDSPOYj6f0n+2B4q80HpXgFoxILHmCJi7PZVPAbowGDmPGWspmw3MVom9Br 8ZDY+Nt7QDdhzjCzsJf28ClWd8hwbXn8i4zQw0+0H5qrM4ShDUak/4gAAXTl73K6sa2uEN MNQvIqPD0Xn3VLqyMKUcAP1xViiOsnF7LKKdDyrjtkVV8YMlvP4CvtTWvRIlxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1718498745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=usUqJQdkY9N20jzAGVc71J83jP5X1lHUSaiAwnJUvK0=; b=OdlkkWakrKf1cP8Er2aYlo7AoSNgtPUe0upDq1DUIA0D4Pb7tHL5rcpFK5i0rGqL/H0pHL tKxcIkfWYXOHzDUmRyjnO1CmXfHkzWQu1WBqk8GSeD5lFD5Rcr0eOt6tngpcvjFrGe6dD9 3NeiA8e0+u5hQvCWTBIrXtVDWIPmweupyv11O5IN3GF5fKrRDdebdkqWxyvgsUOiRwnn6l evZ8BnE5IgweQ3P3/rxUVUc2eBxoLYwqC8uFK+25ASk7r4+y0sebeUQocUkvs6emlm3C6C EW0WPMtBtUIzJfu4AF3hGi63x+KPXqBNk16jj+L0mb//3jSB0YdexHp8japDqw== ARC-Authentication-Results: i=1; rspamd-79677bdb95-9kws4; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Junk X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Blushing-Army: 4fb02fd70d2e3024_1718498746015_2418099486 X-MC-Loop-Signature: 1718498746015:597878449 X-MC-Ingress-Time: 1718498746014 Received: from pdx1-sub0-mail-a220.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.112.87.144 (trex/6.9.2); Sun, 16 Jun 2024 00:45:46 +0000 Received: from [10.17.173.73] (unknown [172.98.33.7]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adam@alphapapa.net) by pdx1-sub0-mail-a220.dreamhost.com (Postfix) with ESMTPSA id 4W1vSn1vlqz1L; Sat, 15 Jun 2024 17:45:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1718498745; bh=usUqJQdkY9N20jzAGVc71J83jP5X1lHUSaiAwnJUvK0=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=yw1xkrqULZjZ6/b3fnOv84z0EKDBroDmffLqEYkHBktqRazm/bJOeHuslsc1hoFJ+ W914ES2xEw8haUqbj8iDa/isGVKYkMlPjIIobsrk2oez/x1ZjtRx8uhOBhZx4uHGiM +GTOk47+J87XeFnMbpg7w3gc4yffV95HdQY0h7CAZ4w1NaM5IKxj3Z4Lm/6ROzdrGt UR5cJOY1fIMAZYDEyjn0d8T2W5HbFOHS5WL+0VezIYfN2y5wk4XBnyO5dzuDJ/310Z 58bVmvZuk9tBPg72eEatl6QUEGYKJpqFA0rHypTUZ2TfQvAYoxzRaxSVjeenV78X/m ZLUcgpQ+1Mb8A== Message-ID: Date: Sat, 15 Jun 2024 19:45:44 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71415: 30.0.50; vtable-current-object off by one To: Eli Zaretskii , john muhl References: <87h6e4u9ec.fsf@pub.pink> <86ikyavbt1.fsf@gnu.org> Content-Language: en-US From: Adam Porter In-Reply-To: <86ikyavbt1.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 71415 Cc: 71415@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) Hi Eli, John, On 6/15/24 03:40, Eli Zaretskii wrote: >> From: john muhl >> Date: Fri, 07 Jun 2024 09:15:07 -0500 >> >> After updating an object, ‘vtable-current-object’ in the displayer >> and formatter functions points to the object after the one that >> was updated. Running the following: >> >> (with-current-buffer (get-buffer-create "vtable-demo") >> (require 'vtable) >> (erase-buffer) >> (make-vtable >> :columns '("Index" "Number") >> :objects `((1 ,(random)) (2 ,(random)) (3 ,(random))) >> :displayer (lambda (value &rest _) >> ;; vtable-current-object is off by one; e.g. >> ;; update the first row and v-c-o will be the second row; >> ;; update the final row and v-c-o will be nil. >> (message "%s %s" value (vtable-current-object)) >> (propertize (number-to-string value) 'face 'vtable))) >> (let* ((table (vtable-current-table)) >> (first (nth 0 (vtable-objects table))) >> (other (nth 1 (vtable-objects table))) >> (final (nth 2 (vtable-objects table)))) >> (setf (nth 1 first) 1) >> (setf (nth 1 other) 2) >> (setf (nth 1 final) 3) >> (vtable-update-object table first) >> (vtable-update-object table other) >> (vtable-update-object table final))) >> >> I see in the messages buffer: >> >> 1 (2 2) [2 times] >> 2 (3 3) [2 times] >> 3 nil [2 times] >> >> when I expect to see: >> >> 1 (1 1) [2 times] >> 2 (2 2) [2 times] >> 3 (3 3) [2 times] > > Adam, any comments or suggestions? Hi Eli, John, My first thought is that this code had some changes recently, and the bug report indicates that the version of Emacs used was compiled from revision f2309557ff366a81183859bda88b9a0012a5d9d6, but I can't find that in emacs.git/master. So I'd suggest trying to reproduce it with a build of Emacs from master after the related changes. Secondly, it seems likely to be a violation of intent to call `vtable-current-object' inside the table's displayer function. I don't think that function is intended to be used within the process of updating a vtable. It's intended to be used from outside vtable code to find what object's representation point is on in a vtable. So if it works correctly in that case but not in this apparently contrived one, I doubt that this would indicate a bug. And in that case, I'd suggest that we be told what the user is actually trying to accomplish, in case there's a real bug elsewhere that was "rabbit-trailed" into a misunderstanding here. :) Thanks, Adam From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 17 09:36:05 2024 Received: (at 71415) by debbugs.gnu.org; 17 Jun 2024 13:36:05 +0000 Received: from localhost ([127.0.0.1]:33781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJCWj-0005vv-3b for submit@debbugs.gnu.org; Mon, 17 Jun 2024 09:36:05 -0400 Received: from fout2-smtp.messagingengine.com ([103.168.172.145]:54039) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJCWe-0005sn-8k for 71415@debbugs.gnu.org; Mon, 17 Jun 2024 09:36:03 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.nyi.internal (Postfix) with ESMTP id 1F0B913802C8; Mon, 17 Jun 2024 09:35:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 17 Jun 2024 09:35:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1718631353; x=1718717753; bh=MTh1vVLIU1k8cDChPHXZd39f1MOwJIritFFQxuvQwBI=; b= hP2aNQA4xQYF3oiJLxmFn7pFM/AFvoRDgXRJoc2dwVQ433anxF2nqc66g55+mEho kqe8Qhtvz7X5ddhJAQFr/NbDqKjugD9HnLD5tJSXv3zy1r9loX86g5M0Y49HpSMQ Z+q3ZA8Z0Crp6DSa/6dw52aiUvIfNrHf6ZchGqyUJFnC+K2naJAmplX8QIMbhIkY s+WNCmj/VEXedV0SVdFBLSsSI8v5mjuBO1U6DRGV2JIZXkd+nF/frEXI2BhR2aEv sOUvcilO02KJFMjMAuybfLUHY5oXE21TmzSf2DiKPP5OpegID2Qcs8RcJgNOBtT8 jYBaDwWXLNoaV/ByqiCBfA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718631353; x= 1718717753; bh=MTh1vVLIU1k8cDChPHXZd39f1MOwJIritFFQxuvQwBI=; b=F I0EttWxwzNPZtVb9aifUW/zSU1BtNyyIZgtAe1bV+T3lUJxSlLgmaSCS5gcT8Qn4 tnOoFxq1QrfgK5mnaZ3v+OhPWT486VO5VpHjYkNsYMP6jLuxMmjtqQzwp/nmqVAf wA0GOLz5CYGpZhzoMUdk86wZJ75466hAoXRwjGvmknwPEYYnc1oIXX7dqr4uvCXw Lvi8N4FP3xL8+fEnrvds4/fyO7mcK83Tjy75fsnOheLjBaHk0GnNMtdUsO7z6drV rmArX6NB5D8xWGzqDt5OGhHVnFvTQ868mZkR5gT3J7xdWd6+Pi5bU/46z+PdS5B7 RXBQR/im5HSIKUAzpMVMg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedvhedgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujghffgffkfggtgfgsehtqhertddtreejnecuhfhrohhmpehjohhh nhcumhhuhhhluceojhhmsehpuhgsrdhpihhnkheqnecuggftrfgrthhtvghrnhepgeevhe dvtdetvdekuddvtddthefhvdfggfdvgfeitdejudehhfffjedtvdevveeknecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhmsehpuhgsrdhpih hnkh X-ME-Proxy: Feedback-ID: i74194916:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Jun 2024 09:35:52 -0400 (EDT) From: john muhl To: Adam Porter Subject: Re: bug#71415: 30.0.50; vtable-current-object off by one In-Reply-To: (Adam Porter's message of "Sat, 15 Jun 2024 19:45:44 -0500") References: <87h6e4u9ec.fsf@pub.pink> <86ikyavbt1.fsf@gnu.org> User-Agent: mu4e 1.12.1; emacs 30.0.50 Date: Mon, 17 Jun 2024 08:35:50 -0500 Message-ID: <87v8278zex.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71415 Cc: 71415@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Adam Porter writes: > Hi Eli, John, > > My first thought i> Hi Eli, John, > > On 6/15/24 03:40, Eli Zaretskii wrote: >>> From: john muhl >>> Date: Fri, 07 Jun 2024 09:15:07 -0500 >>> >>> After updating an object, =E2=80=98vtable-current-object=E2=80=99 in th= e displayer >>> and formatter functions points to the object after the one that >>> was updated. Running the following: >>> >>> (with-current-buffer (get-buffer-create "vtable-demo") >>> (require 'vtable) >>> (erase-buffer) >>> (make-vtable >>> :columns '("Index" "Number") >>> :objects `((1 ,(random)) (2 ,(random)) (3 ,(random))) >>> :displayer (lambda (value &rest _) >>> ;; vtable-current-object is off by one; e.g. >>> ;; update the first row and v-c-o will be the second= row; >>> ;; update the final row and v-c-o will be nil. >>> (message "%s %s" value (vtable-current-object)) >>> (propertize (number-to-string value) 'face 'vtable))) >>> (let* ((table (vtable-current-table)) >>> (first (nth 0 (vtable-objects table))) >>> (other (nth 1 (vtable-objects table))) >>> (final (nth 2 (vtable-objects table)))) >>> (setf (nth 1 first) 1) >>> (setf (nth 1 other) 2) >>> (setf (nth 1 final) 3) >>> (vtable-update-object table first) >>> (vtable-update-object table other) >>> (vtable-update-object table final))) >>> >>> I see in the messages buffer: >>> >>> 1 (2 2) [2 times] >>> 2 (3 3) [2 times] >>> 3 nil [2 times] >>> >>> when I expect to see: >>> >>> 1 (1 1) [2 times] >>> 2 (2 2) [2 times] >>> 3 (3 3) [2 times] >> Adam, any comments or suggestions? > s that this code had some changes recently, and the > bug report indicates that the version of Emacs used was compiled from > revision f2309557ff366a81183859bda88b9a0012a5d9d6, but I can't find > that in emacs.git/master. So I'd suggest trying to reproduce it with > a build of Emacs from master after the related changes. > > Secondly, it seems likely to be a violation of intent to call > `vtable-current-object' inside the table's displayer function. I > don't think that function is intended to be used within the process of > updating a vtable. It's intended to be used from outside vtable code > to find what object's representation point is on in a vtable. > > So if it works correctly in that case but not in this apparently > contrived one, I doubt that this would indicate a bug. And in that > case, I'd suggest that we be told what the user is actually trying to > accomplish, in case there's a real bug elsewhere that was > "rabbit-trailed" into a misunderstanding here. :) > > Thanks, > Adam Right. It=E2=80=99s my mistake. Sorry for the bother. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 17 12:24:36 2024 Received: (at 71415) by debbugs.gnu.org; 17 Jun 2024 16:24:36 +0000 Received: from localhost ([127.0.0.1]:35210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJF9n-0002Fy-Tt for submit@debbugs.gnu.org; Mon, 17 Jun 2024 12:24:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJF9k-0002Fj-E0 for 71415@debbugs.gnu.org; Mon, 17 Jun 2024 12:24:34 -0400 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 1sJF9b-0003Dk-5A; Mon, 17 Jun 2024 12:24:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=poDSfrb9LE0pDyVJvc5yjKPLgThCCJhMOeva/4JaEp8=; b=DOR6sBPvgtezaubqxetr JdyxpledixB2R07n/WM9sakl6P3ChG/gY8ElOi6L+wCdsyMPrqzoPnTIoRwNWygACA+7Jos+1AQ8M ROtM/KAMADcPus0qxBRliY9PU3aIhMj3sw2220ycMeRMZd8LrGKIybVCXrsszXpEBdVSd6fHc2MOG gpFJ3gJJiIvvHvR1JwV+Fcf7Rixi1fk99Ki4NUd31yFBOD9/aKuD42JZeGg46WFm89a/bKduUiqOO z/dvx+/dKs0XjhV+ORT0i4+azBUYsiSiHF825k0b1BsV9dYFKpA7BwllrJZ8fRak0/ivyxUAx9hHc ArfHl82U1FC1Fw==; Date: Mon, 17 Jun 2024 19:24:18 +0300 Message-Id: <86tthrr0zx.fsf@gnu.org> From: Eli Zaretskii To: john muhl In-Reply-To: <87v8278zex.fsf@pub.pink> (message from john muhl on Mon, 17 Jun 2024 08:35:50 -0500) Subject: Re: bug#71415: 30.0.50; vtable-current-object off by one References: <87h6e4u9ec.fsf@pub.pink> <86ikyavbt1.fsf@gnu.org> <87v8278zex.fsf@pub.pink> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71415 Cc: adam@alphapapa.net, 71415@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: john muhl > Cc: Eli Zaretskii , 71415@debbugs.gnu.org > Date: Mon, 17 Jun 2024 08:35:50 -0500 > > Adam Porter writes: > > > Hi Eli, John, > > > > My first thought i> Hi Eli, John, > > > > On 6/15/24 03:40, Eli Zaretskii wrote: > >>> From: john muhl > >>> Date: Fri, 07 Jun 2024 09:15:07 -0500 > >>> > >>> After updating an object, ‘vtable-current-object’ in the displayer > >>> and formatter functions points to the object after the one that > >>> was updated. Running the following: > >>> > >>> (with-current-buffer (get-buffer-create "vtable-demo") > >>> (require 'vtable) > >>> (erase-buffer) > >>> (make-vtable > >>> :columns '("Index" "Number") > >>> :objects `((1 ,(random)) (2 ,(random)) (3 ,(random))) > >>> :displayer (lambda (value &rest _) > >>> ;; vtable-current-object is off by one; e.g. > >>> ;; update the first row and v-c-o will be the second row; > >>> ;; update the final row and v-c-o will be nil. > >>> (message "%s %s" value (vtable-current-object)) > >>> (propertize (number-to-string value) 'face 'vtable))) > >>> (let* ((table (vtable-current-table)) > >>> (first (nth 0 (vtable-objects table))) > >>> (other (nth 1 (vtable-objects table))) > >>> (final (nth 2 (vtable-objects table)))) > >>> (setf (nth 1 first) 1) > >>> (setf (nth 1 other) 2) > >>> (setf (nth 1 final) 3) > >>> (vtable-update-object table first) > >>> (vtable-update-object table other) > >>> (vtable-update-object table final))) > >>> > >>> I see in the messages buffer: > >>> > >>> 1 (2 2) [2 times] > >>> 2 (3 3) [2 times] > >>> 3 nil [2 times] > >>> > >>> when I expect to see: > >>> > >>> 1 (1 1) [2 times] > >>> 2 (2 2) [2 times] > >>> 3 (3 3) [2 times] > >> Adam, any comments or suggestions? > > > s that this code had some changes recently, and the > > bug report indicates that the version of Emacs used was compiled from > > revision f2309557ff366a81183859bda88b9a0012a5d9d6, but I can't find > > that in emacs.git/master. So I'd suggest trying to reproduce it with > > a build of Emacs from master after the related changes. > > > > Secondly, it seems likely to be a violation of intent to call > > `vtable-current-object' inside the table's displayer function. I > > don't think that function is intended to be used within the process of > > updating a vtable. It's intended to be used from outside vtable code > > to find what object's representation point is on in a vtable. > > > > So if it works correctly in that case but not in this apparently > > contrived one, I doubt that this would indicate a bug. And in that > > case, I'd suggest that we be told what the user is actually trying to > > accomplish, in case there's a real bug elsewhere that was > > "rabbit-trailed" into a misunderstanding here. :) > > > > Thanks, > > Adam > > Right. It’s my mistake. Sorry for the bother. No sweat. So should we now close this bug? From unknown Sat Jun 21 10:22:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 16 Jul 2024 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator