all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Thorpe <rt@robertthorpeconsulting.com>
To: renato.pontefice@gmail.com
Cc: help-gnu-emacs@gnu.org
Subject: Re: strange behaviorof replace-regexp on win xp
Date: Sat, 09 Aug 2014 21:41:53 +0100	[thread overview]
Message-ID: <87y4uxjsz2.fsf@robertthorpeconsulting.com> (raw)
In-Reply-To: <dd10def5-761a-48c5-a15e-1e7dc523398a@googlegroups.com> (renato.pontefice@gmail.com)

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



      parent reply	other threads:[~2014-08-09 20:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y4uxjsz2.fsf@robertthorpeconsulting.com \
    --to=rt@robertthorpeconsulting.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=renato.pontefice@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.