[mew-int 2810] Re: "No message" on (Virtual)

Kazu Yamamoto (山本和彦) <[email protected]>
Newsgroups gmane.mail.mew.general
Message-ID <[email protected]>
Hello,

> Ok, I think I accidently figured out.
> 
> When the remote folder has a space on its name, Mew throws that
> message and do not open any e-mail.
> 
> If the folder's name do not have spaces, it doesn't happen and the
> e-mails open normally.

Please try the following patch. If this patch fix the problem,
I will push this to github.

--Kazu

diff --git a/mew-scan.el b/mew-scan.el
index 5f452ec..54c85d8 100644
--- a/mew-scan.el
+++ b/mew-scan.el
@@ -336,6 +336,12 @@ Address is converted by 'mew-summary-form-extract-addr'. See also
 		str) ;; width may exceed.
 	    (mew-substring str width nil nopad)))))))
 
+(defun mew-sumsym-encode-folder (fld)
+  (mew-replace-character fld ?  ?\t))
+
+(defun mew-sumsym-decode-folder (fld)
+  (mew-replace-character fld ?\t ? ))
+
 (defun mew-scan-get-line (mew-vec mew-inherit-width)
   (let* ((mew-inherit-total 0) (fld "")
 	 (line (mapconcat 'mew-scan-get-piece (mew-sinfo-get-summary-form) ""))
@@ -362,10 +368,11 @@ Address is converted by 'mew-summary-form-extract-addr'. See also
 			 (car irt-list)
 			 ""))))
     (when (mew-virtual-p)
-      (setq fld (or (cdr (assoc (mew-scan-get-folder mew-vec)
-				(mew-vinfo-get-lra)))
-		    ;; Spotlight
-		    (MEW-FLD)))) ;; xxx
+      (setq fld (mew-sumsym-encode-folder
+		 (or (cdr (assoc (mew-scan-get-folder mew-vec)
+				 (mew-vinfo-get-lra)))
+		     ;; Spotlight
+		     (MEW-FLD))))) ;; xxx
     (setq msg (mew-scan-get-message mew-vec))
     (setq uid (or (mew-scan-uid-uid (MEW-UID)) ""))
     (setq siz (or (mew-scan-uid-size (MEW-UID)) ""))
diff --git a/mew-syntax.el b/mew-syntax.el
index 70ec322..6044c11 100644
--- a/mew-syntax.el
+++ b/mew-syntax.el
@@ -386,7 +386,7 @@ system."
   (let ((fn (mew-match-string 1))
 	(bn (buffer-name)))
     (cond
-     ((not (string= fn "")) fn)
+     ((not (string= fn "")) (mew-sumsym-decode-folder fn))
      ((mew-virtual-for-one-summary)
       (mew-vinfo-get-physical-folder))
      (t bn))))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.