Re: re emacs23 update

2011-03-21 Thread David Coppa
On Wed, Mar 16, 2011 at 1:21 PM, Manuel Giraud
manuel.gir...@univ-nantes.fr wrote:

 Another round. Tested on i386 GENERIC.MP and emacs --batch -f
 byte-compile-file: ok.

What's about this? Can it be committed?

cheers,
david



Re: re emacs23 update

2011-03-21 Thread Christiano F. Haesbaert
On Mon, Mar 21, 2011 at 11:36:17AM +0100, David Coppa wrote:
 On Wed, Mar 16, 2011 at 1:21 PM, Manuel Giraud
 manuel.gir...@univ-nantes.fr wrote:
 
  Another round. Tested on i386 GENERIC.MP and emacs --batch -f
  byte-compile-file: ok.
 
 What's about this? Can it be committed?
 

I've been using the version prior to the diff, athena flavor on MP.
No problems seen so far.

-- 
Christiano Farina HAESBAERT
Do NOT send me html mail.



Re: re emacs23 update

2011-03-21 Thread Manuel Giraud
David Coppa dco...@gmail.com writes:

 On Wed, Mar 16, 2011 at 1:21 PM, Manuel Giraud
 manuel.gir...@univ-nantes.fr wrote:

 Another round. Tested on i386 GENERIC.MP and emacs --batch -f
 byte-compile-file: ok.

 What's about this? Can it be committed?

I didn't have report on other arch of this last version with Mike
Belopuhov patch.

-- 
Manuel Giraud



Re: re emacs23 update

2011-03-21 Thread David Coppa
On Wed, Mar 16, 2011 at 1:21 PM, Manuel Giraud
manuel.gir...@univ-nantes.fr wrote:

I've (not so heavily) tested it on my sparc64 box.

The gtk+2 flavor builds and packages fine. It also seemed to work
without particular problems in all my test cases...

 Another round. Tested on i386 GENERIC.MP and emacs --batch -f
 byte-compile-file: ok.

This works well too. And also Tetris, Snake and Pong ;) ;)

cheers,
David



Re: re emacs23 update

2011-03-16 Thread Manuel Giraud

Another round. Tested on i386 GENERIC.MP and emacs --batch -f
byte-compile-file: ok.



emacs.tgz
Description: Unix tar archive

-- 
Manuel Giraud


re emacs23 update

2011-03-15 Thread Mike Belopuhov
re,

it turns out that SIGIO handling in emacs incorporates too many
workarounds, especially when running under X and at this point
it's impossible (at least for me) to grasp through the code and
find why it fails to work with xcb or X in general.

but fortunately there's a tweak (DISABLE_SIGIO) that makes it
use poll exclusively and fixes everything!

and also, there's an emacs 23.3 released already.

cheers.

--- src/s/openbsd.h~Tue Mar 15 11:56:59 2011
+++ src/s/openbsd.h Tue Mar 15 11:57:25 2011
@@ -36,5 +36,7 @@
 
 #endif
 
+#define BROKEN_SIGIO
+
 /* arch-tag: 7e3f65ca-3f48-4237-933f-2b208b21e8e2
(do not change this comment) */



Re: re emacs23 update

2011-03-15 Thread Manuel Giraud
Mike Belopuhov m...@crypt.org.ru writes:

 re,

 it turns out that SIGIO handling in emacs incorporates too many
 workarounds, especially when running under X and at this point
 it's impossible (at least for me) to grasp through the code and
 find why it fails to work with xcb or X in general.

 but fortunately there's a tweak (DISABLE_SIGIO) that makes it
 use poll exclusively and fixes everything!

 and also, there's an emacs 23.3 released already.

 cheers.

Thank you. I'll update the port with 23.3, your patch and others'
comments and repost ASAP.

Just out of curiousity, how did you trace such bug? I ended up lost in
uthread lib.

-- 
Manuel Giraud



Re: re emacs23 update

