Xref: utzoo gnu.emacs.gnus:287 comp.emacs:6409 Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!csd4.milw.wisc.edu!leah!rpi!rpi.edu!tale From: tale@pawl.rpi.edu (David C Lawrence) Newsgroups: gnu.emacs.gnus,comp.emacs Subject: Re: Treatment of the FCC: header field (author copy) Message-ID: Date: 1 Jul 89 07:31:55 GMT References: Sender: usenet@rpi.edu Reply-To: tale@pawl.rpi.edu Followup-To: gnu.emacs.gnus Lines: 117 In-reply-to: shadow@pawl.rpi.edu's message of 1 Jul 89 01:17:45 GMT In shadow@pawl.rpi.edu (Deven T. Corzine): DTC> It should accept anything starting with a + in the FCC: field as an MH DTC> folder and use rcvstore to save it there. Please, someone add this DTC> feature? (I _tried_ the "|/usr/local/lib/rcvstore +Articles" method; DTC> it didn't work. Besides, it's ugly. Plain "+Articles" ought to work.) I agree with you that plain +Articles should work. For those who are curious, Deven's problem with the pipeline not working was not the fault of GNUS but due to the fact that he did not have a +Articles folder and did not specify -create as an argument to rcvstore. I argued with him about "So what that it's ugly, no one ever sees it but you and it works ...", but that was basically an impasse. :-) Anyway, the following diffs to gnuspost.el do two things: o Allow you to specify a FCC which starts with + as a special character that means "save this in my MH folder +foldername using rcvstore". If the folder does not exist you are asked whether you want to create it. o Allow you to have a null-string organization. See an earlier posting of mine regarding this. You can get the same effects by setting gnus-your-organization and gnus-organization-file both to nil and making sure that the environment variable ORGANIZATION is not set. (The patch also does one minor thing by clearing up some overhead by not firing up a shell if FCC is going to pipe the message to a programme.) This patch is UNOFFICIAL and mostly unimportant. It doesn't really fix anything that is broken, just makes a couple of things easier. If you want either or both of these features use this in good health. % diff -c gnuspost.el gnuspostnew.el *** gnuspost.el Mon Jun 26 13:51:37 1989 --- gnuspostnew.el Sat Jul 1 03:14:23 1989 *************** *** 383,391 **** (match-beginning 1) (match-end 1)))) ;; Suggested by yuki@flab.fujitsu.junet. ;; Pipe out article to named program. ! (call-process-region (point-min) (point-max) shell-file-name ! nil nil nil "-c" program) ! )) (t ;; Suggested by hyoko@flab.fujitsu.junet. ;; Save article in Unix mail format. --- 383,410 ---- (match-beginning 1) (match-end 1)))) ;; Suggested by yuki@flab.fujitsu.junet. ;; Pipe out article to named program. ! (call-process-region (point-min) (point-max) ! program nil nil nil))) ! ;; if it starts with a +, save it to an MH folder ! ((string-match "^\\s *\\(\\+\\S +\\)\\s *$" fcc-file) ! (require 'mh-e) ! (or mh-user-path (mh-find-path)) ! (let* ((name (substring fcc-file (match-beginning 1) ! (match-end 1))) ! (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). --- 563,569 ---- (let ((organization (or (getenv "ORGANIZATION") gnus-your-organization (expand-file-name "~/.organization" nil)))) ! (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 --- 576,582 ---- gnus-organization-file) (t 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 This is the trailing garbage your patcher always told you about... Dave -- (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 (?)