From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: rustom Newsgroups: gmane.emacs.help Subject: Re: catching parenthesis errors in elisp Date: Fri, 12 Jun 2009 05:06:57 -0700 (PDT) Organization: http://groups.google.com Message-ID: <9879b6b4-b81f-43f3-92cf-fc22ae5bc90c@u9g2000prd.googlegroups.com> References: <89aa42c7-bfc9-43de-b844-882b9db0ef77@p6g2000pre.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1244810752 17484 80.91.229.12 (12 Jun 2009 12:45:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Jun 2009 12:45:52 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 12 14:45:49 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MF68i-0005Ay-Aj for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Jun 2009 14:45:48 +0200 Original-Received: from localhost ([127.0.0.1]:57634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MF68h-00004v-Al for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Jun 2009 08:45:47 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!u9g2000prd.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 43 Original-NNTP-Posting-Host: 220.225.70.2 Original-X-Trace: posting.google.com 1244808417 10267 127.0.0.1 (12 Jun 2009 12:06:57 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 12 Jun 2009 12:06:57 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u9g2000prd.googlegroups.com; posting-host=220.225.70.2; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui User-Agent: G2/1.0 X-HTTP-Via: 1.1 PT-PROXY1, 1.1 PT-PROXY2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729), gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:169972 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:65199 Archived-At: On Jun 12, 4:55=C2=A0pm, Xah Lee wrote: > On Jun 12, 12:05 am, rustom wrote: > > > Im hacking on a 700 line elisp function. > > While doing some (fairly mechanical) cut-paste operations it looks > > like either Ive got a parenthesis or a quote (most likely double quote > > but could also be single quote) error. > > > Any suggestions on how to catch such errors? > > here's some recommendation based on how i code elisp. > > =E2=80=A2 never type single paren. I always type them in pairs. And never > delete one of them. > =E2=80=A2 use tree navigation to move between code. > =E2=80=A2 to delete or move parts of expression, select the whole express= ion, > cut & copy to move. > > so, when i code in lisp, there is never ever unmatched parenthesis. > > this method beats paren-edit mode. Ive *not* written this lisp. All did (or tried to do) was take some existing lisp and change it a bit here and there -- mostly nothing more than changing some strings. > > the detail of my editing and setup is here: > > =E2=80=A2 Tips For Editing Lisp Code With Emacs > =C2=A0http://xahlee.org/emacs/emacs_editing_lisp.html > > to select current unit of sexp, i press one key, which is bound to > extend-selection, which is defined in my ergoemacs mode. The code is > shown here: > > =E2=80=A2 A Text Editor Feature: Extend Selection By Semantic Unit > =C2=A0http://xahlee.org/emacs/syntax_tree_walk.html > > =C2=A0 Xah > =E2=88=91http://xahlee.org/ > > =E2=98=84