Stefan Kangas <stefankangas@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 76455) by debbugs.gnu.org; 21 Feb 2025 17:47:26 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 21 12:47:26 2025 Received: from localhost ([127.0.0.1]:34842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tlX7W-0007qm-AA for submit <at> debbugs.gnu.org; Fri, 21 Feb 2025 12:47:26 -0500 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]:50383) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1tlX7T-0007pN-8B for 76455 <at> debbugs.gnu.org; Fri, 21 Feb 2025 12:47:24 -0500 Received: by mail-ot1-x342.google.com with SMTP id 46e09a7af769-72726025fa5so624140a34.0 for <76455 <at> debbugs.gnu.org>; Fri, 21 Feb 2025 09:47:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740160037; x=1740764837; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=7SsBHvnElCcxCAkFoFHl5Y5ZQcZlvF9S2hGlR6xOfyg=; b=ljgPbH4pg8qmC3HJtb5P7ibhsEFfRhWfHhUoNcRl/amTdaM3v3kJuqyO4H2nCYbyQT oRGoT06W0x/ddz2KvaXSfH3HbCgQ6ejZG5DfhSgctuMrjgOTPYKGYzvNRM+B5lt2WSf6 +B5pzr3FD2e9Lmtufna1MxZtG/QFwKIvMEEwiec7YdvOk0uhusM0V+7MMdtZA2tLvXMt nmupCRBtJK5hcJU+ekL3Mw7/W2fqtRv2+5M/rKnDjZcrS5et52b28smOW0NWtX/CPWI+ cLkT2BNXAiwLSGQxXaB9yHUbniLTBECmaFrmDg0gRA6AqRRbuPVAxocjKuw+cd1cORqm CwUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740160037; x=1740764837; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7SsBHvnElCcxCAkFoFHl5Y5ZQcZlvF9S2hGlR6xOfyg=; b=tF7GMGeXnLdPu8tZNHnhAM1QI3X2bN/v6ex9AY6gp6xyRxCBvn4At3nd8ucA6cmsAv zLm+pzUcOBjSAB4xZNAwRuxnXpPG2rjAyuQqx15UpHHBQhWdzsG+XojtXY5Jp9pEogRS WPjrPiq2T28nLO9G+5OyOemuBlLCSyYo0+RIff7/HZf3BZteiiLXNkbr9DTD7MRg7jfw GOVJzJQ0nAwT7nhYeNws3XnTRyDXWPKHOMeEM7xH0W2u6vILxEtUzp6XZWSC7RtQsFfx r+oX3Mw65FXLqSn/lSG55xNqKwN1pRZFjYnwTMdZGhcBw0qMod4B3BZU83prv/6vLTGt gT5A== X-Forwarded-Encrypted: i=1; AJvYcCUcx45w9Vl6G6NNN3O7SzuWuDOKZx+pAiV6dTRcX/1sw8G1KCdlgpsLutzCstwkU6MVaiEIfQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yxv8tJgE51+N6lFsfVnAlZ2u9sYbxdrUt/K4rFQKUloLAMb73oN 9tNyoOS7B+hRO0RqN1b10k/QBasJ+g8hwwPu4ZQV63vCGbwZS+CpQBrxSlFf X-Gm-Gg: ASbGnctO394flweipNDdgiW3FL0jKbI42ubwTv3tPbiZlQZPnCQ8A2kpGFhhLuEcA1m IrFLf7AFKw9jENEVM56uFZnRCIGjwiGCKglkOvv4sTlUIGYWjHf4nTdL/qtUQx7usiudeITl+56 ap44TVkGQH9ecWemndOSdcgeTPC/bclm02e+Tnq7/8OOBiN14B1xdJQWkKnYZAZ/GxhRDB8Qbq9 OubKfJGiEMfHbZyMaHwzVM/dVqrXgk7rAQGCRXnE86ZcUbYWw2g0MfSink/nSAq9Yhm2w== X-Google-Smtp-Source: AGHT+IHK32Xu9h41GjlNquXgqw19G7EkCxKFZSLf60QmkWvvVg4bKurygBhYpT4zCGZ92KJ2RpVeWQ== X-Received: by 2002:a05:6808:80c6:b0:3f4:15bd:e5c4 with SMTP id 5614622812f47-3f4246e3a24mr2893406b6e.20.1740160037077; Fri, 21 Feb 2025 09:47:17 -0800 (PST) Received: from fedora ([2806:10ae:e:8def::1]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3f40e619d33sm1693437b6e.15.2025.02.21.09.47.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2025 09:47:16 -0800 (PST) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: Juri Linkov <juri@HIDDEN> Subject: Re: bug#76455: [PATCH] Allow truncate flymake end-of-line diagnostic summary In-Reply-To: <87o6yvohdk.fsf@HIDDEN> References: <87h64n52ce.fsf@HIDDEN> <86tt8n20o1.fsf@HIDDEN> <87o6yvohdk.fsf@HIDDEN> Date: Fri, 21 Feb 2025 11:47:15 -0600 Message-ID: <8734g7chr0.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 76455 Cc: sbaugh@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 76455 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Juri Linkov <juri@HIDDEN> writes: > Or truncate-string-to-width. I didn't know about that function. I've now updated the patch: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Allow-truncate-flymake-end-of-line-diagnostic-summar.patch From a1c1236ab472fe56b1aaa2542b47ca9cafbe5410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= <eg642616@HIDDEN> Date: Thu, 20 Feb 2025 22:20:29 -0600 Subject: [PATCH] Allow truncate flymake end-of-line diagnostic summary * lisp/progmodes/flymake.el (flymake-max-length-eol-diagnostic-summary): New user customizable variable. (flymake--eol-overlay-summary): Allow truncate summary if `flymake-max-length-eol-diagnostic-summary' is non-nil. --- doc/misc/flymake.texi | 4 ++++ etc/NEWS | 8 ++++++++ lisp/progmodes/flymake.el | 14 +++++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index 54835767928..cee7bb24c76 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi @@ -348,6 +348,10 @@ Customizable variables early aid that relieves you from moving around or reaching for the mouse to consult an error message. +@item flymake-max-length-eol-diagnostic-summary +When non-nil, set a maximum length for end-of-line diagnostic summary +descriptions. + @item flymake-error-eol A custom face for summarizing diagnostic error messages. diff --git a/etc/NEWS b/etc/NEWS index f06fb7ef151..19bcc29b381 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -280,8 +280,16 @@ When such value is used, the 'project-prompter' is called with it as the first argument. This is a way for the callers to indicate, for example, the reason or the context why the project is asked for. +** Flymake + ++++ +*** New user option 'flymake-max-length-eol-diagnostic-summary'. +When non-nil, set a maximum length for end-of-line diagnostic summary +descriptions. + ** Registers +--- *** New functions 'buffer-to-register' and 'file-to-register'. These allow users to interactively store file and buffers in registers. Killed buffers stored in a register using 'buffer-to-register' are diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 9dda53713f5..04a6d53ea40 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -541,6 +541,12 @@ flymake-show-diagnostics-at-end-of-line (const :tag "Don't display diagnostics at end-of-line" nil)) :package-version '(Flymake . "1.3.6")) +(defcustom flymake-max-length-eol-diagnostic-summary nil + "Set maximum summary length to truncate in end-of-line diagnostics. +If set to nil (default), there's not limit and string summary +won't be truncated." + :type '(choice integer (const :tag "No limit" nil))) + (define-obsolete-face-alias 'flymake-warnline 'flymake-warning "26.1") (define-obsolete-face-alias 'flymake-errline 'flymake-error "26.1") @@ -819,7 +825,13 @@ flymake--delete-overlay (defun flymake--eol-overlay-summary (src-ovs) "Helper function for `flymake--update-eol-overlays'." (cl-flet ((summarize (d) - (propertize (flymake-diagnostic-oneliner d t) 'face + (propertize (if flymake-max-length-eol-diagnostic-summary + (truncate-string-to-width + (flymake-diagnostic-oneliner d t) + flymake-max-length-eol-diagnostic-summary + nil nil t) + (flymake-diagnostic-oneliner d t)) + 'face (flymake--lookup-type-property (flymake--diag-type d) 'eol-face)))) (let* ((diags -- 2.48.1 --=-=-= Content-Type: text/plain -- - E.G via GNU Emacs. --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#76455
; Package emacs
.
Full text available.Received: (at 76455) by debbugs.gnu.org; 21 Feb 2025 17:07:40 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 21 12:07:40 2025 Received: from localhost ([127.0.0.1]:34303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tlWV2-0001XU-2R for submit <at> debbugs.gnu.org; Fri, 21 Feb 2025 12:07:40 -0500 Received: from mail-oa1-x43.google.com ([2001:4860:4864:20::43]:60675) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1tlWUz-0001WE-3A for 76455 <at> debbugs.gnu.org; Fri, 21 Feb 2025 12:07:38 -0500 Received: by mail-oa1-x43.google.com with SMTP id 586e51a60fabf-2bcca6aae0bso1331678fac.1 for <76455 <at> debbugs.gnu.org>; Fri, 21 Feb 2025 09:07:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740157651; x=1740762451; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=t8kBK1h4hYpLj7UUcuiq18QDeFPxYlznZOuTfogSB98=; b=FjSw01quCJXG2Aeiu2aHXD/zESO5Rpyf51XtB+mZ9n+k6uw94Axu1Fv4LMRKQM45+m t5qFIEY0jYBhC1jEJi4KgXGnmn6KUXGyQtr8X4CS8mvwCfQaEQQwspyzqgKlPDzQK3Nv YHXITDicKFfGBrsh1PEkOCND+ugKyMsFFEJyVNXIj3izQYwuB4sO1RFZNNPQzpjm9/Ge b5Wm4xQxRtXqYJHS/j89yENA4s6cbm0TMyGdUlhZQmH0qumhj2NuKwuzkg7WvTAX60cQ iu+qNBAi/PepLJ04n9PjPlDlK580xMkFkHZQz/phrvQXU+iOy3Tr4cLzllWmvMSpMWn6 ncoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740157651; x=1740762451; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=t8kBK1h4hYpLj7UUcuiq18QDeFPxYlznZOuTfogSB98=; b=NHRdI69E923ER4e4Sq1hvAkWOwOJSReCT7BuIDJTDKUPCHBJwX17CPfBROmDRKlqg2 Ny+rnBKWwZTFQjz5rXyRIfDfmSAA7HgFh+wI42ilcsqwQVvalVUpVIAOzOrIcsaSL0Aq xP39V7ib6RoySvC+HXYj0huTXMthO/hKzbhQDqz5m4veEya2tH2IJ+RjwWvf+5bzOeuy DPD8DkorhnF6d+ngtokRFkBDn1O1AKkormgf8fTIEFYF/Ljy+mWa9GlC9S5d721rTIXc mGhmsbgaznbap8UuWywAmdFrJOIXkikLWtcXv1jtAULR+ofKoFLT1vK6hN2ffMfOSBtO gsQQ== X-Forwarded-Encrypted: i=1; AJvYcCWA8GzoPI4R1ismQlR23vLQnvnoFlw/kz3LyQOY16frsHJW48mDIUQJ38MYfHIaMFjxybTDlQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwQm3ffwtShP9SgWTQ3YcubsoCrEM7GTeF+cNdiPiYuINIUPP46 WMTv+aMNTnUYuD0Gn/Y7fr7IpLTyecY6BmndegnAAqZs5DtaSgVKGqa3v9vC X-Gm-Gg: ASbGncu6plb01rz0ZoXCiJe43UQ1bnOh7mtkFYqcHEyz+4KY5kVvaBytbocBTKlc8xL ptDsHN05zn2pH0YfRaQ0i/6dfrvxquVRCuxbgoixWcS8s2OlSQD2ZhAyuLK2k3hBAIavhkGiK0L hx3c59lzNzsLHHPBJdQbIo9UnBawmBa0JJOrfyr9AP6A57IeB2sVSDojjSN7HT64ic5NTYMwH2B mJeDrXf3XZSPKuAr4IJF+bJk4wIz9i4zi9wk4AM9zhuxd+TvEw9LZ7DChkzxrSVoK+Tyw== X-Google-Smtp-Source: AGHT+IGJqyQwjhQ6Kp9qPy5JZ1DfODFp1hhBt46vPuNFGLaopDObTi9kpYlyHtOGeq1k5PzCakp1ug== X-Received: by 2002:a05:6870:82a7:b0:2bc:69d8:a39e with SMTP id 586e51a60fabf-2bd50fae62cmr3047337fac.33.1740157650942; Fri, 21 Feb 2025 09:07:30 -0800 (PST) Received: from fedora ([2806:10ae:e:8def::1]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7272cc781a7sm2425982a34.6.2025.02.21.09.07.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2025 09:07:30 -0800 (PST) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#76455: [PATCH] Allow truncate flymake end-of-line diagnostic summary In-Reply-To: <86tt8n20o1.fsf@HIDDEN> References: <87h64n52ce.fsf@HIDDEN> <86tt8n20o1.fsf@HIDDEN> Date: Fri, 21 Feb 2025 11:07:29 -0600 Message-ID: <878qpzcjla.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 76455 Cc: sbaugh@HIDDEN, 76455 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) Eli Zaretskii <eliz@HIDDEN> writes: >> From: Elijah Gabe P=C3=A9rez <eg642616@HIDDEN> >> Date: Thu, 20 Feb 2025 22:49:37 -0600 >>=20 >> This patch allow to user set a limit for >> `flymake-show-diagnostics-at-end-of-line' summary text. >>=20 >> This way you can shorten long messages like: >>=20 >> (message ) =E2=80=98message=E2=80=99 called with 0 arguments, but requir= es 1 or more >> error message^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>=20 >> to... >>=20 >> (message ) =E2=80=98message=E2=80=99 called with 0 arguments... >> error message^^^^^^^^^^^^^^^^^^^^^^^ >>=20 >> This is related to bug#74691, which I also have this problem. > > Would it make sense to use string-truncate-left instead of reinventing > what it does? The problem is that `string-truncate-left' only truncate from left and not from right. If I eval this: (string-truncate-left "=E2=80=98message=E2=80=99 called with 0 arguments= , but requires 1 or more" 30) returns: "...nts, but requires 1 or more" But I think this would be more appropriate: "=E2=80=98message=E2=80=99 called with 0 arg..." Maybe the way to achieve this would be something like this: (string-reverse (string-truncate-left (string-reverse "=E2=80=98message=E2=80=99 called with 0 arguments, but requires 1 = or more") 20)) but this is very ugly imo. That's why I decided to use `substring', unless there is a "string-truncate-right" that can I use. --=20 - E.G via GNU Emacs.
bug-gnu-emacs@HIDDEN
:bug#76455
; Package emacs
.
Full text available.Received: (at 76455) by debbugs.gnu.org; 21 Feb 2025 08:03:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 21 03:03:31 2025 Received: from localhost ([127.0.0.1]:51995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tlO0Q-0006Td-Uz for submit <at> debbugs.gnu.org; Fri, 21 Feb 2025 03:03:31 -0500 Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]:44511) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1tlO0N-0006SR-SJ for 76455 <at> debbugs.gnu.org; Fri, 21 Feb 2025 03:03:28 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 1F8CE44185; Fri, 21 Feb 2025 08:03:18 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#76455: [PATCH] Allow truncate flymake end-of-line diagnostic summary In-Reply-To: <86tt8n20o1.fsf@HIDDEN> Organization: LINKOV.NET References: <87h64n52ce.fsf@HIDDEN> <86tt8n20o1.fsf@HIDDEN> Date: Fri, 21 Feb 2025 10:02:15 +0200 Message-ID: <87o6yvohdk.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeileehtdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghofhffkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeeiffetjeegheffjeeutdeihfdukeegjeetkeeigfevueehtedvfeegkeekveekudenucfkphepledurdduvdelrdeliedrieeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrdeliedrieeipdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohepgedprhgtphhtthhopeejieegheehseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepshgsrghughhhsehjrghnvghsthhrvggvthdrtghomhdprhgtphhtthhopegvgheigedvieduieesghhmrghilhdrtghomhdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrgh X-GND-Sasl: juri@HIDDEN X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 76455 Cc: sbaugh@HIDDEN, Elijah Gabe =?iso-8859-1?Q?P=E9rez?= <eg642616@HIDDEN>, 76455 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) >> This patch allow to user set a limit for >> `flymake-show-diagnostics-at-end-of-line' summary text. >> >> This way you can shorten long messages like: >> >> (message ) ‘message’ called with 0 arguments, but requires 1 or more >> error message^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> >> to... >> >> (message ) ‘message’ called with 0 arguments... >> error message^^^^^^^^^^^^^^^^^^^^^^^ >> >> This is related to bug#74691, which I also have this problem. > > Would it make sense to use string-truncate-left instead of reinventing > what it does? Or truncate-string-to-width.
bug-gnu-emacs@HIDDEN
:bug#76455
; Package emacs
.
Full text available.Received: (at 76455) by debbugs.gnu.org; 21 Feb 2025 07:54:18 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 21 02:54:18 2025 Received: from localhost ([127.0.0.1]:51872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tlNrV-00051P-Eu for submit <at> debbugs.gnu.org; Fri, 21 Feb 2025 02:54:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59344) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tlNrT-00050F-7c for 76455 <at> debbugs.gnu.org; Fri, 21 Feb 2025 02:54:15 -0500 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 <eliz@HIDDEN>) id 1tlNrN-0004FQ-E3; Fri, 21 Feb 2025 02:54:09 -0500 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=RhJRb4CduTy7mkNZ1axEBKXhXk44+8+BLcYdWZgourk=; b=Jm7fHTU+JGtTJzlzdi1x mPD2VrojI/NqNyf3B7K0o7bZQ2gY6IsbLIXwl+7OMh3v1wW9W3KnVgQPkYgsdGf2XYhJE+Je2OpU9 XYNg+8mrp1rx7ZlMNNl/6GMspW0P+afIRa7X1cKdszLne0ArJjwet10RqNcWpfGPHec4IIpmxUVzR 3SQGEAW+q7u1ECRHGTPeZT5uvDBlNfcr3QwXw/J/ZcY035d1KBCscFLsjk+nst9waX2bE/SiAd+kh +NQbjPOtB2X5Lr5fD6zXEEnYDsgJfFQLGxtdu4XqZ5q8yiFjk0Ft4o6nkKrYZWcYZciuaYddi+vZ8 sWeY2W3xaNwngQ==; Date: Fri, 21 Feb 2025 09:54:06 +0200 Message-Id: <86tt8n20o1.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Elijah Gabe =?utf-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>, sbaugh@HIDDEN In-Reply-To: <87h64n52ce.fsf@HIDDEN> (message from Elijah Gabe =?utf-8?Q?P=C3=A9rez?= on Thu, 20 Feb 2025 22:49:37 -0600) Subject: Re: bug#76455: [PATCH] Allow truncate flymake end-of-line diagnostic summary References: <87h64n52ce.fsf@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76455 Cc: 76455 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Elijah Gabe Pérez <eg642616@HIDDEN> > Date: Thu, 20 Feb 2025 22:49:37 -0600 > > This patch allow to user set a limit for > `flymake-show-diagnostics-at-end-of-line' summary text. > > This way you can shorten long messages like: > > (message ) ‘message’ called with 0 arguments, but requires 1 or more > error message^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > to... > > (message ) ‘message’ called with 0 arguments... > error message^^^^^^^^^^^^^^^^^^^^^^^ > > This is related to bug#74691, which I also have this problem. Would it make sense to use string-truncate-left instead of reinventing what it does? Thanks.
bug-gnu-emacs@HIDDEN
:bug#76455
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 21 Feb 2025 04:49:54 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 20 23:49:54 2025 Received: from localhost ([127.0.0.1]:49237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tlKz4-000239-24 for submit <at> debbugs.gnu.org; Thu, 20 Feb 2025 23:49:54 -0500 Received: from lists.gnu.org ([2001:470:142::17]:52808) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1tlKz0-00021h-VX for submit <at> debbugs.gnu.org; Thu, 20 Feb 2025 23:49:52 -0500 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 <eg642616@HIDDEN>) id 1tlKyt-0003Z6-5d for bug-gnu-emacs@HIDDEN; Thu, 20 Feb 2025 23:49:44 -0500 Received: from mail-oa1-x43.google.com ([2001:4860:4864:20::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <eg642616@HIDDEN>) id 1tlKyr-0008IM-J7 for bug-gnu-emacs@HIDDEN; Thu, 20 Feb 2025 23:49:42 -0500 Received: by mail-oa1-x43.google.com with SMTP id 586e51a60fabf-2aa17010cbcso1234489fac.3 for <bug-gnu-emacs@HIDDEN>; Thu, 20 Feb 2025 20:49:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740113379; x=1740718179; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=PYFOGZO02m4NL6omNr/fTXBAf3WdDKYvjZ2Q+hIIhO8=; b=T15w+Ce01G+erCoDsiIfKCn0guxk5z6j0/9TsntoxdXTK0REo1+8/++ijhvux+ewg8 DLSqWyapTFi3bkLE1TlBFUjgGN7VBD/pqqoKru3chCI0OP/n7N2Um8cuO/QGRymjJM9L mSUfqcPQAWvpFS9DR0t26FKspMwUb4QIIr2xLYo1zZFTW0oR0A6/ukiw7oA4Z3FVUdsv RXlqYMo7wJ+dpDTVvQwEEqP8C5xwvvvkALYRpZICHylvx3WlDZE/FETgTmHwnBtoQjv9 p339COwViDUwRKGLMZK34JiuhtSk3tUQF0F+o0kZq/5/1c7/uLyKK2uOCTeKLI8+4nwk M1+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740113379; x=1740718179; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PYFOGZO02m4NL6omNr/fTXBAf3WdDKYvjZ2Q+hIIhO8=; b=py+7f7e0HnRzgRB7AvErakFM/onRVsU62HU+zJzXi0l86z6LVU0IXPPit5rl79sVzC jiYdS/n7tVXzbIp2S92xVWCk/yjxDXhnlvchq4v23O2k8YnpduwrQ08aOQj9nkJ1FhlV il0D8Z2t6ysdYAMiYwOybSFXSKz2OKwK6eMOhrbx86xm3KToUrTtgW+D6aoxe4lcetUW QdP0jdlIazN6IDo3YSFdCyDGBqrP/l5oBqMPBmGs9rcFCiUTTWMzOkUE03FNtPBOTMa1 lSSg1YtzaCuur+yrg4C+3P2uHdmGPtMI7V8BZwI89gMbAK3yVmP9T27BvN29EQftEioD VpXw== X-Gm-Message-State: AOJu0Yx7hq0VSzvelapd95icXSQlezuPtkzxR9zL/Y9xkZAllgAYhD5h /43DHAHVRr8RWvFDipknw9bYAjsR/wqR+Nex1kK7Kwv5MJYKLodKSHYlZYYp X-Gm-Gg: ASbGncs/ol42Mq9X+h2qX/PYGB4sHvUY8lX8hU9obAkZBdu/UP+xeCtblo8dfaFZPCR //E3RlumSjtEw0hW/cKeMz11kZTHekKKDCjbSF77Eg+keHOhhwPPom/L6zZYO2j/m91XKDdbl2P q6MivWImuhhaso2YruCWZjcY/ZeIO4tVDPkdBysuNCEk6k76cE43idnCL3dpBKGyHGOY0oYS1SG lc2xBJQ0+zGIXZfHW9Bci3HSeCCcFelyDCR3PSXAscVc2vF5Gt+TGA7HhjRrPlToyD7nA== X-Google-Smtp-Source: AGHT+IGIzxSfrXfLTBU1Bh0AZMPl12RLcdKmHInxP1aCxc+bQpykX0HfRaf5tozdboRyFQlnQwzv7A== X-Received: by 2002:a05:6870:20b:b0:288:6a16:fe1 with SMTP id 586e51a60fabf-2bd50d9075dmr1346265fac.18.1740113379428; Thu, 20 Feb 2025 20:49:39 -0800 (PST) Received: from fedora ([2806:10ae:e:8def::1]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2b963a0d287sm6581671fac.46.2025.02.20.20.49.38 for <bug-gnu-emacs@HIDDEN> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Feb 2025 20:49:38 -0800 (PST) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: [PATCH] Allow truncate flymake end-of-line diagnostic summary X-Debbugs-Cc: Date: Thu, 20 Feb 2025 22:49:37 -0600 Message-ID: <87h64n52ce.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2001:4860:4864:20::43; envelope-from=eg642616@HIDDEN; helo=mail-oa1-x43.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: Tags: patch This patch allow to user set a limit for `flymake-show-diagnostics-at-end-of-line' summary text. This way you can shorten long messages like: Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (eg642616[at]gmail.com) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (eg642616[at]gmail.com) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.2 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Tags: patch This patch allow to user set a limit for `flymake-show-diagnostics-at-end-of-line' summary text. This way you can shorten long messages like: (message ) =E2=80=98message=E2=80=99 called with 0 arguments, but requires = 1 or more error message^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ to... (message ) =E2=80=98message=E2=80=99 called with 0 arguments... error message^^^^^^^^^^^^^^^^^^^^^^^ This is related to bug#74691, which I also have this problem. --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Allow-truncate-flymake-end-of-line-diagnostic-summar.patch From 09b591a3b261b656bdcdf0644e3a186bbd1e001d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= <eg642616@HIDDEN> Date: Thu, 20 Feb 2025 22:20:29 -0600 Subject: [PATCH] Allow truncate flymake end-of-line diagnostic summary * lisp/progmodes/flymake.el (flymake-max-length-eol-diagnostic-summary): New user customizable variable. (flymake--eol-overlay-summary): Allow truncate summary if `flymake-max-length-eol-diagnostic-summary' is non-nil. --- lisp/progmodes/flymake.el | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 9dda53713f5..9fca65e6491 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -541,6 +541,12 @@ flymake-show-diagnostics-at-end-of-line (const :tag "Don't display diagnostics at end-of-line" nil)) :package-version '(Flymake . "1.3.6")) +(defcustom flymake-max-length-eol-diagnostic-summary nil + "Set maximum string length to truncate in end-of-line summary diagnostic. +If set to nil (default), there's not limit and string summary +won't be truncated." + :type '(choice integer (const :tag "No limit" nil))) + (define-obsolete-face-alias 'flymake-warnline 'flymake-warning "26.1") (define-obsolete-face-alias 'flymake-errline 'flymake-error "26.1") @@ -819,9 +825,13 @@ flymake--delete-overlay (defun flymake--eol-overlay-summary (src-ovs) "Helper function for `flymake--update-eol-overlays'." (cl-flet ((summarize (d) - (propertize (flymake-diagnostic-oneliner d t) 'face - (flymake--lookup-type-property (flymake--diag-type d) - 'eol-face)))) + (propertize (concat (substring (flymake-diagnostic-oneliner d t) + 0 flymake-max-length-eol-diagnostic-summary) + (if flymake-max-length-eol-diagnostic-summary + "...")) + 'face (flymake--lookup-type-property + (flymake--diag-type d) + 'eol-face)))) (let* ((diags (cl-sort (mapcar (lambda (o) (overlay-get o 'flymake-diagnostic)) src-ovs) -- 2.48.1 --=-=-= Content-Type: text/plain -- - E.G via GNU Emacs. --=-=-=--
Elijah Gabe Pérez <eg642616@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#76455
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.