From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Chris Siebenmann Newsgroups: gmane.emacs.bugs Subject: bug#67359: 29.1; 29.1: MH-E limited display malfunctions if nothing is matched Date: Tue, 21 Nov 2023 19:28:45 -0500 Message-ID: <2304350.1700612925@apps0.cs.toronto.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38290"; mail-complaints-to="usenet@ciao.gmane.io" Cc: cks.emacsbugs-01@cs.toronto.edu To: 67359@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 22 09:26:36 2023 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 1r5iZ9-0009gU-JY for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Nov 2023 09:26:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5iYc-0007Hh-2Y; Wed, 22 Nov 2023 03:26:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r5iYa-0007BV-AO for bug-gnu-emacs@gnu.org; Wed, 22 Nov 2023 03:26:00 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5iYZ-0003ZS-V0 for bug-gnu-emacs@gnu.org; Wed, 22 Nov 2023 03:25:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r5iYc-000327-1e for bug-gnu-emacs@gnu.org; Wed, 22 Nov 2023 03:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Chris Siebenmann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Nov 2023 08:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67359 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.170064151311583 (code B ref -1); Wed, 22 Nov 2023 08:26:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Nov 2023 08:25:13 +0000 Original-Received: from localhost ([127.0.0.1]:57948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5iXm-00030f-8q for submit@debbugs.gnu.org; Wed, 22 Nov 2023 03:25:12 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:34986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5b7E-0003yX-LT for submit@debbugs.gnu.org; Tue, 21 Nov 2023 19:29:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r5b76-0002Pd-BT for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 19:29:08 -0500 Original-Received: from cliff.cs.toronto.edu ([128.100.3.120]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r5b74-0002Ec-4J for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 19:29:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.toronto.edu; s=cs202005; h=Message-ID:Date:Content-ID:Content-Type: MIME-Version:Subject:cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=/K6f79DM38VLz9dbzz/AcPa3LtxTFqE9w6k0TAV1LXI=; b=g2pizfqtIhEdboqjR1PJvKZDxx onDB2TbfVAB41MOYa0S0qviWI9fplV5GFV2veXI096zf0nXvm8v1vDy9pY11uPKzYgf/Uqwe9Y4pg BvT+o0EE/gQX/B+cjPFPpd59aA3h4RoSaDSngN4UEibZYUcy2I+NRrEjMpHGf1BKaKRg4Ia0cYmtM 0U15gpL+WNgG2hy1EL5SAq6ht4xD+iyl768khJRXimsGewYV8MyA1L7VyCjKHfjkTNz2HSKcW6pG6 r8weF73WKNSNw9w1PjAaBAJQZHWDuXLMvPKfhBuj826cASBtrV7fbOnYrwIg9qy1CXM42wn05AwiW 0/4VnvtA==; Original-Received: from apps0.cs.toronto.edu ([128.100.3.40] ident=postfix) by cliff.cs.toronto.edu with esmtp (Exim 4.95) (envelope-from ) id 1r5b8L-009olM-Ca; Tue, 21 Nov 2023 19:28:46 -0500 Original-Received: by apps0.cs.toronto.edu (Postfix, from userid 915) id 6D57760296; Tue, 21 Nov 2023 19:28:45 -0500 (EST) Original-Received: from apps0.cs.toronto.edu (localhost [127.0.0.1]) by apps0.cs.toronto.edu (Postfix) with ESMTP id 6BEE66023B; Tue, 21 Nov 2023 19:28:45 -0500 (EST) Content-ID: <2304349.1700612925.1@apps0.cs.toronto.edu> Received-SPF: pass client-ip=128.100.3.120; envelope-from=cks.emacsbugs-01@cs.toronto.edu; helo=cliff.cs.toronto.edu X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, 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-Mailman-Approved-At: Wed, 22 Nov 2023 03:25:09 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274753 Archived-At: The summary is that if you use one of the MH-E limit commands, normally bound under / in MH-E folder mode, and you attempt to limit (narrow) to something that isn't present, MH-E doesn't handle the situation properly and winds up with a narrowed list of folder contents displaying nothing useful instead of reporting that no messages matched. To reproduce this, you will need NMH and MH-E configured. Then: * Enter MH-E, for example with 'M-x mh-rmail'. * widen the display to cover your entire inbox, '/ w'. * search for something that is not present: 'C-u / s', and change the subject to search for to, for example, 'nosuchsubjectstring'. When you do this, MH-E will first show an error message in a buffer below the folder window and then narrow the main folder window to a single line showing 'scan: no messages match specification'. ('/ w' will then fix the situation.) When this happens, my *MH-E Log* buffer shows (without the leading indent): Errors when executing: mark +inbox -add -sequence header 0 0 mark: no messages match specification The NMH commands MH-E has run (for me) are: /usr/bin/mh/pick +inbox 1-382 -list -subject nosuchsubjectstring /usr/bin/mh/mark +inbox -add -sequence header 0 0 The output from this pick command if run by hand *without standard output being a tty* are: $ pick +inbox 1-382 -list -subject nosuchsubjectstring | cat pick: no messages match specification 0 The potentially surprising '0' is documented in the current NMH pick manual page in "Output when no messages are matched". In brief, with -list and standard output not being a tty, pick deliberately outputs as '0' to standard output to signal error. I believe the code problem is in mh-narrow-to-header-field in mh-limit.el, where it processes pick output using 'string-to-number' on each line and then pushes the nominal resulting number on to the msg-list list with: (when num (push num msg-list)) I think that there are two problems with this code. The first is that string-to-number doesn't return nil on non-numbers, it returns 0. The second is that sometimes a real '0' is present, but should not be pushed into the message list either. The two together explain why mark was invoked with the odd '0 0'; one is from the pick error line and one is from the actual '0' it output. I am using the version of NMH packaged with Ubuntu 22.04, which is listed as NMH 1.7.1. My Emacs is a locally compiled 29.1. NOTE: This reproduces in 'emacs -Q', but this report is submitted from inside my regular Emacs environment because life is too short. You can ignore the list of third party packages, load-path shadows, and other things. In GNU Emacs 29.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2023-10-30 built on comps3 Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: Ubuntu 22.04.3 LTS Configured using: 'configure --prefix /u/cks/lib/x64-linux/emacs-29.1 --without-gsettings --with-x --with-x-toolkit=gtk3 --with-json --with-tree-sitter --with-native-compilation=aot' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LC_COLLATE: C value of $LC_CTYPE: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: smartparens-mode: t global-corfu-mode: t corfu-mode: t marginalia-mode: t vertico-mouse-mode: t vertico-multiform-mode: t vertico-mode: t which-key-mode: t global-flycheck-mode: t flycheck-mode: t backward-forward-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-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: /u/cks/.emacs.d/elpa/transient-20231121.1154/transient hides /u/cks/lib/x64-linux/emacs-29.1/share/emacs/29.1/lisp/transient /u/cks/.emacs.d/elpa/use-package-20230426.2324/use-package-core hides /u/cks/lib/x64-linux/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package-core /u/cks/.emacs.d/elpa/use-package-20230426.2324/use-package-diminish hides /u/cks/lib/x64-linux/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package-diminish /u/cks/.emacs.d/elpa/bind-key-20230203.2004/bind-key hides /u/cks/lib/x64-linux/emacs-29.1/share/emacs/29.1/lisp/use-package/bind-key /u/cks/.emacs.d/elpa/use-package-20230426.2324/use-package-lint hides /u/cks/lib/x64-linux/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package-lint /u/cks/.emacs.d/elpa/use-package-20230426.2324/use-package-jump hides /u/cks/lib/x64-linux/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package-jump /u/cks/.emacs.d/elpa/use-package-20230426.2324/use-package hides /u/cks/lib/x64-linux/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package /u/cks/.emacs.d/elpa/use-package-20230426.2324/use-package-delight hides /u/cks/lib/x64-linux/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package-delight /u/cks/.emacs.d/elpa/use-package-20230426.2324/use-package-bind-key hides /u/cks/lib/x64-linux/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package-bind-key /u/cks/.emacs.d/elpa/use-package-20230426.2324/use-package-ensure hides /u/cks/lib/x64-linux/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package-ensure /u/cks/.emacs.d/elpa/project-0.10.0/project hides /u/cks/lib/x64-linux/emacs-29.1/share/emacs/29.1/lisp/progmodes/project /u/cks/.emacs.d/elpa/seq-2.24/seq hides /u/cks/lib/x64-linux/emacs-29.1/share/emacs/29.1/lisp/emacs-lisp/seq Features: (shadow mh-identity mh-letter emacsbug mule-util mh-limit shr-color color textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check mm-archive mail-extr mh-seq mh-inc hl-line mh-tool-bar flyspell ispell mh-xface mh-cks mh-cks-speed mh-speed speedbar ezimage dframe gnus-icalendar org-capture org-refile org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete pcomplete comint ansi-osc ring 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 org-version org-compat org-macs format-spec icalendar diary-lib diary-loaddefs cal-menu calendar cal-loaddefs mh-utils mh-mime mh-acros mh-show gnus-cite gnus-art mm-uu mml2015 gnus-sum shr pixel-fill kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 nnoo parse-time iso8601 gnus-spec gnus-int message yank-media dired dired-loaddefs rfc822 mailabbrev gmm-utils mailheader gnus-win gnus-range gnus nnheader range wid-edit mh-comp sendmail mail-utils mh-gnus mml mm-view mml-smime mml-sec epa derived epg rfc6068 epg-config smime gnutls puny dig mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mh-folder which-func imenu gnus-util text-property-search time-date mh-scan mh-e mh-buffers mh-loaddefs goto-addr comp comp-cstr warnings icons smartparens advice loadhist thingatpt .emacs corfu marginalia vertico-mouse vertico-multiform vertico compat which-key flycheck ansi-color find-func rx dash backward-forward edmacro kmacro cl-extra help-mode pp diminish use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core finder-inf company-autoloads consult-flycheck-autoloads consult-flyspell-autoloads consult-lsp-autoloads corfu-autoloads embark-consult-autoloads consult-autoloads embark-autoloads evil-autoloads expand-region-autoloads flycheck-golangci-lint-autoloads flycheck-autoloads fold-this-autoloads go-mode-autoloads goto-chg-autoloads lsp-ui-autoloads lsp-mode-autoloads magit-autoloads pcase git-commit-autoloads magit-section-autoloads marginalia-autoloads orderless-autoloads project-autoloads markdown-mode-autoloads f-autoloads rust-mode-autoloads smartparens-autoloads transient-autoloads try-autoloads vertico-autoloads vundo-autoloads which-key-autoloads with-editor-autoloads info compat-autoloads seq-autoloads yaml-mode-autoloads package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib 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 font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 677360 268275) (symbols 48 32601 280) (strings 32 175807 52415) (string-bytes 1 5114423) (vectors 16 78133) (vector-slots 8 1328934 545011) (floats 8 474 1371) (intervals 56 853 260) (buffers 984 19))