9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Forward option for Mail
@ 2003-12-15  8:47 Skip Tavakkolian
  2003-12-15  9:04 ` rob pike, esq.
  2003-12-16  1:27 ` Russ Cox
  0 siblings, 2 replies; 23+ messages in thread
From: Skip Tavakkolian @ 2003-12-15  8:47 UTC (permalink / raw)
  To: 9fans

I added a Forward option for acme/mail. I've been using it a few days. I
was careful to leave the Q/Reply/all behavior unchanged.

If you mark something that looks like an email address (has an '@' in
it) and middle-left-click on Forward, it creates the new Forward
buffer with that address in the To line; otherwise the To line will be
blank.  Another minor thing was adding the |spell in the tag line.

diff /n/dump/2003/1207/acme/mail/src/dat.h /acme/mail/src/dat.h
diff /n/dump/2003/1207/acme/mail/src/html.c /acme/mail/src/html.c
diff /n/dump/2003/1207/acme/mail/src/mail.c /acme/mail/src/mail.c
diff /n/dump/2003/1207/acme/mail/src/mesg.c /acme/mail/src/mesg.c
642a643,647
> 	if (strcmp(args[0], "Forward") == 0) {
> 		char *to = (nargs >= 2 && strchr(args[1], '@')) ? args[1] : nil;
> 		mkreply(m, "Forward", to, nil, nil);
> 		goto Return;
> 	}
1233c1238
< 				wintagwrite(m->w, "Q Reply all UnDelmesg Save ", 2+6+4+10+5);
---
> 				wintagwrite(m->w, "Q Reply all Forward UnDelmesg Save ", 2+6+4+8+10+5);
1235c1240
< 				wintagwrite(m->w, "Q Reply all Delmesg Save ", 2+6+4+8+5);
---
> 				wintagwrite(m->w, "Q Reply all Forward Delmesg Save ", 2+6+4+8+8+5);
diff /n/dump/2003/1207/acme/mail/src/reply.c /acme/mail/src/reply.c
74c74
< 	int quotereply;
---
> 	int quotereply, fwdreply;
77a78
> 	fwdreply = (strcmp(label, "Forward") == 0);
93c94
< 	wintagwrite(r->w, "|fmt Post", 5+4);
---
> 	wintagwrite(r->w, "|spell |fmt Undo Post", 7+5+5+4);
97c98
< 	if(to!=nil && to[0]!='\0')
---
> 	if(to!=nil && to[0]!='\0' && !fwdreply)
104c105,109
< 		if(to == nil && attr == nil){
---
> 		if (fwdreply) {
> 			Bprint(r->w->body, "To: %s\n", to ? to: "");
> 			quotereply = 0;	/* force inclusion of the whole message */
> 		}
> 		else if(to == nil && attr == nil){
118,119c123,124
< 			t = "Subject: Re: ";
< 			if(strlen(m->subject) >= 3)
---
> 			t = (fwdreply) ? "Subject: Fwd: " : "Subject: Re: ";
> 			if(!fwdreply && strlen(m->subject) >= 3)
diff /n/dump/2003/1207/acme/mail/src/util.c /acme/mail/src/util.c
diff /n/dump/2003/1207/acme/mail/src/win.c /acme/mail/src/win.c



^ permalink raw reply	[flat|nested] 23+ messages in thread
* Re: [9fans] Forward option for Mail
@ 2003-12-16 14:36 David Presotto
  2003-12-16 14:15 ` Russ Cox
  2003-12-16 15:05 ` David Presotto
  0 siblings, 2 replies; 23+ messages in thread
From: David Presotto @ 2003-12-16 14:36 UTC (permalink / raw)
  To: 9fans

	Elm and Mutt use "bounce" and it's a very nifty feature.  But
	forwarding then is a case of Mime-enclosing (or otherwise isolating)
	the original message in a bigger scope where the forwarder can add
	her comments.

Nedmail already does all this.  You just lose it
with the acme interface.


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

end of thread, other threads:[~2003-12-17 11:16 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-15  8:47 [9fans] Forward option for Mail Skip Tavakkolian
2003-12-15  9:04 ` rob pike, esq.
2003-12-15 10:17   ` Skip Tavakkolian
2003-12-15 16:53     ` Rob Pike
2003-12-15 10:28   ` Skip Tavakkolian
2003-12-16  1:27 ` Russ Cox
2003-12-16  1:53   ` Jim Choate
2003-12-16  1:52     ` Russ Cox
2003-12-16  2:56       ` Jim Choate
2003-12-16  7:26   ` Skip Tavakkolian
2003-12-16 13:38     ` Jim Choate
2003-12-16 13:47       ` Axel Belinfante
2003-12-16 14:16         ` Lucio De Re
2003-12-16 14:12           ` Russ Cox
2003-12-17  2:10           ` Charles Forsyth
2003-12-17 11:16             ` David Lukes
2003-12-17  6:06       ` Skip Tavakkolian
2003-12-17  5:14         ` andrey mirtchovski
2003-12-17  6:41           ` Skip Tavakkolian
2003-12-17  8:20             ` andrey mirtchovski
2003-12-16 14:36 David Presotto
2003-12-16 14:15 ` Russ Cox
2003-12-16 15:05 ` David Presotto

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