From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62153 Path: news.gmane.org!not-for-mail From: Bill Wohler Newsgroups: gmane.mail.mh-e.devel,gmane.emacs.gnus.general Subject: Re: image-load-path/load-path function Date: Sat, 04 Mar 2006 09:55:16 -0800 Organization: Newt Software Message-ID: <5868.1141494916@olgas.newt.com> References: <17903.1141256030@olgas.newt.com> <19737.1141261645@olgas.newt.com> <4021.1141273863@mixed> <12647.1141331413@olgas.newt.com> <18269.1141346992@olgas.newt.com> <9984.1141426021@olgas.newt.com> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1141494977 16437 80.91.229.2 (4 Mar 2006 17:56:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 4 Mar 2006 17:56:17 +0000 (UTC) Original-X-From: mh-e-devel-admin@lists.sourceforge.net Sat Mar 04 18:56:14 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 1FFaz3-0002BO-Sl for gmmd-mh-e-devel@m.gmane.org; Sat, 04 Mar 2006 18:56:03 +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 1C279883A8; Sat, 4 Mar 2006 09:56:01 -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 1FFayU-0004aM-Dp for mh-e-devel@lists.sourceforge.net; Sat, 04 Mar 2006 09:55:26 -0800 Original-Received: from pop-cowbird.atl.sa.earthlink.net ([207.69.195.68]) by mail.sourceforge.net with esmtp (Exim 4.44) id 1FFayO-0001GK-K2 for mh-e-devel@lists.sourceforge.net; Sat, 04 Mar 2006 09:55:26 -0800 Original-Received: from h-64-105-35-154.snvacaid.dynamic.covad.net ([64.105.35.154] helo=olgas.newt.com) by pop-cowbird.atl.sa.earthlink.net with esmtp (Exim 3.36 #10) id 1FFayK-0004gC-00; Sat, 04 Mar 2006 12:55:17 -0500 Original-Received: by olgas.newt.com (Postfix, from userid 1000) id 45CDD1717A; Sat, 4 Mar 2006 09:55:16 -0800 (PST) Original-Received: from olgas.newt.com (localhost [127.0.0.1]) by olgas.newt.com (Postfix) with ESMTP id 423B6170A8; Sat, 4 Mar 2006 09:55:16 -0800 (PST) Original-To: mh-e-devel@lists.sourceforge.net, ding@gnus.org In-reply-to: Comments: In-reply-to Reiner Steib message dated "Sat, 04 Mar 2006 17:27:17 +0100." X-Mailer: MH-E 7.92+cvs; nmh 1.1; GNU Emacs 22.0.50.9 X-Image-URL: http://www.newt.com/wohler/images/bill-diving.png Mail-Followup-To: mh-e-devel@lists.sourceforge.net, ding@gnus.org X-Spam-Score: 1.0 (+) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 1.0 FORGED_RCVD_HELO Received: contains a forged HELO Original-Sender: mh-e-devel-admin@lists.sourceforge.net Errors-To: mh-e-devel-admin@lists.sourceforge.net X-BeenThere: mh-e-devel@lists.sourceforge.net X-Mailman-Version: 2.0.9-sf.net Precedence: bulk List-Unsubscribe: , List-Id: Forum for the MH-E developers List-Post: List-Help: List-Subscribe: , List-Archive: X-Original-Date: Sat, 04 Mar 2006 09:55:16 -0800 Xref: news.gmane.org gmane.mail.mh-e.devel:11851 gmane.emacs.gnus.general:62153 Archived-At: Reiner Steib wrote: > On Fri, Mar 03 2006, Bill Wohler wrote: > > > Here is the same thing as my last patch, [...] > > (BTW, if it's already in Emacs CVS, you don't need to include it > here.) ;-). > > I'm definitely now heavily leaning towards the name > > image-load-path-for-library. Does it work for you too? The "relative" > > variants didn't work for me since you could also pull the directories > > off of load-path or image-load-path. > > Okay with me. Although I'd slightly prefer to emphasize "relative" a > little bit. But maybe adding it to the doc string is sufficient: > > "Return a suitable search path for images relative to LIBRARY. > [...]" OK. > > In an Emacs 22 environment, given the name, you'd expect a modified > > image-load-path, but you get a modified load-path. If the optional > > argument path isn't present, I'd suggest returning a modified > > image-load-path if it exists; else a modified load-path. What do you > > think? > > What if a user shares configuration files between Emacs 21 and 22 and > sets `image-load-path' unconditionally (without a boundp test; I > sometimes don't add test such if I assume that it will be just ignored > in older Emacsen)? The you'll get a bogus `load-path' like... Good thinking. > I think #2 and #3 both are a little problematic. I'm convinced. I'll avoid them and stick with #1. > But maybe we can suggest an example which avoids calling > `image-load-path-for-library' twice: > > (let* ((load-path (image-load-path-for-library "mh-e" "mh-logo.xpm")) > (image-load-path (cons (car load-path) image-load-path))) > ;; do something. Test: > image-load-path) That assumes we guarantee that the image-directory is always first. That appears to be the case now. I think I'd be a little leery about committing to this in case we find out later that we needed to preserve the existing order in the path if the image directory was already in the path. But if we want to commit to this, then I'll add it to the documentation and use this example, otherwise... > > Here is an example that uses a common idiom to provide > > compatibility with versions of Emacs that lack the variable > > `image-load-path': > > > > (let ((load-path > > (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\" 'load-path)) > > I'd omit 'load-path as it is optional. ...I'll do that. Let me know which you prefer. Maybe someone else has a gut feel about this too. My gut tells me to avoid committing more to the API than we have to. Thanks for the great feedback. -- Bill Wohler http://www.newt.com/wohler/ GnuPG ID:610BD9AD Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian! If you're passed on the right, you're in the wrong lane. ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642