Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!apple!usc!cs.utexas.edu!uunet!mcvax!hp4nl!eutrc3!wsincc From: wsincc@eutrc3.urc.tue.nl (Wim van Dorst) Newsgroups: comp.emacs Subject: MicroEmacs' $readhook Keywords: MicroEmacs 3.10 VMS $readhook Mail.rc Message-ID: <809@eutrc3.urc.tue.nl> Date: 21 Jul 89 09:27:26 GMT Organization: Eindhoven University of Technology, The Netherlands Lines: 37 Hello Everybody, I have set up as indicated in the manual, the proper things in order to use MicroEmacs as my mail-editor. This works great sofar. I have made a file mail.rc to use as startup file while using MicroEmacs as mail-editor. It makes use of $writehook to add my signature to the typed-in letter. I now want it to insert things like "> " in front of each line of the letter I am replying to, using $readhook. I have in mail.rc this: 23 store-macro set %rctmp &sin $cfname "." set %rctmp &mid $cfname &add %rctmp 1 5 !if &seq %rctmp "rc" !return !endif write-message "You may reply to this file" !endm set $readhook execute-macro-23 When I open a letter (Mail, send, me, subject) it gives me an empty file and no message. When I change the write-message to insert-string ">" it gives an empty file and the cursor keeps blinking behind the message "New File". It cannot be moved anywhere anymore and I have to turn off my terminal. When I put in the line replace-string "~n" "~n> " which was my original idea, I get the same results. How come I don't get the results I expect? Is it something I have not yet understood about the use of the $readhook, or is it a bug, or....? I hope to see this discussed in this newsgroup, please. Met vriendelijke groeten, Wim van Dorst (wsincc@tuerc3.urc.tue.nl or wsincc@tuerc3.uucp)