[1.4i PATCH] current mailbox as default outbox
Hi,
one of my needs is to follow my own mails in a thread.
Using many mboxes, I have to save the outgoing message in the mbox where
I answered a mail.
patch-1.3.23.bj.current_shortcut.1 couldn't work for me (?)
(using ^ as current mbox shortcut in a fcc-hook)
So I wrote the following one activating the feature with a muttrc
variable: save_current
BTW,
- I used diff -pruN,
is there a better way ?
- what is a patch level number ?
any suggestion welcome.
thx
--
richard hitier
diff -pruN mutt-1.4.orig/PATCHES mutt-1.4/PATCHES
--- mutt-1.4.orig/PATCHES Mon Dec 1 22:05:14 2003
+++ mutt-1.4/PATCHES Mon Dec 1 22:55:25 2003
@@ -0,0 +1 @@
+patch-1.4i.rhi.current_rcvar.1
diff -pruN mutt-1.4.orig/hook.c mutt-1.4/hook.c
--- mutt-1.4.orig/hook.c Mon Dec 1 22:05:13 2003
+++ mutt-1.4/hook.c Mon Dec 1 22:55:25 2003
@@ -412,6 +412,10 @@ void mutt_select_fcc (char *path, size_t
if (!option (OPTFORCENAME) && mx_access (path, W_OK) != 0)
strfcpy (path, NONULL (Outbox), pathlen);
}
+ else if ( Context && option (OPTSAVECURRENT) )
+ {
+ strfcpy (path, Context->path, pathlen);
+ }
else
strfcpy (path, NONULL (Outbox), pathlen);
}
diff -pruN mutt-1.4.orig/init.h mutt-1.4/init.h
--- mutt-1.4.orig/init.h Mon Dec 1 22:05:13 2003
+++ mutt-1.4/init.h Mon Dec 1 22:55:25 2003
@@ -1877,6 +1877,14 @@ struct option_t MuttVars[] = {
** .pp
** Also see the ``$$force_name'' variable.
*/
+ { "save_current", DT_BOOL, R_NONE, OPTSAVECURRENT, 0 },
+ /*
+ ** .pp
+ ** This variable controls whether or not to use current mailbox
+ ** to receive the outgoing messages.
+ ** Notice that ``$$save_name'', ``$$force_name'', ``$fcc-save-hook''
+ ** and ``$fcc-hook'' will override this. Also see ``$$record''.
+ */
{ "score", DT_BOOL, R_NONE, OPTSCORE, 1 },
/*
** .pp
diff -pruN mutt-1.4.orig/mutt.h mutt-1.4/mutt.h
--- mutt-1.4.orig/mutt.h Mon Dec 1 22:52:45 2003
+++ mutt-1.4/mutt.h Mon Dec 1 22:55:25 2003
@@ -387,6 +387,7 @@ enum
OPTSAVEADDRESS,
OPTSAVEEMPTY,
OPTSAVENAME,
+ OPTSAVECURRENT,
OPTSCORE,
OPTSIGDASHES,
OPTSIGONTOP,