* wl-highlight.el (wl-highlight-summary-current-line):
authorteranisi <teranisi>
Fri, 31 Aug 2001 11:19:16 +0000 (11:19 +0000)
committerteranisi <teranisi>
Fri, 31 Aug 2001 11:19:16 +0000 (11:19 +0000)
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.

elmo/ChangeLog
elmo/acap.el
wl/ChangeLog
wl/wl-acap.el
wl/wl-highlight.el

index b58d0ff..76bdfa1 100644 (file)
@@ -1,3 +1,8 @@
+2001-08-31  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * acap.el (acap-open): erase buffer before starting network process.
+       (acap-store): Rewrite.
+
 2001-08-29  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * elmo-imap4.el (elmo-imap4-default-mailbox,
index 448c534..54a87ba 100644 (file)
@@ -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."
index 9200996..c3a184c 100644 (file)
@@ -1,3 +1,11 @@
+2001-08-31  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * 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  <teranisi@gohome.org>
 
        * wl-acap.el (toplevel): Check and require 'un-define before
index 34cb102..28a8d7b 100644 (file)
@@ -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
index 5a1654c..f29b869 100644 (file)
                    "\\(.\\)\\(.\\)../..\(.*\)..:.. \\("
                    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)
           ((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 "+")
                  (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))