From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68752 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: nnmaildir.el Followup-To: gmane.emacs.devel Date: Sat, 18 Jul 2009 13:13:37 +0200 Message-ID: <87vdlqp7ku.fsf@marauder.physik.uni-ulm.de> References: <831voeqqh9.fsf@gnu.org> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1247915639 21525 80.91.229.12 (18 Jul 2009 11:13:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Jul 2009 11:13:59 +0000 (UTC) Cc: emacs-devel@gnu.org, ding@gnus.org, Paul Jarc To: Eli Zaretskii Original-X-From: ding-owner+M17173@lists.math.uh.edu Sat Jul 18 13:13:52 2009 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 1MS7rU-0005aT-4y for ding-account@gmane.org; Sat, 18 Jul 2009 13:13:52 +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 1MS7rS-00068L-Ft; Sat, 18 Jul 2009 06:13:50 -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 1MS7rQ-00067w-Vo for ding@lists.math.uh.edu; Sat, 18 Jul 2009 06:13:48 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1MS7rO-0001IT-Uq for ding@lists.math.uh.edu; Sat, 18 Jul 2009 06:13:48 -0500 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1MS7rw-0003ek-00 for ; Sat, 18 Jul 2009 13:14:20 +0200 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.10.175]) by mail.uni-ulm.de (8.14.2/8.14.2) with ESMTP id n6IBDer4017788; Sat, 18 Jul 2009 13:13:40 +0200 (MEST) Original-Received: from localhost (localhost [127.0.0.1]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id 6EE6413943; Sat, 18 Jul 2009 13:13:40 +0200 (CEST) X-Face: P05mdcZT&lL[-s2=mw~RsllZ0zZAb?vdE}.s, emacs-devel@gnu.org, ding@gnus.org, Paul Jarc In-Reply-To: <831voeqqh9.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 18 Jul 2009 12:40:02 +0300") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.1 (gnu/linux) X-DCC-Misty-Metrics: poseidon 1170; Body=4 Fuz1=4 Fuz2=4 X-Virus-Scanned: by amavisd-new X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68752 gmane.emacs.devel:112671 Archived-At: --=-=-= On Sat, Jul 18 2009, Eli Zaretskii wrote: > Is nnmaildir.el supposed to work on non-Posix platforms? > > If it is, then it should not unconditionally invoke Unix-only > functions such as unix-sync. Since Maildir (the underlying mail storage format) is not suitable for Windows, nnmaildir.el is Posix-only. CMIIW. - colons in filenames; no specification about replacement charater (BTW, what does Samba do when `:' is used on a share?) nnmaildir.el could avoid hard-coding `:', though. - no atomic rename on Windows - (no hard links on ntfs, at least not for non-administrative users) See . > If it isn't supposed to work on anything but Unix and GNU systems, how > about disabling to load it on others, or at least printing a warning? I think a warning should be sufficient. Maybe even only when calling `unix-sync'. See the attached patch. BTW, when discussing Gnus issues, please cc . Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- nnmaildir.el 19 May 2008 10:47:42 +0200 7.20 +++ nnmaildir.el 18 Jul 2009 13:09:43 +0200 @@ -152,6 +152,12 @@ (gnm nil) ;; flag: split from mail-sources? (target-prefix nil :type string)) ;; symlink target prefix +(defun nnmaildir--sync () + (if (fboundp 'unix-sync) + (unix-sync) ;; no fsync :( + (gnus-message + 1 "nnmaildir: `unix-sync' not supported on this platform."))) + (defun nnmaildir--expired-article (group article) (setf (nnmaildir--art-nov article) nil) (let ((flist (nnmaildir--grp-flist group)) @@ -1293,7 +1299,7 @@ (set-buffer buffer) (gmm-write-region (point-min) (point-max) tmpfile nil 'no-message nil 'excl)) - (unix-sync) ;; no fsync :( + (nnmaildir--sync) ;; no fsync :( (rename-file tmpfile (concat (nnmaildir--cur dir) file suffix) 'replace) t))) @@ -1387,7 +1393,7 @@ (error (gmm-write-region (point-min) (point-max) tmpfile nil 'no-message nil 'excl) - (unix-sync))) ;; no fsync :( + (nnmaildir--sync))) ;; no fsync :( (nnheader-cancel-timer 24h) (condition-case err (add-name-to-file tmpfile curfile) --=-=-=--