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