From unknown Tue Jun 17 01:36:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55980: 29.0.50; [PATCH] whitespace.el: New whitespace style `lines-char' Resent-From: miha@kamnitnik.top Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Jun 2022 18:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55980 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 55980@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165523302420851 (code B ref -1); Tue, 14 Jun 2022 18:58:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Jun 2022 18:57:04 +0000 Received: from localhost ([127.0.0.1]:35788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1Bip-0005QF-UF for submit@debbugs.gnu.org; Tue, 14 Jun 2022 14:57:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:44680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1Bin-0005Px-Kx for submit@debbugs.gnu.org; Tue, 14 Jun 2022 14:57:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1Bij-0000yJ-VY for bug-gnu-emacs@gnu.org; Tue, 14 Jun 2022 14:56:59 -0400 Received: from kamnitnik.top ([2001:19f0:5001:bf2:5400:2ff:fee0:2626]:58884) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1Bih-0005AL-Pc for bug-gnu-emacs@gnu.org; Tue, 14 Jun 2022 14:56:57 -0400 From: miha@kamnitnik.top DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1655233013; bh=eDOUT0qr6B5R8eWObskhDZe+TS4srWL6WBGQ3cg2WlY=; h=From:To:Subject:Date:From; b=fK/m8r74AdHhe2OWuRf+nUa6ra9Pc85cU1kEyrkkgZEvqysd+mGp26ROc7u2n3AHR XSNxHDOckE+ab1dgOzFvrzbA+LR8ZJyi0SbC16jAwaCbCrF4B5odMHL0km09Gb/ZM5 KF/7kvDHE4JfrkkH1FPu25Q1ylCcKkKlqU7l1C3T+p+d3P2QKAElREhlaOzTkzbaZg 9phSQ/MShobudoywgnzQYUSPp0mXBKZYIYlDdiUL+qf1h/sHMU5XQBjbFzviPDOkPD nN64uU+dCsIAobGmHhLSyiSYLeKTOK/CT9ntA7ujiNOO+b0+lmsAYZrEU7lSni3rUI SHSiLQ7OMtl9w== Date: Tue, 14 Jun 2022 21:08:54 +0200 Message-ID: <865yl3kqpl.fsf@miha-pc> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2001:19f0:5001:bf2:5400:2ff:fee0:2626; envelope-from=miha@kamnitnik.top; helo=kamnitnik.top X-Spam_score_int: 24 X-Spam_score: 2.4 X-Spam_bar: ++ X-Spam_report: (2.4 / 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, FROM_SUSPICIOUS_NTLD=0.499, FROM_SUSPICIOUS_NTLD_FP=1.997, PDS_OTHER_BAD_TLD=1.997, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 2.7 (++) 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: Please see the attached patch which adds a new whitespace style to highlight only the first character over the whitespace-line-column limit. Best regards. From d1c341e46206e7ce1615105cf6a0e70aebbc72e4 Mon Sep 17 00:00:00 2001 From: Miha =?UTF-8?Q?Rihtar=C5=A1i=C4=8D?= Date: Tue, 14 Jun 2022 21:02:22 +0200 Subject: [PATCH] whitespa [...] Content analysis details: (2.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.51.188.17 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=miha%40kamnitnik.top; ip=209.51.188.17; r=debbugs.gnu.org] 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: kamnitnik.top (top)] 2.0 FROM_SUSPICIOUS_NTLD_FP From abused NTLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 T_SCC_BODY_TEXT_LINE No description available. 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 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Please see the attached patch which adds a new whitespace style to highlight only the first character over the whitespace-line-column limit. Best regards. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-whitespace.el-New-whitespace-style-lines-char.patch Content-Transfer-Encoding: quoted-printable From=20d1c341e46206e7ce1615105cf6a0e70aebbc72e4 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Miha=3D20Rihtar=3DC5=3DA1i=3DC4=3D8D?=3D Date: Tue, 14 Jun 2022 21:02:22 +0200 Subject: [PATCH] whitespace.el: New whitespace style `lines-char' * lisp/whitespace.el (whitespace-style): (whitespace-style-value-list): (whitespace-toggle-option-alist): (global-whitespace-toggle-options): (whitespace-help-text): (whitespace-interactive-char): (whitespace-style-face-p): (whitespace-color-on): (whitespace-lines-regexp): New whitespace style `lines-char', which highlights only the first character over the whitespace-line-column limit. =2D-- lisp/whitespace.el | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 610d670ac9..a974336ace 100644 =2D-- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -295,8 +295,8 @@ whitespace-style `whitespace-line-column' are highlighted via faces. Whole line is highlighted. =2D It has precedence over `lines-tail' (see =2D below). + It has precedence over `lines-tail' and + `lines-char' (see below). It has effect only if `face' (see above) is present in `whitespace-style'. =20 @@ -310,6 +310,17 @@ whitespace-style and if `face' (see above) is present in `whitespace-style'. =20 + lines-char lines which have columns beyond + `whitespace-line-column' are highlighted via + faces. + But only the first character which goes + beyond `whitespace-line-column' column. + It has effect only if `lines' or + `lines-tail' (see above) + is not present in `whitespace-style' + and if `face' (see above) is present in + `whitespace-style'. + newline NEWLINEs are visualized via faces. It has effect only if `face' (see above) is present in `whitespace-style'. @@ -431,6 +442,7 @@ whitespace-style (const :tag "(Face) SPACEs and HARD SPACEs" spaces) (const :tag "(Face) Lines" lines) (const :tag "(Face) Lines, only overlong part" lines-tail) + (const :tag "(Face) Lines, only first character" lines-char) (const :tag "(Face) NEWLINEs" newline) (const :tag "(Face) Missing newlines at EOB" missing-newline-at-eof) @@ -772,7 +784,8 @@ whitespace-line-column It must be an integer or nil. If nil, the `fill-column' variable value is used. =20 =2DUsed when `whitespace-style' includes `lines' or `lines-tail'." +Used when `whitespace-style' includes `lines', `lines-tail' or +`lines-char'." :type '(choice :tag "Line Length Limit" (integer :tag "Line Length") (const :tag "Use fill-column" nil)) @@ -1058,6 +1071,7 @@ whitespace-style-value-list trailing lines lines-tail + lines-char newline empty indentation @@ -1085,6 +1099,7 @@ whitespace-toggle-option-alist (?r . trailing) (?l . lines) (?L . lines-tail) + (?\C-l . lines-char) (?n . newline) (?e . empty) (?\C-i . indentation) @@ -1244,6 +1259,7 @@ global-whitespace-toggle-options r toggle trailing blanks visualization l toggle \"long lines\" visualization L toggle \"long lines\" tail visualization + C-l toggle \"long lines\" one character visualization n toggle NEWLINE visualization e toggle empty line at bob and/or eob visualization C-i toggle indentation SPACEs visualization (via `indent-tabs-mode') @@ -1274,6 +1290,7 @@ global-whitespace-toggle-options trailing toggle trailing blanks visualization lines toggle \"long lines\" visualization lines-tail toggle \"long lines\" tail visualization + lines-char toggle \"long lines\" one character visualization newline toggle NEWLINE visualization empty toggle empty line at bob and/or eob visualization indentation toggle indentation SPACEs visualization @@ -1770,6 +1787,7 @@ whitespace-help-text [] r - toggle trailing blanks visualization [] l - toggle \"long lines\" visualization [] L - toggle \"long lines\" tail visualization + [] C-l - toggle \"long lines\" one character visualization [] n - toggle NEWLINE visualization [] e - toggle empty line at bob and/or eob visualization [] C-i - toggle indentation SPACEs visualization (via `indent-tabs-mode') @@ -1892,6 +1910,7 @@ whitespace-interactive-char r toggle trailing blanks visualization l toggle \"long lines\" visualization L toggle \"long lines\" tail visualization + C-l toggle \"long lines\" one character visualization n toggle NEWLINE visualization e toggle empty line at bob and/or eob visualization C-i toggle indentation SPACEs visualization (via `indent-tabs-mode') @@ -2020,6 +2039,7 @@ whitespace-style-face-p (memq 'trailing whitespace-active-style) (memq 'lines whitespace-active-style) (memq 'lines-tail whitespace-active-style) + (memq 'lines-char whitespace-active-style) (memq 'newline whitespace-active-style) (memq 'empty whitespace-active-style) (memq 'indentation whitespace-active-style) @@ -2066,12 +2086,17 @@ whitespace-color-on ;; Show trailing blanks. `((,#'whitespace-trailing-regexp 1 whitespace-trailing t))) ,@(when (or (memq 'lines whitespace-active-style) =2D (memq 'lines-tail whitespace-active-style)) + (memq 'lines-tail whitespace-active-style) + (memq 'lines-char whitespace-active-style)) ;; Show "long" lines. `((,#'whitespace-lines-regexp =2D ,(if (memq 'lines whitespace-active-style) =2D 0 ; whole line =2D 2) ; line tail + ,(cond + ;; whole line + ((memq 'lines whitespace-active-style) 0) + ;; line tail + ((memq 'lines-tail whitespace-active-style) 2) + ;; first overflowing character + ((memq 'lines-char whitespace-active-style) 3)) whitespace-line prepend))) ,@(when (or (memq 'space-before-tab whitespace-active-style) (memq 'space-before-tab::tab whitespace-active-style) @@ -2182,7 +2207,7 @@ whitespace-lines-regexp (re-search-forward (let ((line-column (or whitespace-line-column fill-column))) (format =2D "^\\([^\t\n]\\{%s\\}\\|[^\t\n]\\{0,%s\\}\t\\)\\{%d\\}%s\\(.+\\)$" + "^\\([^\t\n]\\{%s\\}\\|[^\t\n]\\{0,%s\\}\t\\)\\{%d\\}%s\\(?2:\\(?3:.= \\).*\\)$" tab-width (1- tab-width) (/ line-column tab-width) =2D-=20 2.36.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmKo3MYTHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP8C7D/9LgBRzVLGZFbPRKVSUSgk3zd9p9W0Y 5wVpV5BD7ZnDk4nlJ0WSWZpV+J3P7GwHOwGxYEGwCT5AvZ3OXBNd5oiS+W+DDb6Y ixvM+N8nHiExhh0VQtVFL6xbYkPIGBa7HPCvnL/+6LWOA/Y6Eu8Gt8p2GOxep8yZ etmJffwBNxZtGS0esScib0fvdBJgFnS7dpxWsb/oNA3mRHSxiK9we/53UY6rrjcj yKvKz5RlBcLfuKgQ8I6+ZgCB9qaR7trZtoG8+N7vXkTDy5OCVlZRMY5fRUZCCI/y IIyeoGNWvbimAyZLXZSt9VgRZv6Vmuj/u5NKiydpgydzuf+0ergi1NV26e8hlWi6 cTIgdzZSQFN+KFfSyONVjAINwhYa5b0rF6jjXu3ee7aHzos4wqlENdEhDkI96Ape TNnd06qaLbgjBe+LbSxqzOA8IXRY4VxvjJumGBX8kCI/ShATrstZewh9cJxS7LYw ZNCArDSszr28ZfScBbwGSH1tVH7xQ5b9Of4gqGOKjoPzR5fPA9rlRJ1dPWUAuehn vo2PNhjx5YpdnUBU2Nivqvy5wANEsaBBOkaU7NSqQfmLD2gfshauND81v1WwW2Pp Dok1oE30e1Ca4WlMB3Z/jp1qW69zZhg8i5SgvaKzAojgPhacpZo0Bt2/x5HvzPNN 5czxxLiQLg72Cg== =N2VA -----END PGP SIGNATURE----- --==-=-=-- From unknown Tue Jun 17 01:36:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55980: 29.0.50; [PATCH] whitespace.el: New whitespace style `lines-char' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Jun 2022 12:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55980 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: miha@kamnitnik.top Cc: 55980@debbugs.gnu.org Received: via spool by 55980-submit@debbugs.gnu.org id=B55980.165529591030115 (code B ref 55980); Wed, 15 Jun 2022 12:26:01 +0000 Received: (at 55980) by debbugs.gnu.org; 15 Jun 2022 12:25:10 +0000 Received: from localhost ([127.0.0.1]:36781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1S57-0007pd-HH for submit@debbugs.gnu.org; Wed, 15 Jun 2022 08:25:09 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1S55-0007pB-KZ for 55980@debbugs.gnu.org; Wed, 15 Jun 2022 08:25:08 -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:In-Reply-To:Date: References: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=Wstop1rhcSM7HuLOliIqGf2KxLrtm3+Kp2GjeF+zapI=; b=BTWgI8mfG/Dbvisg7NF1oO4fmh fxb4uxFPaS3d8DV/hkI4fEWdbfNmFIqHgLt52Jgmi5oty0bZTOsdrX9DPI1RdJmXoRXIK90xCjPmo tNfJUIHrEAFwNJGITdJ5lVpcxJNFh5fyRIlTfFMdQ4KUerO9GiZFBz4H5KbXB1PhMEX4=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o1S4v-0002R4-MO; Wed, 15 Jun 2022 14:25:00 +0200 From: Lars Ingebrigtsen References: <865yl3kqpl.fsf@miha-pc> X-Now-Playing: Neil Young's _Comes a Time_: "Motorcycle Mama" Date: Wed, 15 Jun 2022 14:24:57 +0200 In-Reply-To: <865yl3kqpl.fsf@miha-pc> (miha@kamnitnik.top's message of "Tue, 14 Jun 2022 21:08:54 +0200") Message-ID: <87ilp2i06e.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: miha@kamnitnik.top writes: > Please see the attached patch which adds a new whitespace style to > highlight only the first character over the whitespace-line-column > limit. Thanks; pushed to Emacs 29 (with a minor rewording of one of the doc strings). 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: -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 (-) miha@kamnitnik.top writes: > Please see the attached patch which adds a new whitespace style to > highlight only the first character over the whitespace-line-column > limit. Thanks; pushed to Emacs 29 (with a minor rewording of one of the doc strings). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 08:25:35 2022 Received: (at control) by debbugs.gnu.org; 15 Jun 2022 12:25:35 +0000 Received: from localhost ([127.0.0.1]:36787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1S5X-0007qh-8c for submit@debbugs.gnu.org; Wed, 15 Jun 2022 08:25:35 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1S5H-0007ps-My for control@debbugs.gnu.org; Wed, 15 Jun 2022 08:25:34 -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=FOTXfi1pek/ZtcMhDDv1BxoDri7f7bem0H7ALeL4mNo=; b=WRA8eD9w7t8ANfSJR7UnC+FvUf duvhCBqLf5FxU03zDJMWUhcBYs9XHO3x3CtSANJOnYtcdpafwt1uAfaACCJfjZpoiJWnv8evwb1JF NyzglzwWf/8IXWqwSZZC090UKPCLuaDfQOgs4kBJOqyXA6yp3OLlWFfBhXM5BtoyWgy0=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o1S59-0002RI-To for control@debbugs.gnu.org; Wed, 15 Jun 2022 14:25:13 +0200 Date: Wed, 15 Jun 2022 14:25:11 +0200 Message-Id: <87h74mi060.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #55980 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 55980 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: -0.0 (/) 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 55980 29.1 quit