emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* new (iCalendar) exporter problem
@ 2013-05-05 20:02 Simon Thum
  2013-05-05 20:14 ` Nicolas Goaziou
  0 siblings, 1 reply; 10+ messages in thread
From: Simon Thum @ 2013-05-05 20:02 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hi Nicolas,

I'm using the new icalendar export and one of it's more advanced features:

(setq org-icalendar-exclude-tags '("noexport" "drawnin"))

The docstring says:

Tags that exclude a tree from export.
This variable allows to specify different exclude tags from other
back-ends.  It can also be set with the ICAL_EXCLUDE_TAGS
keyword.

What really happens: The icalendar CATEGORIES which I am filling with 
these (i.e. (setq org-icalendar-categories '(all-tags))) no longer bears 
the mentioned strings, but the actual entries are still there.

I could not see any obvious mistake in how exclude-tags are handled. 
Thus, I concluded maybe it affects other exporters as well.

Apart from that, it seems to work fine. I just got me the latest maint 
but the issue persists.

Cheers,

Simon

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new (iCalendar) exporter problem
  2013-05-05 20:02 new (iCalendar) exporter problem Simon Thum
@ 2013-05-05 20:14 ` Nicolas Goaziou
  2013-05-05 20:24   ` Simon Thum
  0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Goaziou @ 2013-05-05 20:14 UTC (permalink / raw)
  To: Simon Thum; +Cc: emacs-orgmode

Hello,

Simon Thum <simon.thum@gmx.de> writes:

> I'm using the new icalendar export and one of it's more advanced features:
>
> (setq org-icalendar-exclude-tags '("noexport" "drawnin"))
>
> The docstring says:
>
> Tags that exclude a tree from export.
> This variable allows to specify different exclude tags from other
> back-ends.  It can also be set with the ICAL_EXCLUDE_TAGS
> keyword.

There's a mistake in the docstring: it is "ICALENDAR_EXCLUDE_TAGS".

> What really happens: The icalendar CATEGORIES which I am filling with
> these (i.e. (setq org-icalendar-categories '(all-tags))) no longer
> bears the mentioned strings, but the actual entries are still there.

I cannot reproduce it (i.e. the actual entries are removed). Could you
provide an ECM?


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new (iCalendar) exporter problem
  2013-05-05 20:14 ` Nicolas Goaziou
@ 2013-05-05 20:24   ` Simon Thum
  2013-05-05 20:37     ` Nicolas Goaziou
  0 siblings, 1 reply; 10+ messages in thread
From: Simon Thum @ 2013-05-05 20:24 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

I'm trying. I forgot to mention some things I notice:

1) It's a script that exports (batch mode)
2) Tags are coming from #+FILETAGS:

Does this help you reproduce?

