From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Flymake Support Indicator Errors in Margin Date: Sat, 06 Apr 2024 14:35:51 +0300 Message-ID: <86edbi3eqw.fsf@gnu.org> References: <87r0gfajlh.fsf@posteo.net> <868r2mtjdk.fsf@gnu.org> <86msr19ipu.fsf@gnu.org> <864jd677qh.fsf@gnu.org> <87jzm0iza9.fsf@catern.com> <87cyrsitqw.fsf@catern.com> <871q7w4jn7.fsf@catern.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2077"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sbaugh@catern.com, sbaugh@janestreet.com, philipk@posteo.net, emacs-devel@gnu.org, luangruo@yahoo.com To: Elijah G Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 06 13:36:50 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 1rt4Lp-0000Jg-Hm for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Apr 2024 13:36:49 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rt4Kz-0006vz-UU; Sat, 06 Apr 2024 07:35:57 -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 1rt4Kz-0006vq-2w for emacs-devel@gnu.org; Sat, 06 Apr 2024 07:35:57 -0400 Original-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 1rt4Kw-0005E5-MH; Sat, 06 Apr 2024 07:35:54 -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=trKnB+zNWpZ3OYVufFqE+N+t0zdZ66T1HMrSkOOv9z0=; b=dA2j/DBibFHC kQ6XBxWdqCL0KVs6EzkdCrNH05jt0mAPhMjZxr7zXmQWV7flunBQRgZmRtE2Vqxiyk73DF444yqhd qPmVUvCZi1/8UkBRwUq2o7OSRMH8SWI2mq6ZHYwUd0No7szTsLXhlC+DlqA7bypLVIFcuUUREFFsn 25z3iSp3MOwy6dVtBg9k4eM0nx6olUJ4ejpQsP92WosSyX7ldfP9uvv7YjXjzBT/OYQpXNc/qFsPo YWm82hyO/kog+QGDUlSrNQ2KduUtLPxelYLPjkaxulCJiGAIroJsW5bNlpj0up79SgSO2aFwAHQtt rhjsto3qCjswOEC77IJJXg==; In-Reply-To: (message from Elijah G on Wed, 27 Mar 2024 15:29:28 -0600) 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:317568 Archived-At: > From: Elijah G > Date: Wed, 27 Mar 2024 15:29:28 -0600 > Cc: Eli Zaretskii , Spencer Baugh , philipk@posteo.net, > emacs-devel@gnu.org, Po Lu > > I've now updated the patch to allow auto resize margins and using margins > when it's in terminal frames. Thanks, I think this is almost ready to be installed; see a few minor comments below. > Sadly I couldn't find anything for detecting HDiPI frames, so the user > must have to configure it. I don't think Emacs should second-guess the user in this matter: let the user decide whether the fringes are too narrow for these indicators. > +(defcustom flymake-indicator-type (if (display-graphic-p) > + 'fringes > + 'margins) > + "Indicate which indicator type to use for display errors. > + > +The value can be nil (dont indicate errors but just highlight them), ^^^^ "don't" > +(defcustom flymake-margin-indicators-string > + '((error "!!" compilation-error) > + (warning "!" compilation-warning) > + (note "!" compilation-info)) > + "Strings used for margins indicators. > +The value of each list may be a list of 3 elements where specifies the > +error type, its string to use and its face, ^^^^^^^^^^ "the string" > +or a list of 2 elements specifying only the error type and its string. ^^^^^^^^^^^^^^ "and the corresponding string" > +Indicators can be an ASCII or non-ASCII string. This sentence is redundant, so I suggest to remove it. The ASCII vs non-ASCII issue is only relevant for the default value; users can do whatever they want when they customize the option. > +(defcustom flymake-autoresize-margins t > + "If non-nil automatically resize margin-width. ^ Comma is missing there. Also, how about telling what triggers the resizing? > +Only if `flymake-indicator-type' is set to margins." ^^^^^^^ "Only relevant if..." > +(defvar-local flymake-original-margin-width nil > + "Store original margin width") Should this be an internal variable (named flymake--original-margin-width)? Also, please consider telling in the doc string when is the width restored. > +(defun flymake--resize-margins (&optional og-width) > + "Resize current window margins according `flymake-margin-indicator-position'. ^^^^^^^^^ "according to" > +Return to original margin width if OG-WIDTH is non-nil." Suggest to rename OG-WIDTH to ORIG-WIDTH. Last, but not least: please mention this change (and the new user options) in NEWS and in the Flymake manual.