GNU bug report logs - #79080
31.0.50; report-emacs-bug-check-org errors with args-out-range

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Wed, 23 Jul 2025 10:01:01 UTC

Severity: normal

Merged with 79138

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Daniel Mendler <mail <at> daniel-mendler.de>, Antero Mejr <mail <at> antr.me>
Cc: 79080 <at> debbugs.gnu.org
Subject: bug#79080: 31.0.50; report-emacs-bug-check-org errors with args-out-range
Date: Sat, 26 Jul 2025 12:57:37 +0300
> Date: Wed, 23 Jul 2025 11:59:48 +0200
> From:  Daniel Mendler via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> While sending my last bug report I observed the following issue, where
> `report-emacs-bug-check-org' throws an `args-out-of-range' error. I've
> got the following stack trace:
> 
> Debugger entered--Lisp error: (args-out-of-range "From: Daniel Mendler <mail <at> daniel-mendler.de>\nTo: bug-gnu-emacs <at> gnu.org\nSubject: 31.0.50; Piped command output is sometimes lost in Eshell\nGcc: nnimap+privat:sent\nX-Debbugs-Cc: Jim Porter <jporterbugs <at> gmail.com>\n--text follows this line--\nHello,\n\nsometimes when executing commands in Eshell with pipes the output seems\nto get lost, for example:\n\ngit log | head -n 10 | cat\n\nInstead of the expected ten lines of output, there is no output. This\nproblem does not happen always, but from time to time, so maybe there is\nsome timing issue regarding the process handling? In case the issue does\nnot occur immediately one can try this:\n\nwhile true { echo \"test\"; git log | head -n 1 | cat }\n\nFor such loops the following error might occur:\n\nCreating pipe: Too many open files\nCannot redirect stderr: Too many open files, /dev/null\n\nI tested this with emacs -Q on Emacs 31 with a relatively recent commit\nfrom a few days ago (1e3d76af5a7a16682e71f9df46f6788c0880cccd).\n\nCan someone confirm these problems? Thanks!\n\nIn GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version\n 3.24.49, cairo version 1.18.4) of 2025-07-15\nWindowing system distributor 'The X.Org Foundation', version 11.0.12101016\nSystem Description: Debian GNU/Linux 13 (trixie)\n\nConfigured using:\n 'configure --prefix=$HOME/.local/share/emacs\n --without-compress-install --with-tree-sitter --with-native-compilation\n --with-dbus --without-selinux --without-threads --disable-gc-mark-trace\n --without-gsettings --without-gpm --with-cairo --with-cairo-xcb\n --with-xinput2 --with-x-toolkit=gtk3 --without-toolkit-scroll-bars\n 'CFLAGS=-O3 -mtune=native -march=native''\n\nConfigured features:\nCAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBOTF LIBSYSTEMD\nLIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP\nSOUND SQLITE3 TIFF TREE_SITTER WEBP X11 XDBE XIM XINERAMA XINPUT2 XPM\nXRANDR GTK3 ZLIB" 0 7762)
>   (report-emacs-bug-check-org)

Thanks.  I added the author of that function to the discussion.

Antero, I think the bug here is in the assumption that the user edits
the original text inserted by report-emacs-bug only to _add_ text.
But that might not be true: users could remove some of the original
text as well.  So something like the below is in order.  But I also
wonder why we should look for the regular expression only in part of
the message to be sent.  Can you explain why you did that?

diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 5ffb86e..51954a1 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -430,8 +430,11 @@ report-emacs-bug-check-org
     (goto-char (point-max))
     (skip-chars-backward " \t\n")
     (let* ((text (buffer-substring-no-properties (point-min) (point)))
-           (l (length report-emacs-bug-orig-text))
-           (text (substring text 0 l))
+           (ltext (length text))
+           (lorig (length report-emacs-bug-orig-text))
+           (text (if (< lorig ltext)
+                     (substring text 0 lorig)
+                   text))
            (org-regex "\\b[Oo]rg\\(-mode\\)?\\b"))
       (when (string-match-p org-regex text)
         (when (yes-or-no-p "Is this bug about org-mode?")




This bug report was last modified 19 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.