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] Add abbrev suggestions Date: Thu, 13 Aug 2020 16:59:19 +0300 Message-ID: <838seimytk.fsf@gnu.org> References: <83pn8rgwib.fsf@gnu.org> <83o8o4c8s4.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39855"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Mathias Dahl Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Aug 13 16:00:16 2020 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 1k6DmB-000AGg-Tt for ged-emacs-devel@m.gmane-mx.org; Thu, 13 Aug 2020 16:00:15 +0200 Original-Received: from localhost ([::1]:43012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6DmA-0006E3-Vf for ged-emacs-devel@m.gmane-mx.org; Thu, 13 Aug 2020 10:00:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6DlS-0005mY-JC for emacs-devel@gnu.org; Thu, 13 Aug 2020 09:59:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54819) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6DlS-0006t7-AK; Thu, 13 Aug 2020 09:59:30 -0400 Original-Received: from [176.228.60.248] (port=4143 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k6DlP-0001uu-IN; Thu, 13 Aug 2020 09:59:28 -0400 In-Reply-To: (message from Mathias Dahl on Wed, 12 Aug 2020 00:16:33 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:253730 Archived-At: > From: Mathias Dahl > Date: Wed, 12 Aug 2020 00:16:33 +0200 > Cc: emacs-devel@gnu.org > > > Are you sure it is a good idea to make this non-nil by default? > > Wouldn't some users consider these suggestions an annoyance? > > No, I'm not. In fact, it was not the default when I started working on > this, but Stefan suggested that it might be a good default. Now we're > me and you against him, I guess... :) Let's start with having it opt-in. We can later see if it is popular enough to become the default. > > > +(defun abbrev--suggest-above-threshold (expansion) > > > + "Return t if we are above the threshold. > > > > Who is "we" in this context? This should be explained. > > I know, I was not happy when I wrote that. "we", here, is something > like "the difference in length between what the user typed and the > abbrev that we found." I guess I could not find a good way to keep the > first sentence of the docstring short, so I opted for the fuzzy "we" > expression... How about the below? Return non-nil if an abbrev in EXPANSION provides significant savings. > > > +EXPANSION is a cons cell where the car is the expansion and the > > > +cdr is the abbrev." > > > > Our style is to include the arguments in the first sentence of the doc > > string. > > I know. Frankly I don't know if I can come up with a suggestion that > combines that together with having a relatively short first > sentence... See above. > Should I include those changes in the same patch and resend > that when done? Yes, please.