* strange behaviorof replace-regexp on win xp
@ 2014-08-07 9:23 renato.pontefice
2014-08-07 9:55 ` renato.pontefice
2014-08-09 20:41 ` Robert Thorpe
0 siblings, 2 replies; 3+ messages in thread
From: renato.pontefice @ 2014-08-07 9:23 UTC (permalink / raw)
To: help-gnu-emacs
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.
I want that it replace with null char, not space.
Can it be a win prob.?
TIA
Renato
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: strange behaviorof replace-regexp on win xp
2014-08-07 9:23 strange behaviorof replace-regexp on win xp renato.pontefice
@ 2014-08-07 9:55 ` renato.pontefice
2014-08-09 20:41 ` Robert Thorpe
1 sibling, 0 replies; 3+ messages in thread
From: renato.pontefice @ 2014-08-07 9:55 UTC (permalink / raw)
To: help-gnu-emacs
Il giorno giovedì 7 agosto 2014 11:23:02 UTC+2, renato.p...@gmail.com ha scritto:
> 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.
>
> I want that it replace with null char, not space.
>
>
>
> Can it be a win prob.?
>
>
>
> TIA
>
>
>
> Renato
I had an idea:
could it be a prob of coding?
I mean: the file is coded as MS-DOS, could it be this the prob?
and if yes:
- wich isthe code that in MS-DOS coding, represent the nul space?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: strange behaviorof replace-regexp on win xp
2014-08-07 9:23 strange behaviorof replace-regexp on win xp renato.pontefice
2014-08-07 9:55 ` renato.pontefice
@ 2014-08-09 20:41 ` Robert Thorpe
1 sibling, 0 replies; 3+ messages in thread
From: Robert Thorpe @ 2014-08-09 20:41 UTC (permalink / raw)
To: renato.pontefice; +Cc: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-09 20:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-07 9:23 strange behaviorof replace-regexp on win xp renato.pontefice
2014-08-07 9:55 ` renato.pontefice
2014-08-09 20:41 ` Robert Thorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).