Emacs 21.2.1 having problems with latest Cygwin/X11

2005-06-09 Thread Gilbert Pilz
I recently re-installed Cygwin 1.5.17-1 with emacs 21.2.-13 and Cygwin/X
6.8.2.0-1. When I attempt to launch emacs from an xterm I get tons of
the following message:

Xlib: sequence lost (0x1 > 0x1ce) in reply type 0xf!

followed by emacs either hanging or aborting. Is there anything I can do
to fix this?

Here is a list of the packages:

cygwin: 1.5.17-1

emacs:  21.2-13
emacs-X11:  21.2-13
emacs-el:   21.2-13
emacs-leim: 21.3.50-2

xorg-x11-base:  6.8.2.0-1
xorg-x11-bin:   6.8.2.0-1
xorg-x11-bin-dlls:  6.8.2.0-1
xorg-x11-bin-lndir: 6.8.2.0-1
xorg-x11-etc:   6.8.2.0-1
xorg-x11-fenc:  6.8.2.0-2
xorg-x11-fnts:  6.8.2.0-3
xorg-x11-libs-data: 6.8.2.0-1
xorg-x11-xwin:  6.8.2.0-2

Gilbert Pilz
Sr. Principal Technologist
Office of the CTO
BEA Systems Inc.



Join CEO Alfred Chuang and CTO Mark Carges on June 15 for a unique online 
event, giving you the first look at a new category of enterprise software 
built specifically for Service-Oriented Architecture (SOA).

Register Now.  It's Free!

http://www.bea.com/events/june15


Re: read bug in Cygwin xterm window only

2005-06-09 Thread Christopher Faylor
On Wed, Jun 08, 2005 at 09:22:08PM +0200, Jason Curl wrote:
>On Fri, Apr 29, 2005 at 05:54:35PM -0700, Peter Farley wrote:
>>The following program demonstrates what looks to me
>>like a bug in the "read" function in an xterm (as
>>opposed to a Cygwin console window).  To run the test,
>>compile with:
>>
>>gcc -g -o xtermbug.exe xtermbug.c
>>
>>When you run it in a console window, you can enter
>>normal keyboard characters, then a return to see
>>"cmdline=".  Press the Esc key to exit
>>the program.
>
>Unfortunately I'm seeing exactly the same problem too, and have so for 
>some time. I've also noticed that a read() giving a particular length 
>will ignore the length field and actually read more data in some cases.

Peter provided a test case which I used to diagnose a problem with
Cygwin.  I fixed the problem and released a new version of cygwin which
fixed the problem so it is unlikely that this is exactly the same
problem.

Please provide a simple test case which shows your specific problem.

And, also please provide the details mentioned at
http://cygwin.com/problems.html .

cgf


Re: xterm and right click and 'print window'

2005-06-09 Thread J. David Boyd
Igor Pechtchanski <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 

> On Thu, 9 Jun 2005, J. David Boyd wrote:
> 
>> Igor Pechtchanski <[EMAIL PROTECTED]> wrote:
> 
>.  Thanks.
> 
>> > On Wed, 8 Jun 2005, J. David Boyd wrote:
>> >
>> >> Has anyone found a way to make this feature work, on any version
>> >> of windows, with any printer?
>> >
>> > This works for me.  WinXP, networked printer.  As long as the
>> > PRINTER variable is exported.
>> >
>> >> I've had no luck so far, and am grasping for clues.
>> >>
>> >> I've defined my $PRINTER as //quantex2/hplaserj, which prints okay
>> >> from windows, but not cygwin.
>> >
>> > Open a regular bash window (no X), and type "echo $PRINTER".  If
>> > that prints the correct thing, try "bash -c 'echo $PRINTER'".  If
>> > that works too, type "xterm -display 127.0.0.1:0", and from that
>> > xterm type "echo $PRINTER".  If you see the correct printer in all
>> > 3 cases, the "Print Window" command should work (it does for me).
>> >
>> > Alternatively, since all xterm does is pipe stuff to lpr, does "lpr
>> > -P //quantex2/hplaserj /etc/passwd" print /etc/passwd to that
>> > printer (just to make sure lpr works)?
>> >  Igor
>>
>> All the variable expansion looks fine, so maybe it is an lpr problem.
>>
>> When I try the command line
>>
>> "lpr -P //quantex2/HPLaserJ /etc/passwd"
>>
>> I get the error printer name is invalid.
>>
>> When I go back to what my profile set up, which is
>> "HP LaserJet 6P", I actually get output.  I was thinking all along
>> that I couldn't use that name, but perhaps cygwin's lpr has been
>> patched to use the windows resource name?
> 
> lpr interacts directly with the print spooler, so whatever name is
> used for the printer in Windows, lpr will also use.
> 
>> I also noticed that nothing came out of the printer until I
>> sent another file...
> 
> That may be because your driver needs to be set up to send a FF after
> each job.  There may be an lpr option for that as well, not sure.
> 
>> And, are you setup for DOS endings or Unix?
> 
> Unix, of course.  But it doesn't matter for lpr -- it's all pipes
> anyway. 
> 
>> So, I can print from the command line.  But, after closing my
>> terms and opening some new ones (just to be sure I have the correct
>> environment), and verifying that $PRINTER is still "HP LaserJet 6P",
>> I get nothing from 'Print window', and I don't see any errors.
>> I wonder if there is a log somewhere that I can peruse.
> 
> If you start an xterm from a bash console window, all error messages
> from that xterm go into the console window.  Otherwise, you can
> redirect the stdout/stderr of the xterm to a file.
> 
>> Anyway, thanks for the help. I guess I won't worry about it
>> for now.  I can always do an Alt-PrtScn and paste it
>> somewhere to print it.
> 
> It would be interesting to find out why your config doesn't work.  Do
> you have PRINTER set in the global Windows environment?  How do you
> start your xterm?
>  Igor