2011-03-15 Thread David Coppa
On Tue, Mar 15, 2011 at 12:26 PM, Mike Belopuhov m...@crypt.org.ru wrote:
 re,

 it turns out that SIGIO handling in emacs incorporates too many
 workarounds, especially when running under X and at this point
 it's impossible (at least for me) to grasp through the code and
 find why it fails to work with xcb or X in general.

 but fortunately there's a tweak (DISABLE_SIGIO) that makes it
 use poll exclusively and fixes everything!

 and also, there's an emacs 23.3 released already.

 cheers.

 --- src/s/openbsd.h~    Tue Mar 15 11:56:59 2011
 +++ src/s/openbsd.h     Tue Mar 15 11:57:25 2011
 @@ -36,5 +36,7 @@

  #endif

 +#define BROKEN_SIGIO
 +
  /* arch-tag: 7e3f65ca-3f48-4237-933f-2b208b21e8e2
    (do not change this comment) */

Good catch!

thank you,
David



Re: re emacs23 update

2011-03-15 Thread Mike Belopuhov
On Tue, Mar 15, 2011 at 3:17 PM, Manuel Giraud
manuel.gir...@univ-nantes.fr wrote:
 Mike Belopuhov m...@crypt.org.ru writes:

 re,

 it turns out that SIGIO handling in emacs incorporates too many
 workarounds, especially when running under X and at this point
 it's impossible (at least for me) to grasp through the code and
 find why it fails to work with xcb or X in general.

 but fortunately there's a tweak (DISABLE_SIGIO) that makes it
 use poll exclusively and fixes everything!


it's BROKEN_SIGIO not DISABLE_SIGIO.  the diff is correct.

 and also, there's an emacs 23.3 released already.

 cheers.

 Thank you. I'll update the port with 23.3, your patch and others'
 comments and repost ASAP.

 Just out of curiousity, how did you trace such bug? I ended up lost in
 uthread lib.


i used gdb, ktrace, read some pthread, xcb and kernel code.
in fact i got a crash on emacs22 with erlang running in the inferior
mode and that provided a hint about SIGIO handling.

 --
 Manuel Giraud




Re: re emacs23 update

2011-03-15 Thread Manuel Giraud

Here's the new version of emacs 23 port. Tested and ok on i386 GENERIC.MP



emacs.tgz
Description: Unix tar archive

-- 
Manuel Giraud


Re: re emacs23 update

2011-03-15 Thread Matthew Dempsky
On Tue, Mar 15, 2011 at 9:35 AM, Manuel Giraud
manuel.gir...@univ-nantes.fr wrote:
 Here's the new version of emacs 23 port. Tested and ok on i386 GENERIC.MP

In post-install, since bin/emacs and bin/emacs-${VERSION} are hard
linked to the same file, you only need to chmod -t one of them.

Shouldn't you get rid of the REVISION-{el,main} = 0 lines too, since
it's a version bump?

Building on amd64 fails because of not finding tsang-b5.el.gz.  You'll
need to do something like:

post-install:
chmod -t ${PREFIX}/bin/emacs
.if ${MACHINE_ARCH} == amd64 || ${MACHINE_ARCH} == mips64
gzip -f ${PREFIX}/share/emacs/${VERSION}/leim/quail/tsang-b5.el

post-extract:
touch ${WRKSRC}/leim/quail/tsang-b5.el
.endif



Re: re emacs23 update

2011-03-15 Thread Mike Belopuhov
On Tue, Mar 15, 2011 at 15:17 +0100, Manuel Giraud wrote:
 Mike Belopuhov m...@crypt.org.ru writes:
 
  re,
 
  it turns out that SIGIO handling in emacs incorporates too many
  workarounds, especially when running under X and at this point
  it's impossible (at least for me) to grasp through the code and
  find why it fails to work with xcb or X in general.
 
  but fortunately there's a tweak (DISABLE_SIGIO) that makes it
  use poll exclusively and fixes everything!
 
  and also, there's an emacs 23.3 released already.
 
  cheers.
 
 Thank you. I'll update the port with 23.3, your patch and others'
 comments and repost ASAP.
 
 Just out of curiousity, how did you trace such bug? I ended up lost in
 uthread lib.
 
 -- 
 Manuel Giraud

