Gnus development mailing list
 help / color / mirror / Atom feed
* Default save-name for saving news articles
@ 1995-11-11 22:38 Steven L. Baur
  1995-11-12  1:58 ` Robert Nicholson
  1995-11-13 14:24 ` Per Abrahamsen
  0 siblings, 2 replies; 5+ messages in thread
From: Steven L. Baur @ 1995-11-11 22:38 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Default save-name for saving news articles
  1995-11-11 22:38 Default save-name for saving news articles Steven L. Baur
@ 1995-11-12  1:58 ` Robert Nicholson
  1995-11-13 22:48   ` Lars Magne Ingebrigtsen
  1995-11-13 14:24 ` Per Abrahamsen
  1 sibling, 1 reply; 5+ messages in thread
From: Robert Nicholson @ 1995-11-12  1:58 UTC (permalink / raw)
  Cc: ding

On a somewhat related note I'm currently using.

(defun gnus-plain-save-name-type
    (newsgroup headers &optional last-file)
    (gnus-plain-save-name
     (if (string-match "^nnfolder:" newsgroup)
     (concat "~/Mail/archive/" (substring newsgroup 9 nil))
       (concat "~/News/archive/" newsgroup)) headers last-file))

as my article saver.

Simply because I want to archive mail and news in different locations
and GNUS doesn't appear to have any easy way to do that.

-- 
             "Mary ate a little lamb and punk rock isn't dead"
            (PGP key: send email with Subject: request pgp key)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Default save-name for saving news articles
  1995-11-11 22:38 Default save-name for saving news articles Steven L. Baur
  1995-11-12  1:58 ` Robert Nicholson
@ 1995-11-13 14:24 ` Per Abrahamsen
  1 sibling, 0 replies; 5+ messages in thread
From: Per Abrahamsen @ 1995-11-13 14:24 UTC (permalink / raw)
  Cc: ding


>>>>> "SLB" == Steven L Baur <steve@miranova.com> writes:

SLB> When saving articles from News, I save them to my incoming procmail
SLB> spool directory, so that Gnus can take them and do whatever it has to
SLB> do to keep the nnml NOV files up to date.

Why don't you just use `B m' to move the message?  

Saving them in your incomming procmail spool directory could cause
problems (like lost mail) if procmail is also delivering a messages
there.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Default save-name for saving news articles
  1995-11-12  1:58 ` Robert Nicholson
@ 1995-11-13 22:48   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 1995-11-13 22:48 UTC (permalink / raw)


robert@steffi.accessone.com (Robert Nicholson) writes:

> Simply because I want to archive mail and news in different locations
> and GNUS doesn't appear to have any easy way to do that.

gnus-split-methods's value is nil

Documentation:
*Variable used to suggest where articles are to be saved.
The syntax of this variable is the same as `nnmail-split-methods'.  

For instance, if you would like to save articles related to Gnus in
the file "gnus-stuff", and articles related to VM in "vm-stuff",
you could set this variable to something like:

 '(("^Subject:.*gnus\|^Newsgroups:.*gnus" "gnus-stuff")
   ("^Subject:.*vm\|^Xref:.*vm" "vm-stuff"))

-- 
Home is where the cat is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Default save-name for saving news articles
@ 1995-11-13 18:03 Steven L. Baur
  0 siblings, 0 replies; 5+ messages in thread
From: Steven L. Baur @ 1995-11-13 18:03 UTC (permalink / raw)


>>>>> "Per" == Per Abrahamsen <abraham@dina.kvl.dk> writes:

>>>>> "SLB" == Steven L Baur <steve@miranova.com> writes:

    SLB> When saving articles from News, I save them to my incoming
    SLB> procmail spool directory, so that Gnus can take them and do
    SLB> whatever it has to do to keep the nnml NOV files up to date.

    Per> Why don't you just use `B m' to move the message?

``The current newsgroup does not support article moving''

Even if it did work, it does not have the desired semantics.  I like
the feature that saving the article leaves it unread in the
destination folder.  B m has three flaws: (sgnus 0.12)

* It does not respect readedness status of the starting article.  It
 usually leaves the article read.

* Sometimes it does not leave the article read, but the group listing
 is not updated properly.  I haven't tracked this down enough to make
 a decent bug report yet.

* It does not copy status.  Eg.  a marked article (with ``!'') does
 not end up marked in the destination folder.  I haven't checked
 fully, but I don't believe it copies things like reply status either.

You could also add the number of keystrokes required too.
B m nnml:news.group <RET>  -vs-

o <RET>

    Per> Saving them in your incomming procmail spool directory could
    Per> cause problems (like lost mail) if procmail is also
    Per> delivering a messages there.

I have multiple spool files there.  How can writing to
gnu.emacs.gnus.spool cause mail lossage when procmail does not know
about that file?

-- 
steve@miranova.com baur


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1995-11-13 22:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-11-11 22:38 Default save-name for saving news articles Steven L. Baur
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

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).