I start my xterm from startxwin.bat.  Four of them.

I've tried defining PRINTER in startxwin.bat, but it seems to make no 
difference.

Oh well, I have to go to Oregon tomorrow morning for a week, so I'll look 
into this when I get back.

Thanks again,

Dave



Re: read bug in Cygwin xterm window only

2005-06-09 Thread Jason Curl

Peter Farley wrote:

Hi all,

The following program demonstrates what looks to me
like a bug in the "read" function in an xterm (as
opposed to a Cygwin console window).  To run the test,
compile with:

gcc -g -o xtermbug.exe xtermbug.c

When you run it in a console window, you can enter
normal keyboard characters, then a return to see
"cmdline=".  Press the Esc key to exit
the program.


Unfortunately I'm seeing exactly the same problem too, and have so for 
some time. I've also noticed that a read() giving a particular length 
will ignore the length field and actually read more data in some cases.


I haven't seen these problems under a normal console, nor under xterm on 
other operating systems (e.g. Linux).




When run in an xterm window, the first keypress causes
this behavior:

1. Select returns with rc = 0 and readset set to
indicate that a key was received
2. "read" returns with kblen = 1 and kbbuf[0] = '\0'
3. (1) and (2) repeat forever.

I put in a "maxdbg" parameter and terminate the
program after 5 occurrences of this loop.

This problem was first detected trying to run a copy
of the hercules IBM mainframe emulator in a Cygwin
xterm window.  The code below is extracted and
minimalized as much as possible from the hercules
keyboard input routine.

Peter Farley





Re: xterm and right click and 'print window'

2005-06-09 Thread Igor Pechtchanski
On Thu, 9 Jun 2005, J. David Boyd wrote:

> Igor Pechtchanski <[EMAIL PROTECTED]> wrote:

.  Thanks.

> > On Wed, 8 Jun 2005, J. David Boyd wrote:
> >
> >> Has anyone found a way to make this feature work, on any version of
> >> windows, with any printer?
> >
> > This works for me.  WinXP, networked printer.  As long as the PRINTER
> > variable is exported.
> >
> >> I've had no luck so far, and am grasping for clues.
> >>
> >> I've defined my $PRINTER as //quantex2/hplaserj, which prints okay
> >> from windows, but not cygwin.
> >
> > Open a regular bash window (no X), and type "echo $PRINTER".  If that
> > prints the correct thing, try "bash -c 'echo $PRINTER'".  If that
> > works too, type "xterm -display 127.0.0.1:0", and from that xterm type
> > "echo $PRINTER".  If you see the correct printer in all 3 cases, the
> > "Print Window" command should work (it does for me).
> >
> > Alternatively, since all xterm does is pipe stuff to lpr, does "lpr -P
> > //quantex2/hplaserj /etc/passwd" print /etc/passwd to that printer
> > (just to make sure lpr works)?
> >  Igor
>
> All the variable expansion looks fine, so maybe it is an lpr problem.
>
> When I try the command line
>
> "lpr -P //quantex2/HPLaserJ /etc/passwd"
>
> I get the error printer name is invalid.
>
> When I go back to what my profile set up, which is
> "HP LaserJet 6P", I actually get output.  I was thinking all along
> that I couldn't use that name, but perhaps cygwin's lpr has been
> patched to use the windows resource name?

lpr interacts directly with the print spooler, so whatever name is used
for the printer in Windows, lpr will also use.

> I also noticed that nothing came out of the printer until I
> sent another file...

That may be because your driver needs to be set up to send a FF after each
job.  There may be an lpr option for that as well, not sure.

> And, are you setup for DOS endings or Unix?

Unix, of course.  But it doesn't matter for lpr -- it's all pipes anyway.

> So, I can print from the command line.  But, after closing my
> terms and opening some new ones (just to be sure I have the correct
> environment), and verifying that $PRINTER is still "HP LaserJet 6P",
> I get nothing from 'Print window', and I don't see any errors.
> I wonder if there is a log somewhere that I can peruse.

