From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/3924 Path: main.gmane.org!not-for-mail From: steve@miranova.com (Steven L. Baur) Newsgroups: gmane.emacs.gnus.general Subject: Default save-name for saving news articles Date: 11 Nov 1995 14:38:26 -0800 Organization: Miranova Systems, Inc. Sender: steve@miranova.com Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035144741 27955 80.91.224.250 (20 Oct 2002 20:12:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:12:21 +0000 (UTC) X-From-Line: ding-request@ifi.uio.no Sat Nov 11 15:09:52 1995 Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by miranova.com (8.6.11/8.6.9) with ESMTP id PAA31974 for ; Sat, 11 Nov 1995 15:09:47 -0800 Original-Received: from miranova.com (steve@miranova.com [204.212.162.100]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Sat, 11 Nov 1995 23:38:42 +0100 Original-Received: (from steve@localhost) by miranova.com (8.6.11/8.6.9) id OAA31748; Sat, 11 Nov 1995 14:38:30 -0800 Original-To: ding@ifi.uio.no X-Url: http://www.miranova.com/%7Esteve/ In-Reply-To: Sven's message of 11 Nov 1995 10:44:26 -0800 X-Mailer: September Gnus v0.12 Original-Lines: 47 Xref: main.gmane.org gmane.emacs.gnus.general:3924 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:3924 When saving articles from News, I save them to my incoming procmail spool directory, so that Gnus can take them and do whatever it has to do to keep the nnml NOV files up to date. By default, Gnus requires a .spool extension in order to do its magic ... gnus-plain-save-name and gnus-Plain-save-name are close, but do not offer any option to add an extension. I offer two functions to automate this. These have been tested with long file names, but should work with the other options. This might be better added to gnus-plain-save-name and gnus-Plain-save-name, but I don't fully understand the other dependencies. (defvar gnus-mail-save-file-suffix nnmail-procmail-suffix "Extension to append to mail save names.") ;; cloned off of gnus-[Pp]lain-save-name (defun gnus-Spool-save-name (newsgroup headers &optional last-file) "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. If variable `gnus-use-long-file-name' is non-nil, it is ~/News/News.group. Otherwise, it is like ~/News/news/group/news." (or last-file (expand-file-name (if (gnus-use-long-file-name 'not-save) (concat (gnus-capitalize-newsgroup newsgroup) gnus-mail-save-file-suffix) (concat (gnus-newsgroup-directory-form newsgroup) "/news")) (or gnus-article-save-directory "~/News")))) (defun gnus-spool-save-name (newsgroup headers &optional last-file) "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. If variable `gnus-use-long-file-name' is non-nil, it is ~/News/news.group. Otherwise, it is like ~/News/news/group/news." (or last-file (expand-file-name (if (gnus-use-long-file-name 'not-save) (concat newsgroup gnus-mail-save-file-suffix) (concat (gnus-newsgroup-directory-form newsgroup) "/news")) (or gnus-article-save-directory "~/News")))) -- steve@miranova.com baur