From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: obarray Date: Tue, 17 Dec 2013 02:47:17 +0100 Message-ID: <87mwk0meoq.fsf@web.de> References: <87haabq6gl.fsf@nl106-137-194.student.uu.se> <87bo0irj13.fsf@nl106-137-194.student.uu.se> <87wqj6pva0.fsf@nl106-137-194.student.uu.se> <87txeaxb4l.fsf@nl106-137-194.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1387244891 19586 80.91.229.3 (17 Dec 2013 01:48:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Dec 2013 01:48:11 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 17 02:48:17 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vsjlg-0002bl-KR for geh-help-gnu-emacs@m.gmane.org; Tue, 17 Dec 2013 02:48:16 +0100 Original-Received: from localhost ([::1]:59276 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vsjlc-0004sN-Sm for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Dec 2013 20:48:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vsjl8-0004Pz-Lz for help-gnu-emacs@gnu.org; Mon, 16 Dec 2013 20:47:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vsjl1-0001xH-6S for help-gnu-emacs@gnu.org; Mon, 16 Dec 2013 20:47:42 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:32973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vsjl0-0001vU-Vi for help-gnu-emacs@gnu.org; Mon, 16 Dec 2013 20:47:35 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Vsjkx-00022H-Tl for help-gnu-emacs@gnu.org; Tue, 17 Dec 2013 02:47:31 +0100 Original-Received: from ip-90-186-227-169.web.vodafone.de ([90.186.227.169]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Dec 2013 02:47:31 +0100 Original-Received: from michael_heerdegen by ip-90-186-227-169.web.vodafone.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Dec 2013 02:47:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip-90-186-227-169.web.vodafone.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:PTdTBa4OQhZsZXtfHRDdex5AxsQ= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95029 Archived-At: Barry Margolin writes: > > Is there a way to confirm this? How can I access a > > symbol's value, if the symbol isn't in the obarray? If > > it isn't in the obarray, where is it? Is there a buffer > > and/or "scope" (i.e. form or process) local/temporary > > object array or anything of the like? No. They are just existing in memory, and will not be garage collected, as long as they can be referenced from Lisp. There is also no array of all existing strings, of all window configurations, etc. So you can't tell Lisp to give you a complete list of all currently existing strings, window configurations, or (uninterned) symbols. There is just no need to organize those objects in a user visible structure. OTOH, an uninterned symbol can be used like any other symbol: it can be set, used to hold a function, etc. > You can access it the same way you can access the contents of arrays and > lists -- by getting to it from some other variable (or cons cell or > array element) that references it. That's what the variable > uninterned-symbol is for. > > (symbol-value uninterned-symbol) => bar Of course, this is not very useful, it was just a demonstration, not a realistic use case. When using uninterned symbols in macros, you can "paste" these symbols in the expansion code which will be evaluated at run-time. So, programs _can_ contain uninterned symbols; you can really _use_ uninterned symbols in code. Not in code read from a file or buffer, but in code generated by macros. This way, you avoid that you accidentally use a symbol that is already "in use" (e.g. in the code the macro transforms). Regards, Michael.