If you start an xterm from a bash console window, all error messages from
that xterm go into the console window.  Otherwise, you can redirect the
stdout/stderr of the xterm to a file.

> Anyway, thanks for the help. I guess I won't worry about it
> for now.  I can always do an Alt-PrtScn and paste it
> somewhere to print it.

It would be interesting to find out why your config doesn't work.  Do you
have PRINTER set in the global Windows environment?  How do you start your
xterm?
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT


Re: xterm and right click and 'print window'

2005-06-09 Thread J. David Boyd
Igor Pechtchanski <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 

> On Wed, 8 Jun 2005, J. David Boyd wrote:
> 
>> Has anyone found a way to make this feature work, on any version of
>> windows, with any printer?
> 
> This works for me.  WinXP, networked printer.  As long as the PRINTER
> variable is exported.
> 
>> I've had no luck so far, and am grasping for clues.
>>
>> I've defined my $PRINTER as //quantex2/hplaserj, which prints okay
>> from windows, but not cygwin.
> 
> Open a regular bash window (no X), and type "echo $PRINTER".  If that
> prints the correct thing, try "bash -c 'echo $PRINTER'".  If that
> works too, type "xterm -display 127.0.0.1:0", and from that xterm type
> "echo $PRINTER".  If you see the correct printer in all 3 cases, the
> "Print Window" command should work (it does for me).
> 
> Alternatively, since all xterm does is pipe stuff to lpr, does "lpr -P
> //quantex2/hplaserj /etc/passwd" print /etc/passwd to that printer
> (just to make sure lpr works)?
>  Igor


All the variable expansion looks fine, so maybe it is an lpr problem.

When I try the command line 

"lpr -P //quantex2/HPLaserJ /etc/passwd"

I get the error printer name is invalid.

When I go back to what my profile set up, which is 
"HP LaserJet 6P", I actually get output.  I was thinking all along 
that I couldn't use that name, but perhaps cygwin's lpr has been 
patched to use the windows resource name? 

I also noticed that nothing came out of the printer until I 
sent another file... 

And, are you setup for DOS endings or Unix?

So, I can print from the command line.  But, after closing my 
terms and opening some new ones (just to be sure I have the correct 
environment), and verifying that $PRINTER is still "HP LaserJet 6P", 
I get nothing from 'Print window', and I don't see any errors.  
I wonder if there is a log somewhere that I can peruse. 

Anyway, thanks for the help. I guess I won't worry about it 
for now.  I can always do an Alt-PrtScn and paste it 
somewhere to print it. 

Dave



Re: Problems with ALT_GR and minimized multiwindow xterm

2005-06-09 Thread Alexander Gottwald
On Thu, 9 Jun 2005, Dan Bruhn wrote:

> I forgot to mention that you need to change Windows keyboard layout under 
> regional settings for the problem to apear. Using "-kxblayout" se is not 
> enough.
> 
> The easiest way is to just add the swedish layout and switch to that with the 
> language bar while starting the cygwin session. That way you don't have to 
> have se layout for you other sessions. 

I could reproduce it with the installed german layout too.

I does however seem to be related to something else too. I tried 
with a separatly started server used for debugging and could not 
reproduce this (latest CVS code, compiled for mingw) but I'm quite 
I saw this too some time ago. Anyway, since I now can reproduce this 
much more easily the chances are good I can find a solution.

bye
ago
-- 
 [EMAIL PROTECTED] 
 http://www.gotti.org   ICQ: 126018723


Re: Problems with ALT_GR and minimized multiwindow xterm

2005-06-09 Thread Dan Bruhn
I forgot to mention that you need to change Windows keyboard layout under 
regional settings for the problem to apear. Using "-kxblayout" se is not enough.

The easiest way is to just add the swedish layout and switch to that with the 
language bar while starting the cygwin session. That way you don't have to have 
se layout for you other sessions.  

/Regards Dan

On 07/06/05 14:57 +0200, Alexander Gottwald wrote:
> On Tue, 7 Jun 2005, Dan Bruhn wrote:
> 
> > Hi
> > 
> > Problem:
> > If i start a xterm from a already existing xterm and minimize either of 
> > them keys in the still open xterm starts behaving strange. 
> > 
> > ALT_GR seems to be the most consistent affected key. If i try to type a \ 
> > on the specific layout which is SE (Swedish) all kind of strange characters 
> > appear. 
> > 
> > If I open up the xterm that i have minimized, functionallity comes right 
> > back again. 
> 
> somehow the alt-gr messages (which actually are composed from alt and control 
> presses) 
> are not properly merged and a fake control gets sent. Now that I know how to 
> reproduce 
> this easily I can try check what the cause is.
> 
> bye
>   ago
> -- 
>  [EMAIL PROTECTED] 
>  http://www.gotti.org   ICQ: 126018723