[comp.soft-sys.andrew] Changing AMS headers and more.

nsb@THUMPER.BELLCORE.COM (Nathaniel Borenstein) (09/14/90)

You can probably get the effect you desire in the headers only by either
A) changing the code or B)  doing some init file hacking.  In the latter
scenario, which is REALLY ugly, what you'd do would be to replace things
like  the "Reply to Sender" menu & keystrokes with compound commands
that do the normal action and then add the header you want.  I don't
have an example of exactly what you want, but the following init file
line sets up a custom menu that sets up a reply to the sender, fills in
the body, and then actually sends off the mail and deletes the message
you were reading.  You might use at as a sort of perverse inspiration
for doing what you want to do...

# addmenu messages-compound-operation "Custom~99,On The List~11"
messages messages inherit "messages-reply-to-sender;
messages-sendmessage-compound sendmessage-insert-file 
/afs/andrew.cmu.edu/usr2/nsb/.onthelisttext;
messages-sendmessage-compound sendmessage-excerpt-body;
messages-sendmessage-compound sendmessage-send-message;
messages-delete-current"

A third way to extend the system that wouldn't have to use this awful
syntax would be to use Ness; I'm not sure how exactly, but I'm pretty
sure it could be done.   (Actually, it might be a lot easier with Ness,
but I'm not a Ness expert.)

As far as eatmail goes:  What it does is convert mbox format files to
separate files in a directory (~/Mailbox by default) for processing by
AMS.  So I doubt that it's what you want.

For converting MH mail to AMS, I think you have the right idea -- CUI
reconstruct is the way to go.  The reconstruction might work better if
you first type "create folder-name" to create the folder index and then
"reconstruct folder-name" to fill it in properly.

As for printscribe & console, well, I can't help much on those...

wjh+@ANDREW.CMU.EDU (Fred Hansen) (09/18/90)

Excerpts from internet.info-andrew: 13-Sep-90 Changing AMS headers and
more. MAG@IBM.COM (1338)

>  Is there any way to change the "message composing" headers permanently
> (without using "insert header"), either system wide or by individual
> user?  I need to add a couple of headers.
> e.g.
> 	To:
> 	Subject:
> change to:
> 	To:
> 	Subject:
> 	New-header:


In a reply to this message Nathaniel suggests using Ness. 
Unfortunately, a key piece needed will not be released until patch 7. 
At that time you can use Ness as follows:

Add to ~/.messagesinit the lines
 
	load ness
	call ness-load  <full path name of file>

where the file contains:

    extend "view:sendmessage"
        on menu "Add My Headers"
                sendmessage_add_header(currentwindow,
                        "New Header: ")
                sendmessage_add_header(currentwindow, 
                        "Another Header: ")
        end menu
        on menu "Send/Post"
                sendmessage_send_message(currentwindow)
                sendmessage_add_header(currentwindow, 
                        "New Header 2: ")
                sendmessage_add_header(currentwindow, 
                        "Another Header 2: ")
        end menu
    end extend
        
This will add one new menu item in SendMessage: "Add My Headers".  When
selected, two new headers will be added.  It will also modify the
"Send/Post" menu item so it adds a different pair of headers--of course
they could be the same.


Fred Hansen

MAG@IBM.COM (09/20/90)

Thanks to everyone for the quick responses and suggestions..

I am currently trying to add headers through "addmenu" , but I am having
some problems.
Here is what I have in the .messagesinit file:

addmenu messages-compound-operation ",Send External Message~52" messages
messages inherit "messages-reply-to-sender;
messages-sendmessage-compound sendmessage-add-header X-External-Networks;
messages-sendmessage-compound sendmessage-headers-textview-compound
textview-self-insert yes;
messages-sendmessage-compound sendmessage-set-not-modified"

And this is what I get in my "messages Composing" window:

X-External-Networks: \311
To:
Subject:
CC:

The problems are:
 1) There is no cursor anywhere in the window, if I start to type, the
letters appear on the "CC" line. If I hit cursor return, nothing happens
(the invisible cursor seems to still be on the "CC" line.).  The only
way it works is if I click the mouse button on one of the header fields,
then the cursor appears and cursor return works fine.
2) How can I add a default value ("yes") to the new header?.  The
text-self-insert doesn't seem to work.

I like to suggest that AMS should work similar to XMH. XMH has
~/Mail/components file, where the user can customize the compose
headers.  Can anyone from CMU comment on this suggestion?


How can I make messages come up faster?.  It seems to take forever on a
IBM/RT AIX 2.2.1.

	Thanks
	Marlon
	T.J. Watson AIX Information Center
	mag@ibm.com

