+2003-11-22 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-log.el (riece-log-coding-system): New user option.
+ (riece-log-display-message-function): Bind
+ coding-system-for-write; don't create temp buffer.
+
+ * riece-rdcc.el (riece-rdcc-filter): Use write-region instead of
+ append-to-file to suppress "Wrote file" messages.
+
2003-11-10 Daiki Ueno <ueno@unixuser.org>
* Riece: Version 0.1.6 released.
(boolean :tag "flash back or not"))
:group 'riece-log)
+(defcustom riece-log-coding-system nil
+ "*Coding system used for log files."
+ :type 'symbol
+ :group 'riece-log)
+
(defun riece-log-display-message-function (message)
(let ((open-bracket
(funcall riece-message-make-open-bracket-function message))
(funcall riece-message-make-close-bracket-function message))
(name
(funcall riece-message-make-name-function message))
- (file (riece-log-get-file (riece-message-target message))))
+ (file (riece-log-get-file (riece-message-target message)))
+ (coding-system-for-write riece-log-coding-system))
(unless (file-directory-p (file-name-directory file))
(make-directory (file-name-directory file) t))
- (with-temp-buffer
- (insert (concat (format-time-string "%H:%M") " "
- open-bracket name close-bracket
- " " (riece-message-text message) "\n"))
- (write-region (point-min) (point-max) file t 0))))
+ (write-region (concat (format-time-string "%H:%M") " "
+ open-bracket name close-bracket
+ " " (riece-message-text message) "\n")
+ nil file t 0)))
(defun riece-log-get-file (identity)
(expand-file-name
(let ((channel (riece-identity-prefix identity))
(server (riece-identity-server identity))
(map (assoc (riece-format-identity identity) riece-log-directory-map))
- name)
+ name)
(cond (map (setq name (cdr map)))
((string-match riece-channel-regexp channel)
(let ((suffix (match-string 2 channel)))
(insert input)
(let ((coding-system-for-write 'binary)
jka-compr-compression-info-list jam-zcat-filename-list)
- (append-to-file (point-min) (point-max) riece-rdcc-temp-file))
+ (write-region (point-min) (point-max) riece-rdcc-temp-file t 0))
(message "Receiving %s from %s...(%s/%s)"
(file-name-nondirectory riece-rdcc-request-file)
riece-rdcc-request-user