9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Mail: scroll top top of message
@ 2024-06-22 15:38 Nicola Girardi
  2024-06-22 15:59 ` ori
  0 siblings, 1 reply; 3+ messages in thread
From: Nicola Girardi @ 2024-06-22 15:38 UTC (permalink / raw)
  To: 9front

Hi, I was looking to make acme Mail show the top of newly opened
messages; I've used the scrollbar manually for years now and finally
decided to try and automate that...  this works for me, posting here
in case it's useful for anyone else.

; git/diff mesg.c
diff 900d08fb3c2517270cb15201a27eeda6eba5a522 uncommitted
--- a/sys/src/cmd/upas/Mail/mesg.c
+++ b/sys/src/cmd/upas/Mail/mesg.c
@@ -294,7 +294,8 @@
 	}
 	Bterm(wfd);
 	free(home);
-	fprint(m->ctl, "clean\n");
+	fprint(m->addr, "#0");
+	fprint(m->ctl, "dot=addr\nshow\nclean\n");
 	return 0;
 }
 


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

* Re: [9front] Mail: scroll top top of message
  2024-06-22 15:38 [9front] Mail: scroll top top of message Nicola Girardi
@ 2024-06-22 15:59 ` ori
  0 siblings, 0 replies; 3+ messages in thread
From: ori @ 2024-06-22 15:59 UTC (permalink / raw)
  To: 9front

Quoth Nicola Girardi <ng@0x80.stream>:
> Hi, I was looking to make acme Mail show the top of newly opened
> messages; I've used the scrollbar manually for years now and finally
> decided to try and automate that...  this works for me, posting here
> in case it's useful for anyone else.

Hm, no objections, but the newly opened messages start at
the top for me; do you have steps to reproduce?

> 
> ; git/diff mesg.c
> diff 900d08fb3c2517270cb15201a27eeda6eba5a522 uncommitted
> --- a/sys/src/cmd/upas/Mail/mesg.c
> +++ b/sys/src/cmd/upas/Mail/mesg.c
> @@ -294,7 +294,8 @@
>  	}
>  	Bterm(wfd);
>  	free(home);
> -	fprint(m->ctl, "clean\n");
> +	fprint(m->addr, "#0");
> +	fprint(m->ctl, "dot=addr\nshow\nclean\n");
>  	return 0;
>  }
>  
> 


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

* Re: [9front] Mail: scroll top top of message
@ 2024-06-22 16:13 ng
  0 siblings, 0 replies; 3+ messages in thread
From: ng @ 2024-06-22 16:13 UTC (permalink / raw)
  To: 9front

ori@eigenstate.org wrote:
> Hm, no objections, but the newly opened messages start at
> the top for me; do you have steps to reproduce?

Ori, you're right, no patch needed in 9front.

I use Mail both in p9p and in 9front and I was sure I was observing
the same behavior; so sure that I ported the p9p fix I'd done an hour
ago without first reproducing with vanilla Mail.

Sorry for the noise!


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

end of thread, other threads:[~2024-06-22 16:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-22 15:38 [9front] Mail: scroll top top of message Nicola Girardi
2024-06-22 15:59 ` ori
2024-06-22 16:13 ng

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).