From unknown Fri Sep 19 06:16:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79080: 31.0.50; report-emacs-bug-check-org errors with args-out-range Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Jul 2025 10:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 79080 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 79080@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.175326481015026 (code B ref -1); Wed, 23 Jul 2025 10:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jul 2025 10:00:10 +0000 Received: from localhost ([127.0.0.1]:48500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ueWGf-0003u8-0v for submit@debbugs.gnu.org; Wed, 23 Jul 2025 06:00:09 -0400 Received: from lists.gnu.org ([2001:470:142::17]:39136) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ueWGb-0003sK-CQ for submit@debbugs.gnu.org; Wed, 23 Jul 2025 06:00:06 -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 1ueWGO-0005N3-Bl for bug-gnu-emacs@gnu.org; Wed, 23 Jul 2025 05:59:53 -0400 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1] helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ueWGM-0004KY-K4 for bug-gnu-emacs@gnu.org; Wed, 23 Jul 2025 05:59:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nNVp5XIgG9bC21PKoPhqrmBhogO7+jnbXno7VrkuVFA=; b=yYdi6Lb4W6d4d9526or0KknQLz Oc+NXWXQcPRkMTYOn7ssd/AHQhSVAp/k79qMNBp07kTWVTxb075Y3jeI8xS8eVh8Bbxd0PAEexYxF jHeYL76GqLuohoeykGLFvgAeqAmRrZw0EM8GZNT+PkVlLcrdRkLFOBO9zZ+Np/EXgb9g=; From: Daniel Mendler Date: Wed, 23 Jul 2025 11:59:48 +0200 Message-ID: <87ms8v5isr.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a01:4f8:c012:9177::1; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) 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.1 (/) 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 \nTo: bug-gnu-emacs@gnu.org\nSubject: 31.0.50; Piped co= mmand output is sometimes lost in Eshell\nGcc: nnimap+privat:sent\nX-Debbug= s-Cc: Jim Porter \n--text follows this line--\nHello= ,\n\nsometimes when executing commands in Eshell with pipes the output seem= s\nto get lost, for example:\n\ngit log | head -n 10 | cat\n\nInstead of th= e 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 immediate= ly one can try this:\n\nwhile true { echo \"test\"; git log | head -n 1 | c= at }\n\nFor such loops the following error might occur:\n\nCreating pipe: T= oo 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 som= eone 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-1= 5\nWindowing system distributor 'The X.Org Foundation', version 11.0.121010= 16\nSystem Description: Debian GNU/Linux 13 (trixie)\n\nConfigured using:\n= 'configure --prefix=3D$HOME/.local/share/emacs\n --without-compress-instal= l --with-tree-sitter --with-native-compilation\n --with-dbus --without-seli= nux --without-threads --disable-gc-mark-trace\n --without-gsettings --witho= ut-gpm --with-cairo --with-cairo-xcb\n --with-xinput2 --with-x-toolkit=3Dgt= k3 --without-toolkit-scroll-bars\n 'CFLAGS=3D-O3 -mtune=3Dnative -march=3Dn= ative''\n\nConfigured features:\nCAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HA= RFBUZZ JPEG LIBOTF LIBSYSTEMD\nLIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY P= DUMPER PNG RSVG SECCOMP\nSOUND SQLITE3 TIFF TREE_SITTER WEBP X11 XDBE XIM X= INERAMA XINPUT2 XPM\nXRANDR GTK3 ZLIB" 0 7762) (report-emacs-bug-check-org) (report-emacs-bug-hook) (message-send nil) (message-send-and-exit nil) (funcall-interactively message-send-and-exit nil) (command-execute message-send-and-exit) In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.49, cairo version 1.18.4) of 2025-07-15 Windowing system distributor 'The X.Org Foundation', version 11.0.12101016 System Description: Debian GNU/Linux 13 (trixie) Configured using: 'configure --prefix=3D$HOME/.local/share/emacs --without-compress-install --with-tree-sitter --with-native-compilation --with-dbus --without-selinux --without-threads --disable-gc-mark-trace --without-gsettings --without-gpm --with-cairo --with-cairo-xcb --with-xinput2 --with-x-toolkit=3Dgtk3 --without-toolkit-scroll-bars 'CFLAGS=3D-O3 -mtune=3Dnative -march=3Dnative'' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 TIFF TREE_SITTER WEBP X11 XDBE XIM XINERAMA XINPUT2 XPM XRANDR GTK3 ZLIB From unknown Fri Sep 19 06:16:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79080: 31.0.50; report-emacs-bug-check-org errors with args-out-range Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Jul 2025 09:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79080 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Daniel Mendler , Antero Mejr Cc: 79080@debbugs.gnu.org Received: via spool by 79080-submit@debbugs.gnu.org id=B79080.175352387022874 (code B ref 79080); Sat, 26 Jul 2025 09:58:01 +0000 Received: (at 79080) by debbugs.gnu.org; 26 Jul 2025 09:57:50 +0000 Received: from localhost ([127.0.0.1]:40112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ufbf3-0005ws-Qa for submit@debbugs.gnu.org; Sat, 26 Jul 2025 05:57:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59636) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ufbf0-0005wW-O1 for 79080@debbugs.gnu.org; Sat, 26 Jul 2025 05:57:47 -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 1ufbeu-0006dn-FM; Sat, 26 Jul 2025 05:57:40 -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=zn6v6DLUTw/RhyrbIJwG3Pfpn3AXwxe5ymJivyHqG2M=; b=QGhtQhUTgTZqJHKCx7Sj 8m4mnM788Ej3t4Ss3cVSEeSB0isMggQjLSONu+YQhYZDOA9YrA3Hm6esXjMj6AbojSOLR77P2iT8L Oc0QO2ioFrIirhpLRUdOAXeO7yjM+zybmtpIIkRlS82eyzT7VSd387A1NbVsei6D4jFVkdA4Txn+v CZznHRZJc6JnIMtSgcPQmNilnWNfoM9AnrFTB2qjciMAIKoMboggdijOxCWeWTxQfz1QmsvjLZBVP wBrWUnzjqsJasViuFxUkELCMZKXqQzBu562TF4Wj4t8m/Haa4B7GxUE1vz6i/XJLd7RhdED0PvH6E X00uKL5m9oiPCQ==; Date: Sat, 26 Jul 2025 12:57:37 +0300 Message-Id: <86bjp71dgu.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87ms8v5isr.fsf@daniel-mendler.de> (bug-gnu-emacs@gnu.org) References: <87ms8v5isr.fsf@daniel-mendler.de> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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 (---) > 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" >=20 > 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: >=20 > Debugger entered--Lisp error: (args-out-of-range "From: Daniel Mendler \nTo: bug-gnu-emacs@gnu.org\nSubject: 31.0.50; Piped = command output is sometimes lost in Eshell\nGcc: nnimap+privat:sent\nX-Debb= ugs-Cc: Jim Porter \n--text follows this line--\nHel= lo,\n\nsometimes when executing commands in Eshell with pipes the output se= ems\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 no= t happen always, but from time to time, so maybe there is\nsome timing issu= e regarding the process handling? In case the issue does\nnot occur immedia= tely 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/nul= l\n\nI tested this with emacs -Q on Emacs 31 with a relatively recent commi= t\nfrom a few days ago (1e3d76af5a7a16682e71f9df46f6788c0880cccd).\n\nCan s= omeone confirm these problems? Thanks!\n\nIn GNU Emacs 31.0.50 (build 1, x8= 6_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.1210= 1016\nSystem Description: Debian GNU/Linux 13 (trixie)\n\nConfigured using:= \n 'configure --prefix=3D$HOME/.local/share/emacs\n --without-compress-inst= all --with-tree-sitter --with-native-compilation\n --with-dbus --without-se= linux --without-threads --disable-gc-mark-trace\n --without-gsettings --wit= hout-gpm --with-cairo --with-cairo-xcb\n --with-xinput2 --with-x-toolkit=3D= gtk3 --without-toolkit-scroll-bars\n 'CFLAGS=3D-O3 -mtune=3Dnative -march= =3Dnative''\n\nConfigured features:\nCAIRO DBUS FREETYPE GIF GLIB GMP GNUTL= S HARFBUZZ JPEG LIBOTF LIBSYSTEMD\nLIBXML2 MODULES NATIVE_COMP NOTIFY INOTI= FY PDUMPER PNG RSVG SECCOMP\nSOUND SQLITE3 TIFF TREE_SITTER WEBP X11 XDBE X= IM 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?") From unknown Fri Sep 19 06:16:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79080: 31.0.50; report-emacs-bug-check-org errors with args-out-range Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Jul 2025 10:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79080 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Antero Mejr , 79080@debbugs.gnu.org Received: via spool by 79080-submit@debbugs.gnu.org id=B79080.175352425424566 (code B ref 79080); Sat, 26 Jul 2025 10:05:01 +0000 Received: (at 79080) by debbugs.gnu.org; 26 Jul 2025 10:04:14 +0000 Received: from localhost ([127.0.0.1]:40156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ufblG-0006OA-4N for submit@debbugs.gnu.org; Sat, 26 Jul 2025 06:04:14 -0400 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:58439 helo=mail.qxqx.de) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ufblC-0006Nt-Vb for 79080@debbugs.gnu.org; Sat, 26 Jul 2025 06:04:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LYB3M5hBjcaio3nMzNczceKs2TMG1glW3odPXIZYido=; b=O1wvHOO5rs+Z29aBQNso3mAqP2 kSVygwz3PIZ2JExRZtMWP5byk7A4XAxGRxLdja56UVvzlPcBcC+GUY7b+TrOfzWVjq6litLwKXJsn nDBuHv6W47GlbgG/5A+SQUgYxkejwLhdlveHpCx5W6Dm/oyRUrdKuuWrpQsjDZTvYLFA=; From: Daniel Mendler In-Reply-To: <86bjp71dgu.fsf@gnu.org> References: <87ms8v5isr.fsf@daniel-mendler.de> <86bjp71dgu.fsf@gnu.org> Date: Sat, 26 Jul 2025 12:04:02 +0200 Message-ID: <87y0sbs1yl.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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 (-) Eli Zaretskii writes: >> 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" >>=20 >> 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: >>=20 >> Debugger entered--Lisp error: (args-out-of-range "From: Daniel Mendler <= mail@daniel-mendler.de>\nTo: bug-gnu-emacs@gnu.org\nSubject: 31.0.50; Piped= command output is sometimes lost in Eshell\nGcc: nnimap+privat:sent\nX-Deb= bugs-Cc: Jim Porter \n--text follows this line--\nHe= llo,\n\nsometimes when executing commands in Eshell with pipes the output s= eems\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 n= ot happen always, but from time to time, so maybe there is\nsome timing iss= ue regarding the process handling? In case the issue does\nnot occur immedi= ately 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/nu= ll\n\nI tested this with emacs -Q on Emacs 31 with a relatively recent comm= it\nfrom a few days ago (1e3d76af5a7a16682e71f9df46f6788c0880cccd).\n\nCan = someone confirm these problems? Thanks!\n\nIn GNU Emacs 31.0.50 (build 1, x= 86_64-pc-linux-gnu, GTK+ Version\n 3.24.49, cairo version 1.18.4) of 2025-0= 7-15\nWindowing system distributor 'The X.Org Foundation', version 11.0.121= 01016\nSystem Description: Debian GNU/Linux 13 (trixie)\n\nConfigured using= :\n 'configure --prefix=3D$HOME/.local/share/emacs\n --without-compress-ins= tall --with-tree-sitter --with-native-compilation\n --with-dbus --without-s= elinux --without-threads --disable-gc-mark-trace\n --without-gsettings --wi= thout-gpm --with-cairo --with-cairo-xcb\n --with-xinput2 --with-x-toolkit= =3Dgtk3 --without-toolkit-scroll-bars\n 'CFLAGS=3D-O3 -mtune=3Dnative -marc= h=3Dnative''\n\nConfigured features:\nCAIRO DBUS FREETYPE GIF GLIB GMP GNUT= LS HARFBUZZ JPEG LIBOTF LIBSYSTEMD\nLIBXML2 MODULES NATIVE_COMP NOTIFY INOT= IFY 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. Yes, I can confirm that this is the problem. I edited the original text. Daniel From unknown Fri Sep 19 06:16:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79080: 31.0.50; report-emacs-bug-check-org errors with args-out-range Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Jul 2025 15:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79080 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Daniel Mendler , 79080@debbugs.gnu.org Received: via spool by 79080-submit@debbugs.gnu.org id=B79080.17535434202037 (code B ref 79080); Sat, 26 Jul 2025 15:24:01 +0000 Received: (at 79080) by debbugs.gnu.org; 26 Jul 2025 15:23:40 +0000 Received: from localhost ([127.0.0.1]:44025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ufgkN-0000Wm-T7 for submit@debbugs.gnu.org; Sat, 26 Jul 2025 11:23:40 -0400 Received: from sender4-op-o10.zoho.com ([136.143.188.10]:17024) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ufgkK-0000W9-Fm for 79080@debbugs.gnu.org; Sat, 26 Jul 2025 11:23:37 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1753543399; cv=none; d=zohomail.com; s=zohoarc; b=haYQk9B5ZuT7sHkntsbldNNJQmaiBmVpzAJopmSNOb5VgIdjmoa5Qei0nJFzfgPY0MXaz3lOWe0sh8s5lnFTIOEx2vh30eIN8L+fHi0/m7HYAnyH+UKUvlPxxCE3Bkb9OYCRNKVRdv/2To1M2hqIuiBmXWCVazoE2BEETMTY+BM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753543399; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=nXWLKYdJ8UJASuT5SWw+Dcy/tJwysVReP/Bv5pVj2Ug=; b=A6rl6hrbQP6g3mnXgWkyO7XXhxLUKroJu1eIHezCz6pOoZWa+93ok8BBykzkeuR2et1R1RPGi0JPB1BLYbKs93Bv43EhXHDzr/wbvpIyyf7LmTo6SpBbrzcA6uXAeghH5OJxhg6w7lF81bgRTMLTUNklfLIeOEwphFdbFalnFJA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=antr.me; spf=pass smtp.mailfrom=mail@antr.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1753543399; s=zmail; d=antr.me; i=mail@antr.me; h=From:From:To:To:Cc:Cc:Subject:Subject:In-Reply-To:References:Date:Date:Message-ID:MIME-Version:Content-Type:Message-Id:Reply-To; bh=nXWLKYdJ8UJASuT5SWw+Dcy/tJwysVReP/Bv5pVj2Ug=; b=KP9ogoaAAECqUWG8m2tQG32NRt4DnuLWB8M63qs38vOxBMlSwob/djyfjPOv50kE UHTsdLVkxzox241BO9UzYyJmPb452fB66AiHAwWAHo+KrFxWHcTcTfZ2hGNc97v4QCy B0siOkPapr5iJ0g6EB7HSxGSm73rY0Yr5tQH1JxQ= Received: by mx.zohomail.com with SMTPS id 1753543397285185.35179625141825; Sat, 26 Jul 2025 08:23:17 -0700 (PDT) From: Antero Mejr In-Reply-To: <86bjp71dgu.fsf@gnu.org> References: <87ms8v5isr.fsf@daniel-mendler.de> <86bjp71dgu.fsf@gnu.org> Date: Sat, 26 Jul 2025 15:23:16 +0000 Message-ID: <87frejc6xn.fsf@antr.me> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Zoho-Virus-Status: 1 X-Zoho-Virus-Status: 1 X-Zoho-AV-Stamp: zmail-av-1.4.2/253.536.6 X-ZohoMailClient: External 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 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> 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" >> >> 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: >> > 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? The Features: section of the original text contains the string " org ", which will match the regex and always flag a false positive. The snippet you posted works but I think it will match that " org " feature if the user removes any of the original text. I attached a patch that compares the number of matches in the original text to the edited text. This should avoid false positives unless the user deletes the " org " strings from the original text. And it will fix the error. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fix-index-error-when-checking-edited-bug-reports.patch >From c92b9e63f30bde4b6ec0e94ca4ece8494c21c8b6 Mon Sep 17 00:00:00 2001 From: Antero Mejr Date: Sat, 26 Jul 2025 15:13:15 +0000 Subject: [PATCH] Fix index error when checking edited bug reports * lisp/mail/emacsbug.el (report-emacs-bug-check-org): Improve regex check. (Bug#79080) --- lisp/mail/emacsbug.el | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index 5ffb86e68b6..d43647a12ca 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -427,13 +427,16 @@ emacs-build-description (defun report-emacs-bug-check-org () "Warn the user if the bug report mentions org-mode." (unless report-emacs-bug-no-confirmation - (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)) - (org-regex "\\b[Oo]rg\\(-mode\\)?\\b")) - (when (string-match-p org-regex text) + (let* ((org-regex "\\(^\\|\\s-\\)[Oo]rg\\(-mode\\)?\\(\\s-\\|$\\)") + (count (lambda (r s) + (let ((c 0) (start 0)) + (while (string-match r s start) + (setq c (1+ c)) + (setq start (match-end 0))) + c))) + (m (funcall count org-regex (buffer-string))) + (m-orig (funcall count org-regex report-emacs-bug-orig-text))) + (when (> m m-orig) (when (yes-or-no-p "Is this bug about org-mode?") (error (substitute-command-keys "\ Not sending, use \\[org-submit-bug-report] to report an Org-mode bug."))))))) -- 2.34.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 01 02:46:22 2025 Received: (at control) by debbugs.gnu.org; 1 Aug 2025 06:46:23 +0000 Received: from localhost ([127.0.0.1]:54106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uhjX4-0000Pw-Hr for submit@debbugs.gnu.org; Fri, 01 Aug 2025 02:46:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42766) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uhjX1-0000PH-5c; Fri, 01 Aug 2025 02:46:20 -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 1uhjWv-0004SB-I1; Fri, 01 Aug 2025 02:46:13 -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=cBqLJHpQAGmk/q+IksWKaiHaBR6NipwudZikuFk5yGo=; b=lDqzXedx1FSJ IEnfM+mmRkqkKSbIpjcGsXB76npkzGMmtJnh57f8eVOMAAQ2B+r47/JvesInkz2c3dxT6MNRwHGJ/ 98aI0/XHUSuQpK4iCZxxH1ZjI8bMTJaCk3wPvG+Eds2ZW0yiLgKAOU0/MKR+9tyHmR17U10PvJfA+ AKCSM04O9kXGe94N0uIfI76krNjhrZIEYr2Z/UVukfaQDIGalCKDdNNtTuL2gulvyNXfp42mB1xW9 zAtQLUgd3e8q2s39IB6s7+1C2uFxepSExiUqyVAvN6v/a90V9TYQ6AtgLBzClr5PTX1E9RYp+VzyD XNSKor1tLpZChmJRsC7T8w==; Date: Fri, 01 Aug 2025 09:46:09 +0300 Message-Id: <86v7n7tu8e.fsf@gnu.org> From: Eli Zaretskii To: Dima Kogan In-Reply-To: <87zfckhwqf.fsf@secretsauce.net> (message from Dima Kogan on Thu, 31 Jul 2025 14:32:56 -0700) Subject: Re: bug#79138: 31.0.50; (report-emacs-bug-check-org) throws an error when reporting unrelated bug References: <87zfckhwqf.fsf@secretsauce.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control Cc: 79138@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 (---) merge 79138 79080 thanks > From: Dima Kogan > Date: Thu, 31 Jul 2025 14:32:56 -0700 > > Hi. I'm using the bleeding-edge emacs from git: 99080d0c049. On Debian. > GTK. > > I just tried to M-x reportbug for something, and it repeatedly failed > because (report-emacs-bug-check-org) throws an "Args out of range" > error. The function in question: > > (defun report-emacs-bug-check-org () > "Warn the user if the bug report mentions org-mode." > (unless report-emacs-bug-no-confirmation > (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)) > (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?") > (error (substitute-command-keys "\ > Not sending, use \\[org-submit-bug-report] to report an Org-mode bug."))))))) > > So it gets the current buffer text into 'text > > (goto-char (point-max)) > (text (buffer-substring-no-properties (point-min) (point))) > > And then it cuts this variable to the size of the text in > 'report-emacs-bug-orig-text. > > (l (length report-emacs-bug-orig-text)) > (text (substring text 0 l)) > > In this case report-emacs-bug-orig-text is much bigger than text, so the > (substring) fails. So currently (report-emacs-bug-check-org) is not > self-contained: it's making assumptions on the value of some external > variable ('report-emacs-bug-orig-text) when called, and if those > assumptions fail (as they do here), it dies. This is bug#79080, so I'm now merging them. If you can try the patch proposed there, it would help. (It would also help if other people with write access would examine and install patches instead of always waiting for me to do it, which sometime makes the reaction times too slow, but that's a rant.) From unknown Fri Sep 19 06:16:32 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: Daniel Mendler Subject: bug#79080: closed (Re: bug#79080: 31.0.50; report-emacs-bug-check-org errors with args-out-range) Message-ID: References: <865xf5svct.fsf@gnu.org> <87ms8v5isr.fsf@daniel-mendler.de> X-Gnu-PR-Message: they-closed 79080 X-Gnu-PR-Package: emacs Reply-To: 79080@debbugs.gnu.org Date: Sat, 02 Aug 2025 13:32:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1754141522-22142-1" This is a multi-part message in MIME format... ------------=_1754141522-22142-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #79080: 31.0.50; report-emacs-bug-check-org errors with args-out-range 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 79080@debbugs.gnu.org. --=20 79080: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D79080 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1754141522-22142-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 79080-done) by debbugs.gnu.org; 2 Aug 2025 13:31:59 +0000 Received: from localhost ([127.0.0.1]:35072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uiCL8-0005kp-O2 for submit@debbugs.gnu.org; Sat, 02 Aug 2025 09:31:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36246) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uiCL6-0005kY-2v for 79080-done@debbugs.gnu.org; Sat, 02 Aug 2025 09:31:57 -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 1uiCKz-0002Ub-Lz; Sat, 02 Aug 2025 09:31:49 -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=0xKzubimS8jz1uHTG2X5higQp3qR+Gk/xMM756c2E4k=; b=ampGazwNvBy2 G/4w1dk/9A+lpR4XSizw9uXsf0WhHDZNrpkQ7jnY1LCJEGn3DVUbTYSjqSum5Ob/MsY2GlVg2AfIs +Dt2NCst5SZnJYLBMN6dr7sjkAyAjwbLIvWkWoQwQWrDPf8XfHCdW7Ecmk1x9zqVxcg27/egTac3w XEVd1jiXf7VcZvrH0NzFHynvAztTDJri+eRP0HmTumMjBbCV0XwGm84bVcJG5oU6FuIPH6VzoZ5fQ pHZj/pYGcozkPmVMOsm/gMgpAAd7PepidBWv+zvLKd9ux9+nUHm1n0R0LTAd1nFWZ7dWPIFighmKU vXeEiXP8ACwjNo8sMtSB9Q==; Date: Sat, 02 Aug 2025 16:31:46 +0300 Message-Id: <865xf5svct.fsf@gnu.org> From: Eli Zaretskii To: Antero Mejr In-Reply-To: <87frejc6xn.fsf@antr.me> (message from Antero Mejr on Sat, 26 Jul 2025 15:23:16 +0000) Subject: Re: bug#79080: 31.0.50; report-emacs-bug-check-org errors with args-out-range References: <87ms8v5isr.fsf@daniel-mendler.de> <86bjp71dgu.fsf@gnu.org> <87frejc6xn.fsf@antr.me> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79080-done Cc: mail@daniel-mendler.de, 79080-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: Antero Mejr > Cc: Daniel Mendler , 79080@debbugs.gnu.org > Date: Sat, 26 Jul 2025 15:23:16 +0000 > > Eli Zaretskii writes: > > >> 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" > >> > >> 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: > >> > > 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? > > The Features: section of the original text contains the string " org ", > which will match the regex and always flag a false positive. > > The snippet you posted works but I think it will match that " org " > feature if the user removes any of the original text. > > I attached a patch that compares the number of matches in the original > text to the edited text. This should avoid false positives unless the > user deletes the " org " strings from the original text. And it will fix > the error. Thanks, now installed on the master branch, and closing the bug. ------------=_1754141522-22142-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 23 Jul 2025 10:00:10 +0000 Received: from localhost ([127.0.0.1]:48500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ueWGf-0003u8-0v for submit@debbugs.gnu.org; Wed, 23 Jul 2025 06:00:09 -0400 Received: from lists.gnu.org ([2001:470:142::17]:39136) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ueWGb-0003sK-CQ for submit@debbugs.gnu.org; Wed, 23 Jul 2025 06:00:06 -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 1ueWGO-0005N3-Bl for bug-gnu-emacs@gnu.org; Wed, 23 Jul 2025 05:59:53 -0400 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1] helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ueWGM-0004KY-K4 for bug-gnu-emacs@gnu.org; Wed, 23 Jul 2025 05:59:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nNVp5XIgG9bC21PKoPhqrmBhogO7+jnbXno7VrkuVFA=; b=yYdi6Lb4W6d4d9526or0KknQLz Oc+NXWXQcPRkMTYOn7ssd/AHQhSVAp/k79qMNBp07kTWVTxb075Y3jeI8xS8eVh8Bbxd0PAEexYxF jHeYL76GqLuohoeykGLFvgAeqAmRrZw0EM8GZNT+PkVlLcrdRkLFOBO9zZ+Np/EXgb9g=; From: Daniel Mendler To: bug-gnu-emacs@gnu.org Subject: 31.0.50; report-emacs-bug-check-org errors with args-out-range X-Debbugs-Cc: Date: Wed, 23 Jul 2025 11:59:48 +0200 Message-ID: <87ms8v5isr.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a01:4f8:c012:9177::1; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) 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: -0.1 (/) 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 \nTo: bug-gnu-emacs@gnu.org\nSubject: 31.0.50; Piped co= mmand output is sometimes lost in Eshell\nGcc: nnimap+privat:sent\nX-Debbug= s-Cc: Jim Porter \n--text follows this line--\nHello= ,\n\nsometimes when executing commands in Eshell with pipes the output seem= s\nto get lost, for example:\n\ngit log | head -n 10 | cat\n\nInstead of th= e 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 immediate= ly one can try this:\n\nwhile true { echo \"test\"; git log | head -n 1 | c= at }\n\nFor such loops the following error might occur:\n\nCreating pipe: T= oo 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 som= eone 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-1= 5\nWindowing system distributor 'The X.Org Foundation', version 11.0.121010= 16\nSystem Description: Debian GNU/Linux 13 (trixie)\n\nConfigured using:\n= 'configure --prefix=3D$HOME/.local/share/emacs\n --without-compress-instal= l --with-tree-sitter --with-native-compilation\n --with-dbus --without-seli= nux --without-threads --disable-gc-mark-trace\n --without-gsettings --witho= ut-gpm --with-cairo --with-cairo-xcb\n --with-xinput2 --with-x-toolkit=3Dgt= k3 --without-toolkit-scroll-bars\n 'CFLAGS=3D-O3 -mtune=3Dnative -march=3Dn= ative''\n\nConfigured features:\nCAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HA= RFBUZZ JPEG LIBOTF LIBSYSTEMD\nLIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY P= DUMPER PNG RSVG SECCOMP\nSOUND SQLITE3 TIFF TREE_SITTER WEBP X11 XDBE XIM X= INERAMA XINPUT2 XPM\nXRANDR GTK3 ZLIB" 0 7762) (report-emacs-bug-check-org) (report-emacs-bug-hook) (message-send nil) (message-send-and-exit nil) (funcall-interactively message-send-and-exit nil) (command-execute message-send-and-exit) In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.49, cairo version 1.18.4) of 2025-07-15 Windowing system distributor 'The X.Org Foundation', version 11.0.12101016 System Description: Debian GNU/Linux 13 (trixie) Configured using: 'configure --prefix=3D$HOME/.local/share/emacs --without-compress-install --with-tree-sitter --with-native-compilation --with-dbus --without-selinux --without-threads --disable-gc-mark-trace --without-gsettings --without-gpm --with-cairo --with-cairo-xcb --with-xinput2 --with-x-toolkit=3Dgtk3 --without-toolkit-scroll-bars 'CFLAGS=3D-O3 -mtune=3Dnative -march=3Dnative'' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 TIFF TREE_SITTER WEBP X11 XDBE XIM XINERAMA XINPUT2 XPM XRANDR GTK3 ZLIB ------------=_1754141522-22142-1-- From unknown Fri Sep 19 06:16:32 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: Dima Kogan Subject: bug#79138: closed (Re: bug#79080: 31.0.50; report-emacs-bug-check-org errors with args-out-range) Message-ID: References: <865xf5svct.fsf@gnu.org> <87zfckhwqf.fsf@secretsauce.net> X-Gnu-PR-Message: they-closed 79138 X-Gnu-PR-Package: emacs Reply-To: 79138@debbugs.gnu.org Date: Sat, 02 Aug 2025 13:32:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1754141522-22142-3" This is a multi-part message in MIME format... ------------=_1754141522-22142-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #79080: 31.0.50; (report-emacs-bug-check-org) throws an error when reportin= g unrelated bug 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 79138@debbugs.gnu.org. --=20 79080: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D79080 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1754141522-22142-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 79080-done) by debbugs.gnu.org; 2 Aug 2025 13:31:59 +0000 Received: from localhost ([127.0.0.1]:35072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uiCL8-0005kp-O2 for submit@debbugs.gnu.org; Sat, 02 Aug 2025 09:31:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36246) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uiCL6-0005kY-2v for 79080-done@debbugs.gnu.org; Sat, 02 Aug 2025 09:31:57 -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 1uiCKz-0002Ub-Lz; Sat, 02 Aug 2025 09:31:49 -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=0xKzubimS8jz1uHTG2X5higQp3qR+Gk/xMM756c2E4k=; b=ampGazwNvBy2 G/4w1dk/9A+lpR4XSizw9uXsf0WhHDZNrpkQ7jnY1LCJEGn3DVUbTYSjqSum5Ob/MsY2GlVg2AfIs +Dt2NCst5SZnJYLBMN6dr7sjkAyAjwbLIvWkWoQwQWrDPf8XfHCdW7Ecmk1x9zqVxcg27/egTac3w XEVd1jiXf7VcZvrH0NzFHynvAztTDJri+eRP0HmTumMjBbCV0XwGm84bVcJG5oU6FuIPH6VzoZ5fQ pHZj/pYGcozkPmVMOsm/gMgpAAd7PepidBWv+zvLKd9ux9+nUHm1n0R0LTAd1nFWZ7dWPIFighmKU vXeEiXP8ACwjNo8sMtSB9Q==; Date: Sat, 02 Aug 2025 16:31:46 +0300 Message-Id: <865xf5svct.fsf@gnu.org> From: Eli Zaretskii To: Antero Mejr In-Reply-To: <87frejc6xn.fsf@antr.me> (message from Antero Mejr on Sat, 26 Jul 2025 15:23:16 +0000) Subject: Re: bug#79080: 31.0.50; report-emacs-bug-check-org errors with args-out-range References: <87ms8v5isr.fsf@daniel-mendler.de> <86bjp71dgu.fsf@gnu.org> <87frejc6xn.fsf@antr.me> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79080-done Cc: mail@daniel-mendler.de, 79080-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: Antero Mejr > Cc: Daniel Mendler , 79080@debbugs.gnu.org > Date: Sat, 26 Jul 2025 15:23:16 +0000 > > Eli Zaretskii writes: > > >> 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" > >> > >> 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: > >> > > 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? > > The Features: section of the original text contains the string " org ", > which will match the regex and always flag a false positive. > > The snippet you posted works but I think it will match that " org " > feature if the user removes any of the original text. > > I attached a patch that compares the number of matches in the original > text to the edited text. This should avoid false positives unless the > user deletes the " org " strings from the original text. And it will fix > the error. Thanks, now installed on the master branch, and closing the bug. ------------=_1754141522-22142-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 31 Jul 2025 21:30:42 +0000 Received: from localhost ([127.0.0.1]:50599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uharJ-0000Mg-TE for submit@debbugs.gnu.org; Thu, 31 Jul 2025 17:30:42 -0400 Received: from lists.gnu.org ([2001:470:142::17]:43190) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uharG-0000M9-SQ for submit@debbugs.gnu.org; Thu, 31 Jul 2025 17:30:39 -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 1uhar1-00059r-3e for bug-gnu-emacs@gnu.org; Thu, 31 Jul 2025 17:30:24 -0400 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uhaqz-0008Ly-3e for bug-gnu-emacs@gnu.org; Thu, 31 Jul 2025 17:30:22 -0400 Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.stl.internal (Postfix) with ESMTP id BCBF11D00727 for ; Thu, 31 Jul 2025 17:30:19 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Thu, 31 Jul 2025 17:30:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm2; t=1753997419; x=1754083819; bh=s5qi5FL9W9Pdu6l4aSD/rw+xVui+JAxQ AvTh2Z8bXa8=; b=iEox1lGKi6HHQHKyQVO/TF4tK7wTaZf6RBNOtcd59j/Yt13u lmENf0Sh7Yu1LbpJto8iMjk3VryEf9BZMwQ5zAilVhqBBIlxo88fOraNYpA2UwUQ tIELkthLQt/2yrAmgIstA9d+SBywRmiEfFjAxBbzsf4ZobRgp+XXJhY512GUQDKQ 3vBT+jGoYj0rvS3DxcZqBjHTzvIrZeuMm/iaOLshEG3X3LLg+8X67IkWeuwdd01s pMVsLio0sz+35gjwuOxX6BmL1hiwXNDeQpQvzU8iXrM1Udx59cVChKYpJACOfCHJ RDNMSD8ME8Yc+MJ9vo+6niN5KabVbPJ+03vvtA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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-sender:x-me-sender:x-sasl-enc; s=fm3; t=1753997419; x= 1754083819; bh=s5qi5FL9W9Pdu6l4aSD/rw+xVui+JAxQAvTh2Z8bXa8=; b=H lnDVL8VVBpS22wCGWLC/rTSAO2Fy+KRGbZ/xoQqvfCSIruN/VePb4NOOsRN4ocP1 +IfNlQwpJxGMGjcnHt9687y2299ghydXMxPFHhoaqcAVWvGyU2tPplRCt07NFy2z vvrAVuB2FUaR2l/tY1l0MCZxyoUBGeaY/9Nyu4fELM2lDG51SVVsTy7sowxXRcSi ssI2KKzRRjX7PprLyTVRQHIg5pnJIs8JdaL09dAg94YP5xDvpRt1PGx/xWZwM8LE cHRXHLtZ3aBkUVwIsY2S4NaiVoAx/PupV3l6ChmurnIM0udW9IUeWiJ0UAOO0ArG 0JWMbhq4/K/Wi9359/Q/w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddutddukeelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtsehttdertddttddtne cuhfhrohhmpeffihhmrgcumfhoghgrnhcuoeguihhmrgesshgvtghrvghtshgruhgtvgdr nhgvtheqnecuggftrfgrthhtvghrnhepffdvffduhfekfffhieefhfffvddtgfefjeevue dvfedujeejudevfedtgeeguedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepughimhgrsehsvggtrhgvthhsrghutggvrdhnvghtpdhnsggprh gtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegsuhhgqdhgnhhu qdgvmhgrtghssehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i3e8042a0:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Thu, 31 Jul 2025 17:30:19 -0400 (EDT) From: Dima Kogan To: bug-gnu-emacs@gnu.org Subject: 31.0.50; (report-emacs-bug-check-org) throws an error when reporting unrelated bug X-Debbugs-Cc: Date: Thu, 31 Jul 2025 14:32:56 -0700 Message-ID: <87zfckhwqf.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=202.12.124.151; envelope-from=dima@secretsauce.net; helo=fout-b8-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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.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: -0.3 (/) Hi. I'm using the bleeding-edge emacs from git: 99080d0c049. On Debian. GTK. I just tried to M-x reportbug for something, and it repeatedly failed because (report-emacs-bug-check-org) throws an "Args out of range" error. The function in question: (defun report-emacs-bug-check-org () "Warn the user if the bug report mentions org-mode." (unless report-emacs-bug-no-confirmation (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)) (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?") (error (substitute-command-keys "\ Not sending, use \\[org-submit-bug-report] to report an Org-mode bug."))))))) So it gets the current buffer text into 'text (goto-char (point-max)) (text (buffer-substring-no-properties (point-min) (point))) And then it cuts this variable to the size of the text in 'report-emacs-bug-orig-text. (l (length report-emacs-bug-orig-text)) (text (substring text 0 l)) In this case report-emacs-bug-orig-text is much bigger than text, so the (substring) fails. So currently (report-emacs-bug-check-org) is not self-contained: it's making assumptions on the value of some external variable ('report-emacs-bug-orig-text) when called, and if those assumptions fail (as they do here), it dies. Thanks ------------=_1754141522-22142-3--