From: David Kastrup <dak@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: convert strings to symbol
Date: Mon, 16 Jun 2008 16:48:00 +0200 [thread overview]
Message-ID: <85tzfte8rj.fsf@lola.goethe.zz> (raw)
In-Reply-To: mailman.13394.1213625735.18990.help-gnu-emacs@gnu.org
Andreas Röhler <andreas.roehler@online.de> writes:
> Am Montag, 16. Juni 2008 schrieb alruccaba@justmail.de:
>> Does someone have an idea how to convert a string object to a symbol?
>> One purpose would be some kind of variable substitution :
>>
>> (setq y "z")
>> (setq x "y")
>> (print ..? x ....) -> "z"
>>
>> Thanks in advance.
>
> make-symbol (?)
>
> (setq a (make-symbol "eins"))
> a => eins
No, that is entirely useless since it creates a new symbol that has only
the print name "eins" but is not accessible via its name.
He wants something like
(print (symbol-value (intern x)))
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
next prev parent reply other threads:[~2008-06-16 14:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-16 13:03 convert strings to symbol alruccaba
2008-06-16 13:17 ` Nicholas Sandow
2008-06-16 13:27 ` David Hansen
2008-06-16 14:16 ` Andreas Röhler
[not found] ` <mailman.13394.1213625735.18990.help-gnu-emacs@gnu.org>
2008-06-16 14:48 ` David Kastrup [this message]
2008-06-16 16:48 ` Andreas Röhler
[not found] ` <mailman.13405.1213634862.18990.help-gnu-emacs@gnu.org>
2008-06-16 17:12 ` David Kastrup
2008-06-20 14:25 ` Andreas Röhler
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=85tzfte8rj.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--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.