From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62054 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.mail.mh-e.devel,gmane.emacs.gnus.general Subject: Re: Sharing mail icons between MH-E and Gnus Date: Tue, 21 Feb 2006 22:22:35 +0100 Message-ID: References: <28928.1129483226@olgas.newt.com> <30678.1129563148@olgas.newt.com> <16231.1140316818@olgas.newt.com> <6909.1140475990@olgas.newt.com> Reply-To: Reiner Steib NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1140557010 4443 80.91.229.2 (21 Feb 2006 21:23:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 21 Feb 2006 21:23:30 +0000 (UTC) Cc: ding@gnus.org Original-X-From: mh-e-devel-admin@lists.sourceforge.net Tue Feb 21 22:23:23 2006 Return-path: Envelope-to: gmmd-mh-e-devel@m.gmane.org Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FBeyV-0001XJ-8S for gmmd-mh-e-devel@m.gmane.org; Tue, 21 Feb 2006 22:23:11 +0100 Original-Received: from sc8-sf-list1-b.sourceforge.net (sc8-sf-list1-b.sourceforge.net [10.3.1.7]) by sc8-sf-spam1.sourceforge.net (Postfix) with ESMTP id 81823895AE; Tue, 21 Feb 2006 13:23:10 -0800 (PST) Original-Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30) id 1FBey4-00048K-Bc for mh-e-devel@lists.sourceforge.net; Tue, 21 Feb 2006 13:22:44 -0800 Original-Received: from mail.uni-ulm.de ([134.60.1.1]) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1FBey2-0007ia-JV for mh-e-devel@lists.sourceforge.net; Tue, 21 Feb 2006 13:22:44 -0800 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.10.123]) by mail.uni-ulm.de (8.13.4/8.13.4) with ESMTP id k1LLMZNS027365; Tue, 21 Feb 2006 22:22:36 +0100 (MET) Original-Received: by bridgekeeper.physik.uni-ulm.de (Postfix, from userid 170) id C51EA112E9; Tue, 21 Feb 2006 22:22:35 +0100 (CET) Original-To: mh-e-devel@lists.sourceforge.net Mail-Followup-To: mh-e-devel@lists.sourceforge.net, ding@gnus.org X-Face: 3Phac&+dw=IZHjhua]bp}LH<*p{qzj8u+ It's also conceivable that using a temporary load-path/image-load-path > might invalidate image caching schemes. AFAICS, `image.el' stores the full path. See above. > And what if the user adds his own images to image-load-path (if he > defined a theme, if you will) and expects to see his images rather than > yours? Since you didn't leave your path on the image-load-path, he would > be confused since he wouldn't see where they came from. I though that the variable `gmm-image-load-path' (or mh-image-load-path) is intended for this. BTW, if you/we call it *-path it should be a list (else: *-directory). > Hmmm, this argues that we would want prepend the default Emacs path > (since a newer Gnus/MH-E package might have newer images than the one > distributed with an old version of Emacs) and append to any user-defined > paths (since the user is always right). Is that possible? - We (or `image.el') could use an additional `*-user-image-load-path' and always prepend this. - We could check if `image-load-path' has it's default value... Hm stop... `image-load-path' isn't customizable. I've suggested a patch to do this in September 2005 on emacs-devel: . There was neither positive or negative feedback. > At any rate, since we're coordinating now, those icons will probably be > the same anyway, so I don't think that this will be much of a problem. (Gnus and MH-E were just examples here.) >> (defmacro gmm-defun-compat (name function arg-list &rest body) > > We've borrowed so much from Gnus, I'd be tickled pink if Gnus borrowed > from MH-E ;-). :-) >> (defun gmm-image-load-path (library &optional image path) > > For the generalized function, we might want to make IMAGE non-optional > so that we don't have MH-E and Gnus icons in the code. ACK. That was just for my laziness. >> ;; Return augmented `image-load-path' or `load-path'. >> (cond ((and path (symbolp path)) >> (nconc (list gmm-image-load-path) (symbol-value path))) >> (t >> (nconc (list gmm-image-load-path) load-path)))) > > Now it's my turn not to like the code ;-). This doesn't use > image-load-path if it exists. You need to use (gmm-image-load-path "message" nil 'image-load-path) for this as I did the example in my previous article: (let ((load-path (gmm-image-load-path "message" nil 'load-path)) (image-load-path (gmm-image-load-path "message" nil 'image-load-path))) (gmm-tool-bar-from-list message-tool-bar message-tool-bar-zap-list 'message-mode-map)) > It can add the image directory even if it already exists on path. A minor issue, I think. But the following should remove the duplicates: ;; Return augmented `image-load-path' or `load-path'. (cond ((and path (symbolp path)) (nconc (list gmm-image-load-path) (delete gmm-image-load-path (if (boundp path) (symbol-value path) nil)))) (t (nconc (list gmm-image-load-path) (delete gmm-image-load-path load-path))))) Without "(boundp path)" it won't work in Emacs 21. I didn't test this yesterday. > I guess the big question is whether to modify image-load-path > (load-path) or not. It would be good for a few others to weigh in. It > would be good to solicit opinions from the folks on emacs-devel too. > I'll do that. I've just checked in `gmm-image-load-path' in `gmm-utils.el' (Gnus trunk) marked with a "Subject to change" warning. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642