From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.devel Subject: Re: Abbrev suggestions - feedback appreciated Date: Sat, 7 Oct 2017 19:18:54 +0200 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a114a6886273f81055af82836" X-Trace: blaine.gmane.org 1507396819 5294 195.159.176.226 (7 Oct 2017 17:20:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 7 Oct 2017 17:20:19 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 07 19:20:12 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 1e0slj-0007xy-03 for ged-emacs-devel@m.gmane.org; Sat, 07 Oct 2017 19:20:07 +0200 Original-Received: from localhost ([::1]:50670 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0sln-0007Fa-D8 for ged-emacs-devel@m.gmane.org; Sat, 07 Oct 2017 13:20:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0skv-0006si-ER for emacs-devel@gnu.org; Sat, 07 Oct 2017 13:19:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0sku-0001mP-EV for emacs-devel@gnu.org; Sat, 07 Oct 2017 13:19:17 -0400 Original-Received: from mail-qk0-x22e.google.com ([2607:f8b0:400d:c09::22e]:50640) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0sku-0001mI-8h for emacs-devel@gnu.org; Sat, 07 Oct 2017 13:19:16 -0400 Original-Received: by mail-qk0-x22e.google.com with SMTP id o187so18312085qke.7 for ; Sat, 07 Oct 2017 10:19:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=bTrGWxRzcl6hq4BEARDYfXLlr2Pwr1gbWwuZ87hARzk=; b=E/lOx8OdSJ4o3fv2YEYo4K80aPlJDmOFNlgHCK3/oeFoep+RjWX3SyLwxr3ZckTv7m apb8tk/+RE9y7DvShr5vSGiUpQePRBUHjyRMqAle+2f/XdBJpkKeDyj4rCsNb2ROZyl6 UU/1yR8xTyQX61cFMp/AOzvVgw2lH2heGYnW3fLNnxPhU0h4uqp0RIeEDx/burC/TEDa k1OFK4LxOOFeewHFfcgHUSHEouEb9dCw56G71aIQvjHzXm2iKlNlPl6isYUUA7t1Q2qu 07LDRLpYz3JT+yHMuwHVW6aLZm7bKeCPh5uwJAaogUGxjFCMtzIogYOLNND8N8BcHYFs QAfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=bTrGWxRzcl6hq4BEARDYfXLlr2Pwr1gbWwuZ87hARzk=; b=O9/ASZszxVNDg5bZZ9RA+xzgWri6RqUq5JLz+ghtvnyF3ohMbcp/JcAbWZZra+NK8s LPR/PNSPg09rp8H8f6D0TiRavjq4+mN5HGgdBzP7nWjjWja6jfphwV61zdVY8M8nH8a6 slNPGYpoS/KxZmmMYQdjGCk3mEmcF3O+d2SU8hZnIQ0maVyyYLdFWDQ/hkcXUmyMQn6+ Cum+IjXRY32ZwMgqt/y6l6JD4D/mqS2BamtYs4u/j7Mphi2LmDz80VqYG98D1CD8YRAI nr9u+tY57wyX1hzMmnsPXyfO0vroe5TB8hZ+MbiujuKVZL6CQ165En207PdK4YPTweRI 18iw== X-Gm-Message-State: AMCzsaULE4HI66Xxh/6OzN4S9EnVx6+iLk+whaNACghdI7LFlNVHAQXq 4p70qFy4wx44YUX7ecS0yZIxxnlMALWupxwsYFo83gNI X-Google-Smtp-Source: AOwi7QCGPFLtALQNma6UH93b2l26MsKFRFi776+pZIwqoZeU48+HYuzhwivOMiMaqk3a+fH2rxQkCTLDFHRjSUAiWDs= X-Received: by 10.55.82.194 with SMTP id g185mr3085386qkb.282.1507396755601; Sat, 07 Oct 2017 10:19:15 -0700 (PDT) Original-Received: by 10.140.85.170 with HTTP; Sat, 7 Oct 2017 10:18:54 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::22e 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:219229 Archived-At: --001a114a6886273f81055af82836 Content-Type: text/plain; charset="UTF-8" > > > Also, someone mailed me about the scenario where there are more than one > > abbrev for the same expansion. Right now, you will get a suggestion to > use > > the most recently defined abbrev. I wonder how useful it would be to see > > the full list of abbrevs that might expand to a certain expansion... > > I think it's enough to make sure we show the /shortest/ abbrev. > I was able to implement that quite easily. The only worry I have is that it might be slow, or I know it is slow-er at least since I need to go through all active abbrev expansions to see if there is any shorter one. I used benchmark-run 1000 times on one of the core functions though and it takes less than 0.1 second on my not very new PC, so perhaps I should not worry. I have very few abbrevs though... Should I be worried about performance? We don't want the user's typing to be affected by this. --001a114a6886273f81055af82836 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> A= lso, someone mailed me about the scenario where there are more than one
> abbrev for the same expansion. Right now, you will get a suggestion to= use
> the most recently defined abbrev. I wonder how useful it would be to s= ee
> the full list of abbrevs that might expand to a certain expansion...
I think it's enough to make sure we show the /shortest/ abbrev.<= br>

I was able to implement that quite= easily. The only worry I have is that
it might be slow, or I kno= w it is slow-er at least since I need to go
through all active ab= brev expansions to see if there is any shorter
one. I used benchm= ark-run 1000 times on one of the core functions though
and it tak= es less than 0.1 second on my not very new PC, so perhaps I
shoul= d not worry. I have very few abbrevs though... Should I be worried
about performance? We don't want the user's typing to be affected= by this.


--001a114a6886273f81055af82836--