all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "A.Politz" <politza@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: using find-image with picture name stored in a variable
Date: Tue, 18 Aug 2009 13:42:07 -0700 (PDT)	[thread overview]
Message-ID: <8b1dce33-641f-4a2b-9c1c-d2323cb8624b@18g2000yqa.googlegroups.com> (raw)
In-Reply-To: mailman.4854.1250627340.2239.help-gnu-emacs@gnu.org

On Aug 18, 10:28 pm, Dirk80 <d...@dirkundsari.de> 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
>
> Thank you for your help.
>
> Greetings,
> Dirk
> --
> View this message in context:http://www.nabble.com/using-find-image-with-picture-name-stored-in-a-...
> Sent from the Emacs - Help mailing list archive at Nabble.com.



       reply	other threads:[~2009-08-18 20:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.4854.1250627340.2239.help-gnu-emacs@gnu.org>
2009-08-18 20:42 ` A.Politz [this message]
2009-08-19  8:58   ` using find-image with picture name stored in a variable Anselm Helbig
2009-08-18 20:28 Dirk80

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8b1dce33-641f-4a2b-9c1c-d2323cb8624b@18g2000yqa.googlegroups.com \
    --to=politza@googlemail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.