From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: Abbrevs for the most frequent elisp symbols Date: Mon, 29 Dec 2014 12:24:20 +0100 Message-ID: <878uhqpul7.fsf@wmi.amu.edu.pl> References: <87sifzkrwn.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1419852297 8829 80.91.229.3 (29 Dec 2014 11:24:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Dec 2014 11:24:57 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 29 12:24:52 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 1Y5YRP-00062F-TK for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Dec 2014 12:24:52 +0100 Original-Received: from localhost ([::1]:32960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y5YRO-0003i6-Th for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Dec 2014 06:24:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y5YRD-0003hG-Al for help-gnu-emacs@gnu.org; Mon, 29 Dec 2014 06:24:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y5YR7-0003wO-Ob for help-gnu-emacs@gnu.org; Mon, 29 Dec 2014 06:24:39 -0500 Original-Received: from msg.wmi.amu.edu.pl ([150.254.78.50]:51705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y5YR7-0003wC-IZ for help-gnu-emacs@gnu.org; Mon, 29 Dec 2014 06:24:33 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id 0D8B4414A4 for ; Mon, 29 Dec 2014 12:24:33 +0100 (CET) Original-Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0SrIGtYR4zMw for ; Mon, 29 Dec 2014 12:24:32 +0100 (CET) Original-Received: from localhost (117-116.echostar.pl [213.156.117.116]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id AD22842061 for ; Mon, 29 Dec 2014 12:24:32 +0100 (CET) In-reply-to: <87sifzkrwn.fsf@debian.uxu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 150.254.78.50 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:101749 Archived-At: On 2014-12-29, at 05:21, Emanuel Berg wrote: > Tom writes: > >> The other day it occurred to me I could use simple >> abbrevs for elisp programming, but defining these >> manually is tiresome, so I did some automation ... >> The idea is trivial ... > > Not exactly trivial I would say, and certainly not the > implementation. > >> so I collected the usage statistics of all elisp >> symbols from the emacs lisp sources > > Cool: most likely there isn't a better example for how > to properly use Elisp for real software, than Emacs > and the associated software and libraries. False assumption: that Emacs libraries contain good practices only. I know you dislike Emacs.SE, but there was a question there about good Elisp code to read (to learn Elisp), and someone warned about reading Emacs code (especially older libraries). Recently, I grepped the Emacs Lisp sources for occurences of `mapcar', and there is *no* consistency in e.g. using ' versus #', or quoted lambdas (which I hear are a no-no unless in special circumstances, like macros). > But even so, what if some guy is the other way around, > e.g., he prefers `garbage-collect' to `goto-char'? Is > that easily rerouted in some automatically generated > (but after that manually editable) abbrev table? > >> so probably somebody has done something like this >> already > > Yes: I've seen something similar but I think that was > the typing of commands after M-x, and not the whole > Elisp language when typing it in a buffer. BTW: what's wrong with Yasnippet? Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University