On 05/05/2013 10:14 PM, Nicolas Goaziou wrote:
> Hello,
>
> Simon Thum <simon.thum@gmx.de> writes:
>
>> I'm using the new icalendar export and one of it's more advanced features:
>>
>> (setq org-icalendar-exclude-tags '("noexport" "drawnin"))
>>
>> The docstring says:
>>
>> Tags that exclude a tree from export.
>> This variable allows to specify different exclude tags from other
>> back-ends.  It can also be set with the ICAL_EXCLUDE_TAGS
>> keyword.
>
> There's a mistake in the docstring: it is "ICALENDAR_EXCLUDE_TAGS".
>
>> What really happens: The icalendar CATEGORIES which I am filling with
>> these (i.e. (setq org-icalendar-categories '(all-tags))) no longer
>> bears the mentioned strings, but the actual entries are still there.
>
> I cannot reproduce it (i.e. the actual entries are removed). Could you
> provide an ECM?
>
>
> Regards,
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new (iCalendar) exporter problem
  2013-05-05 20:24   ` Simon Thum
@ 2013-05-05 20:37     ` Nicolas Goaziou
  2013-05-05 20:42       ` Simon Thum
  0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Goaziou @ 2013-05-05 20:37 UTC (permalink / raw)
  To: Simon Thum; +Cc: emacs-orgmode

Simon Thum <simon.thum@gmx.de> writes:

> I'm trying. I forgot to mention some things I notice:
>
> 1) It's a script that exports (batch mode)
> 2) Tags are coming from #+FILETAGS:
>
> Does this help you reproduce?

No. The following code exports fine:

--8<---------------cut here---------------start------------->8---
#+filetags: tag
#+icalendar_exclude_tags: drawnin noexport
#+bind: org-icalendar-categories (all-tags)

* Test                                                                   :drawnin:

  <2013-05-05 Sun>

  Desc


* Test 2

  <2013-05-06 Mon>

  Desc2
--8<---------------cut here---------------end--------------->8---


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new (iCalendar) exporter problem
  2013-05-05 20:37     ` Nicolas Goaziou
@ 2013-05-05 20:42       ` Simon Thum
  2013-05-05 21:01         ` Nicolas Goaziou
  0 siblings, 1 reply; 10+ messages in thread
From: Simon Thum @ 2013-05-05 20:42 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

I guess we have it then.

Your example leads to icalendar without content.

However I have:

#+filetags: drawnin
#+icalendar_exclude_tags: drawnin noexport
#+bind: org-icalendar-categories (all-tags)

* Test (no tag here ->

   <2013-05-05 Sun>

   Desc


That one indeed exports, but IMO shouldn't.


On 05/05/2013 10:37 PM, Nicolas Goaziou wrote:
> Simon Thum <simon.thum@gmx.de> writes:
>
>> I'm trying. I forgot to mention some things I notice:
>>
>> 1) It's a script that exports (batch mode)
>> 2) Tags are coming from #+FILETAGS:
>>
>> Does this help you reproduce?
>
> No. The following code exports fine:
>
> --8<---------------cut here---------------start------------->8---
> #+filetags: tag
> #+icalendar_exclude_tags: drawnin noexport
> #+bind: org-icalendar-categories (all-tags)
>
> * Test                                                                   :drawnin:
>
>    <2013-05-05 Sun>
>
>    Desc
>
>
> * Test 2
>
>    <2013-05-06 Mon>
>
>    Desc2
> --8<---------------cut here---------------end--------------->8---
>
>
> Regards,
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new (iCalendar) exporter problem
  2013-05-05 20:42       ` Simon Thum
@ 2013-05-05 21:01         ` Nicolas Goaziou
  2013-05-05 21:31           ` Simon Thum
  2013-05-06 18:06           ` Simon Thum
  0 siblings, 2 replies; 10+ messages in thread
From: Nicolas Goaziou @ 2013-05-05 21:01 UTC (permalink / raw)
  To: Simon Thum; +Cc: emacs-orgmode

Simon Thum <simon.thum@gmx.de> writes:

> I guess we have it then.
>
> Your example leads to icalendar without content.

What is the value of `org-icalendar-with-timestamps'?

I don't see any difference between my "* Test 2" headline and your "*
Test" below.

> However I have:
>
> #+filetags: drawnin
> #+icalendar_exclude_tags: drawnin noexport
> #+bind: org-icalendar-categories (all-tags)
>
> * Test (no tag here ->
>
>    <2013-05-05 Sun>
>
>    Desc
>
>
> That one indeed exports, but IMO shouldn't.

exclude tags are not inherited.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new (iCalendar) exporter problem
  2013-05-05 21:01         ` Nicolas Goaziou
@ 2013-05-05 21:31           ` Simon Thum
  2013-05-06 18:06           ` Simon Thum
  1 sibling, 0 replies; 10+ messages in thread
From: Simon Thum @ 2013-05-05 21:31 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On 05/05/2013 11:01 PM, Nicolas Goaziou wrote:
> Simon Thum <simon.thum@gmx.de> writes:
>
>> I guess we have it then.
>>
>> Your example leads to icalendar without content.
>
> What is the value of `org-icalendar-with-timestamps'?

org-icalendar-with-timestamps: active

But see below.

>
> I don't see any difference between my "* Test 2" headline and your "*
> Test" below.

Yes, I copied only the first of your headlines. That lead to the 
confusing statement of mine. But the behaviour is consistent: a 
#filetags: tag cannot prevent export of the file's headlines. IMO this 
is a bug.

My use case is to prevent duplicates that come from me importing outside 
iCals into org (using ical2org). When exporting, I do not want these to 
be re-exported. I could remove the files from the agenda altogether, but 
tags offer a more logical path for me.

Cheers,

Simon


>
>> However I have:
>>
>> #+filetags: drawnin
>> #+icalendar_exclude_tags: drawnin noexport
>> #+bind: org-icalendar-categories (all-tags)
>>
>> * Test (no tag here ->
>>
>>     <2013-05-05 Sun>
>>
>>     Desc
>>
>>
>> That one indeed exports, but IMO shouldn't.
>
> exclude tags are not inherited.
>
>
> Regards,
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new (iCalendar) exporter problem
  2013-05-05 21:01         ` Nicolas Goaziou
  2013-05-05 21:31           ` Simon Thum
@ 2013-05-06 18:06           ` Simon Thum
  2013-05-07 10:22             ` Bastien
  1 sibling, 1 reply; 10+ messages in thread
From: Simon Thum @ 2013-05-06 18:06 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hi Nicolas,

I seem to have overssen something:

>>
>> #+filetags: drawnin
>> #+icalendar_exclude_tags: drawnin noexport
>> #+bind: org-icalendar-categories (all-tags)
>>
>> * Test (no tag here ->
>>
>>     <2013-05-05 Sun>
>>
>>     Desc
>>
>>
>> That one indeed exports, but IMO shouldn't.
>
> exclude tags are not inherited.

You mean inherited tags (coming from filetags in this case) do not 
contribute to exclude tag filtering?

If yes, why? I seems inconsistent.

Cheers,

Simon

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new (iCalendar) exporter problem
  2013-05-06 18:06           ` Simon Thum
@ 2013-05-07 10:22             ` Bastien
  2013-05-09 14:33               ` Simon Thum
  0 siblings, 1 reply; 10+ messages in thread
From: Bastien @ 2013-05-07 10:22 UTC (permalink / raw)
  To: Simon Thum; +Cc: emacs-orgmode, Nicolas Goaziou

Hi Simon,

Simon Thum <simon.thum@gmx.de> writes:

> You mean inherited tags (coming from filetags in this case) do not
> contribute to exclude tag filtering?

More precisely, filetag-inherited tags do not contribute to excluding
subtrees during export.

> If yes, why? I seems inconsistent.

Inherited-exclude-tags contribute to excluding subtrees not because
they are inherited, but because the whole exclude-tagged subtree is
excluded.

We may support filetags for excluding, but it seems simple enough to
exclude the entire file instead IMHO.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new (iCalendar) exporter problem
  2013-05-07 10:22             ` Bastien
@ 2013-05-09 14:33               ` Simon Thum
  0 siblings, 0 replies; 10+ messages in thread
From: Simon Thum @ 2013-05-09 14:33 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Nicolas Goaziou

On 05/07/2013 12:22 PM, Bastien wrote:
> Hi Simon,
>
> Simon Thum <simon.thum@gmx.de> writes:
>
>> You mean inherited tags (coming from filetags in this case) do not
>> contribute to exclude tag filtering?
>
> More precisely, filetag-inherited tags do not contribute to excluding
> subtrees during export.
>
>> If yes, why? I seems inconsistent.
>
> Inherited-exclude-tags contribute to excluding subtrees not because
> they are inherited, but because the whole exclude-tagged subtree is
> excluded.

I guessed that but there is a difference in modelled vs. observable 
behaviour.

>
> We may support filetags for excluding, but it seems simple enough to
> exclude the entire file instead IMHO.
>
Well, probably.

I eventually figured that

(let ((org-agenda-files (remove-if (lambda (a) (string-match "extern" 
a)) org-agenda-files)))
   (org-agenda-files)
   )

is going to get me roughly where I want, but since I rely a lot on tags 
it's not going to scale nicely.

So in case it comes up elsewhere please consider this.

Thank you,

Simon

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-05-09 14:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-05 20:02 new (iCalendar) exporter problem Simon Thum
2013-05-05 20:14 ` Nicolas Goaziou
2013-05-05 20:24   ` Simon Thum
2013-05-05 20:37     ` Nicolas Goaziou
2013-05-05 20:42       ` Simon Thum
2013-05-05 21:01         ` Nicolas Goaziou
2013-05-05 21:31           ` Simon Thum
2013-05-06 18:06           ` Simon Thum
2013-05-07 10:22             ` Bastien
2013-05-09 14:33               ` Simon Thum

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).