X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 	tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <498DC3D6.1040906@columbus.rr.com>
Date: Sat, 07 Feb 2009 12:24:38 -0500
From: Paul McFerrin <pmcferrin@columbus.rr.com>
Reply-To: pmcferrin@columbus.rr.com
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
MIME-Version: 1.0
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
CC: "'Ralf Gans'" <Ralf.Gans@NSG-GmbH.de>
Subject: RE: Copy converts tabs to spaces ?
References: <WorldClient-F200902021105.AA05540020@butn.net>  <A45AE599-B6AC-41DA-A230-CD3C1C7A4F67@NSG-GmbH.de>  <0105D5C1E0353146B1B222348B0411A2182F4DC2@NIHMLBX02.nih.gov>  <B7021E1A-156E-4F9B-ADFC-B6DE58D5E14D@NSG-GmbH.de>
In-Reply-To: <B7021E1A-156E-4F9B-ADFC-B6DE58D5E14D@NSG-GmbH.de>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

>>> On 02.02.2009, at 11:05, xerces8 wrote:
>>>> I noticed that when copying text from a the Cygwin Bash window and
>>>> then pasting it somewhere (like WordPad), tabulator characters are
>>>> converted to spaces. 
>>>> 
>>>> The same happens with RXVT too.
>>>> 
>>>> Details:
>>>> - print the content of some text file that has tabs (like a C
>>>> program source) : cat foo.c 
>>>> - select and copy the text with the mouse
>>>> - paste (ctrl-V) into WordPad
>>>> 
>>>> The text in Wordpad has no more tabs.
>>>> 
>>>> Is there a way around this ?
>>> 
>>> copy an paste from window to window takes what's printed, not what
>>> you have written. 
>>> 
>>> So, if the terminal prints spaces to represent the tabs, as a
>>> terminal usually does, you CAN only copy spaces.

Let me add my 2 cents worth.  If you have the "newform" command, the 
following magic will work:

	$ newform -i-8 -o0 input_file >output_file

I have newform but i'm not sure where i got it since I was a long-time 
AT&T Unix user.  I also didn't find a man page.  It's a very handy tool.

Translations:
	-i-8 = input tabs assumed to be at every 8 columns
	-o0 = output has tabs at 0 (no tabs)

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

