[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Parser - which values are possible for `archivedp'?
From: |
Thorsten Jolitz |
Subject: |
Re: [O] Parser - which values are possible for `archivedp'? |
Date: |
Tue, 04 Mar 2014 17:19:22 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Nick Dokos <address@hidden> writes:
> Thorsten Jolitz <address@hidden> writes:
>
>>> > 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")
>>> `------------------------------------------------
>>>
>>> Change the order of the tags so that Archive comes before the others
>>> and you get:
>>>
>>> ** Second level 2 :ARCHIVE:tag:my:
>>> :tags ("tag" "my") :archivedp ("ARCHIVE" "tag" "my")
>>
>> A very useful feature of the `member' function in lisp programming, but
>> not that great in this case I would say ... why not use (car (member
>> ...))?
>> Then its just a string, and the single value of interest.
>
> Why? All that matters is whether it's nil or not.
Why not? With a tiny change in the code one would get rid of potential
redundancy in the parse tree, would cause less surprise for people who
look at the parsers output (what does ":archivedp ("ARCHIVE" "tag"
"my")" mean?) and would get something more logical (the value of
:archivedp is either nil or the string in org-archive-tag).
But its not really that important I guess, I just needed to know what
kind of values to expect in that place - thanks for the hints. I
use that in another program where it does matter if its a boolean, a
string or a list of strings ...
--
cheers,
Thorsten
Re: [O] Parser - which values are possible for `archivedp'?, Thorsten Jolitz, 2014/03/04