From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: use Elisp to improve your Elisp - some code issues Date: Sat, 01 Aug 2015 06:20:47 +0200 Message-ID: <87lhdvd4gw.fsf@nl106-137-147.student.uu.se> References: <683844af-0117-4f6e-a64e-aeabc12946e7@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438402969 18023 80.91.229.3 (1 Aug 2015 04:22:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Aug 2015 04:22:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 01 06:22:42 2015 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 1ZLOJl-0007V4-Kz for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Aug 2015 06:22:41 +0200 Original-Received: from localhost ([::1]:46718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLOJk-0001tJ-Qg for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Aug 2015 00:22:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLOJb-0001tE-5a for help-gnu-emacs@gnu.org; Sat, 01 Aug 2015 00:22:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLOJW-0003ZF-5t for help-gnu-emacs@gnu.org; Sat, 01 Aug 2015 00:22:31 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:53699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLOJW-0003Yz-0N for help-gnu-emacs@gnu.org; Sat, 01 Aug 2015 00:22:26 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZLOJU-0007M9-S6 for help-gnu-emacs@gnu.org; Sat, 01 Aug 2015 06:22:24 +0200 Original-Received: from nl106-137-228.student.uu.se ([130.243.137.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Aug 2015 06:22:24 +0200 Original-Received: from embe8573 by nl106-137-228.student.uu.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Aug 2015 06:22:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 50 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: nl106-137-228.student.uu.se Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:+qOuWuwflnvk6dF+yq9cOti/9Wo= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:106178 Archived-At: Sam Halliday writes: > This is really great! We have plans to do something > similar in ENSIME (for Scala, and soon Java, > development). Well, thank you :) The idea is great, however it is not a new one since it is basically find + egrep, with find here being a zsh pattern matching ls (I'm unsure bash has "**/*", so that example may not work work tho many others will), and egrep being `re-search-forward'. But yeah, it is a nice little thing :) > The Scala/Java support is of no relevance to this > group, so I shall just say that we have an external > process that we communicate with and it can provide > async suggestions of code that can be changed. > > It sounds like what you're doing here and we aim to > achieve (albeit it a long burn) would benefit from > a common interface of "code suggestion" --- both > a format for the changes (universal diff?) and the > method to show and accept the changes. More or less. The tool (code) just searches for regexps in the files whose names match another regexp. So it is just a tool to find things in files. However if you express style things you don't like as regexps, it can be used as to improve the code (if you change them as well). See the examples last in the file - if I come up with more, I'll add them to the same file. One example would be what we have mentioned a couple of times by now and that is (if a b) (if (not a) b) which should be (when a b) (unless a b) Anyone has an regexp for that? -- underground experts united http://user.it.uu.se/~embe8573