tramp-devel
[Top][All Lists]
Advanced

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

Command output, tabs, and OpenBSD


From: Dale Sedivec
Subject: Command output, tabs, and OpenBSD
Date: Wed, 13 Oct 2010 23:50:43 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2

Greetings,

I'm using TRAMP to edit files on an OpenBSD box and seeing surprising behavior with things like (shell-command) and (process-file): tabs are being converted to spaces.

        Steps to reproduce:

1. Connect to OpenBSD box through TRAMP with e.g. dired: C-x d /scp:address@hidden:/foo

2. Output a tab with shell-command: M-! echo -e 'x\ty'

3. Switch to *Shell Command Output* buffer

Expected contents: "x", one tab character, and then "y"

What I get instead: "x", one or more spaces, and then "y"

My suspicion is that this problem arises from the fact that OpenBSD enables OXTABS (expand tabs to spaces) on TTYs by default. Switching back to my dired buffer above, I can

        M-! stty -oxtabs <&1

then repeat the above echo command, and now I get the expected output which includes a single tab character instead of spaces. (I crudely steal the TTY from stdout and put it on stdin with "<&1" for stty's benefit; otherwise it tells me I'm not on a TTY and refuses to run.)

        I'm using:

Emacs end:
OS X 10.5 Intel
Emacs 23.2 with experimental Mac patch (making it a native app not X11)
tramp-version: 2.1.18-23.2
OpenSSH 5.6p1 from MacPorts

Remote end:
OpenBSD 4.7 x86, including its OpenSSH (5.5) and default ksh

Is it appropriate that I should see tabs expanded into spaces in the output from remote commands executed through TRAMP? Should TRAMP "stty -oxtabs" when connecting [to an [Open]BSD box]?

Sorry for not sending with tramp-bug. Will apologize and sheepishly run that if necessary.

        Thank you very much for TRAMP!  It's a killer feature for Emacs.

Regards,
Dale



reply via email to

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