?? faq
字號:
the source must be modified to do the cleanup. See "srvrsmtp.c patch" in the Appendix. If you don't have the sources, modify your MH sources to not use the ONEX verb. --Paul Pomes <paul@uxc.cso.uiuc.edu> [3.93] Subject: How can I get xmh to use Emacs as the editor?From: Xmh-50 The modifications to xmh to support an external editor, annotations, and an append command can be found in the these places. --Bob Ellison <ellison@sei.cmu.edu> export.lcs.mit.edu R5fixes/xmh.editor/* ftp.sei.cmu.edu pub/xmh As of R5, xmh has a new action proc called XmhShellCommand. A string parameter will be executed as a shell command with the currently selected messages as parameters (or the current message if there are no selected messages). Using this new action, a couple of shell scripts, a window version of emacs (e.g. xemacs) and some elisp code, xmh can use emacs as its editor instead of the built in Athena text widget editor. This doesn't require any source code changes to xmh. These are included in the appendix "Switching xmh's editor". --Andrew Wason <aw@bae.bellcore.com> Subject: Does xmh support subfolders?From: Xmh-51 Yes. Create one by invoking "Create Folder" as usual, and enter something like: existing-folder/new-sub-folder. You can then access the subfolder by popping up a menu over the "existing-folder" button item. --Steve Malowany <malowany@cenparmi.concordia.ca> But: The R5 version of xmh does *not* handle nested sub-folders. If you create a folder as 'grab/some/bandwidth', xmh displays this foldername for the remainder of the session where it was created, BUT if you later re-run xmh, the folder is no longer visible to xmh. --John Cooper <jsc@saxon.Eng.Sun.COM> See also MH book section 15.6.2 (14.6.2). Subject: How do I precede included messages with ">" when replying in xmh?From: Xmh-52 Include the following line in your ~/app-defaults/XMh file: Xmh*replyInsertFilter: "sed 's/^/> /'" --Len Makin <len@mel.dit.csiro.au> or, Xmh.ReplyInsertFilter: /usr/local/lib/mh/mhl -form repl.filter Using this means that you can chose to insert the original by use of the "Insert" button in the Draft message pane. See "How do I include messages in repl with or without ">"?" to find examples of repl.filter. --Andy Linton <andy.linton@comp.vuw.ac.nz> See also MH book sections 15.1.4 (14.1.4), 16.3.3 (15.2.3). Subject: GlossaryFrom: Appendix MH Mail Handler POP3 Post Office Protocol, RFC 1225 MMDF Multi-channel Memo Distribution Facility MIME Multipurpose Internet Mail Extensions Subject: AcknowledgementsFrom: AppendixI'd like to thank the following people for providing ideas on thelayout of this article:Joe Wells <jbw@bigbird.bu.edu> Richard M. Stallman <rms@gnu.ai.mit.edu>David Elliott <dce@smsc.sony.com> Tom Christiansen <tchrist@convex.com>Eugene N. Miya <eugene@nas.nasa.gov>We are also grateful to the individuals mentioned below and in thetext of this document who have provided answers or other informationto make this a better document. I regret that it is possible thatsome names have been accidently omitted. I would also like to thankall the readers of comp.mail.mh. Kim F. Storm <storm@texas.dk> Edward Vielmetti <emv@ox.com> Subject: WarrantyFrom: Appendix[The following statement epitomizes the ridiculous state of affairs inour country (I'm an American) and can be ignored outside the US...]No Warranty: Because this article is provided free of charge as aservice to comp.mail.mh readers, we provide absolutely no warranty, tothe extent permitted by applicable state law. This article isprovided "as is" without warranty of any kind, either expressed orimplied, including, but not limited to, the implied warranties ofmerchantability and fitness for a particular purpose. Should theinformation prove defective, you assume the cost of all necessaryservicing, repair or correction. Subject: Switching xmh's editorFrom: Appendix#! /bin/sh# This is a shell archive. Remove anything before this line, then unpack# it by saving it into a file and typing "sh file". To overwrite existing# files, type "sh file -c". You can also feed this as standard input via# unshar, or by typing "sh <file", e.g.. If this archive is complete, you# will see the following message at the end:# "End of shell archive."# Contents: README Xmh.ad xmh-command.el xmhcommand xmhemacs# Wrapped by aw@jello on Fri Nov 15 17:10:34 1991PATH=/bin:/usr/bin:/usr/ucb ; export PATHif test -f 'README' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'README'\"elseecho shar: Extracting \"'README'\" \(1269 characters\)sed "s/^X//" >'README' <<'END_OF_FILE'XThis is a short description of what to do with each of the enclosed files.XXXmh.adX Merge this in with your xmh resources. If you already haveX user defined buttons, then you may need to renumber theX buttons in this resource file.XXxmh-command.elX Byte compile this file and put it in your GNU emacs load-path.XXxmhcommandXxmhemacsX Put these somewhere in your path.XXXOnce you have installed these, restart the R5 xmh with the newXresources. When you press the repl, forw or comp buttonsXan xemacs window will come up with your draft message.XXOnce you have written your mail, save it and exit GNU emacs (C-xC-c).XYou will be prompted if you want to send the current message.XIf you enter 'y', the message will be sent and the output willXbe displayed in an emacs window (in case you use -verbose or -snoop).XThen you will be prompted to exit emacs. Enter 'y' when you are ready.XXIf you answered 'n' when prompted to send the message,Xthen the draft message will be deleted and emacs will exit.XXYou can modify the Xmh.ad resources to add more buttons.XAny MH command which accepts "+folder msg" can be usedX(e.g. a replx shell script which includes the body of theXmessage being replied to can be bound to a replx button)XXXAndrew WasonXaw@bae.bellcore.comEND_OF_FILEif test 1269 -ne `wc -c <'README'`; then echo shar: \"'README'\" unpacked with wrong size!fi# end of 'README'fiif test -f 'Xmh.ad' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Xmh.ad'\"elseecho shar: Extracting \"'Xmh.ad'\" \(457 characters\)sed "s/^X//" >'Xmh.ad' <<'END_OF_FILE'XXmh*CommandButtonCount: 3XXXmh*commandBox.button1.label: replXXmh*commandBox.button1.translations:\X #override\n\X <Btn1Up>: XmhShellCommand(xmhcommand y repl) unset()XXXmh*commandBox.button2.label: forwXXmh*commandBox.button2.translations:\X #override\n\X <Btn1Up>: XmhShellCommand(xmhcommand y forw) unset()XXXmh*commandBox.button3.label: compXXmh*commandBox.button3.translations:\X #override\n\X <Btn1Up>: XmhShellCommand(xmhcommand n comp) unset()END_OF_FILEif test 457 -ne `wc -c <'Xmh.ad'`; then echo shar: \"'Xmh.ad'\" unpacked with wrong size!fi# end of 'Xmh.ad'fiif test -f 'xmh-command.el' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xmh-command.el'\"elseecho shar: Extracting \"'xmh-command.el'\" \(1294 characters\)sed "s/^X//" >'xmh-command.el' <<'END_OF_FILE'X;;; These functions are for use with xemacs and xmh.X;;; The R5 xmh has a new action - XmhShellCommand which executesX;;; a shell command with the current msg as an arg.X;;; By executing something like:X;;; XmhShellCommand(xmhcommand repl)X;;; you can use xemacs as your editor with xmh.X;;;X;;; The following elisp functions perform the basic whatnowproc functionalityX;;; (quitting and deleting, sending)X;;;X;;; Andrew Wason aw@bae.bellcore.comXXX;;; Override C-xC-cX(define-key indented-text-mode-map "\C-x\C-c" 'xmh-command-send-or-delete)XXX(setq mhdraft (getenv "mhdraft")) ; save the filename of the draftXXX(find-file mhdraft) ; load the draft letterX(indented-text-mode)X(setq draft-buffer (current-buffer)) ; save the buffer the draft is inXXX(defun xmh-command-send-or-delete ()X "Prompt to send or delete letter, then quit."X (interactive)X (set-buffer draft-buffer)X (if (y-or-n-p "Send message? ")X (prognX (save-buffer) ; save the draft bufferX (message "Sending...")X (pop-to-buffer "MH mail delivery"); pop to a buffer for "send" outputX (erase-buffer)X (call-process "send" nil t t mhdraft) ; call MH "send"X (if (y-or-n-p "Exit? ")X (kill-emacs))) ; exit emacsX (delete-file mhdraft) ; delete the draft letterX (kill-emacs))) ; exit emacsEND_OF_FILEif test 1294 -ne `wc -c <'xmh-command.el'`; then echo shar: \"'xmh-command.el'\" unpacked with wrong size!fi# end of 'xmh-command.el'fiif test -f 'xmhcommand' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xmhcommand'\"elseecho shar: Extracting \"'xmhcommand'\" \(669 characters\)sed "s/^X//" >'xmhcommand' <<'END_OF_FILE'X#!/bin/shX# This shell should be invoked by the xmh XmhShellCommand() action asX# XmhShellCommand(xmhcommand y repl)X# XmhShellCommand(xmhcommand n comp) etc.X# If the second arg is y, then the message list will be used.XX# We invoke the passed MH command on the identified messageX# (we must strip the message number and folder from the pathname)X(if [ $1 = "y" ]XthenX $2 -whatnowproc xmhemacs +`dirname \`echo $3 | \X sed "s;\\\`mhpath +\\\`/;;"\`` `basename $3`XX# You can use this more readable version instead if you have kshX# $2 -whatnowproc xmhemacs +$(dirname $(echo $3 | \X# sed "s;$(mhpath +)/;;")) $(basename $3)XXelseX $2 -whatnowproc xmhemacsXfi)&END_OF_FILEif test 669 -ne `wc -c <'xmhcommand'`; then echo shar: \"'xmhcommand'\" unpacked with wrong size!fichmod +x 'xmhcommand'# end of 'xmhcommand'fiif test -f 'xmhemacs' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xmhemacs'\"elseecho shar: Extracting \"'xmhemacs'\" \(116 characters\)sed "s/^X//" >'xmhemacs' <<'END_OF_FILE'X#!/bin/shX# Invoke xemacs and load the xmh-command.el stuff.X# xmhemacs is used by xmhcommandXxemacs -l xmh-commandEND_OF_FILEif test 116 -ne `wc -c <'xmhemacs'`; then echo shar: \"'xmhemacs'\" unpacked with wrong size!fichmod +x 'xmhemacs'# end of 'xmhemacs'fiecho shar: End of shell archive.exit 0 Subject: babyl2mh.plFrom: Appendix#!/usr/gnu/bin/perl# incorporate an RMAIL babyl file into an MH folder## usage: babyl2mh +folder babyl-file## V. Khera <khera@cs.duke.edu> 17-JUL-1991# where to find rcvstore$rcvstore = "/usr/local/lib/mh/rcvstore";## pull out command line args#die "usage: babyl2mh +folder babyl-file\n" unless @ARGV == 2;$folder = shift;# make sure folder name starts with a "+"(substr($folder,0,1) eq "+") || (substr($folder,0,0) = "+");$bfname = shift;print "Incorporating RMAIL file $bfname into MH folder $folder\n";## read in babyl file.#$/ = "\037"; # this separates the records in a babyl file$* = 1; # records are multi-linesopen(BABYL,$bfname) || die "Couldn't open $bfname\n";$_ = <BABYL>; # discard header.$msgnum = 0;while (<BABYL>) { chop; # get rid of delimeter s/\f(.|\n)*\*\*\* EOOH \*\*\*\n//; # remove duplicate header information open(RCVSTORE,"|" . $rcvstore . " $folder"); print RCVSTORE $_; $msgnum++; print "Message $msgnum done.\n";} Subject: incoFrom: Appendix#!/bin/sh# Usage: inco [from [folder]]# "from" defaults to $HOME/Mail/outbound, "folder" to +inbox.lispfile=/tmp/inco.$$.elinput=${1-$HOME/Mail/outbound}tmpmbox=/tmp/inc.$$.mboxfolder=${2-+inbox}if [ $# -ge 3 ]; then echo Usage: `basename $0` [ from [ folder ]] exit 2fitrap "rm -f $lispfile $tmpmbox ; exit 1" 1 2 15touch $tmpmboxchmod 600 $tmpmboxecho '(rmail-input "'$input'")(rmail-last-message)(setq last (rmail-what-message))(rmail-show-message 1)(while (not (equal (rmail-what-message) last)) (rmail-output "'$tmpmbox'") (rmail-delete-forward nil))(rmail-output "'$tmpmbox'")(kill-buffer (current-buffer))' > $lispfileemacs -batch -l $lispfileinc -file $tmpmbox $folder> $inputrm -f $lispfile $tmpmbox Subject: srvrsmtp.c patchFrom: Appendix>From the 5.67 sources:*** srvrsmtp.c- Mon Feb 22 12:25:54 1993--- srvrsmtp.c Mon Feb 22 12:29:09 1993****************** 384,389 ****--- 384,395 ---- message("250", "Reset state"); if (InChild) finis();+ + /* clean up a bit if running in parent */+ hasmail = FALSE;+ dropenvelope(CurEnv);+ CurEnv = newenvelope(CurEnv);+ CurEnv->e_flags = BlankEnvelope.e_flags; break; case CMDVRFY: /* vrfy -- verify address */Local Variables:mode: outlineoutline-regexp: "^Subject:"fill-prefix: " " eval: (progn (setq buffer-read-only nil) (hide-body))End:
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -