Gnus development mailing list
 help / color / mirror / Atom feed
From: steve@miranova.com (Steven L. Baur)
Subject: Default save-name for saving news articles
Date: 11 Nov 1995 14:38:26 -0800	[thread overview]
Message-ID: <m2lopmepzx.fsf@diana.miranova.com> (raw)
In-Reply-To: Sven's message of 11 Nov 1995 10:44:26 -0800

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


             reply	other threads:[~1995-11-11 22:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-11-11 22:38 Steven L. Baur [this message]
1995-11-12  1:58 ` Robert Nicholson
1995-11-13 22:48   ` Lars Magne Ingebrigtsen
1995-11-13 14:24 ` Per Abrahamsen
1995-11-13 18:03 Steven L. Baur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2lopmepzx.fsf@diana.miranova.com \
    --to=steve@miranova.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).