* Patch to message.el to allow saving multiple message buffers when Gnus not running
@ 2008-09-06 17:58 Francis Litterio
2008-09-12 14:28 ` Francis Litterio
0 siblings, 1 reply; 3+ messages in thread
From: Francis Litterio @ 2008-09-06 17:58 UTC (permalink / raw
To: emacs-devel
In Gnus in CVS Emacs, function message-set-auto-save-file-name (in
message.el) arranges for all message composition buffers to be saved to
the same disk file when Gnus has not been started. If two messages are
being composed at the same time, both will be saved to the same file.
This is at odds with how the same function saves multiple drafts of
outgoing messages in the drafts folder when Gnus has been started. The
below patch fixes this by changing message-set-auto-save-file to append
a unique timestamp to the name of the disk file for the message
composition buffer.
I hope this helps.
--
Francis Litterio
--- message.el~ 2008-09-03 12:14:37.000000000 -0400
+++ message.el 2008-09-06 13:29:49.912406400 -0400
@@ -6286,13 +6286,22 @@
(if (gnus-alive-p)
(setq message-draft-article
(nndraft-request-associate-buffer "drafts"))
+
+ ;; If Gnus were alive, draft messages would be saved in the drafts folder.
+ ;; But Gnus is not alive, so arrange to save the draft message in a
+ ;; regular file in message-auto-save-directory. Append a unique
+ ;; time-based suffix to the filename to allow multiple drafts to be saved
+ ;; simultaneously without overwriting each other (which mimics the
+ ;; functionality of the Gnus drafts folder).
(setq buffer-file-name (expand-file-name
+ (concat
(if (memq system-type
'(ms-dos ms-windows windows-nt
cygwin cygwin32 win32 w32
mswindows))
"message"
"*message*")
+ (format-time-string "-%Y%m%d-%H%M%S"))
message-auto-save-directory))
(setq buffer-auto-save-file-name (make-auto-save-file-name)))
(clear-visited-file-modtime)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Patch to message.el to allow saving multiple message buffers when Gnus not running
2008-09-06 17:58 Patch to message.el to allow saving multiple message buffers when Gnus not running Francis Litterio
@ 2008-09-12 14:28 ` Francis Litterio
2008-09-12 16:13 ` Ted Zlatanov
0 siblings, 1 reply; 3+ messages in thread
From: Francis Litterio @ 2008-09-12 14:28 UTC (permalink / raw
To: emacs-devel
I wrote:
> In Gnus in CVS Emacs, function message-set-auto-save-file-name (in
> message.el) arranges for all message composition buffers to be saved to
> the same disk file when Gnus has not been started. If two messages are
> being composed at the same time, both will be saved to the same file.
> --- message.el~ 2008-09-03 12:14:37.000000000 -0400
> +++ message.el 2008-09-06 13:29:49.912406400 -0400
> @@ -6286,13 +6286,22 @@
[...]
Was this patch accepted? If not, could someone comment on the
deficiencies that prevented it from being accepted, so I can try to
improve it?
Thanks.
--
Fran
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Patch to message.el to allow saving multiple message buffers when Gnus not running
2008-09-12 14:28 ` Francis Litterio
@ 2008-09-12 16:13 ` Ted Zlatanov
0 siblings, 0 replies; 3+ messages in thread
From: Ted Zlatanov @ 2008-09-12 16:13 UTC (permalink / raw
To: emacs-devel
On Fri, 12 Sep 2008 10:28:30 -0400 Francis Litterio <flitterio@gmail.com> wrote:
FL> I wrote:
>> In Gnus in CVS Emacs, function message-set-auto-save-file-name (in
>> message.el) arranges for all message composition buffers to be saved to
>> the same disk file when Gnus has not been started. If two messages are
>> being composed at the same time, both will be saved to the same file.
>> --- message.el~ 2008-09-03 12:14:37.000000000 -0400
>> +++ message.el 2008-09-06 13:29:49.912406400 -0400
>> @@ -6286,13 +6286,22 @@
FL> [...]
FL> Was this patch accepted? If not, could someone comment on the
FL> deficiencies that prevented it from being accepted, so I can try to
FL> improve it?
I saw no problems with it, but didn't have the time to look it over in
detail or commit it. Can you resend to the Gnus mailing list
<ding@gnus.org> please? If no one else does, I'll get to it over the
weekend.
Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-12 16:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-06 17:58 Patch to message.el to allow saving multiple message buffers when Gnus not running Francis Litterio
2008-09-12 14:28 ` Francis Litterio
2008-09-12 16:13 ` Ted Zlatanov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.