From unknown Sun Jun 22 03:57:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63754: 29.0.91; tmm breaks when tmm-completion-prompt is nil Resent-From: Thiago Melo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 May 2023 14:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63754 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 63754@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168519928528330 (code B ref -1); Sat, 27 May 2023 14:55:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 May 2023 14:54:45 +0000 Received: from localhost ([127.0.0.1]:52406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2vJc-0007Mr-8N for submit@debbugs.gnu.org; Sat, 27 May 2023 10:54:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:43324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2vJa-0007Mj-5C for submit@debbugs.gnu.org; Sat, 27 May 2023 10:54:42 -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 1q2vJZ-0006LE-UV for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 10:54:41 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2vJX-0008JU-Cm for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 10:54:41 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-96f99222e80so383209166b.1 for ; Sat, 27 May 2023 07:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685199277; x=1687791277; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Z/7ZZjQSLDmUJQX4RNj0qZo8gGlHXISvkOC9P+4381w=; b=sWCoHsYJG0w0yqVNlR09W7lGnsTMVL36gLdWaVhitQUKKM4Y4bwLVfkXgex02t700D hTqOL9VKkulNabjPmuC9h2P5U23vawRPId6YoTdf0mhemO3eBR0ti5YWP/NmxvDR9lyz KQrUmQoRFP+UxdWaAmxBWbUQWHwugbnXUefDTT6PVGRGDMrbsvT+kZgFcrJJ5NhT3QHs 1MHEKmX5oLXxw8jwa2PCwdT6QEf8up0gd+x2wc77lnCHYuU1YrJ4nwPbDvWfWB27LEXm mNIwezo02WRjwDzs5RX1BsDDoWswxv4CaN7ffn2lx3vYPq4nGajbhbEhLzaQqI164ZfZ FX9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685199277; x=1687791277; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Z/7ZZjQSLDmUJQX4RNj0qZo8gGlHXISvkOC9P+4381w=; b=icg+or47RJd5o8GMgBVSxtWfbYax2wmoVnfTRRBMd32nQn6Ss6SB4qFXu9sqTl+c/g tgTjh+TJxfKGqQSMbXOMGkhoDl9fo4A2mG/VnPJRq1UmLiPdec4DtHPRKLg8LRoMxp/O VGZw7WluvDWb2VX8l+SKz+wZN3xM2v6cpGSTL9F4s/Rp19sffZK/OlWKtzXCLTigG6Gg ixQen4WT4hxK8T8sRFV5/u7sZXjC32uJqFcjIRZgQhPS9D+58eiuilfCSw7qjyqWREPU A7YzcxT/3tW2k7uTZyxjnbythM803A/KcIRHmw9Jr0vGvzZg8qMTvW9fiSTaARrZsY7z RImg== X-Gm-Message-State: AC+VfDz9lLtWMPD6aZ9bSEQyXv8umF4RPKcj+PiMcCi9o/h2oLU1M0+o +A++wUJqb1TappgVsuOH01mG/nXuTvNYJt2jqB/EDP9eFi4= X-Google-Smtp-Source: ACHHUZ7bx0M1t/LSspVcvDTOjWHleOkE2xM5+a5+7CkBbq/lcMfYsLnB/q3Uyc4GtvnDxeJPJcI5yx0p4BUpikblAT4= X-Received: by 2002:a17:907:1626:b0:969:e993:6ff0 with SMTP id hb38-20020a170907162600b00969e9936ff0mr2382120ejc.25.1685199277184; Sat, 27 May 2023 07:54:37 -0700 (PDT) MIME-Version: 1.0 From: Thiago Melo Date: Sat, 27 May 2023 14:53:59 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=tmdmelo@gmail.com; helo=mail-ej1-x62a.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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.3 (--) Issue doesn't happen with Emacs 28. * How to reproduce run: emacs -Q eval: (setq tmm-completion-prompt nil) (tmm-menubar) ; or `tmm-prompt' with any menu/keymap * Backtrace Debugger entered--Lisp error: (search-failed "Possible completions are:\n") search-forward("Possible completions are:\n") tmm-completion-delete-prompt() run-hooks(completion-setup-hook) display-completion-list((#("f==>File" 0 1 (face (completions-first-difference))) #("e==>Edit" 0 1 (face (completions-first-difference))) #("o==>Options" 0 1 (face (completions-first-difference))) #("b==>Buffers" 0 1 (face (completions-first-difference))) #("t==>Tools" 0 1 (face (completions-first-difference))) #("l==>Lisp-Interaction" 0 1 (face (completions-first-difference))) #("h==>Help" 0 1 (face (completions-first-difference)))) nil nil) #f(compiled-function (window) #)(#) window--display-buffer(# # window ((window-height . completions--fit-window-to-buffer) nil (body-function . #f(compiled-function (window) #)))) display-buffer-at-bottom(# ((window-height . completions--fit-window-to-buffer) nil (body-function . #f(compiled-function (window) #)))) display-buffer(# ((display-buffer--maybe-same-window display-buffer-reuse-window display-buffer--maybe-pop-up-frame display-buffer-at-bottom) (window-height . completions--fit-window-to-buffer) nil (body-function . #f(compiled-function (window) #)))) temp-buffer-window-show(# ((display-buffer--maybe-same-window display-buffer-reuse-window display-buffer--maybe-pop-up-frame display-buffer-at-bottom) (window-height . completions--fit-window-to-buffer) nil (body-function . #f(compiled-function (window) #)))) minibuffer-completion-help() tmm-add-prompt() minibuffer-setup() read-from-minibuffer("Menu bar (up/down to change, PgUp to menu): " nil (keymap (10 . minibuffer-complete-and-exit) (13 . minibuffer-complete-and-exit) keymap (menu-bar keymap (minibuf "Minibuf" keymap (tab menu-item "Complete" minibuffer-complete :help "Complete as far as possible") (space menu-item "Complete Word" minibuffer-complete-word :help "Complete at most one word") (63 menu-item "List Completions" minibuffer-completion-help :help "Display all possible completions") "Minibuf")) (M-down . minibuffer-next-completion) (M-up . minibuffer-previous-completion) (27 keymap (13 . minibuffer-choose-completion) (103 keymap (27 keymap (99 . switch-to-completions))) (118 . switch-to-completions)) (prior . switch-to-completions) (63 . minibuffer-completion-help) (32 . minibuffer-complete-word) (backtab . minibuffer-complete) (9 . minibuffer-complete) keymap (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the min...") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuf...") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "\15" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (24 keymap (down . minibuffer-complete-defaults) (up . minibuffer-complete-history)) (13 . exit-minibuffer) (10 . exit-minibuffer) (7 . abort-minibuffers) (C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous-history-element) (up . previous-line-or-history-element) (prior . previous-history-element) (XF86Forward . next-history-element) (down . next-line-or-history-element) (next . next-history-element) (27 keymap (60 . minibuffer-beginning-of-buffer) (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) nil tmm--history ("f==>File" "e==>Edit" "o==>Options" "b==>Buffers" "t==>Tools" "l==>Lisp-Interaction" "h==>Help") nil) completing-read-default("Menu bar (up/down to change, PgUp to menu): " #f(compiled-function (string pred action) #) nil t nil tmm--history ("f==>File" "e==>Edit" "o==>Options" "b==>Buffers" "t==>Tools" "l==>Lisp-Interaction" "h==>Help")) tmm-prompt((keymap ... ... ... ... ... ... ... ...) nil nil) tmm-menubar() eval((tmm-menubar) t) eval-expression((tmm-menubar) nil nil 127) funcall-interactively(eval-expression (tmm-menubar) nil nil 127) call-interactively(eval-expression nil nil) command-execute(eval-expression) * System information: In GNU Emacs 29.0.91 (build 1, x86_64-pc-linux-gnu, cairo version 1.16.0) of 2023-05-26 built on debian-x250 Repository revision: 5e7c826bfa5cb7459f5b162b498af1c57c4578e6 Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux 11 (bullseye) Configured using: 'configure --prefix=/home/user/apps/emacs-29.0.91-5e7c826 --with-x-toolkit=no --with-mailutils --with-modules --without-compress-install --without-toolkit-scroll-bars --with-native-compilation=no --with-tree-sitter' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY OLDXMENU PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM ZLIB Important settings: value of $LANG: en_DK.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-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 line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-fns radix-tree cl-print byte-opt gv bytecomp byte-compile debug backtrace help-mode find-func cl-loaddefs cl-lib tmm rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode 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 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 lcms2 dynamic-setting system-font-setting font-render-setting cairo xinput2 x multi-tty make-network-process emacs) Memory information: ((conses 16 58330 6430) (symbols 48 6229 0) (strings 32 16451 1591) (string-bytes 1 489144) (vectors 16 12732) (vector-slots 8 171485 10082) (floats 8 27 43) (intervals 56 1188 0) (buffers 984 13)) From unknown Sun Jun 22 03:57:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63754: 29.0.91; tmm breaks when tmm-completion-prompt is nil Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 May 2023 17:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63754 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Thiago Melo Cc: 63754@debbugs.gnu.org Received: via spool by 63754-submit@debbugs.gnu.org id=B63754.168520768711967 (code B ref 63754); Sat, 27 May 2023 17:15:02 +0000 Received: (at 63754) by debbugs.gnu.org; 27 May 2023 17:14:47 +0000 Received: from localhost ([127.0.0.1]:52489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2xV8-00036w-Ru for submit@debbugs.gnu.org; Sat, 27 May 2023 13:14:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2xV6-00036b-Ph for 63754@debbugs.gnu.org; Sat, 27 May 2023 13:14:45 -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 1q2xV0-0005Za-5A; Sat, 27 May 2023 13:14:38 -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=FCD1NtOYOCc9av8YxOPWM6dYYpRhGRGczF8aCBF7XvY=; b=byXzvvpuBSjX ogaQg//q1WjszVT6bsH4WNt8+cSle9KwPx3SI2NWroz/uaRfJ83QWnyzCq7trHhHk1QpwEfz3bLDR a2JzzeDtVISEQ4pN7mtnXlSM1bX9572jDnv7dg304tBzq3zpSm8c8GkEjCRcL8+WXQV42hIPMptdN AGRC4t6mkmCL8L78ff9V/RV2ruhxHzxP9+B3KVHlUmoIha7uPDg5TBmSlEKVwa5Pkwec8Qnjdozp5 M0z7buZ6117whJu6nHWkBrOpAvf5JFlV8TiELXM4ywL3/1Wb+fDYimc9ZpUKfUI4aF8UjhtB4o2c4 Cv/tdvqcltSbbrCpMqjTwg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2xUz-0006Cg-8D; Sat, 27 May 2023 13:14:37 -0400 Date: Sat, 27 May 2023 20:15:12 +0300 Message-Id: <831qj1k867.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Thiago Melo on Sat, 27 May 2023 14:53:59 +0000) References: X-Spam-Score: -2.3 (--) 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: Thiago Melo > Date: Sat, 27 May 2023 14:53:59 +0000 > > Issue doesn't happen with Emacs 28. > > * How to reproduce > > run: > emacs -Q > > eval: > (setq tmm-completion-prompt nil) > (tmm-menubar) ; or `tmm-prompt' with any menu/keymap > > * Backtrace > > Debugger entered--Lisp error: (search-failed "Possible completions are:\n") > search-forward("Possible completions are:\n") > tmm-completion-delete-prompt() > run-hooks(completion-setup-hook) > display-completion-list((#("f==>File" 0 1 (face Thanks. This was caused by a change in the completion heading line in Emacs 29: it is now a customizable format string, and can be nil. So the method used by tmm.el for finding the prompt (so it could delete it) is no longer workable, and must be replaced by a different method. Should be fixed now on the emacs-29 branch. (I also fixed it to work when 'tmm-mid-prompt' is nil, something that seems to have been broken since about forever -- I found that bug while testing the patch, because the patch has to work also when 'tmm-mid-prompt' is nil, and there are no menu shortcuts shown.) From unknown Sun Jun 22 03:57:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63754: 29.0.91; tmm breaks when tmm-completion-prompt is nil Resent-From: Thiago Melo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 May 2023 19:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63754 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 63754@debbugs.gnu.org Received: via spool by 63754-submit@debbugs.gnu.org id=B63754.168521698129975 (code B ref 63754); Sat, 27 May 2023 19:50:02 +0000 Received: (at 63754) by debbugs.gnu.org; 27 May 2023 19:49:41 +0000 Received: from localhost ([127.0.0.1]:52625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2zv2-0007nP-PA for submit@debbugs.gnu.org; Sat, 27 May 2023 15:49:41 -0400 Received: from mail-ed1-f42.google.com ([209.85.208.42]:53370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2zv0-0007n9-A1 for 63754@debbugs.gnu.org; Sat, 27 May 2023 15:49:38 -0400 Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-510e90d785fso2785815a12.2 for <63754@debbugs.gnu.org>; Sat, 27 May 2023 12:49:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685216972; x=1687808972; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=2uwjLsdQY91XSte2yst5KQlLi92OEhCxBrvNUEhqZCI=; b=KTJ1OfFc+a63EmRkBALdAaerhbzLvxgqhujcrQeGO1ozZ7adriQmdWRlI9H43l1KwH QuBf5X7YP+EJ1qK8MmnETc3C2pr3wxWbGkwq54w+u/YCKqTMMnI1wQvm4heI2pCS4Sd1 PAt24+/d5MwVA8zxxAoQUSAc2+CypwA8giGedyihfHTYN3Nz5ZbhpvCZholH7YWvshJw mK6Ij0fDIJ472Y3wJeM2rTJ0FvniRN2A3Sb3T47exYhVHxh9SmTbarlpidsvcEAXY6Ok XgofMUsviOLkc8Iv5Xb3OLQ9E0F5WNpHcuW+mqvopmhAHPyVkYNTJUwiZL4J7QQNqdxF P3bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685216972; x=1687808972; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2uwjLsdQY91XSte2yst5KQlLi92OEhCxBrvNUEhqZCI=; b=I3Ls2L/X/vHfSr7CfRZ+aaT7NWV+1L5iaPUqC9XlqqFyqmiY0OTtRUL1nhjQmBO2VT iKpGrKQcxsevDe7hTtVpsDJk5K2bE4tEssDT11jXXYESWn413eN8gaSrokr9TiRAeDOj wKHjfY89p4jNDPhtWo67AHs9+c4/zqqzxEWPQZQI9q1zRfzMzWwSmdi5IsqpvYsIb4lL gJOjHxf7jprV8h/Lld6ehIM7/dn3RSj2vgwzp73iAQeFbuatPl8nlJFUo4/bwC6CBSiL JoVF7VpnyB5NwrhzxJCzzZAEkn5kGXsi6ZmERjS9LAKjkNbjeu6loe/Ap/lQhXFMd4SW DmMw== X-Gm-Message-State: AC+VfDxI77uNyx8fPA+8SuFaGdpI+oxI44YyPCNNzI0D7VjS/8gi9qOl NNtkaVdId+qs+ba+5r8ARTAFuTzrOOj837o07Gw= X-Google-Smtp-Source: ACHHUZ61o+ZCCvGm0wC4N22ZcdsR9OotWrkQK76JNCE66tw/DLZxiwp4IxsnqEcWPSeA/LZfP/uz2JrcIYyMLE6/BLA= X-Received: by 2002:a05:6402:31f6:b0:512:686f:b651 with SMTP id dy22-20020a05640231f600b00512686fb651mr5120368edb.32.1685216972185; Sat, 27 May 2023 12:49:32 -0700 (PDT) MIME-Version: 1.0 References: <831qj1k867.fsf@gnu.org> In-Reply-To: <831qj1k867.fsf@gnu.org> From: Thiago Melo Date: Sat, 27 May 2023 19:48:54 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) 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.0 (-) On Sat, May 27, 2023 at 5:14=E2=80=AFPM Eli Zaretskii wrote: > Thanks. This was caused by a change in the completion heading line in > Emacs 29: it is now a customizable format string, and can be nil. So > the method used by tmm.el for finding the prompt (so it could delete > it) is no longer workable, and must be replaced by a different method. > > Should be fixed now on the emacs-29 branch. Cool. I've tested, it's working nicely. Thanks for the fix. > (I also fixed it to work > when 'tmm-mid-prompt' is nil, something that seems to have been broken > since about forever -- I found that bug while testing the patch, > because the patch has to work also when 'tmm-mid-prompt' is nil, and > there are no menu shortcuts shown.) Sorry if my comment is out of place, but I also gave a try to `tmm-mid-prompt' =3D nil. Since it disables the tmm shortcuts, maybe it would be more intuitive to let users input keys and do completion at the minibuffer in this situation? (unless I'm missing some unwanted side effect here) With this little change, for example: --- tmm.el.orig 2023-05-27 21:26:44.594743965 +0200 +++ tmm.el 2023-05-27 21:27:13.571769823 +0200 @@ -305,7 +305,7 @@ ;; This returns the old map. (defun tmm-define-keys (minibuffer) (let ((map (make-sparse-keymap))) - (suppress-keymap map t) + (when tmm-mid-prompt (suppress-keymap map t)) (dolist (c tmm-short-cuts) (if (listp tmm-shortcut-style) (define-key map (char-to-string c) 'tmm-shortcut) From unknown Sun Jun 22 03:57:45 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Thiago Melo Subject: bug#63754: closed (Re: bug#63754: 29.0.91; tmm breaks when tmm-completion-prompt is nil) Message-ID: References: <83sfbhhvxd.fsf@gnu.org> X-Gnu-PR-Message: they-closed 63754 X-Gnu-PR-Package: emacs Reply-To: 63754@debbugs.gnu.org Date: Sun, 28 May 2023 05:23:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1685251382-1242-1" This is a multi-part message in MIME format... ------------=_1685251382-1242-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #63754: 29.0.91; tmm breaks when tmm-completion-prompt is nil which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 63754@debbugs.gnu.org. --=20 63754: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D63754 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1685251382-1242-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 63754-done) by debbugs.gnu.org; 28 May 2023 05:22:12 +0000 Received: from localhost ([127.0.0.1]:52987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q38r6-0000Ii-Aq for submit@debbugs.gnu.org; Sun, 28 May 2023 01:22:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q38r4-0000IW-5u for 63754-done@debbugs.gnu.org; Sun, 28 May 2023 01:22:10 -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 1q38qx-0002EP-SF; Sun, 28 May 2023 01:22:03 -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=WLGGWBt0pEjSjtWJUMTfBqAZ9OkSdm2l5Mzw2TAYls8=; b=UWKshvPDOsdaOUQNULZd YNZiOqJf+Yc7IY4jMcCE4Y4gaIxvxJDx/BY/1DfAA8bACIElGyh1FPZqpXmCND1rsx778zh5auVNP eLwXqvnKIjJjAWJWy13AX0IjWkSRB+xUgb3Y3EEKpObB+6c3XoRwI24TvVmUNciQv0Y/ad82SmT0+ WcFdt4h2smDiam0q+3Rp5y7P7h6fsED1zyipGAxzn8CFowUbanoSDXZfrw4uvHgiHfCVxGxQDA273 kaLj0CDdvFVUMAf8uhK/IOTm0aInGB3UQI/tWp1CAmXF2ZFB01pMmk1owbpIWJLDPQLofWUiOig8l U682OzdzTplD9Q==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q38qv-0007BK-TZ; Sun, 28 May 2023 01:22:03 -0400 Date: Sun, 28 May 2023 08:22:38 +0300 Message-Id: <83sfbhhvxd.fsf@gnu.org> From: Eli Zaretskii To: Thiago Melo In-Reply-To: (message from Thiago Melo on Sat, 27 May 2023 19:48:54 +0000) Subject: Re: bug#63754: 29.0.91; tmm breaks when tmm-completion-prompt is nil References: <831qj1k867.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63754-done Cc: 63754-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: -3.3 (---) > From: Thiago Melo > Date: Sat, 27 May 2023 19:48:54 +0000 > Cc: 63754@debbugs.gnu.org > > On Sat, May 27, 2023 at 5:14 PM Eli Zaretskii wrote: > > Thanks. This was caused by a change in the completion heading line in > > Emacs 29: it is now a customizable format string, and can be nil. So > > the method used by tmm.el for finding the prompt (so it could delete > > it) is no longer workable, and must be replaced by a different method. > > > > Should be fixed now on the emacs-29 branch. > > Cool. I've tested, it's working nicely. Thanks for the fix. Thanks for testing, I'm therefore closing this bug. > > (I also fixed it to work > > when 'tmm-mid-prompt' is nil, something that seems to have been broken > > since about forever -- I found that bug while testing the patch, > > because the patch has to work also when 'tmm-mid-prompt' is nil, and > > there are no menu shortcuts shown.) > > Sorry if my comment is out of place, but I also gave a try to > `tmm-mid-prompt' = nil. Since it disables the tmm shortcuts, maybe it > would be more intuitive to let users input keys and do completion at > the minibuffer in this situation? (unless I'm missing some unwanted > side effect here) > > With this little change, for example: I don't know. The original completion works on the shortcuts, AFAIU, and thus makes no sense when tmm-mid-prompt is nil. When that variable is nil, the user needs to use the arrow keys to select the menu items. If someone wants to add a completion feature to that, I don't mind, but I don't know enough about tmm to tell, and such a change is definitely not for the release branch. If someone here has an opinion on this last suggestion, please speak up. ------------=_1685251382-1242-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 27 May 2023 14:54:45 +0000 Received: from localhost ([127.0.0.1]:52406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2vJc-0007Mr-8N for submit@debbugs.gnu.org; Sat, 27 May 2023 10:54:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:43324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2vJa-0007Mj-5C for submit@debbugs.gnu.org; Sat, 27 May 2023 10:54:42 -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 1q2vJZ-0006LE-UV for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 10:54:41 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2vJX-0008JU-Cm for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 10:54:41 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-96f99222e80so383209166b.1 for ; Sat, 27 May 2023 07:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685199277; x=1687791277; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Z/7ZZjQSLDmUJQX4RNj0qZo8gGlHXISvkOC9P+4381w=; b=sWCoHsYJG0w0yqVNlR09W7lGnsTMVL36gLdWaVhitQUKKM4Y4bwLVfkXgex02t700D hTqOL9VKkulNabjPmuC9h2P5U23vawRPId6YoTdf0mhemO3eBR0ti5YWP/NmxvDR9lyz KQrUmQoRFP+UxdWaAmxBWbUQWHwugbnXUefDTT6PVGRGDMrbsvT+kZgFcrJJ5NhT3QHs 1MHEKmX5oLXxw8jwa2PCwdT6QEf8up0gd+x2wc77lnCHYuU1YrJ4nwPbDvWfWB27LEXm mNIwezo02WRjwDzs5RX1BsDDoWswxv4CaN7ffn2lx3vYPq4nGajbhbEhLzaQqI164ZfZ FX9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685199277; x=1687791277; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Z/7ZZjQSLDmUJQX4RNj0qZo8gGlHXISvkOC9P+4381w=; b=icg+or47RJd5o8GMgBVSxtWfbYax2wmoVnfTRRBMd32nQn6Ss6SB4qFXu9sqTl+c/g tgTjh+TJxfKGqQSMbXOMGkhoDl9fo4A2mG/VnPJRq1UmLiPdec4DtHPRKLg8LRoMxp/O VGZw7WluvDWb2VX8l+SKz+wZN3xM2v6cpGSTL9F4s/Rp19sffZK/OlWKtzXCLTigG6Gg ixQen4WT4hxK8T8sRFV5/u7sZXjC32uJqFcjIRZgQhPS9D+58eiuilfCSw7qjyqWREPU A7YzcxT/3tW2k7uTZyxjnbythM803A/KcIRHmw9Jr0vGvzZg8qMTvW9fiSTaARrZsY7z RImg== X-Gm-Message-State: AC+VfDz9lLtWMPD6aZ9bSEQyXv8umF4RPKcj+PiMcCi9o/h2oLU1M0+o +A++wUJqb1TappgVsuOH01mG/nXuTvNYJt2jqB/EDP9eFi4= X-Google-Smtp-Source: ACHHUZ7bx0M1t/LSspVcvDTOjWHleOkE2xM5+a5+7CkBbq/lcMfYsLnB/q3Uyc4GtvnDxeJPJcI5yx0p4BUpikblAT4= X-Received: by 2002:a17:907:1626:b0:969:e993:6ff0 with SMTP id hb38-20020a170907162600b00969e9936ff0mr2382120ejc.25.1685199277184; Sat, 27 May 2023 07:54:37 -0700 (PDT) MIME-Version: 1.0 From: Thiago Melo Date: Sat, 27 May 2023 14:53:59 +0000 Message-ID: Subject: 29.0.91; tmm breaks when tmm-completion-prompt is nil To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=tmdmelo@gmail.com; helo=mail-ej1-x62a.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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.3 (--) Issue doesn't happen with Emacs 28. * How to reproduce run: emacs -Q eval: (setq tmm-completion-prompt nil) (tmm-menubar) ; or `tmm-prompt' with any menu/keymap * Backtrace Debugger entered--Lisp error: (search-failed "Possible completions are:\n") search-forward("Possible completions are:\n") tmm-completion-delete-prompt() run-hooks(completion-setup-hook) display-completion-list((#("f==>File" 0 1 (face (completions-first-difference))) #("e==>Edit" 0 1 (face (completions-first-difference))) #("o==>Options" 0 1 (face (completions-first-difference))) #("b==>Buffers" 0 1 (face (completions-first-difference))) #("t==>Tools" 0 1 (face (completions-first-difference))) #("l==>Lisp-Interaction" 0 1 (face (completions-first-difference))) #("h==>Help" 0 1 (face (completions-first-difference)))) nil nil) #f(compiled-function (window) #)(#) window--display-buffer(# # window ((window-height . completions--fit-window-to-buffer) nil (body-function . #f(compiled-function (window) #)))) display-buffer-at-bottom(# ((window-height . completions--fit-window-to-buffer) nil (body-function . #f(compiled-function (window) #)))) display-buffer(# ((display-buffer--maybe-same-window display-buffer-reuse-window display-buffer--maybe-pop-up-frame display-buffer-at-bottom) (window-height . completions--fit-window-to-buffer) nil (body-function . #f(compiled-function (window) #)))) temp-buffer-window-show(# ((display-buffer--maybe-same-window display-buffer-reuse-window display-buffer--maybe-pop-up-frame display-buffer-at-bottom) (window-height . completions--fit-window-to-buffer) nil (body-function . #f(compiled-function (window) #)))) minibuffer-completion-help() tmm-add-prompt() minibuffer-setup() read-from-minibuffer("Menu bar (up/down to change, PgUp to menu): " nil (keymap (10 . minibuffer-complete-and-exit) (13 . minibuffer-complete-and-exit) keymap (menu-bar keymap (minibuf "Minibuf" keymap (tab menu-item "Complete" minibuffer-complete :help "Complete as far as possible") (space menu-item "Complete Word" minibuffer-complete-word :help "Complete at most one word") (63 menu-item "List Completions" minibuffer-completion-help :help "Display all possible completions") "Minibuf")) (M-down . minibuffer-next-completion) (M-up . minibuffer-previous-completion) (27 keymap (13 . minibuffer-choose-completion) (103 keymap (27 keymap (99 . switch-to-completions))) (118 . switch-to-completions)) (prior . switch-to-completions) (63 . minibuffer-completion-help) (32 . minibuffer-complete-word) (backtab . minibuffer-complete) (9 . minibuffer-complete) keymap (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the min...") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuf...") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "\15" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (24 keymap (down . minibuffer-complete-defaults) (up . minibuffer-complete-history)) (13 . exit-minibuffer) (10 . exit-minibuffer) (7 . abort-minibuffers) (C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous-history-element) (up . previous-line-or-history-element) (prior . previous-history-element) (XF86Forward . next-history-element) (down . next-line-or-history-element) (next . next-history-element) (27 keymap (60 . minibuffer-beginning-of-buffer) (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) nil tmm--history ("f==>File" "e==>Edit" "o==>Options" "b==>Buffers" "t==>Tools" "l==>Lisp-Interaction" "h==>Help") nil) completing-read-default("Menu bar (up/down to change, PgUp to menu): " #f(compiled-function (string pred action) #) nil t nil tmm--history ("f==>File" "e==>Edit" "o==>Options" "b==>Buffers" "t==>Tools" "l==>Lisp-Interaction" "h==>Help")) tmm-prompt((keymap ... ... ... ... ... ... ... ...) nil nil) tmm-menubar() eval((tmm-menubar) t) eval-expression((tmm-menubar) nil nil 127) funcall-interactively(eval-expression (tmm-menubar) nil nil 127) call-interactively(eval-expression nil nil) command-execute(eval-expression) * System information: In GNU Emacs 29.0.91 (build 1, x86_64-pc-linux-gnu, cairo version 1.16.0) of 2023-05-26 built on debian-x250 Repository revision: 5e7c826bfa5cb7459f5b162b498af1c57c4578e6 Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux 11 (bullseye) Configured using: 'configure --prefix=/home/user/apps/emacs-29.0.91-5e7c826 --with-x-toolkit=no --with-mailutils --with-modules --without-compress-install --without-toolkit-scroll-bars --with-native-compilation=no --with-tree-sitter' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY OLDXMENU PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM ZLIB Important settings: value of $LANG: en_DK.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-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 line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-fns radix-tree cl-print byte-opt gv bytecomp byte-compile debug backtrace help-mode find-func cl-loaddefs cl-lib tmm rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode 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 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 lcms2 dynamic-setting system-font-setting font-render-setting cairo xinput2 x multi-tty make-network-process emacs) Memory information: ((conses 16 58330 6430) (symbols 48 6229 0) (strings 32 16451 1591) (string-bytes 1 489144) (vectors 16 12732) (vector-slots 8 171485 10082) (floats 8 27 43) (intervals 56 1188 0) (buffers 984 13)) ------------=_1685251382-1242-1-- From unknown Sun Jun 22 03:57:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63754: 29.0.91; tmm breaks when tmm-completion-prompt is nil Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 May 2023 17:08:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63754 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 63754@debbugs.gnu.org Cc: eliz@gnu.org, tmdmelo@gmail.com Received: via spool by 63754-submit@debbugs.gnu.org id=B63754.16853800627136 (code B ref 63754); Mon, 29 May 2023 17:08:03 +0000 Received: (at 63754) by debbugs.gnu.org; 29 May 2023 17:07:42 +0000 Received: from localhost ([127.0.0.1]:59034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3gLN-0001r1-Mx for submit@debbugs.gnu.org; Mon, 29 May 2023 13:07:41 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:37393) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3gLL-0001qn-FO for 63754@debbugs.gnu.org; Mon, 29 May 2023 13:07:39 -0400 X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net Received: by mail.gandi.net (Postfix) with ESMTPSA id 71C90FF802; Mon, 29 May 2023 17:07:32 +0000 (UTC) From: Juri Linkov In-Reply-To: <83sfbhhvxd.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 28 May 2023 08:22:38 +0300") Organization: LINKOV.NET References: <831qj1k867.fsf@gnu.org> <83sfbhhvxd.fsf@gnu.org> Date: Mon, 29 May 2023 19:37:58 +0300 Message-ID: <86edmz855l.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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 (-) >> > Should be fixed now on the emacs-29 branch. >> >> Cool. I've tested, it's working nicely. Thanks for the fix. > > Thanks for testing, I'm therefore closing this bug. There is one remaining case where it fails: (setq completions-header-format nil) (setq tmm-completion-prompt nil) (tmm-menubar) ; or `tmm-prompt' with any menu/keymap Then the first item is deleted. The patch below fixes this. >> Sorry if my comment is out of place, but I also gave a try to >> `tmm-mid-prompt' = nil. Since it disables the tmm shortcuts, maybe it >> would be more intuitive to let users input keys and do completion at >> the minibuffer in this situation? (unless I'm missing some unwanted >> side effect here) >> >> With this little change, for example: > > I don't know. The original completion works on the shortcuts, AFAIU, > and thus makes no sense when tmm-mid-prompt is nil. When that > variable is nil, the user needs to use the arrow keys to select the > menu items. If someone wants to add a completion feature to that, I > don't mind, but I don't know enough about tmm to tell, and such a > change is definitely not for the release branch. > > If someone here has an opinion on this last suggestion, please speak > up. AFAICS, completion works without problems in tmm. The artificial restriction that removes self-inserting keys was needed to allow only character shortcuts when tmm-mid-prompt is nil. diff --git a/lisp/tmm.el b/lisp/tmm.el index 88254f0d1b8..a4058594622 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -329,7 +329,8 @@ tmm-completion-delete-prompt (with-current-buffer standard-output (goto-char (point-min)) (let* (;; First candidate: first string with mouse-face - (menu-start-1 (next-single-char-property-change (point) 'mouse-face)) + (menu-start-1 (or (and (get-text-property (point) 'mouse-face) (point)) + (next-single-char-property-change (point) 'mouse-face))) ;; Second candidate: an inactive menu item with tmm-inactive face (tps-result (save-excursion (text-property-search-forward 'face 'tmm-inactive t))) From unknown Sun Jun 22 03:57:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63754: 29.0.91; tmm breaks when tmm-completion-prompt is nil Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 May 2023 17:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63754 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 63754@debbugs.gnu.org, tmdmelo@gmail.com Received: via spool by 63754-submit@debbugs.gnu.org id=B63754.16853808748751 (code B ref 63754); Mon, 29 May 2023 17:22:01 +0000 Received: (at 63754) by debbugs.gnu.org; 29 May 2023 17:21:14 +0000 Received: from localhost ([127.0.0.1]:59067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3gYU-0002H5-IU for submit@debbugs.gnu.org; Mon, 29 May 2023 13:21:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3gYS-0002Gq-SC for 63754@debbugs.gnu.org; Mon, 29 May 2023 13:21:13 -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 1q3gYN-0006aS-7u; Mon, 29 May 2023 13:21:07 -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=ytJTNPu+q2pupEcYn70ebDIYNBr8MjAF84Of8/uTVtg=; b=R/VsomRdMqrH P+6U+tnO+HiPAQ5d1vGUB32xyVNnlRY4AqKt8rRnriQZOu0M6hPpwCnTZ0F0MGt5DZuHHnNpqSCQz 6WzhT9dPCgM8qzKMRaCwXbIxTe1ZgQLSfeoijUXMlzAFQXUEGnWMsVketxXCBmhmDR3fshub2smwx LIVuE39inlMnydiGfvi08HJ6NkwEnETwGGi2LcjFskVp7uaTOzUgzgWuc2N/ODzxOefPAfiq44LRP rD0ZGwWt3C3iDEz6nvTijIB6C3YtQqUZp0IjvmFXNDnRixeQJ8ge+MBQW8aoOQ82cpbsPxJeQcqEg 9Oj2Y9dgy5vhUdYVYVrMrg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3gYM-0000lF-IU; Mon, 29 May 2023 13:21:06 -0400 Date: Mon, 29 May 2023 20:21:46 +0300 Message-Id: <835y8bgij9.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <86edmz855l.fsf@mail.linkov.net> (message from Juri Linkov on Mon, 29 May 2023 19:37:58 +0300) References: <831qj1k867.fsf@gnu.org> <83sfbhhvxd.fsf@gnu.org> <86edmz855l.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) 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: Juri Linkov > Cc: eliz@gnu.org, tmdmelo@gmail.com > Date: Mon, 29 May 2023 19:37:58 +0300 > > There is one remaining case where it fails: > > (setq completions-header-format nil) > (setq tmm-completion-prompt nil) > (tmm-menubar) ; or `tmm-prompt' with any menu/keymap > > Then the first item is deleted. The patch below fixes this. Thanks, please install on emacs-29.