LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-23-2012, 06:20 PM   #1
philip518
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Rep: Reputation: 0
Question command "tree" can't display output correctly in xemacs shell


I typically use xemacs in shell mode. but in a new place, with Ubuntu and bash, the shell can't display the output of "tree" correctly:

instead of printing out:

|--Dir0
|--Dir1
|--Dir2

it prints out:
a\224\224a\224\200 Dir1
a\224\224a\224\200 Dir2 etc.

the command "tree" displays correctly in a Terminal. but when I copy the output from the Terminal to IE9, it becomes this:
\u2514\u2500\u2500 Dir0
\u251c\u2500\u2500 Dir1
\u251c\u2500\u2500 Dir2

BTW, at first xemacs couldn't disply "ls" output correctly either, but it is fixed by adding this to init.el.
(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)


Any insight on how to fix the output from "tree" in xemacs?

Thanks.
 
Old 05-23-2012, 07:36 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hi, welcome to LQ!

try
tree -nS



Cheers,
Tink
 
1 members found this post helpful.
Old 05-23-2012, 09:40 PM   #3
philip518
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tinkster View Post
Hi, welcome to LQ!

try
tree -nS

Tink
Thank you very much, Tinkster.

With "tree -S", the output is much clearer and readable. (the color is turned off already in my case.)

but the ASCII indentation lines are still shown as "A umlaut", "A tilde" or other variations.

I can move on now. but it would be great if I can find a way to make xemacs display command output normally.


In case it matters, the following is the xemacs coding system in our environment:

Coding system for saving this buffer:
ISO8 -- iso-2022-8
Default coding system (for new files):
ISO8 -- iso-2022-8
Coding system for keyboard input:
nil
Coding system for terminal output:
nil
Coding systems for process I/O:
encoding input to the process: Binary -- binary
decoding output from the process: Raw -- raw-text-unix

Priority order for recognizing coding systems when reading files:
1. iso-2022-7
2. raw-text
3. ctext
4. iso-2022-lock

Other coding systems cannot be distinguished automatically
from these, and therefore cannot be recognized automatically
with the present coding system priorities.

Particular coding systems specified for certain file names:

OPERATION TARGET PATTERN CODING SYSTEM(s)
--------- -------------- ----------------
File I/O "\\.\\(?:bz2\\|elc\\|g\\(if\\|z\\)\\|jp\\(eg\\|g\\)\\|png\\|t\\(ar\\|gz\\|iff\\)\\|[Zo]\\)\\'"
binary
"TUTORIAL\\.\\(?:hr\\|pl\\|ro\\)\\'"
iso-8859-2
Process I/O nothing specified
Network I/O nothing specified
 
Old 05-23-2012, 09:50 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Sorry mate, the -nS was just a stab in the dark. I don't have xemacs installed,
and wouldn't know where else to start prodding ... is there difference between
xemacs and the enconding you use in your shell?

What does 'locale' tell you?
 
Old 05-24-2012, 01:48 PM   #5
philip518
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Here is the "locale" output:

LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux equivalent to DOS "tree" command? XDude Linux - Newbie 10 09-25-2014 01:24 PM
[SOLVED] Errors executing shell script: "command not found" and "no such file or directory" eko000 Linux - Newbie 1 01-14-2011 08:54 AM
Syslinux doesn't correctly interpret kernel="/foo/bar" command lumix Linux - Newbie 4 06-19-2008 01:15 PM
Feeding the output of "diff" or "cat" command to dpkg --purge kushalkoolwal Debian 9 06-19-2008 08:27 AM
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 08:42 AM


All times are GMT -5. The time now is 08:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration