emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Parser - which values are possible for `archivedp'?
Date: Tue, 04 Mar 2014 15:52:34 +0100	[thread overview]
Message-ID: <8761nukoct.fsf@gmail.com> (raw)
In-Reply-To: 87ha7edoag.fsf@gmail.com

Nick Dokos <ndokos@gmail.com> writes:

> Thorsten Jolitz <tjolitz@gmail.com> 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.

[ups ... I sent this unfinished by accident first]

Ok, thanks, this explains a lot, and it seems that Org-mode inserts the
:ARCHIVE: tag always at the end, and other tags in front of it: 

,-----------------------------------
| ** Second Level 2 :tag:my:ARCHIVE:
`-----------------------------------

so it will almost always look like this:

,------------------------------------------------
| :tags ("tag" "my") [...] :archivedp ("ARCHIVE")
`------------------------------------------------



-- 
cheers,
Thorsten

      parent reply	other threads:[~2014-03-04 14:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04 14:16 Parser - which values are possible for `archivedp'? Thorsten Jolitz
2014-03-04 14:35 ` Nick Dokos
2014-03-04 14:47   ` Thorsten Jolitz
2014-03-04 14:51     ` Jonathan Leech-Pepin
2014-03-04 14:58       ` Thorsten Jolitz
2014-03-04 15:44         ` Nick Dokos
2014-03-04 16:19           ` Thorsten Jolitz
2014-03-04 14:52   ` Thorsten Jolitz [this message]

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=8761nukoct.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=emacs-orgmode@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).