From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ian Dunn Newsgroups: gmane.emacs.devel Subject: Re: Abbrev suggestions - feedback appreciated Date: Sun, 08 Oct 2017 12:38:26 -0400 Message-ID: <87fuatmw71.fsf@gnu.org> References: <871smeoalc.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1507480800 5852 195.159.176.226 (8 Oct 2017 16:40:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 8 Oct 2017 16:40:00 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Cc: emacs-devel@gnu.org, Mathias Dahl To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 08 18:39:56 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1EcM-0000na-GP for ged-emacs-devel@m.gmane.org; Sun, 08 Oct 2017 18:39:54 +0200 Original-Received: from localhost ([::1]:54427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1EcU-0005F8-1b for ged-emacs-devel@m.gmane.org; Sun, 08 Oct 2017 12:40:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1Ebr-0005Do-Ji for emacs-devel@gnu.org; Sun, 08 Oct 2017 12:39:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1Ebq-0006Ez-KG for emacs-devel@gnu.org; Sun, 08 Oct 2017 12:39:23 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1Ebq-0006Ej-FV; Sun, 08 Oct 2017 12:39:22 -0400 Original-Received: from [2604:6000:1010:176:da4d:3352:bae5:f50e] (port=48218 helo=escafil) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e1Ebq-0007Nk-2b; Sun, 08 Oct 2017 12:39:22 -0400 In-Reply-To: (Stefan Monnier's message of "Sat, 07 Oct 2017 18:44:56 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:219260 Archived-At: --=-=-= Content-Type: text/plain >>>>> "Stefan" == Stefan Monnier writes: >> 2. Having this be controlled by some property of abbrev tables >> and/or abbrevs themselves would be ideal, similar to the >> case-fixed property. That way the expansions of auto-correct[1] >> and captain[2] abbrevs won't nag people all the time. >> >> [1] https://elpa.gnu.org/packages/auto-correct.html [2] >> https://elpa.gnu.org/packages/captain.html Stefan> For Captain, the abbrev and its "expansion" should have the Stefan> same length, so absug-hint-threshold should already skip Stefan> them. Stefan> For auto-correct, it might be the case that the wrong Stefan> spelling is shorter by absug-hint-threshold, but then you Stefan> could also argue that if you often misspell a word and it Stefan> gets auto-corrected and the wrong spelling is shorter, you Stefan> might take it as a feature and consciously use the Stefan> shorter/wrong spelling and rely on the abbrev to auto Stefan> correct it. I stand corrected. My only other suggestion would be to use add-function on abbrev-expand-function instead of setting it directly to avoid overwriting other packages that may need it. Something like the following: --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (add-function :after-until abbrev-expand-function #'absug-maybe-suggest) --=-=-= Content-Type: text/plain -- Ian Dunn --=-=-=--