From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: LENNART BORGMAN Newsgroups: gmane.emacs.help Subject: Re: removing spaces from a string Date: Wed, 19 Apr 2006 12:01:21 +0200 Message-ID: <3267b393268304.32683043267b39@net.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT X-Trace: sea.gmane.org 1145441352 15054 80.91.229.2 (19 Apr 2006 10:09:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 Apr 2006 10:09:12 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 19 12:09:10 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FW9cR-0000Ao-MR for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Apr 2006 12:09:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FW9cR-000340-20 for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Apr 2006 06:09:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FW9c7-00030I-EF for help-gnu-emacs@gnu.org; Wed, 19 Apr 2006 06:08:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FW9c5-0002zd-Gq for help-gnu-emacs@gnu.org; Wed, 19 Apr 2006 06:08:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FW9c5-0002zX-9d for help-gnu-emacs@gnu.org; Wed, 19 Apr 2006 06:08:45 -0400 Original-Received: from [130.235.208.46] (helo=piraten.student.lu.se) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FW9dA-0007T3-6I for help-gnu-emacs@gnu.org; Wed, 19 Apr 2006 06:09:52 -0400 Original-Received: from net.lu.se (localhost [127.0.0.1]) by piraten.student.lu.se (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with ESMTP id <0IXY000MPRU9WL@piraten.student.lu.se> for help-gnu-emacs@gnu.org; Wed, 19 Apr 2006 12:01:21 +0200 (MEST) Original-Received: from [212.209.42.132] by piraten.student.lu.se (mshttpd); Wed, 19 Apr 2006 12:01:21 +0200 Original-To: Peter Tury X-Mailer: iPlanet Messenger Express 5.2 HotFix 1.14 (built Mar 18 2003) Content-language: sv Content-disposition: inline X-Accept-Language: sv Priority: normal 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:34451 Archived-At: From: Peter Tury Date: Wednesday, April 19, 2006 11:02 am Subject: removing spaces from a string > Hi, > > how can I most simply remove all spaces from a string? I plan to > have a > variable what holds the string, so functions what operates on regions, > rectangles or any parts of a buffer, etc. are not good (I guess). > > I would need something like this: (remove-all-space a-sting-var); > if e.g. > (setq a-string-var "abcd ef dg ") then this should return > "abcdefdg" what > I will pass forward to another function (namely: process-send-string). > > Thanks! > P > Maybe use replace-regexp-in-string?