From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: remove all the whitespace characters from the cursor to the next symbol Date: Mon, 15 Mar 2010 16:14:58 -0600 Message-ID: <062dnfRzsOL5LAPWnZ2dnUVZ_qKdnZ2d@sysmatrix.net> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1272994082 22034 80.91.229.12 (4 May 2010 17:28:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 May 2010 17:28:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 04 19:28:01 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 1O9LuY-0006Pp-Tc for geh-help-gnu-emacs@m.gmane.org; Tue, 04 May 2010 19:28:00 +0200 Original-Received: from localhost ([127.0.0.1]:57334 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9LuX-0004jI-RG for geh-help-gnu-emacs@m.gmane.org; Tue, 04 May 2010 13:27:57 -0400 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!news.glorb.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.sysmatrix.net!news.sysmatrix.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Mon, 15 Mar 2010 17:15:00 -0500 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) Original-Newsgroups: gnu.emacs.help In-Reply-To: X-No-Archive: yes Original-Lines: 38 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 12.73.132.145 Original-X-Trace: sv3-YkcbLdSntl1dqS4uL6U8IQQhaOYDF0vYW7eAD6bPGkpKdjtqOtM2F9DiFIwNLvfm/FwqziJHRYPP7Le!HFbQRANKh7WioQ2SQ66AM2kVX4Qb1JJJSJn5tfuNzv/ur9VRcUWtJMB+P0cW08jQOm0tH9BWcRaV!C64rmkVQe5wD4JD2lvmQxlPAEtuttNE= Original-X-Complaints-To: abuse@sysmatrix.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 Original-Xref: usenet.stanford.edu gnu.emacs.help:177474 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 X-Gmane-Expiry: 2010-05-18 Xref: news.gmane.org gmane.emacs.help:72985 Archived-At: alex_sv wrote: > Hi all! > > Could you please clarify - is it possible to remove all the whitespace > characters including newline from the current cursor position to the > next meaningful symbol using one command? > > I mean if our buffer's content is as follows: > > 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 > > Thanks in advance! Replace regular expression might work: C-M-% [_C-qC-j]+ Ret Ret where _ is space. You also might me able to use \s- (whitespace syntax) but I couldn't get it to work. Ed