From: Reiner Steib <reinersteib+gmane@imap.cc>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org, ding@gnus.org, Paul Jarc <prj@po.cwru.edu>
Subject: Re: nnmaildir.el
Date: Sat, 18 Jul 2009 13:13:37 +0200 [thread overview]
Message-ID: <87vdlqp7ku.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <831voeqqh9.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 18 Jul 2009 12:40:02 +0300")
[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]
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 <http://en.wikipedia.org/wiki/Maildir#Windows_software>.
> 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 <ding@gnus.org>.
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1169 bytes --]
--- 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)
parent reply other threads:[~2009-07-18 11:13 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <831voeqqh9.fsf@gnu.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vdlqp7ku.fsf@marauder.physik.uni-ulm.de \
--to=reinersteib+gmane@imap.cc \
--cc=Reiner.Steib@gmx.de \
--cc=ding@gnus.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=prj@po.cwru.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).