From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Performance degradation from long lines Date: Sun, 10 Mar 2019 14:58:55 +0200 Message-ID: <834l8a7unk.fsf@gnu.org> References: <665d5f3d84c071632f87f66ffedb6aed@webmail.orcon.net.nz> <83sh0uqhw8.fsf@gnu.org> <83h8haqd2g.fsf@gnu.org> <1c7973ecaeb4478a81dcf17e9257620c@webmail.orcon.net.nz> <34b92ce4-7b3d-97c7-f59e-e61e9564a7b0@orcon.net.nz> <55c0781a-8c15-f0c5-a80b-40e7c37507da@orcon.net.nz> <71558cda-bfb1-22c0-1b9c-ad8f458817da@orcon.net.nz> <83pnt2f80q.fsf@gnu.org> <85d7a4df-27b1-1cc5-64b0-95fc7bd14ccb@orcon.net.nz> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="190809"; mail-complaints-to="usenet@blaine.gmane.org" Cc: mithraeum@protonmail.com, monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: Phil Sainty Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 10 13:59:17 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h2y2v-000nWx-0W for ged-emacs-devel@m.gmane.org; Sun, 10 Mar 2019 13:59:17 +0100 Original-Received: from localhost ([127.0.0.1]:44901 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2y2t-0000Pn-SK for ged-emacs-devel@m.gmane.org; Sun, 10 Mar 2019 08:59:15 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2y2m-0000Om-QW for emacs-devel@gnu.org; Sun, 10 Mar 2019 08:59:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2y2l-0003sW-1L; Sun, 10 Mar 2019 08:59:07 -0400 Original-Received: from [176.228.60.248] (port=3216 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h2y2j-0000Z5-Ql; Sun, 10 Mar 2019 08:59:06 -0400 In-reply-to: <85d7a4df-27b1-1cc5-64b0-95fc7bd14ccb@orcon.net.nz> (message from Phil Sainty on Sun, 10 Mar 2019 23:22:02 +1300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234022 Archived-At: > Cc: mithraeum@protonmail.com, monnier@IRO.UMontreal.CA, emacs-devel@gnu.org > From: Phil Sainty > Date: Sun, 10 Mar 2019 23:22:02 +1300 > > > +(defgroup so-long nil > > + "Prevent unacceptable performance degradation with very long lines." > > + :prefix "so-long" > > + :group 'convenience) > > + > > +(defcustom so-long-threshold 250 > > + "Maximum line length permitted before invoking `so-long-function'. > > + > > +See `so-long-detected-long-line-p' for details." > > + :type 'integer > > + :package-version '(so-long . "1.0") > > + :group 'so-long) > > > > Please add :version tags to all the customizable options. > > It hadn't occurred to me that the defgroup should specify a version, > but I can add that. I meant defcustoms. > I thought that :package-version functioned as an alternative to > :version which worked both for the core library and for the GNU ELPA > package for earlier emacs versions? AFAIR, when we discussed this, the intent was to put this in core? I have no clear idea what is required for ELPA. > > Also, please make the first sentence fit on a single line -- this > > is important for Apropos commands, which only display one line. > > In this instance I had intentionally wrapped the line early so that > the first line was coherent on its own, even though it was part of a > longer sentence. i.e.: > > "Ensures that `so-long-mode' knows the original `major-mode'" > > If that's not sufficient, I can rephrase it over multiple sentences. I think we want this rephrased. Just put a period at the end of the first line, and then add something to the beginning of the rest to get the next sentence. > > +(defun so-long-menu () > > + "Dynamically generate the \"So Long\" menu." > > + ;; (info "(elisp) Menu Example") > > > > How about providing some help-echo for this menu? > > I'd tried that initially, but I found it so glitchy that I removed it. ??? I'm surprised: I never saw nor hear any complaints about help-echo for menus. > I think the `so-long-menu-item-revert' docstring can remain as a > simple cross-reference to `so-long-revert', or else I could do this: > > ;; Duplicate the `so-long-revert' documentation for the menu item. > (put 'so-long-menu-item-revert 'function-documentation > (documentation 'so-long-revert t)) I wonder how will that work with i18n.