From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: strange behaviorof replace-regexp on win xp Date: Sat, 09 Aug 2014 21:41:53 +0100 Message-ID: <87y4uxjsz2.fsf@robertthorpeconsulting.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1407616957 32350 80.91.229.3 (9 Aug 2014 20:42:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Aug 2014 20:42:37 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: renato.pontefice@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 09 22:42:30 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XGDT9-0000eX-SN for geh-help-gnu-emacs@m.gmane.org; Sat, 09 Aug 2014 22:42:27 +0200 Original-Received: from localhost ([::1]:57344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGDT5-0000t8-BH for geh-help-gnu-emacs@m.gmane.org; Sat, 09 Aug 2014 16:42:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGDSm-0000st-UW for help-gnu-emacs@gnu.org; Sat, 09 Aug 2014 16:42:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGDSe-0004Bo-Hi for help-gnu-emacs@gnu.org; Sat, 09 Aug 2014 16:42:04 -0400 Original-Received: from outbound-smtp06.blacknight.com ([81.17.249.39]:36970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGDSe-0004Bj-BY for help-gnu-emacs@gnu.org; Sat, 09 Aug 2014 16:41:56 -0400 Original-Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp06.blacknight.com (Postfix) with ESMTP id 6FEF1992D4 for ; Sat, 9 Aug 2014 20:41:10 +0000 (UTC) Original-Received: (qmail 17500 invoked from network); 9 Aug 2014 20:41:54 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.79.130.113]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 9 Aug 2014 20:41:54 -0000 In-Reply-To: (renato.pontefice@gmail.com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.39 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99150 Archived-At: renato.pontefice@gmail.com writes: > Hi, > I'm using the replace-regexp on win XP. > I need to replace some "tab" with null char. > > I do: > --replace-regexp > ---\\tab (in when it ask me wich char to replace) > ----RETURN (to insert nothing in the replace) > > emacs find about 96 replacement. > > Then, I open the file with MS word, and I find that emacs, replace the > tab, with space. It shouldn't do that. It should replace the tab with nothing at all, so if you have "x y" (there's a tab there) it should become "xy". Are you sure it hasn't done that and you just didn't notice because the tabs generally had spaces at one side? Tabs you type in Emacs are often converted to spaces, TAB usually mean "indent" in Emacs. > I want that it replace with null char, not space. Type C-x 8 RET NULL RET in any buffer. Now you have the NULL character, cut it into the kill ring. Then do:- -- replace-string --- TAB (press tab) --- C-y (which will yank the null character). There are probably better ways to do it. BR, Robert Thorpe