[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding tab characters
From: |
Kerry . Thurber |
Subject: |
Re: Adding tab characters |
Date: |
Thu, 13 Mar 2008 10:52:57 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Mar 13, 10:26 am, Brendan Halpin <brendan.hal...@ul.ie> wrote:
> Kerry.Thur...@gmail.com writes:
> > Hello everyone,
>
> > I'm missing something obvious I think. I want to create a tab
> > delimited file using emacs. I can do it fine with a keyboard macro,
> > but I need to make something permanent that others can use.
>
> > (defun CreateTabDelimitedFile()
> > "Convert JED logs into something Scott can use"
> > (interactive)
> > (beginning-of-buffer)
> > (replace-string ";" "\009") ;tried many other variants
> > )
>
> > In place of "\009" I tried ^I, ^Tab, an actual tab, "[tab]" and
> > everything else I could imagine. Nothing seems to work. Is there a
> > way to replace a string with a tab character? Is there a way to
> > replace a string with another string *plus* a tab character?
>
> An actual tab should work, but you need to enter it as C-Q TAB as Emacs
> may enter spaces instead (or indent). However try:
>
> (replace-string ";" "\t")
>
> \t stands for a literal tab.
>
> Brendan
> --
> Brendan Halpin, Department of Sociology, University of Limerick, Ireland
> Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F2-025 x 3147
> mailto:brendan.hal...@ul.ie http://www.ul.ie/sociology/brendan.halpin.html
Thanks!