From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67362 Path: news.gmane.org!not-for-mail From: Francis Litterio Newsgroups: gmane.emacs.gnus.general Subject: Patch to message.el to allow saving multiple message buffers when Gnus not running Date: Fri, 12 Sep 2008 12:26:37 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1221237005 15816 80.91.229.12 (12 Sep 2008 16:30:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Sep 2008 16:30:05 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M15813@lists.math.uh.edu Fri Sep 12 18:31:00 2008 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1KeBXu-00038m-DU for ding-account@gmane.org; Fri, 12 Sep 2008 18:30:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1KeBVs-0008EK-Lt; Fri, 12 Sep 2008 11:28:52 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1KeBVJ-0008Dc-2L for ding@lists.math.uh.edu; Fri, 12 Sep 2008 11:28:17 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1KeBVD-0004gL-6u for ding@lists.math.uh.edu; Fri, 12 Sep 2008 11:28:17 -0500 Original-Received: from pcls4.std.com ([192.74.137.84] helo=TheWorld.com ident=root) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1KeBVG-0006bv-00 for ; Fri, 12 Sep 2008 18:28:14 +0200 Original-Received: from usenlittefl1c.theworld.com (IDENT:105@shell01.TheWorld.com [192.74.137.71]) by TheWorld.com (8.13.6/8.13.6) with ESMTP id m8CGRYft020807 for ; Fri, 12 Sep 2008 12:27:36 -0400 X-Random-Quote: The trouble with being punctual is that nobody's there to appreciate it. -- Franklin P. Jones X-Spam-Score: -3.6 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:67362 Archived-At: 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)