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

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

Re: Adding tab characters


From: Brendan Halpin
Subject: Re: Adding tab characters
Date: Thu, 13 Mar 2008 17:26:22 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

Kerry.Thurber@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.halpin@ul.ie  http://www.ul.ie/sociology/brendan.halpin.html


reply via email to

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