From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Parser - which values are possible for `archivedp'? Date: Tue, 04 Mar 2014 15:47:05 +0100 Message-ID: <87a9d6koly.fsf@gmail.com> References: <87ha7ekq0k.fsf@gmail.com> <87ha7edoag.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKqc3-0007D5-7L for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 09:46:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKqbv-0002MQ-S6 for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 09:46:31 -0500 Received: from plane.gmane.org ([80.91.229.3]:32838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKqbv-0002ME-L6 for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 09:46:23 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WKqbt-0000KH-1v for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 15:46:21 +0100 Received: from g231224072.adsl.alicedsl.de ([92.231.224.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 04 Mar 2014 15:46:21 +0100 Received: from tjolitz by g231224072.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 04 Mar 2014 15:46:21 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nick Dokos writes: > Thorsten Jolitz writes: > >> Hi List, >> >> the name of headline attribute `archivedp' suggests its just a boolean >> nil/t variable, but in parse trees I see e.g. a list as value >> >> ,----------------------- >> | :archivedp ("ARCHIVE") >> `----------------------- >> >> and I vaguely remember that I have seen different symbols as values of >> this attribute too. >> >> So what do I have to expect as values here? A list of strings or nil? Or >> something else too? Whatever is defined in >> >> ,--------------------------------------------------- >> | org-archive-tag is a variable defined in `org.el'. >> | Its value is "ARCHIVE" >> `--------------------------------------------------- >> >> ? >> >> PS >> >> If the tag is just a string like in this case, why is it shown as >> list in the parse tree? > > It is set like this > (let > ... > (archivedp (member org-archive-tag tags)) > ...) > > in org-element.el. It is effectively a boolean, but there is no > need to reduce the return value of ``member'' to t if it is non-nil: > > ,---- > | member is a built-in function in `C source code'. > | > | (member ELT LIST) > | > | Return non-nil if ELT is an element of LIST. Comparison done with > | equal'. > `---- > > So if non-nil, it will be a list of tags, starting with the value of > org-archive-tag. AFAICT, the rest of the tags can be arbitrary. ** Second Level 2 :tag:my:ARCHIVE: ,------------------------------------------------ | :tags ("tag" "my") [...] :archivedp ("ARCHIVE") `------------------------------------------------ -- cheers, Thorsten