Xref: utzoo gnu.emacs.gnus:288 comp.emacs:6411 Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!rpi!rpi.edu!lawrence From: lawrence@pawl.rpi.edu (David Lawrence) Newsgroups: gnu.emacs.gnus,comp.emacs Subject: Re: Treatment of the FCC: header field (author copy) Message-ID: Date: 1 Jul 89 19:34:29 GMT References: Sender: usenet@rpi.edu Reply-To: tale@pawl.rpi.edu Followup-To: gnu.emacs.gnus Lines: 97 In-reply-to: tale@pawl.rpi.edu's message of 1 Jul 89 07:31:55 GMT Hold the presses, reverse that patch. Here we learn a lesson in the hazards of very rarely changing your development environment and not testing from scratch. My tests of the FCC: +foldername patch didn't pick up the fact that if you don't have mh-e already loaded some nasty things will happen. I already had it provided so I never noticed ... Basically, the problems are these: mh-user-path isn't defvar'ed as nil but as "" (a completely useless original value, but that is another matter ...); additionally, if mh-find-path is run it corrupts the match-data so the let* statement ends up barfing. Ah well, live and learn. The other thing that was pointed out to me is that taking out the overhead of the shell creates the problem of passing arguments to the program via call-process-region. As I was about to fix this I noted that without the shell you also lose the functionality of a longer pipeline or of stdout redirection, so things look best left the way they are in spite of the overhead of the shell process. This is an _unofficial_ patch; if you applied the other (incorrect) one that I submitted in the wee hours of this morning, reverse it and apply this to the distributed gnuspost.el. % diff -c gnuspost.el.orig gnuspost.el *** gnuspost.el.orig Sat Jul 1 14:59:06 1989 --- gnuspost.el Sat Jul 1 15:18:37 1989 *************** *** 386,391 **** --- 386,414 ---- (call-process-region (point-min) (point-max) shell-file-name nil nil nil "-c" program) )) + ((string-match "^\\s *\\(\\+\\S +\\)\\s *^" fcc-file) + ;; Suggested by shadow@pawl.rpi.edu + ;; unofficial patch by tale@rpi.edu + ;; if it starts with a +, save it to an MH folder. + (let ((name (substring fcc-file + (match-beginning 1) (match-end 1))) + folder) + (require 'mh-e) + (if (string= "" mh-user-path) (mh-find-path)) + (setq folder (mh-expand-file-name name)) + (or (file-exists-p folder) + (if (y-or-n-p + (format "Folder %s doesn't exist. Create? " name)) + (progn + (message "Creating %s" folder) + (call-process "mkdir" nil nil nil folder) + (message "Creating %s...done" folder) + (mh-push (list name) mh-folder-list)))) + (if (file-exists-p folder) + (call-process-region (point-min) (point-max) + (concat mh-lib "rcvstore") + nil nil nil name) + (message "FCC to %s not saved." name)))) (t ;; Suggested by hyoko@flab.fujitsu.junet. ;; Save article in Unix mail format. *************** *** 544,550 **** (let ((organization (or (getenv "ORGANIZATION") gnus-your-organization (expand-file-name "~/.organization" nil)))) ! (and (stringp organization) (string-equal (substring organization 0 1) "/") ;; Get it from the user and system file. ;; Suggested by roland@wheaties.ai.mit.edu (Roland McGrath). --- 567,574 ---- (let ((organization (or (getenv "ORGANIZATION") gnus-your-organization (expand-file-name "~/.organization" nil)))) ! ;; patch by tale@rpi.edu to cope with "" organization ! (and (stringp organization) (string< "" organization) (string-equal (substring organization 0 1) "/") ;; Get it from the user and system file. ;; Suggested by roland@wheaties.ai.mit.edu (Roland McGrath). *************** *** 557,563 **** gnus-organization-file) (t organization))) )) ! (cond ((not (stringp organization)) nil) ((and (string-equal (substring organization 0 1) "/") (file-exists-p organization)) ;; If the first character is `/', assume it is the name of --- 581,588 ---- gnus-organization-file) (t organization))) )) ! ;; patched by tale@rpi.edu to deal with "" organization ! (cond ((or (not (stringp organization)) (string= "" organization)) nil) ((and (string-equal (substring organization 0 1) "/") (file-exists-p organization)) ;; If the first character is `/', assume it is the name of -- (setq mail '("tale@pawl.rpi.edu" "tale@itsgw.rpi.edu" "tale@rpitsmts.bitnet")) "Drinking coffee for instant relaxation? That's like drinking alcohol for instant motor skills." -- Mike Price (?)