From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sivaram Neelakantan Newsgroups: gmane.emacs.help Subject: Re: remove all the whitespace characters from the cursor to the next symbol Date: Fri, 07 May 2010 21:18:13 +0530 Message-ID: <82d3x7hfwi.fsf@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1273247459 20043 80.91.229.12 (7 May 2010 15:50:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 7 May 2010 15:50:59 +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 May 07 17:50:59 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1OAPpH-00073W-Mf for geh-help-gnu-emacs@m.gmane.org; Fri, 07 May 2010 17:50:55 +0200 Original-Received: from localhost ([127.0.0.1]:41784 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OAPpF-0001o8-0c for geh-help-gnu-emacs@m.gmane.org; Fri, 07 May 2010 11:50:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OAPoX-0001kf-JL for help-gnu-emacs@gnu.org; Fri, 07 May 2010 11:50:09 -0400 Original-Received: from [140.186.70.92] (port=42885 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OAPoV-0001ik-Vu for help-gnu-emacs@gnu.org; Fri, 07 May 2010 11:50:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OAPoV-00050j-0a for help-gnu-emacs@gnu.org; Fri, 07 May 2010 11:50:07 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:32939) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAPoU-00050J-R4 for help-gnu-emacs@gnu.org; Fri, 07 May 2010 11:50:06 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OAPoR-0006au-VZ for help-gnu-emacs@gnu.org; Fri, 07 May 2010 17:50:03 +0200 Original-Received: from 122.167.108.211 ([122.167.108.211]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 May 2010 17:50:03 +0200 Original-Received: from nsivaram.net by 122.167.108.211 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 May 2010 17:50:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 30 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 122.167.108.211 User-Mail-Address: nsivaram.net@gmail.com User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (windows-nt) Cancel-Lock: sha1:vc/dpLex0aa9Z1RsgB1rnUN/lgM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:73560 Archived-At: On Fri, May 07 2010,Kevin Rodgers wrote: [snipped 9 lines] >> texttexttext{cursor}___ >> _ >> ___text >> >> where '_' means space character, is it possible to press some known >> key sequence to transform the given above to the following form: >> >> texttexttext{cursor}text > [snipped 22 lines] There's also this M-SPC runs the command just-one-space, which is an interactive compiled Lisp function in `simple.el'. It is bound to M-SPC. (just-one-space &optional n) Delete all spaces and tabs around point, leaving one space (or n spaces). Of course it doesn't handle the \n+spaces case. sivaram --