From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 23 13:29:32 2022 Received: (at submit) by debbugs.gnu.org; 23 Aug 2022 17:29:32 +0000 Received: from localhost ([127.0.0.1]:44980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQXiW-000142-B8 for submit@debbugs.gnu.org; Tue, 23 Aug 2022 13:29:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:52894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQVuL-0004Qz-9S for submit@debbugs.gnu.org; Tue, 23 Aug 2022 11:33:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQVuH-0002gP-Jg for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 11:33:37 -0400 Received: from knopi.disroot.org ([178.21.23.139]:59410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQVuD-0001Rg-4O for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 11:33:32 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 1E0C3400A5 for ; Tue, 23 Aug 2022 17:33:23 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IfwyCx9Myyet for ; Tue, 23 Aug 2022 17:33:22 +0200 (CEST) From: Santiago Calandrino DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1661268800; bh=O6ajMcUrndNnI5QqhUIvSR4e+/y0xGzK+sQMN0v9+MQ=; h=From:To:Subject:Date; b=GDIwuSaCZErJY4ZCtWqaOAMpMp3veqJiYUPrdUGPK5IjzBaoHhj6S+HNmF1LVDVV+ 7IVcL3n+PcYGYSaRApkoPdsE6PFBTqutfGbOYxdKPPfH4URG5Z3a/ndQNkoIDmV5BQ vn13yDDmoYAybCS1ENPjhhYViWmnIwIoQFsCNDRggfxnH2C7Fsn6lVs65Fo3mWiCFO xcGlEztJ+G417lauBZvrIKqF/Tbk4xqbdm/g55c13tLKIxB/xn9WpJnvfYCGKger0O a1Qq1KNc+rBqhilfXFP+QRH18+FadUPC+LuNcIm6gq+y/8RyBHi5a/8euARRijpMGa eVmZzu+fngA4Q== To: bug-gnu-emacs@gnu.org Subject: [PATCH] Fix string padding in gdb-mi Date: Tue, 23 Aug 2022 12:26:22 -0300 Message-ID: <878rnf560z.fsf@disroot.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=178.21.23.139; envelope-from=san@disroot.org; helo=knopi.disroot.org 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, 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.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 23 Aug 2022 13:29:30 -0400 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.4 (--) --=-=-= Content-Type: text/plain Hello, I recently updated my Emacs following the master branch and encountered a bug in gdb introduced in commit f6356dc88d23 which breaks some of its buffers. I've attempted to fix it with this patch. Let me know if I made any mistakes since it is my first contribution. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-string-padding-in-gdb-mi.patch Content-Description: 0001-Fix-string-padding-in-gdb-mi.patch >From 7c80780f4ca0bad2af3d137f4ee919eb0d3e9019 Mon Sep 17 00:00:00 2001 From: Santiago Calandrino Date: Mon, 22 Aug 2022 12:01:44 -0300 Subject: [PATCH] Fix string padding in gdb-mi In commit f6356dc88d23eb405aa6d8bd9dd5f669f1bc45ee local padding function gdp-pad-string was replaced with string-pad from subr-x. The problem is that calls to string-pad use negative integers which result in errors that prevent text to be displayed on gdb information buffers. Now padding is stored as positive integers and calls to string-pad check if they should be right aligned. * lisp/progmodes/gdb-mi.el (gdb-table): Fix string padding in gdb-mi. Copyright-paperwork-exempt: yes --- lisp/progmodes/gdb-mi.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index c256198b3c..f2b4aa1054 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -2944,7 +2944,7 @@ gdb-mark-line (defun gdb-pad-string (string padding) (declare (obsolete string-pad "29.1")) - (string-pad string padding nil t)) + (string-pad string (abs padding) nil (natnump padding))) ;; gdb-table struct is a way to programmatically construct simple ;; tables. It help to reliably align columns of data in GDB buffers @@ -2962,8 +2962,7 @@ gdb-table-add-row calling `gdb-table-string'." (let ((rows (gdb-table-rows table)) (row-properties (gdb-table-row-properties table)) - (column-sizes (gdb-table-column-sizes table)) - (right-align (gdb-table-right-align table))) + (column-sizes (gdb-table-column-sizes table))) (when (not column-sizes) (setf (gdb-table-column-sizes table) (make-list (length row) 0))) @@ -2973,9 +2972,7 @@ gdb-table-add-row (append row-properties (list properties))) (setf (gdb-table-column-sizes table) (cl-mapcar (lambda (x s) - (let ((new-x - (max (abs x) (string-width (or s ""))))) - (if right-align new-x (- new-x)))) + (max (abs x) (string-width (or s "")))) (gdb-table-column-sizes table) row)) ;; Avoid trailing whitespace at eol @@ -2991,7 +2988,10 @@ gdb-table-string (lambda (row properties) (apply #'propertize (mapconcat #'identity - (cl-mapcar (lambda (s x) (string-pad s x nil t)) + (cl-mapcar (lambda (s x) + (string-pad + s x nil + (not (gdb-table-right-align table)))) row column-sizes) sep) properties)) -- 2.37.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 24 07:55:20 2022 Received: (at 57362) by debbugs.gnu.org; 24 Aug 2022 11:55:20 +0000 Received: from localhost ([127.0.0.1]:45854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQoye-0004fp-3N for submit@debbugs.gnu.org; Wed, 24 Aug 2022 07:55:20 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQoyb-0004fX-Oa for 57362@debbugs.gnu.org; Wed, 24 Aug 2022 07:55:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=0Awqn6+wBlpNw40rWXRaRhkk0mmf/QyprdBjKQM1Oo0=; b=ZpzPR9sdd5qM3H5DSSDe5TO0bZ igyLx+cFkzC2UAomSWR0KQQH/0i704DyX1yVK+JIUB7id46M2Slm/Pjuz3q7zCnKMA+gDg6aqa60b uOdCdHAeCJS7nZfpMqD1pVYMkN75sg6z3VjxG4WwiQxP335PT3fXqjT38ViAvEGvkJq8=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQoyT-00053F-MP; Wed, 24 Aug 2022 13:55:11 +0200 From: Lars Ingebrigtsen To: Santiago Calandrino Subject: Re: bug#57362: [PATCH] Fix string padding in gdb-mi In-Reply-To: <878rnf560z.fsf@disroot.org> (Santiago Calandrino's message of "Tue, 23 Aug 2022 12:26:22 -0300") References: <878rnf560z.fsf@disroot.org> X-Now-Playing: Sevdaliza's _Shabrang_: "Lamp Lady" Date: Wed, 24 Aug 2022 13:55:09 +0200 Message-ID: <87pmgpn9eq.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Santiago Calandrino writes: > Hello, I recently updated my Emacs following the master branch and > encountered a bug in gdb introduced in commit f6356dc88d23 which breaks > some of its buffers. I've attempted to fix it with this [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57362 Cc: 57362@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 (---) Santiago Calandrino writes: > Hello, I recently updated my Emacs following the master branch and > encountered a bug in gdb introduced in commit f6356dc88d23 which breaks > some of its buffers. I've attempted to fix it with this patch. Let me > know if I made any mistakes since it is my first contribution. Thanks; looks good to me, so I've pushed it to Emacs 29. This change was small enough to apply without assigning copyright to the FSF, but for future patches you want to submit, it might make sense to get the paperwork started now, so that subsequent patches can be applied speedily. Would you be willing to sign such paperwork? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 24 07:55:25 2022 Received: (at control) by debbugs.gnu.org; 24 Aug 2022 11:55:26 +0000 Received: from localhost ([127.0.0.1]:45857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQoyj-0004g7-EA for submit@debbugs.gnu.org; Wed, 24 Aug 2022 07:55:25 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQoyh-0004fh-0h for control@debbugs.gnu.org; Wed, 24 Aug 2022 07:55:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding: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=DETAZuZm3tb4WphReRqrAPNsTEgsADFRSkLIMYjimN8=; b=SV55EZCk69hv2R+zrZioYP7Z2X hUGbWNU6DE1tmeSTvcnmGKq2s5BIk0SGqTMPB5v6znBM9+MDJr9UWxHXCIH7zPFcDGlZxWCzZ2948 C/y0TQ74jyaIMSEFVUvUAMdOBkTZGDY6bDhUeSJZ6HLxfH+pj/D/xZ/2GoE6nbbqt6s0=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQoyZ-00053N-4j for control@debbugs.gnu.org; Wed, 24 Aug 2022 13:55:17 +0200 Date: Wed, 24 Aug 2022 13:55:14 +0200 Message-Id: <87o7w9n9el.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #57362 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 57362 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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 (---) close 57362 29.1 quit From unknown Sat Aug 16 21:21:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 22 Sep 2022 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator