* emacs and ls with cygwin
@ 2010-04-12 23:33 Oren Cheyette
2010-04-13 5:43 ` Dan Davison
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Oren Cheyette @ 2010-04-12 23:33 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 463 bytes --]
I'm using GNU Emacs 23.1.50.1 on Win32 (XP) with cygwin tcsh as the shell invoked by the "shell" command. I have this setup on several computers bought and set up at different times, and most recently I'm finding that the command "ls" produces garbage output full of control characters, like this:
[0m[01;34mMy Documents[0m
[01;34mNotes[0m
[01;32mTestingrecycle.doc[0m
[01;34mWINDOWS[0m
I see nothing in any of the faq's about how to deal with this. Suggestions?
[-- Attachment #2: Type: text/html, Size: 689 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs and ls with cygwin
2010-04-12 23:33 emacs and ls with cygwin Oren Cheyette
@ 2010-04-13 5:43 ` Dan Davison
2010-04-13 8:46 ` Peter Dyballa
2010-04-13 8:41 ` Peter Dyballa
2010-04-23 8:28 ` Paulo J. Matos
2 siblings, 1 reply; 6+ messages in thread
From: Dan Davison @ 2010-04-13 5:43 UTC (permalink / raw)
To: Oren Cheyette; +Cc: help-gnu-emacs
Oren Cheyette <ocheyette@gmail.com> writes:
> I'm using GNU Emacs 23.1.50.1 on Win32 (XP) with cygwin tcsh as the shell
> invoked by the "shell" command. I have this setup on several computers bought
> and set up at different times, and most recently I'm finding that the command
> "ls" produces garbage output full of control characters, like this:
> [0m[01;34mMy Documents[0m
> [01;34mNotes[0m
> [01;32mTestingrecycle.doc[0m
> [01;34mWINDOWS[0m
>
> I see nothing in any of the faq's about how to deal with this. Suggestions?
Hi Oren,
The control characters are to do with creating coloured output of ls.
If you create a file in your home directory containing shell commands
called ~/.emacs_tcsh, then emacs shell will execute those commands when
it sets up the shell environment. So you want to put commands in there
which ensure that ls uses the --color=never option (or --color=none, or
whatever it is on your system). I don't use tcsh, but something like
alias ls 'ls --color=never'
Also note that people sometimes put special control characters in their
prompts, so you may also want to set the value of $PS1 and $PS2 in
~/.emacs_tcsh.
Dan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs and ls with cygwin
2010-04-12 23:33 emacs and ls with cygwin Oren Cheyette
2010-04-13 5:43 ` Dan Davison
@ 2010-04-13 8:41 ` Peter Dyballa
2010-04-13 9:00 ` Thierry Volpiatto
2010-04-23 8:28 ` Paulo J. Matos
2 siblings, 1 reply; 6+ messages in thread
From: Peter Dyballa @ 2010-04-13 8:41 UTC (permalink / raw)
To: Oren Cheyette; +Cc: help-gnu-emacs
Am 13.04.2010 um 01:33 schrieb Oren Cheyette:
> I'm finding that the command "ls" produces garbage output full of
> control characters
This is no garbage! It's ANSI Esc sequence codes to colourise GNU ls'
output. Such switch this behaviour in ls off or use an ANSI compliant
terminal emulation (for example via M-x term RET).
I think since GNU Emacs 23.1 the *shell* buffer is able to "execute"
these codes. Maybe you just need to activate this ability:
(ansi-color-for-comint-mode-on)
Check the documentation!
--
Greetings
Pete
If all else fails read the instructions.
- Donald Knuth
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs and ls with cygwin
2010-04-13 5:43 ` Dan Davison
@ 2010-04-13 8:46 ` Peter Dyballa
0 siblings, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2010-04-13 8:46 UTC (permalink / raw)
To: Dan Davison; +Cc: Oren Cheyette, help-gnu-emacs
Am 13.04.2010 um 07:43 schrieb Dan Davison:
> Also note that people sometimes put special control characters in
> their
> prompts, so you may also want to set the value of $PS1 and $PS2 in
> ~/.emacs_tcsh.
Their behaviour can be quite well emulated via the customised variable
comint-highlight-prompt and setting the prompt for the shell...
--
Greetings
Pete
Who the fsck is "General Failure," and why is he reading my disk?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs and ls with cygwin
2010-04-13 8:41 ` Peter Dyballa
@ 2010-04-13 9:00 ` Thierry Volpiatto
0 siblings, 0 replies; 6+ messages in thread
From: Thierry Volpiatto @ 2010-04-13 9:00 UTC (permalink / raw)
To: help-gnu-emacs
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Am 13.04.2010 um 01:33 schrieb Oren Cheyette:
>
>> I'm finding that the command "ls" produces garbage output full of
>> control characters
>
>
> This is no garbage! It's ANSI Esc sequence codes to colourise GNU ls'
> output. Such switch this behaviour in ls off or use an ANSI compliant
> terminal emulation (for example via M-x term RET).
>
> I think since GNU Emacs 23.1 the *shell* buffer is able to "execute"
> these codes. Maybe you just need to activate this ability:
>
> (ansi-color-for-comint-mode-on)
This variable was introduced, or its default value was changed, in
version 23.2 of Emacs.
It is the default now, so with last Emacs versions, no need to enable
it.
> Check the documentation!
>
> --
> Greetings
>
> Pete
>
> If all else fails read the instructions.
> - Donald Knuth
>
>
>
>
--
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs and ls with cygwin
2010-04-12 23:33 emacs and ls with cygwin Oren Cheyette
2010-04-13 5:43 ` Dan Davison
2010-04-13 8:41 ` Peter Dyballa
@ 2010-04-23 8:28 ` Paulo J. Matos
2 siblings, 0 replies; 6+ messages in thread
From: Paulo J. Matos @ 2010-04-23 8:28 UTC (permalink / raw)
To: Oren Cheyette; +Cc: help-gnu-emacs
Oren Cheyette <ocheyette@gmail.com> writes:
> I'm using GNU Emacs 23.1.50.1 on Win32 (XP) with cygwin tcsh as the shell
> invoked by the "shell" command. I have this setup on several computers bought
> ...
I have found ansi-term to be much better than shell in general.
--
PMatos
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-04-23 8:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-12 23:33 emacs and ls with cygwin Oren Cheyette
2010-04-13 5:43 ` Dan Davison
2010-04-13 8:46 ` Peter Dyballa
2010-04-13 8:41 ` Peter Dyballa
2010-04-13 9:00 ` Thierry Volpiatto
2010-04-23 8:28 ` Paulo J. Matos
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.