From: teranisi Date: Fri, 31 Aug 2001 11:19:16 +0000 (+0000) Subject: * wl-highlight.el (wl-highlight-summary-current-line): X-Git-Tag: wl-2_7_4~54 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=035f323239fb659aad17e7c111217fa4dd9314cb;p=elisp%2Fwanderlust.git * wl-highlight.el (wl-highlight-summary-current-line): Fixed highlighting refile/copy destination. * wl-acap.el (wl-acap-init): Decode string by wl-acap-coding-system. (wl-acap-store): Encode string by wl-acap-coding-system. * acap.el (acap-open): erase buffer before starting network process. (acap-store): Rewrite. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index b58d0ff..76bdfa1 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2001-08-31 Yuuichi Teranishi + + * acap.el (acap-open): erase buffer before starting network process. + (acap-store): Rewrite. + 2001-08-29 Yuuichi Teranishi * elmo-imap4.el (elmo-imap4-default-mailbox, diff --git a/elmo/acap.el b/elmo/acap.el index 448c534..54a87ba 100644 --- a/elmo/acap.el +++ b/elmo/acap.el @@ -212,11 +212,11 @@ Valid states are `closed', `initial', `auth'.") (buffer (get-buffer-create (concat " *acap on " user " at " server))) process passphrase mechanism tag) (with-current-buffer buffer + (erase-buffer) (if acap-process (delete-process acap-process)) (setq process (acap-network-stream-open buffer server port type) acap-process process) - (erase-buffer) (set-buffer-multibyte nil) (buffer-disable-undo) (setq acap-state 'initial) @@ -350,7 +350,42 @@ Examples: (defun acap-store (process entries) "Execute STORE command on PROCESS. ENTRIES is a store-entry list." - (acap-send-command-wait process (concat "STORE " (prin1-to-string entries)))) + (with-temp-buffer + ;; As far as I know, current implementation of ACAP server + ;; (cyrus-smlacapd 0.5) does not accept literal argument for STORE. + ;; If literal argument is available, command arguments can be sent using + ;; function `acap-send-command-wait'. + (set-buffer-multibyte nil) + (insert "STORE (") + (let (beg tag) + (while entries + (cond + ((stringp (car entries)) + (setq beg (point)) + (insert (car entries)) + (goto-char beg) + (while (re-search-forward "\\\\" nil t) + (replace-match "\\\\\\\\")) + (goto-char beg) + (while (re-search-forward "\"" nil t) + (replace-match "\\\\\"")) + (goto-char beg) + (insert "\"") + (goto-char (point-max)) + (insert "\"")) + ((symbolp (car entries)) + (insert (prin1-to-string (car entries))))) + (if (cdr entries)(insert " ")) + (setq entries (cdr entries))) + (insert ")") + (goto-char (point-min)) + (insert (with-current-buffer (process-buffer process) + (number-to-string (setq tag (setq acap-tag (1+ acap-tag))))) + " ") + (process-send-region process (point-min) (point-max)) + (acap-debug (concat (buffer-string) acap-client-eol)) + (process-send-string process acap-client-eol) + (acap-wait-for-response process tag)))) (defun acap-deletedsince (process name time) "Execute DELETEDSINCE command on PROCESS." diff --git a/wl/ChangeLog b/wl/ChangeLog index 9200996..c3a184c 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,11 @@ +2001-08-31 Yuuichi Teranishi + + * wl-highlight.el (wl-highlight-summary-current-line): + Fixed highlighting refile/copy destination. + + * wl-acap.el (wl-acap-init): Decode string by wl-acap-coding-system. + (wl-acap-store): Encode string by wl-acap-coding-system. + 2001-08-30 Yuuichi Teranishi * wl-acap.el (toplevel): Check and require 'un-define before diff --git a/wl/wl-acap.el b/wl/wl-acap.el index 34cb102..28a8d7b 100644 --- a/wl/wl-acap.el +++ b/wl/wl-acap.el @@ -138,14 +138,22 @@ If nil, default acap port is used." (memq 'string type))) (if (memq sym wl-acap-base64-encode-options) (wl-acap-base64-decode-string (cadr x)) - (cadr x))) + (decode-coding-string + (cadr x) + wl-acap-coding-system))) (t (if (cadr x) (read (if (memq sym wl-acap-base64-encode-options) (wl-acap-base64-decode-string (cadr x)) - (read (concat "\"" (cadr x) "\"")))))))))) + (read (concat + "\"" + (decode-coding-string + (cadr x) + wl-acap-coding-system) + "\"")) + )))))))) (t 'wl-acap-ignored)))) settings))) ;; Setup options. @@ -261,11 +269,15 @@ If nil, default acap port is used." (if (memq option wl-acap-base64-encode-options) (wl-acap-base64-encode-string (symbol-value option)) - (symbol-value option))) + (encode-coding-string + (symbol-value option) + wl-acap-coding-system))) (t (if (memq option wl-acap-base64-encode-options) (wl-acap-base64-encode-string (prin1-to-string (symbol-value option))) - (prin1-to-string (symbol-value option)))))) + (encode-coding-string + (prin1-to-string (symbol-value option)) + wl-acap-coding-system))))) settings))) (unwind-protect (progn diff --git a/wl/wl-highlight.el b/wl/wl-highlight.el index 5a1654c..f29b869 100644 --- a/wl/wl-highlight.el +++ b/wl/wl-highlight.el @@ -824,7 +824,7 @@ "\\(.\\)\\(.\\)../..\(.*\)..:.. \\(" wl-highlight-thread-indent-string-regexp "\\)[[<]")) - fregexp fsymbol bol eol matched thread-top looked-at) + fregexp fsymbol bol eol matched thread-top looked-at dest ds) (end-of-line) (setq eol (point)) (beginning-of-line) @@ -847,9 +847,11 @@ ((string= temp-mark "D") (setq fsymbol 'wl-highlight-summary-deleted-face)) ((string= temp-mark "O") - (setq fsymbol 'wl-highlight-summary-copied-face)) + (setq fsymbol 'wl-highlight-summary-copied-face + dest t)) ((string= temp-mark "o") - (setq fsymbol 'wl-highlight-summary-refiled-face))))) + (setq fsymbol 'wl-highlight-summary-refiled-face + dest t))))) (if (not fsymbol) (cond ((and (string= temp-mark "+") @@ -882,6 +884,15 @@ (setq fsymbol 'wl-highlight-summary-thread-top-face) (setq fsymbol 'wl-highlight-summary-normal-face))))) (put-text-property bol eol 'face fsymbol) + (when dest + (put-text-property (next-single-property-change + (next-single-property-change + bol 'wl-summary-destination + nil eol) + 'wl-summary-destination nil eol) + eol + 'face + 'wl-highlight-refile-destination-face)) (if wl-use-highlight-mouse-line (put-text-property bol ;;; Use bol instead of (1- (match-end 0))