help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange behaviorof replace-regexp on win xp


From: Robert Thorpe
Subject: Re: strange behaviorof replace-regexp on win xp
Date: Sat, 09 Aug 2014 21:41:53 +0100

address@hidden 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]