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

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

Re: Adding tab characters


From: Joel J. Adamson
Subject: Re: Adding tab characters
Date: Thu, 13 Mar 2008 15:30:30 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (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
> )

A couple notes on style: Lisp code usually separates words with hyphens
kinda-like-this, as in spicy-food-p.  CamelCase is generally avoided, 
AndWouldYouWantToTypeThat?  Also, it's easier to look at if the trailing
parentheses are all on one line)).

> In place of "\009" I tried ^I, ^Tab, an actual tab, "[tab]" and
> everything else I could imagine.

Can you imagine "\t"?

(info "(elisp) Basic Char Syntax")

Joel

-- 
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109
Public key: http://pgp.mit.edu

The information transmitted in this electronic communication is intended only
for the person or entity to whom it is addressed and may contain confidential
and/or privileged material. Any review, retransmission, dissemination or other
use of or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you received this
information in error, please contact the Compliance HelpLine at 800-856-1983 and
properly dispose of this information.







reply via email to

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