From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.help Subject: Re: Abbrevs for the most frequent elisp symbols Date: Wed, 31 Dec 2014 19:46:49 -0200 Message-ID: References: <549C259F.8080307@easy-emacs.de> <54A1A064.3020602@easy-emacs.de> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1420062432 866 80.91.229.3 (31 Dec 2014 21:47:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Dec 2014 21:47:12 +0000 (UTC) Cc: help-gnu-emacs To: Tom Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 31 22:47:07 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y6R6h-0003G4-Fs for geh-help-gnu-emacs@m.gmane.org; Wed, 31 Dec 2014 22:47:07 +0100 Original-Received: from localhost ([::1]:41451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6R6g-0004k0-PF for geh-help-gnu-emacs@m.gmane.org; Wed, 31 Dec 2014 16:47:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6R6S-0004jv-Bl for help-gnu-emacs@gnu.org; Wed, 31 Dec 2014 16:46:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y6R6R-00061C-0E for help-gnu-emacs@gnu.org; Wed, 31 Dec 2014 16:46:52 -0500 Original-Received: from mail-oi0-x22c.google.com ([2607:f8b0:4003:c06::22c]:50499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6R6Q-000618-Oy for help-gnu-emacs@gnu.org; Wed, 31 Dec 2014 16:46:50 -0500 Original-Received: by mail-oi0-f44.google.com with SMTP id a141so3228184oig.3 for ; Wed, 31 Dec 2014 13:46:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=8LmCOQxjkjh5rFgsRVUjRZZbTQVh3AxH3/jdnAJQgBs=; b=x3XTYuw+XOAkrtBHtWD7318cBNpDV7XmuI/+LV3EOJ2eeWtH+2oqxN9eW+Sf6Va8HN WIwLng6exyGIyWKvKuUPlRbKTkhxs51hqwrnPE414Mfy3Cz4oKFmqwa9Bhkn5tXahmA+ yXAhconpzENws9tfcaYgtomd2WJc3E1s/aN2doxqkL5290Cd5R5AefLwUD2b+v/qD+a5 jK1HJrml7B/Kgvk9ipoYWgV0tDHNGpUW73CEua4h1aUYsZ7QicnTysKnVrOgnJK69psq pd7VE5dA5edvug9qr5fXA4cdfYqg5qV9UZ1IpXsO4BLIDtwJEktTob6KNTLNT/NPc1tV EE0w== X-Received: by 10.202.90.139 with SMTP id o133mr5219072oib.99.1420062409926; Wed, 31 Dec 2014 13:46:49 -0800 (PST) Original-Received: by 10.76.99.74 with HTTP; Wed, 31 Dec 2014 13:46:49 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: xacS9jdBc9LDT6wGAWSomqgB7YE X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::22c X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101812 Archived-At: company comes with a backend that matches the initials of defined symbols, the only difference is that you have to type the hyphens, so a modification of that backend would be a viable approach for this menu that's being suggested. That seems like a worthy addition to company-mode for me. Still, I think that should be something separate from this system that's being discussed. When there are collisions, I prefer to use the most common option than to pop-up a completions menu. That's how my setup works right now, it's part of what makes it fast and it feels awesome. :-) Besides, I feel Emacs has enough options when it comes to completions, and I'd rather this not be Yet Another One. Maybe SPC could trigger the most common expansion (a la abbrev) and TAB could trigger the completions menu (a la company). 2014-12-31 7:50 GMT-02:00 Tom : > Stefan Monnier iro.umontreal.ca> writes: > > > > If you use the `initials' completion style, "wcb" will match > > "with-current-buffer" (along with various others), so if we add a good > > sorting based on known usage frequency (as suggested by the OP), the > > cycling completion will behave very similarly to his abbrevs. > > I wonder if it is possible to combine abbrevs with completion. > > I feel the most convenient completion is abbrevs, because then you > don't have to press anything to complete, it just happens. But > if we use initials then there can be collisions. > > What if we could use initial-abbrevs to type lisp symbols, but when > there is more possible completions for the abbrev (e.g. if there is an > other completion for wcb than with-current-buffer) then at > abbrev expansion it would pop up a completion menu like company, etc. > so right below the line) with the possible completions sorted by > frequency with the most frequent at the top. > > This would be the most convenient solution, because then you could > just type initials and completions would pop up without pressing > anything, or if there is no collision then it would expand > immediately like any other abbrev. > > >