[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Command output, tabs, and OpenBSD
From: |
Michael Albinus |
Subject: |
Re: Command output, tabs, and OpenBSD |
Date: |
Thu, 14 Oct 2010 09:55:08 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Dale Sedivec <address@hidden> writes:
> Greetings,
Hi,
> 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.
Could you, please, try the following patch (untested):
--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/tramp-2-1-stable/lisp/tramp.el.~2.814.~ 2010-08-23
20:23:06.000000000 +0200
--- /home/albinus/src/tramp-2-1-stable/lisp/tramp.el 2010-10-14
09:44:49.000000000 +0200
***************
*** 7062,7067 ****
--- 7062,7071 ----
"^FreeBSD" (tramp-get-connection-property vec "uname" ""))
500 0))))
+ ;; On BSD, ?\t is expanded to spaces. Suppress this.
+ (when (string-match "BSD" (tramp-get-connection-property vec "uname" ""))
+ (tramp-send-command vec "stty -oxtabs" t))
+
;; Set remote PATH variable.
(tramp-set-remote-path vec)
--8<---------------cut here---------------end--------------->8---
stty's "-oxtabs" seems to exist for BSD only, that's why I have added the
check. It might not be sufficient for all cases; MACOSX (which is also
BSD-like) might return another string for "uname -s". Do you know what
it returns (you run it on your local machine).
> 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
Be careful when applying the patch; I have created it on top of Tramp
2.1.19-pre.
> Regards,
> Dale
Best regards, Michael.