From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: matt Newsgroups: gmane.emacs.help Subject: elisp substitution Date: Sat, 18 Jan 2003 09:13:15 GMT Organization: AT&T Broadband Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3E28F08B.6050806@XXnetscape.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1042881365 24304 80.91.224.249 (18 Jan 2003 09:16:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 18 Jan 2003 09:16:05 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18Zp5A-0006Ji-00 for ; Sat, 18 Jan 2003 10:16:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18Zp5B-0001P2-09 for gnu-help-gnu-emacs@m.gmane.org; Sat, 18 Jan 2003 04:16:05 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed.mathworks.com!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc01.POSTED!not-for-mail User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help Original-Lines: 14 Original-NNTP-Posting-Host: 12.234.129.60 Original-X-Complaints-To: abuse@attbi.com Original-X-Trace: sccrnsc01 1042881195 12.234.129.60 (Sat, 18 Jan 2003 09:13:15 GMT) Original-NNTP-Posting-Date: Sat, 18 Jan 2003 09:13:15 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:109114 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5641 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5641 I'm just starting to play around with emacs lisp. A quick question. How can I manipulate variables in elisp? For instance, I want to take a string and add a backslash(escape) to all whitespace. Like in a path like "c:/Documents and settings/" I want to change it to "c:/Documents\ and\ Settings/". Something similar to this in perl: $var =~ s/( )/\\$1/g; Thanks, Matt -- Remove the X's to reply directly.