[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: elmo-folder-open-internal-p always returns nil on multi folder



At Mon, 18 Oct 2010 08:42:31 +0900,
Kazuhiro Ito wrote:
>
> Current problems are
>
> 1. elmo-folder-open-internal-p method of elmo-multi.el is obviously
> broken.
>
> > (luna-define-method elmo-folder-open-internal-p ((folder elmo-multi-folder))
> >   (let (open t)
> >     (dolist (fld (elmo-multi-folder-children-internal folder) open)
> >       (setq open (and open (elmo-folder-open-internal-p fld))))))
>
> (let (open t) ...) makes error.  Probably actual error is suppressed
> by condition-case().

Invalid let statement, indeed.  It tries to bind t to nil.  Fixed.

>
> 2. elmo-folder-open-internal-p method of elmo-pop3.el (and
> elmo-shimbun.el) always return t, even when they are not opend yet.
> As a result, elmo-folder-open-internal method of elmo-multi.el never
> call elmo-folder-open-internal method for thier child POP3 (and
> shimbun) folder, even if problem (1) is fixed.
>
> > (luna-define-method elmo-folder-open-internal ((folder elmo-multi-folder))
> >   (dolist (fld (elmo-multi-folder-children-internal folder))
> >     (unless (elmo-folder-open-internal-p fld)
> >       (elmo-folder-open-internal fld))))

This should be fixed now, too.  It's necessary to define the method
explictly for the two classes elmo-pop3-folder and elmo-shimbun-folder
because they are children of elmo-net-folder and elmo-map-folder
class.  Elmo-net-folder is the first parent and this lets the OOP core
call net-folder's `elmo-folder-open-internal-p' method which falls
back to the default, always returning t.

 -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

Attachment: pgpXNyKo0Nazb.pgp
Description: PGP signature