9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Curious about faces and showmail
@ 2007-10-03 15:55 Gregory Pavelcak
  2007-10-03 20:36 ` Russ Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Gregory Pavelcak @ 2007-10-03 15:55 UTC (permalink / raw)
  To: 9fans

This morning I had 9 or 10 emails showing in faces, and
I decided it would be nice if I could open all of them with
a single click. Based on the existing code in main.c and
some reasonable guesses, I chnged button 2 to this:

	case 2:
		scroll(2, p);
		lockdisplay(display);
		for(i=0; i<nfaces; i++){
			showmail(faces[i]);
			sleep(250);
		}
		unlockdisplay(display);
		break;

Turns out this had kind of unpredictable behavior. In the
times I tried it 3-5 emails would open, but I couldn't really
predict which ones it would be. Just on a hunch, I added
sleep(250) under showmail() in the for() loop, and so far it
works. I was just wondering why showmail() needs that
delay and if such a need is common. I did a quick grep for
sleep() in sources, and, while it shows up, it doesn't seem
especially common. How does one know when one needs it?

Greg


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] Curious about faces and showmail
  2007-10-03 15:55 [9fans] Curious about faces and showmail Gregory Pavelcak
@ 2007-10-03 20:36 ` Russ Cox
  2007-10-03 21:55   ` erik quanstrom
  2007-10-04  0:33   ` Gregory Pavelcak
  0 siblings, 2 replies; 4+ messages in thread
From: Russ Cox @ 2007-10-03 20:36 UTC (permalink / raw)
  To: 9fans

> Turns out this had kind of unpredictable behavior. In the
> times I tried it 3-5 emails would open, but I couldn't really
> predict which ones it would be. Just on a hunch, I added
> sleep(250) under showmail() in the for() loop, and so far it
> works. I was just wondering why showmail() needs that
> delay and if such a need is common. I did a quick grep for
> sleep() in sources, and, while it shows up, it doesn't seem
> especially common. How does one know when one needs it?

easy: you only need to insert sleeps
when the surrounding code is broken.

that said, i don't know which of the
surrounding programs is broken.

you can start "cat /mnt/plumb/showmail"
in a new window and then do your sleep-less
click and see if all the plumbing messages
show up.  that will tell you whether the
plumber is dropping messages.

if the plumber is not dropping messages,
the next thing to do is see why the messages
aren't making your mail reader show mail.

are you using acme mail or nedmail?
probably the latter.  in that case the plumber
is supposed to be starting a window for every
message.  maybe sometimes the nedmail 
fails and the window disappears before you
get a chance to see it.

russ



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] Curious about faces and showmail
  2007-10-03 20:36 ` Russ Cox
@ 2007-10-03 21:55   ` erik quanstrom
  2007-10-04  0:33   ` Gregory Pavelcak
  1 sibling, 0 replies; 4+ messages in thread
From: erik quanstrom @ 2007-10-03 21:55 UTC (permalink / raw)
  To: 9fans

> easy: you only need to insert sleeps
> when the surrounding code is broken.

ironicly, when i click on your face for this message i get
	!message dissappeared
	!message dissappeared

i looked at the problem briefly; it appeared that faces was
either misparsing the plumb messages or upas/fs was sending
the wrong info.

- erik


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] Curious about faces and showmail
  2007-10-03 20:36 ` Russ Cox
  2007-10-03 21:55   ` erik quanstrom
@ 2007-10-04  0:33   ` Gregory Pavelcak
  1 sibling, 0 replies; 4+ messages in thread
From: Gregory Pavelcak @ 2007-10-04  0:33 UTC (permalink / raw)
  To: 9fans

I looked at /mnt/plumb/showmail, as Russ suggested, and it
appears that the plumb messages are going through for every
mail message.

Russ is correct that I am using nedmail in individual windows.
On one occasion when I tried my button 2 click on a mailbox,
I got a few messages in windows and a bunch of question
marks followed by "rc (window): .: can't open: bad character".
Don't know if that means anything to anybody.

Greg


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-10-04  0:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-03 15:55 [9fans] Curious about faces and showmail Gregory Pavelcak
2007-10-03 20:36 ` Russ Cox
2007-10-03 21:55   ` erik quanstrom
2007-10-04  0:33   ` Gregory Pavelcak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).