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

Re: Problem with sb-rss-hash (bug in luna?)

Katsumi Yamaoka <yamaoka@xxxxxxx> writes:
> This issue was discussed in:
> http://news.gmane.org/group/gmane.emacs.w3m/thread=7974/force_load=t
> But we seem to have no smart solution so far, except for a workaround.
> That is, Arisawa-san provided the `shimbun-rss-initialize-ignored-subject'
> function and modified sb-itmedia.el and sb-opentechpress-jp.el so as to
> use it in the `initialize-instance' method as follows:


Thank you for this information. I'm getting more convinced that this is
a bug in luna, namely in luna-class-find-parents-functions. This
function should return all functions 'service' in all parents of the
class. In our case, we have something like

          /          \
         /            \
      sb-hash       sb-rss
         \           /
          \         /

However, this construction in luna-class-find-parents-functions

    (while (and parents
		 (setq ret (luna-class-find-functions
			    (luna-find-class (pop parents))

will only return the left part of the above graph.

I think the following function will do the right thing:

     (defun luna-class-find-parents-functions (class service)
       (let ((parents (luna-class-parents class))
	 (while parents
	   (dolist (fct (luna-class-find-functions
			 (luna-find-class (pop parents))
	     (unless (member fct ret)
	  (setq ret (append ret (list fct))))))

The question is: Is luna (or the FLIM package, by that matter) still
maintained? If not, maybe shimbun should redefine the above function,
and maybe in the long term one could think about switching to another
OOP package, for example EIEIO from CEDET [1]. This would also
have the benefit that EIEIEO will eventually be included in Emacs,
making installing the shimbun module easier in the future.


[1] http://cedet.sourceforge.net/eieio.shtml