* Re: How to use Maildir for everything? How to duplicate behaviour of mutt?
[not found] <87ekkrjpzm.fsf@heresy.ainola.jyu.fi>
@ 2004-09-27 14:30 ` Paul Jarc
2004-09-27 16:31 ` Juhapekka Tolvanen
0 siblings, 1 reply; 4+ messages in thread
From: Paul Jarc @ 2004-09-27 14:30 UTC (permalink / raw)
Juhapekka Tolvanen <FUBAR.juhtolv@iki.fi.SNAFU.invalid> wrote:
> First thing I need is this: When I hit "o" to save my News article, I
> want to save it that article to ~/News so that each group has one
> Maildir-folder.
Apparently there is no maildir-format saver function. But you could
use B c to copy an article to an nnmaildir group. So you could put
together a command that creates the nnmaildir group corresponding to
the current group, if it doesn't already exist, and then calls
gnus-summary-copy-article to put the article there.
> And how can I convert those News articles I already have there to
> Maildir-format? According to file-command they are in emacs
> RMAIL-format.
You could temporarily create an nnbabyl server to access those as Gnus
groups, and use B c to copy the articles to nnmaildir groups.
> [When I stop reading my INBOX, read mails are moved to
> ~/Maildir.save/read/ if I give permission.]
I think you could do something like that with auto-expire in your
inbox group, with the "read" group as the expiry target. I'm not sure
if you could make it prompt you for moving the messages, though.
> [When I leave text editor, and decide to postpone sending my E-Mail, it
> is saved to ~/Maildir.save/postponed/ if don't give permission for
> cancelling that E-Mail]
Gnus has a specialized backend for drafts. It's not maildir, but it
does use one file per message.
> [When I send my E-Mail, a copy of it is saved to
> ~/Maildir.save/sent-mail-YYYY-MM where YYYY is substituted with number
> of year and YY is substituted with number of month (leading zero included)]
That can be done with a little Lisp. I've never done it, so I don't
know the details.
> my_hdr From: Juhapekka Tolvanen <juhtolv@cc.jyu.fi>
> my_hdr Reply-To: Juhapekka Tolvanen <juhtolv@iki.fi>
>
> [Those headers are added to each mail]
I do this with posting styles, but there are other ways too.
> [during editing I can edit all headers, too]
I think that's always true in Gnus, except there are some fields like
Date and Message-ID that are regenerated when you send the message.
> # If unset and you are replying to a message sent by you, Mutt will
> # assume that you want to reply to the recipients of that message
> # rather than to yourself.
If you use followup instead of reply, Gnus will construct a message
addressed to the sender and recipients, but then will remove your own
address.
> [First ignore all headers when reading some E-Mail]
...
> [Then unignore some headers]
See the variable gnus-visible-headers.
> (add-to-list 'gnus-secondary-select-methods '(nnmaildir ""))
Make that:
(add-to-list 'gnus-secondary-select-methods
'(nnmaildir "" (directory "~/Maildir.save")))
> (add-to-list 'mail-sources '(maildir :path "/var/mail/juhtolv/" :subdirs ("cur" "new") ) )
>
> But I don't want it to delete mail from my INBOX when I stop reading
> it. I want to copy each mail manually to right folder.
Then you should access that maildir as an nnmaildir group, not a
mail-source. You can make a symlink like ~/Maildir.save/inbox ->
/var/mail/juhtolv.
> BTW is Gnus the only emacs-based MUA Maildir-support?
There's also VM, perhaps others as well.
paul
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to use Maildir for everything? How to duplicate behaviour of mutt?
2004-09-27 14:30 ` How to use Maildir for everything? How to duplicate behaviour of mutt? Paul Jarc
@ 2004-09-27 16:31 ` Juhapekka Tolvanen
[not found] ` <87u0thcwx2.fsf@heresy.ainola.jyu.fi>
0 siblings, 1 reply; 4+ messages in thread
From: Juhapekka Tolvanen @ 2004-09-27 16:31 UTC (permalink / raw)
prj@po.cwru.edu (Paul Jarc) writes:
> Juhapekka Tolvanen <FUBAR.juhtolv@iki.fi.SNAFU.invalid> wrote:
>> First thing I need is this: When I hit "o" to save my News article, I
>> want to save it that article to ~/News so that each group has one
>> Maildir-folder.
> Apparently there is no maildir-format saver function. But you could
> use B c to copy an article to an nnmaildir group. So you could put
> together a command that creates the nnmaildir group corresponding to
> the current group, if it doesn't already exist, and then calls
> gnus-summary-copy-article to put the article there.
I'm sorry, but I can not code in elisp. Any takers?
Maybe that command could be bound to key "o".
>> And how can I convert those News articles I already have there to
>> Maildir-format? According to file-command they are in emacs
>> RMAIL-format.
> You could temporarily create an nnbabyl server to access those as Gnus
> groups, and use B c to copy the articles to nnmaildir groups.
Argh... Do you know any other ways to convert from RMAIL-format to mbox
or Maildir? I can use mbox-format as intermediate format and then
convert that to Maildir.
>> [When I stop reading my INBOX, read mails are moved to
>> ~/Maildir.save/read/ if I give permission.]
> I think you could do something like that with auto-expire in your
> inbox group, with the "read" group as the expiry target. I'm not sure
> if you could make it prompt you for moving the messages, though.
Okay. Maybe that feature is not very important.
>> [When I leave text editor, and decide to postpone sending my E-Mail, it
>> is saved to ~/Maildir.save/postponed/ if don't give permission for
>> cancelling that E-Mail]
> Gnus has a specialized backend for drafts. It's not maildir, but it
> does use one file per message.
Okay. Maybe that is not too big problem, except in this situation: I
start writing some E-mail under mutt and postpone it. Then I go on
editing it from Gnus. Or vice versa.
>> [When I send my E-Mail, a copy of it is saved to
>> ~/Maildir.save/sent-mail-YYYY-MM where YYYY is substituted with
>> number of year and YY is substituted with number of month (leading
>> zero included)]
> That can be done with a little Lisp. I've never done it, so I don't
> know the details.
I reiterate: I can not code in elisp. Any takers?
>> my_hdr From: Juhapekka Tolvanen <juhtolv@cc.jyu.fi>
>> my_hdr Reply-To: Juhapekka Tolvanen <juhtolv@iki.fi>
>> [Those headers are added to each mail]
> I do this with posting styles, but there are other ways too.
Here are my current posting styles from ~/.gnus.el :
(setq gnus-posting-styles
'(
(".*"
(name "Juhapekka Tolvanen")
(address "SNAFU.juhtolv@iki.fi.FUBAR.invalid")
)
)
)
I tried this, but then I commented it way, because it caused leaving
signature away:
;;(setq gnus-posting-styles
;; '(
;; (".*" ;;default
;; (name "Juhapekka Tolvanen")
;; (organization "")
;; (address "juhtolv@cc.jyu.fi")
;; ("Reply-To" "juhtolv@iki.fi")
;; (signature-file "~/.signature")
;; )
;; ((message-news-p) ;;Usenet news?
;; (address "SNAFU.juhtolv@iki.fi.FUBAR.invalid")
;; ("Reply-To" "SNAFU.juhtolv@iki.fi.FUBAR.invalid")
;; (signature-file "~/.signature")
;; )
;; ((message-mail-p) ;;mail?
;; (address "juhtolv@cc.jyu.fi")
;; ("Reply-To" "juhtolv@iki.fi")
;; (signature-file "~/.signature")
;; )
;; )
;;)
What am I doing wrong?
>> [during editing I can edit all headers, too]
>
> I think that's always true in Gnus, except there are some fields like
> Date and Message-ID that are regenerated when you send the message.
Okay.
>> # If unset and you are replying to a message sent by you, Mutt will
>> # assume that you want to reply to the recipients of that message
>> # rather than to yourself.
> If you use followup instead of reply, Gnus will construct a message
> addressed to the sender and recipients, but then will remove your own
> address.
Okay.
>> [First ignore all headers when reading some E-Mail]
> ...
>> [Then unignore some headers]
>
> See the variable gnus-visible-headers.
Okay. Is it possible to change order of shown headers? Is it possible to
see all headers when reading News article but only selected when reading
E-Mail -messages.
>> (add-to-list 'gnus-secondary-select-methods '(nnmaildir ""))
>
> Make that:
> (add-to-list 'gnus-secondary-select-methods
> '(nnmaildir "" (directory "~/Maildir.save")))
>
>> (add-to-list 'mail-sources '(maildir :path "/var/mail/juhtolv/" :subdirs ("cur" "new") ) )
>>
>> But I don't want it to delete mail from my INBOX when I stop reading
>> it. I want to copy each mail manually to right folder.
> Then you should access that maildir as an nnmaildir group, not a
> mail-source. You can make a symlink like ~/Maildir.save/inbox ->
> /var/mail/juhtolv.
Alright... I am getting there. I start carefully. Hence, I created a
directory called ~/Maildir.gnus, first and I copied a directory called
"ibid" from ~/.Maildir.save to ~/.Maildir.gnus . Then I created symbolic
link that points from ~/.Maildir.gnus/INBOX to /var/mail/juhtolv . And I
put this to my ~/.gnus.el :
(add-to-list 'gnus-secondary-select-methods
'(nnmaildir "" (directory "~/Maildir.gnus")))
If I start Gnus and hit "L", there are these "groups", too:
0: nnmaildir:INBOX
0: nnmaildir:ibid
And if I choose them, I really can read those E-Mails there. And E-Mails
of INBOX really stay there, when I leave that folder. They just go from
/var/mail/juhtolv/new to /var/mail/juhtolv/cur . And same happens when
reading that folder called "ibid".
Now, I want to be sure, that my Gnus never expires my E-Mails
automatically. I am used to do this: I sometimes burn my mailfolders to
CD-R. Then I delete old my E-Mails by hand.
>> BTW is Gnus the only emacs-based MUA Maildir-support?
> There's also VM, perhaps others as well.
Are you really sure that VM has Maildir-support? BTW I just realised,
that Wanderlust has some Maildir-support. But I don't know if it can
read and write Maildir-folders.
--
Juhapekka "naula" Tolvanen * http colon slash slash iki dot fi slash juhtolv
"halpojen hoitojen maailma uljas haluaa taistosi latistaa, mielesi
lipeävedellä valkaistuun ruotuunsa, joka on hautausmaa" CMX
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to use Maildir for everything? How to duplicate behaviour of mutt?
[not found] ` <87acv8jprb.fsf@heresy.ainola.jyu.fi>
@ 2004-09-30 19:32 ` Juhapekka Tolvanen
2004-10-01 8:05 ` Sebastien Kirche
0 siblings, 1 reply; 4+ messages in thread
From: Juhapekka Tolvanen @ 2004-09-30 19:32 UTC (permalink / raw)
Juhapekka Tolvanen <SNAFU.juhtolv@iki.fi.FUBAR.invalid> writes:
> Meanwhile, I'll take your elisp-snippet and tune it for my
> Maildir-folders. Thanks!
Here it is and it works:
;; Save sent E-Mail messages to sent-mail-YYYY-MM
;; Save sent Usenet News articles to sent-news-YYYY-MM
(setq gnus-message-archive-group
'((if (message-news-p)
(concat "nnmaildir:sent-news-" (format-time-string "%Y-%m"))
(concat "nnmaildir:sent-mail-" (format-time-string "%Y-%m"))
)
)
)
Today I also made some hack for converting RMAIL/BABYL-folders to
mbox-format and then to Maildir format.
http://iki.fi/juhtolv/configs/gnus/
This system has just one drawback: Now Gnus can not show if article in
Summary-buffer is saved. But I watch very seldom those articles I have
already read or marked read.
I tried first a software called mb2md, but it was really buggy:
http://batleth.sapienti-sat.org/projects/mb2md/
If you know how to fix it, please do it. Meanwhile I can use that script
called mbox2maildir . I don't remember how I found it.
You may also find these scripts useful, no matter if you were mutt-user:
http://iki.fi/juhtolv/configs/gnus/mutt/
Well, my Gnus configuration is mostly ready. Here are relevant parts
that were needed to enable usage of Gnus for E-Mail in My Way(tm):
(setq gnus-posting-styles
'(
(".*" ;;default
(name "Juhapekka Tolvanen")
(signature-file "~/.signature")
(organization "What?+ Me organized?+ Never!1")
)
(message-news-p ;; A function symbol: Usenet News
(address "SNAFU.juhtolv@iki.fi.FUBAR.invalid")
("Reply-To" "SNAFU.juhtolv@iki.fi.FUBAR.invalid")
)
(message-mail-p ;; A function symbol: E-Mail
(address "juhtolv@cc.jyu.fi")
("Reply-To" "juhtolv@iki.fi")
)
)
)
(setq gnus-visible-headers
(quote ("^Posted-To:" "^X-CRM114-Status:" "^X-CRM114-Score:" "^X-CRM114-Action:" "^X-Reject:" "^X-Spam-Status:" "^X-Spam-Level:"
"^X-Spam-Report:" "^X-Spam-Flag:" "^X-Spam-Checker-Version:" "^X-Pyzor:" "^X-Spam-Pyzor:" "^X-DCC-SdV-Metrics:"
"^X-DCC-MessageCare-Metrics:" "^X-DCC-dmv.com-Metrics:" "^X-Spam-DCC:" "^X-Spam-Checked:" "^X-Spam-Status:" "^X-Virus-Scanned:"
"^X-scanner:" "^Subject:" "^Newsgroups:" "^Date:" "^From:" "^Organization:" "^To:" "^Cc:" "^[BGF]?Cc:" "^Reply-To:" "^Resent-From:"
"^Mail-Followup-To:" "^Followup-To:" "^Mail-Copies-To:" "^Apparently-To:" "^Summary:" "^Keywords:" "^X-Keywords:" "^X-Mailing-List:"
"^Old-Return-Path:" "^Delivered-To:" "^In-Reply-To:" "^X-Originating-Email:" "^Message-ID:" "^X-Lotus-FromDomain:"
"^X-Mailer:" "^X-Newsreader:" "^X-Agent:" "^User-Agent:" "^X-Newsreader" "^X-Mailer-URL:" "^X-Operating-System:" "^X-OS:" "^X-Editor:"
"^X-Uptime:" "Content-Type:" "^Gnus-Warning:")
)
)
(setq mail-sources nil)
(setq nnmail-spool-file nil)
(add-to-list 'gnus-secondary-select-methods
'(nnmaildir "" (directory "~/Maildir.gnus")))
;; Avoid marking read articles expirable:
(remove-hook 'gnus-mark-article-hook
'gnus-summary-mark-read-and-unread-as-read)
(add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
;; Save sent E-Mail messages to sent-mail-YYYY-MM
;; Save sent Usenet News articles to sent-news-YYYY-MM
(setq gnus-message-archive-group
'((if (message-news-p)
(concat "nnmaildir:sent-news-" (format-time-string "%Y-%m"))
(concat "nnmaildir:sent-mail-" (format-time-string "%Y-%m"))
)
)
)
Maybe I'll release all my emacs and Gnus-configs some day in the WWW.
Once again: Thank you!
--
Juhapekka "naula" Tolvanen * http colon slash slash iki dot fi slash juhtolv
"halpojen hoitojen maailma uljas haluaa taistosi latistaa, mielesi
lipeävedellä valkaistuun ruotuunsa, joka on hautausmaa" CMX
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to use Maildir for everything? How to duplicate behaviour of mutt?
2004-09-30 19:32 ` Juhapekka Tolvanen
@ 2004-10-01 8:05 ` Sebastien Kirche
0 siblings, 0 replies; 4+ messages in thread
From: Sebastien Kirche @ 2004-10-01 8:05 UTC (permalink / raw)
Le 30 Sep 2004, Juhapekka Tolvanen a dit :
> I tried first a software called mb2md, but it was really buggy:
>
> http://batleth.sapienti-sat.org/projects/mb2md/
>
> If you know how to fix it, please do it. Meanwhile I can use that script
> called mbox2maildir . I don't remember how I found it.
Did you tried Gnus itself to convert your messages ?
- create a nnmb backend group to access the existing mailbox
- create a nnmaildir backend group where to place the converted mails (maybe
the one you have already)
- mark the messages (M P R RET) in the nnmb group
- move them to the nnmaildir (B m)
Sébastien Kirche
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-10-01 8:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <87ekkrjpzm.fsf@heresy.ainola.jyu.fi>
2004-09-27 14:30 ` How to use Maildir for everything? How to duplicate behaviour of mutt? Paul Jarc
2004-09-27 16:31 ` Juhapekka Tolvanen
[not found] ` <87u0thcwx2.fsf@heresy.ainola.jyu.fi>
[not found] ` <m3zn39b0cg.fsf@multivac.cwru.edu>
[not found] ` <878yatvyoq.fsf@heresy.ainola.jyu.fi>
[not found] ` <85wtycy7ne.fsf@obelix.seki.fr>
[not found] ` <87acv8jprb.fsf@heresy.ainola.jyu.fi>
2004-09-30 19:32 ` Juhapekka Tolvanen
2004-10-01 8:05 ` Sebastien Kirche
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).