From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: bird Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Flymake Support Indicator Errors in Margin Date: Sun, 17 Mar 2024 16:44:15 +0000 (UTC) Message-ID: <87jzm0iza9.fsf@catern.com> References: <87r0gfajlh.fsf@posteo.net> <868r2mtjdk.fsf@gnu.org> <86msr19ipu.fsf@gnu.org> <864jd677qh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30764"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Elijah G , Spencer Baugh , joaotavora@gmail.com, philipk@posteo.net, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 17 17:45:11 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rltdG-0007ny-LK for ged-emacs-devel@m.gmane-mx.org; Sun, 17 Mar 2024 17:45:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rltcV-0003xD-2S; Sun, 17 Mar 2024 12:44:23 -0400 Original-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 1rltcT-0003wX-C5 for emacs-devel@gnu.org; Sun, 17 Mar 2024 12:44:21 -0400 Original-Received: from s.wrqvtbkv.outbound-mail.sendgrid.net ([149.72.123.24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rltcR-0005RB-Ps for emacs-devel@gnu.org; Sun, 17 Mar 2024 12:44:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: content-transfer-encoding:cc:content-type:from:subject:to; s=s1; bh=B/PqtlEWSUXECM070EDcRL26XXxobDlE0ycgAEzea5c=; b=ql5aztQvSoFpoTNrdhR1RBxnRIhj25kkRbY6YxjcFL4JN7XgPFW65H7HCxnZJ/qDBHF2 YvN00+FUmfVMOmaLeEwh64CMXF3NxmoCaepjHwmeDpxA5imxF49jhiv9wauCSu2PDDkyP8 nma3KCN3J8PwziQynHa9r3443O77f+wzXwG14rhmK3O+U/fmrp8YCnuXXMeYrbyfcE2tb/ Q8aVc8yrcyUU3iSBnZfDGDAxoRSYcmmywFb4KeHjjMhMFgK2+4TOfYhzdkPGtmADNXvvrn ZhIB08ih3iSkNlehbMVwl0pkxN7wSK1tHvNbvfVE18Z0r9MlGcCRRslKDJxCwT0g== Original-Received: by recvd-67cf556c4d-vprpr with SMTP id recvd-67cf556c4d-vprpr-1-65F71DDF-7 2024-03-17 16:44:15.530874219 +0000 UTC m=+1536807.352801157 Original-Received: from earth.catern.com (unknown) by geopod-ismtpd-7 (SG) with ESMTP id DCu5bDE7SNq62eRbDG7kxw Sun, 17 Mar 2024 16:44:15.380 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=127.0.0.1; helo=localhost; envelope-from=sbaugh@catern.com; receiver=gnu.org Original-Received: from localhost (localhost [127.0.0.1]) by earth.catern.com (Postfix) with ESMTPSA id E4E5A624F9; Sun, 17 Mar 2024 12:44:14 -0400 (EDT) In-Reply-To: <864jd677qh.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Mar 2024 13:10:14 +0200") X-SG-EID: =?us-ascii?Q?u001=2EbKTm6BaPeP40a=2F4nDT+Cqmx+wegHgiCBeYsPHjNWZ7i=2FC7zpxrSDM=2FV9o?= =?us-ascii?Q?+kBkt6T5WunkZcAvGVPSnDNIeGSRWJlTwHw2qPb?= =?us-ascii?Q?HZo=2FZGnaZ62+eh56Z8Cuzm8ydAXxlfr7LKxlPm9?= =?us-ascii?Q?TiyGZATjKyeMmQoONtsUOD6eth2aSjOPKqssJj2?= =?us-ascii?Q?v6A8xZoAmORUuNtYCl5DMZXRE8Q2=2FBSHLsQc2XC?= =?us-ascii?Q?PwmwD4Hs+Bnxh3NjpAySgs=3D?= X-Entity-ID: u001.oW4JupFKOzCccZAQN2OOFQ== Received-SPF: pass client-ip=149.72.123.24; envelope-from=bounces+21787432-489d-emacs-devel=gnu.org@em8926.catern.com; helo=s.wrqvtbkv.outbound-mail.sendgrid.net 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:317139 Archived-At: Eli Zaretskii writes: >> From: Elijah G >> Date: Thu, 14 Mar 2024 09:35:33 -0600 >> Cc: Jo=C3=A3o T=C3=A1vora ,=20 >> philipk@posteo.net, emacs-devel@gnu.org >>=20 >> On Thu, Mar 14, 2024 at 5:05=E2=80=AFAM Eli Zaretskii wro= te: >>=20 >> > > +(defcustom flymake-margin-indicators-string >> > > + `((error ,(if (char-displayable-p 8252) >> > > + "=E2=80=BC" >> > > + "!!") >> > > + compilation-error) >> > >> > When do you expect this value to be evaluated? >> > >> > In general, I wonder whether it would be simpler and wiser to use just >> > "!!", and leave it to users to customize to "=E2=80=BC" if their displ= ays >> > support that. (We can mention the possibility in the doc string.) >>=20 >> I implemented it in a similar way to how display-fill-column-indicator >> does with display-fill-column-indicator-character, this since I expect >> users to only set left-margin-width to 1, because if there is several >> errors on the same line, the indicators will be displayed next to each >> other and it could be confusing. >>=20 >> However I agree that it is better to change it to just "!!", >> I fixed the patch and added a doc string for the possibility of includin= g >> non-ASCII characters. > > Spencer, any comments? A few thoughts: - I looked through packages in core which use fringes. The only function which seems to also support margins is gdb-put-breakpoint-icon, which automatically uses margins instead of fringes to display a breakpoint icon if (display-images-p) is nil. - The current version of Elijah's patch requires the user to explicitly configure left-margin-width (or right-margin-width) to non-zero if they want the indicators to appear; the margins are not automatically grown, unlike in gdb-put-breakpoint-icon. - I'm not sure whether or why this is even desirable in a TTY. The indicators duplicate information that's already communicated by the face, so they're a minor benefit. In a graphical frame, the indicators are basically "free" in terms of visual space, since they display in the fringe which already exists, so it's worth having them. But in a TTY, with the current patch, two columns of text in every flymake buffer will be devoted to displaying these indicators, whether they're currently needed or not. That seems like too high a cost, unless I'm missing something. - If it *is* desirable on a TTY, then the need to explicitly configure it is unfortunate. - One alternative design could display the indicators in the first few columns of text, if that would otherwise be whitespace, to avoid wasting space for the margin. I think I've seen other packages which display stuff in the whitespace in the first column. - If it's just about making diagnostics more visible, there are various things we could do, like displaying an indicator inline with the text which has the diagnostic, or highlighting the entire line containing the diagnostic. Elijah, could you say more about your setup? - You mentioned you already have a left margin configured; what is displayed in that margin? Is it anything other than flymake/flycheck indicators? - Do you have the margin automatically disappear if you aren't using flycheck in a buffer/if there are no flycheck errors in a buffer? - Is there some reason that seeing the indicators is especially important for you? Does it communicate information not already carried by the face? - If you just want the diagnostics to be more visible, would customizing the face on the diagnostics help? Or perhaps customizing flymake-show-diagnostics-at-end-of-line?