From: Michael Piotrowski <mxp@dynalabs.de>
Subject: nnmaildir and XEmacs
Date: Mon, 09 Oct 2006 16:28:43 +0200 [thread overview]
Message-ID: <x6k639sgv8.fsf@dynalabs.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 610 bytes --]
Hi,
I recently noticed that nnmaildir.el contains Emacs-specific code,
namely calls to `write-region' where the seventh argument is used with
the semantics of "mustbenew", e.g.:
(write-region (point-min) (point-max) file nil 'no-message nil 'excl)
On XEmacs however, the seventh argument is "coding-system".
Consequently, a call as above results in the error message "No such
coding system: excl" on XEmacs.
Attached is a patch which fixes the problem for me.
Greetings
--
Michael Piotrowski, M.A. <mxp@dynalabs.de>
Public key at <http://www.dynalabs.de/mxp/pubkey.txt>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Make nnmaildir.el work on XEmacs --]
[-- Type: text/x-patch, Size: 2475 bytes --]
Index: nnmaildir.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnmaildir.el,v
retrieving revision 7.11
diff -C2 -r7.11 nnmaildir.el
*** nnmaildir.el 5 Jul 2005 22:34:47 -0000 7.11
--- nnmaildir.el 8 Oct 2006 22:18:33 -0000
***************
*** 115,118 ****
--- 115,126 ----
(defmacro nnmaildir--nov-set-mtime (nov value) `(aset ,nov 3 ,value))
(defmacro nnmaildir--nov-set-extra (nov value) `(aset ,nov 4 ,value))
+ (defun nnmaildir--write-region (start end file &optional append visit
+ lockname)
+ (if (featurep 'xemacs)
+ (if (file-exists-p file)
+ (signal 'file-already-exists
+ (list "File exists" file))
+ (write-region start end file append visit lockname))
+ (write-region start end file append visit lockname 'excl)))
(defstruct nnmaildir--art
***************
*** 482,486 ****
(setq file (concat novfile ":"))
(nnmaildir--unlink file)
! (write-region (point-min) (point-max) file nil 'no-message nil 'excl))
(rename-file file novfile 'replace)
(setf (nnmaildir--art-msgid article) msgid)
--- 490,495 ----
(setq file (concat novfile ":"))
(nnmaildir--unlink file)
! (nnmaildir--write-region (point-min) (point-max) file nil
! 'no-message nil))
(rename-file file novfile 'replace)
(setf (nnmaildir--art-msgid article) msgid)
***************
*** 1299,1304 ****
(save-excursion
(set-buffer buffer)
! (write-region (point-min) (point-max) tmpfile nil 'no-message nil
! 'excl))
(unix-sync) ;; no fsync :(
(rename-file tmpfile (concat (nnmaildir--cur dir) file suffix) 'replace)
--- 1308,1313 ----
(save-excursion
(set-buffer buffer)
! (nnmaildir--write-region (point-min) (point-max) tmpfile nil
! 'no-message nil))
(unix-sync) ;; no fsync :(
(rename-file tmpfile (concat (nnmaildir--cur dir) file suffix) 'replace)
***************
*** 1393,1398 ****
(condition-case nil (add-name-to-file nnmaildir--file tmpfile)
(error
! (write-region (point-min) (point-max) tmpfile nil 'no-message nil
! 'excl)
(unix-sync))) ;; no fsync :(
(nnheader-cancel-timer 24h)
--- 1402,1407 ----
(condition-case nil (add-name-to-file nnmaildir--file tmpfile)
(error
! (nnmaildir--write-region (point-min) (point-max) tmpfile nil
! 'no-message nil)
(unix-sync))) ;; no fsync :(
(nnheader-cancel-timer 24h)
next reply other threads:[~2006-10-09 14:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-09 14:28 Michael Piotrowski [this message]
2006-10-10 21:53 ` Reiner Steib
2006-10-11 2:19 ` Katsumi Yamaoka
2006-10-11 3:49 ` Katsumi Yamaoka
2006-10-11 8:09 ` Reiner Steib
2006-10-11 12:13 ` Katsumi Yamaoka
2006-10-18 9:03 ` Michael Piotrowski
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=x6k639sgv8.fsf@dynalabs.de \
--to=mxp@dynalabs.de \
/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).