After cygwin upgrade, Emacs shell buffers with colors are corrupted

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

After cygwin upgrade, Emacs shell buffers with colors are corrupted

Cygwin list mailing list
Yesterday I upgraded Cygwin, which I hadn't done in a while. I had recently
upgraded my Windows 10 OS from build 1709 to 1809 (yes, those are correct).

My current Emacs version is 26.3, but I don't know what it was before the
upgrade.

If I create a shell buffer and execute a command that produces plain,
uncolored output, it appears to work fine.  However, output from "Maven"
has always been colorized for me, and it's always worked fine.  Today, I'm
seeing that the output is severely corrupted.  If I pipe the output into a
file and view that, which doesn't have colors, the contents are fine. I
also ran the same process in a mintty window, which is colorized in the
same way, and that is also working fine.

For instance, if this is what I see in a mintty buffer:
-----------------------
[WACDTL03DK068X:~/git/cartms] mvn package
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option
MaxPermSize=128m; sup
port was removed in 8.0
[INFO] Scanning for projects...
[WARNING]
...
-------------------------

What I see in the Emacs shell buffer is something like this:
-------------------------
[WACDTL03DK068X:~/git/cartms] mvn package
[WACDTL03DK068X:~/git/cartms] [WACDTL03DK068X:~/git/cartms] Java
HotSpot(TM) 64-
Bit Server VM warning:ignoring option MaxPermSize=128m; support was removed
in
8.0
[INFO] Scanning for projects...[
[WARNING] l





....
---------------------------

The first thing I see is that it prints the shell prompt twice AFTER
pressing enter on the command line to run. That might possibly be an issue
with my Bash dot files, but this didn't happen before the Cygwin upgrade,
and it doesn't happen in the mintty window.

After that, it gets even worse.  The "Java HotSpot ..." line prints in
three lines, instead of a single line.  Then, the first "WARNING" line has
the "l" at the end of the line, and then numerous blank lines.  The rest of
the output is mangled in other ways.

Any ideas what might be wrong here?
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: After cygwin upgrade, Emacs shell buffers with colors are corrupted

Cygwin list mailing list
On 3/17/2020 7:14 PM, David Karr via Cygwin wrote:

> Yesterday I upgraded Cygwin, which I hadn't done in a while. I had recently
> upgraded my Windows 10 OS from build 1709 to 1809 (yes, those are correct).
>
> My current Emacs version is 26.3, but I don't know what it was before the
> upgrade.
>
> If I create a shell buffer and execute a command that produces plain,
> uncolored output, it appears to work fine.  However, output from "Maven"
> has always been colorized for me, and it's always worked fine.  Today, I'm
> seeing that the output is severely corrupted.  If I pipe the output into a
> file and view that, which doesn't have colors, the contents are fine. I
> also ran the same process in a mintty window, which is colorized in the
> same way, and that is also working fine.
>
> For instance, if this is what I see in a mintty buffer:
> -----------------------
> [WACDTL03DK068X:~/git/cartms] mvn package
> Java HotSpot(TM) 64-Bit Server VM warning: ignoring option
> MaxPermSize=128m; sup
> port was removed in 8.0
> [INFO] Scanning for projects...
> [WARNING]
> ...
> -------------------------
>
> What I see in the Emacs shell buffer is something like this:
> -------------------------
> [WACDTL03DK068X:~/git/cartms] mvn package
> [WACDTL03DK068X:~/git/cartms] [WACDTL03DK068X:~/git/cartms] Java
> HotSpot(TM) 64-
> Bit Server VM warning:ignoring option MaxPermSize=128m; support was removed
> in
> 8.0
> [INFO] Scanning for projects...[
> [WARNING] l
>
>
>
>
>
> ....
> ---------------------------
>
> The first thing I see is that it prints the shell prompt twice AFTER
> pressing enter on the command line to run. That might possibly be an issue
> with my Bash dot files, but this didn't happen before the Cygwin upgrade,
> and it doesn't happen in the mintty window.
>
> After that, it gets even worse.  The "Java HotSpot ..." line prints in
> three lines, instead of a single line.  Then, the first "WARNING" line has
> the "l" at the end of the line, and then numerous blank lines.  The rest of
> the output is mangled in other ways.
>
> Any ideas what might be wrong here?

This is probably related to the new pty code.  Does it help if you start emacs
like this?

   CYGWIN=disable_pcon emacs

If so, that confirms my guess and gives you a workaround.

Ken
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: After cygwin upgrade, Emacs shell buffers with colors are corrupted

Cygwin list mailing list
Thanks, that worked.  For now, I guess I have to figure out how to set that
property permanently, or until this pty bug is fixed.. I start Emacs from a
shortcut, executing "emacs.xml".  I see the file appears to have some
syntax for setting the environment, but I've never inspected that file
before.

On Tue, Mar 17, 2020 at 6:04 PM Ken Brown via Cygwin <[hidden email]>
wrote:

> On 3/17/2020 7:14 PM, David Karr via Cygwin wrote:
> > Yesterday I upgraded Cygwin, which I hadn't done in a while. I had
> recently
> > upgraded my Windows 10 OS from build 1709 to 1809 (yes, those are
> correct).
> >
> > My current Emacs version is 26.3, but I don't know what it was before the
> > upgrade.
> >
> > If I create a shell buffer and execute a command that produces plain,
> > uncolored output, it appears to work fine.  However, output from "Maven"
> > has always been colorized for me, and it's always worked fine.  Today,
> I'm
> > seeing that the output is severely corrupted.  If I pipe the output into
> a
> > file and view that, which doesn't have colors, the contents are fine. I
> > also ran the same process in a mintty window, which is colorized in the
> > same way, and that is also working fine.
> >
> > For instance, if this is what I see in a mintty buffer:
> > -----------------------
> > [WACDTL03DK068X:~/git/cartms] mvn package
> > Java HotSpot(TM) 64-Bit Server VM warning: ignoring option
> > MaxPermSize=128m; sup
> > port was removed in 8.0
> > [INFO] Scanning for projects...
> > [WARNING]
> > ...
> > -------------------------
> >
> > What I see in the Emacs shell buffer is something like this:
> > -------------------------
> > [WACDTL03DK068X:~/git/cartms] mvn package
> > [WACDTL03DK068X:~/git/cartms] [WACDTL03DK068X:~/git/cartms] Java
> > HotSpot(TM) 64-
> > Bit Server VM warning:ignoring option MaxPermSize=128m; support was
> removed
> > in
> > 8.0
> > [INFO] Scanning for projects...[
> > [WARNING] l
> >
> >
> >
> >
> >
> > ....
> > ---------------------------
> >
> > The first thing I see is that it prints the shell prompt twice AFTER
> > pressing enter on the command line to run. That might possibly be an
> issue
> > with my Bash dot files, but this didn't happen before the Cygwin upgrade,
> > and it doesn't happen in the mintty window.
> >
> > After that, it gets even worse.  The "Java HotSpot ..." line prints in
> > three lines, instead of a single line.  Then, the first "WARNING" line
> has
> > the "l" at the end of the line, and then numerous blank lines.  The rest
> of
> > the output is mangled in other ways.
> >
> > Any ideas what might be wrong here?
>
> This is probably related to the new pty code.  Does it help if you start
> emacs
> like this?
>
>    CYGWIN=disable_pcon emacs
>
> If so, that confirms my guess and gives you a workaround.
>
> Ken
> --
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
>
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: After cygwin upgrade, Emacs shell buffers with colors are corrupted

Andrey Repin
Greetings, David Karr!

> Thanks, that worked.  For now, I guess I have to figure out how to set that
> property permanently, or until this pty bug is fixed.. I start Emacs from a
> shortcut, executing "emacs.xml".  I see the file appears to have some
> syntax for setting the environment, but I've never inspected that file
> before.

You set it in Windows.

$ setx CYGWIN "${CYGWIN:+$CYGWIN }disable_pcon"

then relog.

(Yes, this is for Cygwin terminal, although the tool is windows native. It's
just more elegant here.)

P.S.
No top posting in the list, please.
Raw email quoting in message body is also frowned upon. Don't feed the spambots, please.


--
With best regards,
Andrey Repin
Wednesday, March 18, 2020 18:14:51

Sorry for my terrible english...

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: After cygwin upgrade, Emacs shell buffers with colors are corrupted

Cygwin list mailing list
On 3/18/2020 11:22 AM, Andrey Repin wrote:
> Greetings, David Karr!
>
>> Thanks, that worked.  For now, I guess I have to figure out how to set that
>> property permanently, or until this pty bug is fixed.. I start Emacs from a
>> shortcut, executing "emacs.xml".  I see the file appears to have some
>> syntax for setting the environment, but I've never inspected that file
>> before.
>
> You set it in Windows.

Not necessarily.  He might just want to set it for emacs.  Editing emacs.xml is
a fine way to do it.

Ken
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: After cygwin upgrade, Emacs shell buffers with colors are corrupted

Cygwin list mailing list
On Wed, Mar 18, 2020 at 9:38 AM Ken Brown via Cygwin <> wrote:

> On 3/18/2020 11:22 AM, Andrey Repin wrote:
> > Greetings, David Karr!
> >
> >> Thanks, that worked.  For now, I guess I have to figure out how to set
> that
> >> property permanently, or until this pty bug is fixed.. I start Emacs
> from a
> >> shortcut, executing "emacs.xml".  I see the file appears to have some
> >> syntax for setting the environment, but I've never inspected that file
> >> before.
> >
> > You set it in Windows.
>
> Not necessarily.  He might just want to set it for emacs.  Editing
> emacs.xml is
> a fine way to do it.
>

I have no idea whether I would want to do it only for Emacs, as I don't
know what the issue is.

However, if I wanted to, could you point me to the documentation for
changing that file?  The README doesn't say anything about this.
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: After cygwin upgrade, Emacs shell buffers with colors are corrupted

Cygwin list mailing list
On Wed, Mar 18, 2020 at 2:17 PM David Karr <> wrote:

> On Wed, Mar 18, 2020 at 9:38 AM Ken Brown via Cygwin <> wrote:
>
>> On 3/18/2020 11:22 AM, Andrey Repin wrote:
>> > Greetings, David Karr!
>> >
>> >> Thanks, that worked.  For now, I guess I have to figure out how to set
>> that
>> >> property permanently, or until this pty bug is fixed.. I start Emacs
>> from a
>> >> shortcut, executing "emacs.xml".  I see the file appears to have some
>> >> syntax for setting the environment, but I've never inspected that file
>> >> before.
>> >
>> > You set it in Windows.
>>
>> Not necessarily.  He might just want to set it for emacs.  Editing
>> emacs.xml is
>> a fine way to do it.
>>
>
> I have no idea whether I would want to do it only for Emacs, as I don't
> know what the issue is.
>
> However, if I wanted to, could you point me to the documentation for
> changing that file?  The README doesn't say anything about this.
>
>
Just so it's clear, Ken Brown directly sent me some information of what he
knew about the emacs.xml documentation, but it didn't appear to work.

I've verified that setting the CYGWIN variable globally to "disable_pcon"
has resolved the problem.
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: After cygwin upgrade, Emacs shell buffers with colors are corrupted

Cygwin list mailing list
On Thu, Mar 19, 2020 at 3:51 PM David Karr via Cygwin <[hidden email]>
wrote:

> On Wed, Mar 18, 2020 at 2:17 PM David Karr <> wrote:
>
> > On Wed, Mar 18, 2020 at 9:38 AM Ken Brown via Cygwin <> wrote:
> >
> >> On 3/18/2020 11:22 AM, Andrey Repin wrote:
> >> > Greetings, David Karr!
> >> >
> >> >> Thanks, that worked.  For now, I guess I have to figure out how to
> set
> >> that
> >> >> property permanently, or until this pty bug is fixed.. I start Emacs
> >> from a
> >> >> shortcut, executing "emacs.xml".  I see the file appears to have some
> >> >> syntax for setting the environment, but I've never inspected that
> file
> >> >> before.
> >> >
> >> > You set it in Windows.
> >>
> >> Not necessarily.  He might just want to set it for emacs.  Editing
> >> emacs.xml is
> >> a fine way to do it.
> >>
> >
> > I have no idea whether I would want to do it only for Emacs, as I don't
> > know what the issue is.
> >
> > However, if I wanted to, could you point me to the documentation for
> > changing that file?  The README doesn't say anything about this.
> >
> >
> Just so it's clear, Ken Brown directly sent me some information of what he
> knew about the emacs.xml documentation, but it didn't appear to work.
>
> I've verified that setting the CYGWIN variable globally to "disable_pcon"
> has resolved the problem.
>

This is what I did as well to address the problem of M-x gdb not working in
emacs in a new Cygwin installation. I don't know what I might be losing in
other functionality by setting the CYGWIN environment variable globally to
"disable_pcon", but it did address my gdb issue effectively.

--
William M. (Mike) Miller | Edison Design Group
[hidden email]
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple