- (errbuf (get-buffer-create " *Gnus rcvstore*")))
- (gnus-eval-in-buffer-window
- gnus-article-buffer
- (save-restriction
- (widen)
- (unwind-protect
- (call-process-region (point-min) (point-max)
- (expand-file-name "rcvstore" mh-lib)
- nil errbuf nil folder)
- (set-buffer errbuf)
- (if (zerop (buffer-size))
- (message "Article saved in folder: %s" folder)
- (message "%s" (buffer-string)))
- (kill-buffer errbuf))))
+ (errbuf (gnus-get-buffer-create " *Gnus rcvstore*"))
+ ;; Find the rcvstore program.
+ (exec-path (cond
+ ((and (boundp 'mh-lib-progs) mh-lib-progs)
+ (cons mh-lib-progs exec-path))
+ (mh-lib (cons mh-lib exec-path))
+ (t exec-path))))
+ (with-current-buffer gnus-original-article-buffer
+ (save-restriction
+ (widen)
+ (unwind-protect
+ (call-process-region
+ (point-min) (point-max) "rcvstore" nil errbuf nil folder)
+ (set-buffer errbuf)
+ (if (zerop (buffer-size))
+ (message "Article saved in folder: %s" folder)
+ (message "%s" (buffer-string)))
+ (kill-buffer errbuf))))