From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: lampshade Newsgroups: gmane.emacs.help Subject: Help with keybinding to delete between {} Date: Tue, 4 Dec 2007 17:33:27 -0800 (PST) Organization: http://groups.google.com Message-ID: <598472b5-c766-483a-93e5-15b31bfd880f@b40g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1196839408 25459 80.91.229.12 (5 Dec 2007 07:23:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Dec 2007 07:23:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 05 08:23:38 2007 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 1IzobY-0005ay-Sj for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Dec 2007 08:23:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzobI-0004U8-6o for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Dec 2007 02:23:20 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!postnews.google.com!b40g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 Original-NNTP-Posting-Host: 76.85.192.52 Original-X-Trace: posting.google.com 1196818407 7044 127.0.0.1 (5 Dec 2007 01:33:27 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 5 Dec 2007 01:33:27 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b40g2000prf.googlegroups.com; posting-host=76.85.192.52; posting-account=djMGgQoAAAAG8TIKtb_BitRJthuSPo1H User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.10) Gecko/20071126 Ubuntu/7.10 (gutsy) Firefox/2.0.0.10, gzip(gfe), gzip(gfe) Content-Disposition: inline Original-Xref: shelby.stanford.edu gnu.emacs.help:154404 X-Mailman-Approved-At: Wed, 05 Dec 2007 02:21:35 -0500 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:49833 Archived-At: Hello, I would really like a keybinding that would allow me to delete any text between sexp's like {} (), etc no matter where I am between them and whether or not that text has spaces. For example {asdfdsfa asdfasdf asd} I would like to delete between leaving only the {} with my cursor inside ready to type. So far I've been trying (defun delete_between () (interactive) (backward-sexp) (kill-sexp)) (global-set-key [(control meta k)] 'delete_between) but that doesn't quite work. Anyone have any improvements or help they could give me? Thanks in advance, lampshade