From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Hattuari Newsgroups: gmane.emacs.help Subject: Re: What is the type of user input? Date: Fri, 29 Oct 2004 01:54:36 -0400 Organization: Asii Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <2uaf6cF28g520U1@uni-berlin.de> <2uclntF28kv0vU1@uni-berlin.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit X-Trace: sea.gmane.org 1099029744 18637 80.91.229.6 (29 Oct 2004 06:02:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Oct 2004 06:02:24 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 29 08:02:14 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CNPq2-0005HR-00 for ; Fri, 29 Oct 2004 08:02:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CNPxs-0005Iu-DF for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Oct 2004 02:10:20 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Fri, 29 Oct 2004 00:56:47 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: KNode/0.8.1 Original-Lines: 69 Original-NNTP-Posting-Host: 66.92.149.152 Original-X-Trace: sv3-XytbDd+EFaAzGlz3GvhvTJzE7avAD2YTdi/bdzrngnUg8ptxnogvQhnXRv5pcfaMfoQJWZ+q8QrGW18!CNJL2fOnkdoHSlAcKPXCVhYUVa2FvDhVDC1Kndb8Q26zrS9DftH28PSmc58lLjkEbXC4xWHBvrPg!JPtvvARkev6PUMEFK68= Original-X-Complaints-To: abuse@speakeasy.net X-DMCA-Complaints-To: abuse@speakeasy.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.20 Original-Xref: shelby.stanford.edu gnu.emacs.help:126191 Original-To: help-gnu-emacs@gnu.org 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:21571 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:21571 Kevin Rodgers wrote: > Hattuari wrote: > > Kevin Rodgers wrote: > >>gl-type is a string. Since the paste-gl-type-map property list is > >>keyed by symbols, plist-get returns nil. > > > > That's what I was missing. I was assuming that 'symbol-name implicitly > > meant symbol would evaluate to a string. Now that I've read the first > > several chapters of the Elisp Reference Manual, I have a better idea of > > what's going on. > > 'foo is equivalent to (quote foo), which is the symbol whose name is > "foo". That's what the book says. > > I opted for trying an association array, which also worked. > > I assume you mean association list. Yes. I'm accustomed to thinking in terms of associative arrays, and I guess force of habit got the better of me. > But whether you have a (KEY-1 > VALUE-1 ... KEY-N VALUE-N) property list where they keys are by > definition symbols or a ((KEY-1 . VALUE-1) ... (KEY-N . VALUE-N)) alist > where the keys can be arbitrary lisp objects, Actually, according to the documentation the key can be ,----[ §8.4 Property Lists ] | The property names and values in a property list can be any Lisp | objects, but the names are usually symbols. `---- > you still have to make > sure that you pass a key of the correct type to plist-get or assoc, > respectively. In the case of plists I guess that's a direct consequence of the requirement that the key used for lookup has to be the actual object used as the key in the plist. > > I will try your suggestion of using (intern gl-type). As for reading > > gl-type with %S, I'm not sure what that would do for me. The only use > > I know for that is to use it in a string format. > > Oops, I meant S. (You used s in the interactive spec to read gl-type as > a string; using S would bind gl-type to the intern'ed symbol.) Can you provide a reference in the documentation where this use of 'S' is described? The only places I'm aware of where 'S' is used as a means of handling data associated with interactive forms is in formatting strings. > > That doesn't tell me anything that I see as addressing my problem. > Can you > > explain how that answers my question as to why the two symbols were not > > comparing as I had expected? > > You assumed that since the symbol and the string looked the same when > displayed in the echo area by (message "%s" ...), that they were > actually the same. No. What I assumed is that a quoted symbol would evaluate to a string when looking for keys in a plist. -- p->m == (*p).m == p[0].m