From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anselm Helbig Newsgroups: gmane.emacs.help Subject: Re: using find-image with picture name stored in a variable Date: Wed, 19 Aug 2009 10:58:32 +0200 Organization: Freie Universitaet Berlin Message-ID: <871vn85gef.wl%anselm.helbig@gmx.de> References: <8b1dce33-641f-4a2b-9c1c-d2323cb8624b@18g2000yqa.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1250675142 24219 80.91.229.12 (19 Aug 2009 09:45:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Aug 2009 09:45:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 19 11:45:36 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mdhjb-0002Hy-4z for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Aug 2009 11:45:35 +0200 Original-Received: from localhost ([127.0.0.1]:49358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mdhja-00049l-FU for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Aug 2009 05:45:34 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-X-Trace: news.uni-berlin.de TqzxNensG35fqJSn8Mzsrwifuzw8ddavc7Ab7AL19n7YXCOK+oCILXMKxG Cancel-Lock: sha1:8oGwFX6yD7MW/by4q8HG379LnH4= In-Reply-To: <8b1dce33-641f-4a2b-9c1c-d2323cb8624b@18g2000yqa.googlegroups.com> Mail-Followup-To: anselm.helbig+news2009@googlemail.com Original-Xref: news.stanford.edu gnu.emacs.help:172094 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67264 Archived-At: At Tue, 18 Aug 2009 13:42:07 -0700 (PDT), "A.Politz" wrote: > > On Aug 18, 10:28 pm, Dirk80 wrote: > > Hello, > > > > when I give the name of a picture as a string to the find-image command then > > it is working. But when I use a variable instead then find-image is not > > finding the picture. What am I doing wrong? > > > > ;; picture test.jpg is in my home directory > > (add-to-list 'image-load-path "~") > > > > ;; working > > (find-image `((:type jpeg :file "./test.jpg"))) > > > > ;; NOT working > > (setq my-picture "./test.jpg") > > (find-image `((:type jpeg :file my-picture))) > > You are missing a comma, or more likely don't understand quoting. > > (find-image `((:type jpeg :file ,my-picture))) > > (info "(elisp)Backquote") > (info "(elisp)Quoting") > > -ap Maybe it's easier to understand what's going on when you write it this way: (find-image (list (list :type 'jpeg :file my-picture))) HTH, Anselm -- Anselm Helbig mailto:anselm.helbig+news2009@googlemail.com