nsb@THUMPER.BELLCORE.COM (Nathaniel Borenstein) (09/20/90)

Excerpts from internet.info-andrew: 19-Sep-90 Re: Changing AMS headers
an.. MAG@ibm.com (1459)

>  1) There is no cursor anywhere in the window, if I start to type, the
> letters appear on the "CC" line. If I hit cursor return, nothing happens
> (the invisible cursor seems to still be on the "CC" line.).  The only
> way it works is if I click the mouse button on one of the header fields,
> then the cursor appears and cursor return works fine.

Hmm...  Sounds like the input focus is somehow strangely set.  You can
probably use the compound command mechanism to set the input focus, but
I'm not certain about the details.  

> 2) How can I add a default value ("yes") to the new header?.  The
> text-self-insert doesn't seem to work.

Hmm...  The textview object doesn't sem to provide an insert-string
proctable entry.  You could create a file called ~/.YES containing the
string "yes" and then use sendmessage-insert-file /foo/bar/.YES, but
that would be an amazingly stupid thing to have to do...

> I like to suggest that AMS should work similar to XMH. XMH has
> ~/Mail/components file, where the user can customize the compose
> headers.  Can anyone from CMU comment on this suggestion?

That's a good idea.  Pending someone implementing that, however,  you
can use the Save/Restore Draft mechanism to create a "draft" message
file that has the headers you want.  Then you can use the init file
mechanism to bring up this "draft" file whenever you want it. 
(Actually, that will only work for the "fresh" sending, not for replies,
sigh...)  In principle it might be possible to do this with the
messages.tpl file, but I doubt that it is possible in practice, for
various reasons.  With some patches, however, it might well be posible
to do all of this with a customized messages.tpl template.

> How can I make messages come up faster?.  It seems to take forever on a
> IBM/RT AIX 2.2.1.

I have long since given up on answering questions like this.  The
program is definitely slower to come up than it should be, but whether
it is a minor or a major annoyance seems to depend on a whole host of
factors from CPU to memory size to OS to file system.  On my
SparcStation, it comes up tolerably fast.  (Oddly enough, the biggest
performance problem I have these days is that, when running on a Graphon
X terminal at 9600 baud, it takes forever to Quit when you choose the
"Quit" menu, and I have absolutely no idea why this is the case.  It
exits quite quickly on my Sun's main screen.)

Hope the above was helpful... -- Nathaniel

mcinerny+@ANDREW.CMU.EDU ("Michael J. McInerny") (09/20/90)

Here's what I use to add special EzFax headers to my mail, from my
~/.messagesinit:

addmenu sendmessage-compound-operation "Fax~1,Request Acknowledgement~1" sendmessage sendmessage inherit "sendmessage-add-header Ack-to: mcinerny+fax-ack@andrew.cmu.edu"

addmenu sendmessage-compound-operation "Fax~1,Delayed Transmission~2" sendmessage sendmessage inherit "sendmessage-add-header X-Andrew-Fax-Delivery-after: 11pm tonight"

addmenu sendmessage-compound-operation "Fax~1,Use ITC FaxMail coverpage~10" sendmessage sendmessage inherit "sendmessage-add-header X-Andrew-Fax-Coverpage: /afs/andrew/usr0/ezfax/lib/coversheet/itcfaxmail.PS"

addmenu sendmessage-compound-operation "Fax~1,Use ITC coverpage~11" sendmessage sendmessage inherit "sendmessage-add-header X-Andrew-Fax-Coverpage: /afs/andrew/usr0/ezfax/lib/coversheet/itc.PS"

addmenu sendmessage-compound-operation "Fax~1,Use ITC letterhead~12" sendmessage sendmessage inherit "sendmessage-add-header X-Andrew-Fax-Coverpage: /afs/andrew/usr0/ezfax/lib/letterhead/itc.PS"

addmenu sendmessage-compound-operation "Fax~1,Add All Fax Headers~99" sendmessage sendmessage inherit "sendmessage-add-header X-Andrew-Fax-Coverpage: /afs/andrew/usr0/ezfax/lib/coversheet/itcfaxmail.PS;sendmessage-add-header Ack-to: mcinerny+fax-ack@andrew.cmu.edu;sendmessage-add-header X-Andrew-Fax-Max-retries: 1;sendmessage-add-header X-Andrew-Fax-Resolution: fine;sendmessage-add-header X-Andrew-Fax-Delivery-after: now;sendmessage-add-header X-Andrew-Fax-Confidential: no;sendmessage-add-header X-Andrew-F






ax-Trailing-Coverpage-too: no"