looks like this email didn't hit the list for some reason.
sorry if its a dup.

here's a fix for a fallout from the BROKEN_SIGIO change:
'emacs --batch -f byte-compile-file' fails after inactivity timer
fires up.  the solution is to restart fgets upon receiving EINTR.
afaik, read_minibuf_noninteractive is called only in the batch
mode.


--- src/minibuf.c~  Tue Mar 15 18:43:21 2011
+++ src/minibuf.c   Tue Mar 15 18:43:28 2011
@@ -20,6 +20,7 @@ along with GNU Emacs.  If not, see http://www.gnu.org
 
 
 #include config.h
+#include errno.h
 #include stdio.h
 #include setjmp.h
 
@@ -306,12 +307,21 @@ read_minibuf_noninteractive (map, initial, prompt, bac
   size = 100;
   len = 0;
   line = (char *) xmalloc (size * sizeof *line);
-  while ((s = fgets (line + len, size - len, stdin)) != NULL
- (len = strlen (line),
-len == size - 1  line[len - 1] != '\n'))
+
+again:
+  if ((s = fgets (line + len, size - len, stdin)) != NULL)
 {
-  size *= 2;
-  line = (char *) xrealloc (line, size);
+  len = strlen (line);
+  if (len  0  line[len - 1] != '\n')
+   {
+ size *= 2;
+ line = (char *) xrealloc (line, size);
+ goto again;
+   }
+}
+  else if (errno == EINTR)
+{
+  goto again;
 }
 
   if (s)



Re: re emacs23 update

2011-03-15 Thread Mike Belopuhov
On Tue, Mar 15, 2011 at 12:26 +0100, Mike Belopuhov wrote:
 re,
 
 it turns out that SIGIO handling in emacs incorporates too many
 workarounds, especially when running under X and at this point
 it's impossible (at least for me) to grasp through the code and
 find why it fails to work with xcb or X in general.
 
 but fortunately there's a tweak (DISABLE_SIGIO) that makes it
 use poll exclusively and fixes everything!
 
 and also, there's an emacs 23.3 released already.
 
 cheers.
 
 --- src/s/openbsd.h~  Tue Mar 15 11:56:59 2011
 +++ src/s/openbsd.h   Tue Mar 15 11:57:25 2011
 @@ -36,5 +36,7 @@
  
  #endif
  
 +#define BROKEN_SIGIO
 +
  /* arch-tag: 7e3f65ca-3f48-4237-933f-2b208b21e8e2
 (do not change this comment) */

and a fix for a fallout from this change.
'emacs --batch -f byte-compile-file' fails after inactivity timer
fires up.  the solution is to restart fgets upon receiving EINTR.
afaik, read_minibuf_noninteractive is called only in the batch
mode.

--- src/minibuf.c~  Tue Mar 15 18:43:21 2011
+++ src/minibuf.c   Tue Mar 15 18:43:28 2011
@@ -20,6 +20,7 @@ along with GNU Emacs.  If not, see http://www.gnu.org
 
 
 #include config.h
+#include errno.h
 #include stdio.h
 #include setjmp.h
 
@@ -306,12 +307,21 @@ read_minibuf_noninteractive (map, initial, prompt, bac
   size = 100;
   len = 0;
   line = (char *) xmalloc (size * sizeof *line);
-  while ((s = fgets (line + len, size - len, stdin)) != NULL
- (len = strlen (line),
-len == size - 1  line[len - 1] != '\n'))
+
+again:
+  if ((s = fgets (line + len, size - len, stdin)) != NULL)
 {
-  size *= 2;
-  line = (char *) xrealloc (line, size);
+  len = strlen (line);
+  if (len  0  line[len - 1] != '\n')
+   {
+ size *= 2;
+ line = (char *) xrealloc (line, size);
+ goto again;
+   }
+}
+  else if (errno == EINTR)
+{
+  goto again;
 }
 
   if (s)