Re: Agenda without todos only if there is no other timestamp

2022-05-04 Thread Karl Voit
Hi,

* TRS-80  wrote:
>
>> On 2022-04-05 04:48, Karl Voit wrote:
>>> Hi,
>>> I've got following custom agenda for exporting:
>>> | ("n" "no TODO events +180d"
>>> |  ((agenda "no TODO events +180d"
>>> |   ((org-agenda-span 180)
>>> |(org-agenda-time-grid nil)
>>> |(org-agenda-entry-types '(:timestamp :sexp))
>>> |(org-agenda-skip-function
>>> | '(or
>>> |   (org-agenda-skip-entry-if 'todo 'any);; skip if any
>>> TODO state is found
>>> |   (org-agenda-skip-entry-if 'category "errors");; skip
>>> if any TODO state is found
>>> |   (my-skip-tag "lp")
>>> |   )
>>> |  nil (,(concat my-org-files-path "agenda_180d_filtered_raw.html")))
>>> (don't mind the stupid name - I may fix this as it is misleading
>>> here)
>>> This results in an HTML file that contains my appointments without
>>> the tasks.
>>> Unfortunately, I sometimes seem to schedule appointments within open
>>> todos such as:
>>> | * NEXT talk with Steve about the project X
>>> | SCHEDULED: <2022-04-05 Tue>
>>> |
>>> | - [X] ask him for a time-slot
>>> | - we settled for: <2022-04-05 Tue 14:00-15:00>
>>> Of course, those appointments are lost in my agenda export as
>>> specified above. This is a bummer and I want to fix this somehow.
>>> Tasks should be omitted only if there is no other time-stamp than
>>> deadline or scheduled.
>>> org-agenda-skip-if lists:
>>> | scheduled Check if there is a scheduled cookie
>>> | notscheduled  Check if there is no scheduled cookie
>>> | deadline  Check if there is a deadline
>>> | notdeadline   Check if there is no deadline
>>> | timestamp Check if there is a timestamp (also deadline or
>>> scheduled)
>>> | nottimestamp  Check if there is no timestamp (also deadline or
>>> scheduled)
>>> | regexpCheck if regexp matches
>>> | notregexp Check if regexp does not match.
>>> | todo  Check if TODO keyword matches
>>> | nottodo   Check if TODO keyword does not match
>>> How is it possible to accomplish this? I think this would require
>>> something like "Check if there is a timestamp (except deadline or
>>> scheduled)" which isn't available yet.
>>> Any ideas on that one?
>>
>> I think you will need to write a custom ~org-agenda-skip-function~.
>>
>
> I realized there is probably an even easier way (no custom ELisp
> required), simply by creating a separate child heading for the meeting,
> which should then show up.

Thanks for the idea. This is my current workaround. However, it
happens in longer headings that I insert a time/datestamp at the end
without realizing that I'm working in a todo heading. This is an
issue for me because I do have to check every time I'm using
timestamps. It's rather obvious that I fail from time to time and I
lose the entry on my non-todo-agenda.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Agenda without todos only if there is no other timestamp

2022-05-04 Thread Ihor Radchenko
Karl Voit  writes:

> I've got following custom agenda for exporting:
>
> | ("n" "no TODO events +180d"
> |  ((agenda "no TODO events +180d"
> |   ((org-agenda-span 180)
> |(org-agenda-time-grid nil)
> |(org-agenda-entry-types '(:timestamp :sexp))
> |(org-agenda-skip-function
> | '(or
> |   (org-agenda-skip-entry-if 'todo 'any);; skip if any TODO 
> state is found
> |   (org-agenda-skip-entry-if 'category "errors");; skip if any 
> TODO state is found
> |   (my-skip-tag "lp")
> |   )
> |  nil (,(concat my-org-files-path "agenda_180d_filtered_raw.html")))
> ...
> Tasks should be omitted only if there is no other time-stamp than
> deadline or scheduled.
>
> Any ideas on that one?

(org-agenda-skip-function
 '(or
   (and (org-agenda-skip-entry-if 'todo 'any);; skip if any TODO state is found
(org-agenda-skip-entry-if 'deadline 'scheduled))
   (org-agenda-skip-entry-if 'category "errors");; skip if any TODO state is 
found
   (my-skip-tag "lp")))

Best,
Ihor



Re: Agenda without todos only if there is no other timestamp

2022-05-03 Thread TRS-80
TRS-80  writes:

> On 2022-04-05 04:48, Karl Voit wrote:
>> Hi,
>> I've got following custom agenda for exporting:
>> | ("n" "no TODO events +180d"
>> |  ((agenda "no TODO events +180d"
>> |   ((org-agenda-span 180)
>> |(org-agenda-time-grid nil)
>> |(org-agenda-entry-types '(:timestamp :sexp))
>> |(org-agenda-skip-function
>> | '(or
>> |   (org-agenda-skip-entry-if 'todo 'any);; skip if any
>> TODO state is found
>> |   (org-agenda-skip-entry-if 'category "errors");; skip
>> if any TODO state is found
>> |   (my-skip-tag "lp")
>> |   )
>> |  nil (,(concat my-org-files-path "agenda_180d_filtered_raw.html")))
>> (don't mind the stupid name - I may fix this as it is misleading
>> here)
>> This results in an HTML file that contains my appointments without
>> the tasks.
>> Unfortunately, I sometimes seem to schedule appointments within open
>> todos such as:
>> | * NEXT talk with Steve about the project X
>> | SCHEDULED: <2022-04-05 Tue>
>> |
>> | - [X] ask him for a time-slot
>> | - we settled for: <2022-04-05 Tue 14:00-15:00>
>> Of course, those appointments are lost in my agenda export as
>> specified above. This is a bummer and I want to fix this somehow.
>> Tasks should be omitted only if there is no other time-stamp than
>> deadline or scheduled.
>> org-agenda-skip-if lists:
>> | scheduled Check if there is a scheduled cookie
>> | notscheduled  Check if there is no scheduled cookie
>> | deadline  Check if there is a deadline
>> | notdeadline   Check if there is no deadline
>> | timestamp Check if there is a timestamp (also deadline or
>> scheduled)
>> | nottimestamp  Check if there is no timestamp (also deadline or
>> scheduled)
>> | regexpCheck if regexp matches
>> | notregexp Check if regexp does not match.
>> | todo  Check if TODO keyword matches
>> | nottodo   Check if TODO keyword does not match
>> How is it possible to accomplish this? I think this would require
>> something like "Check if there is a timestamp (except deadline or
>> scheduled)" which isn't available yet.
>> Any ideas on that one?
>
> I think you will need to write a custom ~org-agenda-skip-function~.
>

I realized there is probably an even easier way (no custom ELisp
required), simply by creating a separate child heading for the meeting,
which should then show up.  Assuming I am following you correctly, how
about:

#+begin_src org

* PROJECT Project X
  :PROPERTIES:
  :CATEGORY: P:X
  :END:

** PROJECT Discuss 'topic' with Steve

*** DONE Ask Steve for a time-slot

*** Meeting with steve
<2022-04-05 Tue 14:00>--<2022-04-05 Tue 15:00>

#+end_src

N.B. the indentation levels.

Couple notes here:

1. If you set CATEGORY on the parent, and have enabled inheritance, the
'P:X' should appear on left side in your agenda, at the time of this
meeting, giving context.  The 'P:' convention is just what I use to
denote a Project (as opposed to an Area).

2. I follow GTD here, where anything with more subtasks is itself also
considered another 'project'.  You don't have to.  In fact one of my
todo keywords is actually PROJECT.

3. I guess you could use SCHEDULED just as well, but if you carefully
read the manual, this is not the intent of SCHEDULED.  An appointment
(like this) should simply be a time slot (as I showed above).  You can
of course do whatever you like.  :)

I have included some things here that I might do which are not strictly
necessary to solving your problem, but hopefully you can adapt this to
your needs.

Cheers,
TRS-80




Re: Agenda without todos only if there is no other timestamp

2022-04-05 Thread TRS-80

On 2022-04-05 04:48, Karl Voit wrote:

Hi,

I've got following custom agenda for exporting:

| ("n" "no TODO events +180d"
|  ((agenda "no TODO events +180d"
|   ((org-agenda-span 180)
|(org-agenda-time-grid nil)
|(org-agenda-entry-types '(:timestamp :sexp))
|(org-agenda-skip-function
| '(or
|   (org-agenda-skip-entry-if 'todo 'any);; skip if any
TODO state is found
|   (org-agenda-skip-entry-if 'category "errors");; skip
if any TODO state is found
|   (my-skip-tag "lp")
|   )
|  nil (,(concat my-org-files-path "agenda_180d_filtered_raw.html")))

(don't mind the stupid name - I may fix this as it is misleading
here)

This results in an HTML file that contains my appointments without the 
tasks.


Unfortunately, I sometimes seem to schedule appointments within open
todos such as:

| * NEXT talk with Steve about the project X
| SCHEDULED: <2022-04-05 Tue>
|
| - [X] ask him for a time-slot
| - we settled for: <2022-04-05 Tue 14:00-15:00>

Of course, those appointments are lost in my agenda export as
specified above. This is a bummer and I want to fix this somehow.

Tasks should be omitted only if there is no other time-stamp than
deadline or scheduled.

org-agenda-skip-if lists:
| scheduled Check if there is a scheduled cookie
| notscheduled  Check if there is no scheduled cookie
| deadline  Check if there is a deadline
| notdeadline   Check if there is no deadline
| timestamp Check if there is a timestamp (also deadline or 
scheduled)
| nottimestamp  Check if there is no timestamp (also deadline or 
scheduled)

| regexpCheck if regexp matches
| notregexp Check if regexp does not match.
| todo  Check if TODO keyword matches
| nottodo   Check if TODO keyword does not match

How is it possible to accomplish this? I think this would require
something like "Check if there is a timestamp (except deadline or
scheduled)" which isn't available yet.

Any ideas on that one?


I think you will need to write a custom ~org-agenda-skip-function~.

It's late and I am too tired, but if you are still floundering about 
after some days, send another mail and I will see what I can do to help. 
 :)


Cheers,
TRS-80



Agenda without todos only if there is no other timestamp

2022-04-05 Thread Karl Voit
Hi,

I've got following custom agenda for exporting:

| ("n" "no TODO events +180d"
|  ((agenda "no TODO events +180d"
|   ((org-agenda-span 180)
|(org-agenda-time-grid nil)
|(org-agenda-entry-types '(:timestamp :sexp))
|(org-agenda-skip-function
| '(or
|   (org-agenda-skip-entry-if 'todo 'any);; skip if any TODO state 
is found
|   (org-agenda-skip-entry-if 'category "errors");; skip if any 
TODO state is found
|   (my-skip-tag "lp")
|   )
|  nil (,(concat my-org-files-path "agenda_180d_filtered_raw.html")))

(don't mind the stupid name - I may fix this as it is misleading
here)

This results in an HTML file that contains my appointments without the tasks.

Unfortunately, I sometimes seem to schedule appointments within open todos such 
as:

| * NEXT talk with Steve about the project X
| SCHEDULED: <2022-04-05 Tue>
| 
| - [X] ask him for a time-slot
| - we settled for: <2022-04-05 Tue 14:00-15:00>

Of course, those appointments are lost in my agenda export as
specified above. This is a bummer and I want to fix this somehow.

Tasks should be omitted only if there is no other time-stamp than
deadline or scheduled.

org-agenda-skip-if lists:
| scheduled Check if there is a scheduled cookie
| notscheduled  Check if there is no scheduled cookie
| deadline  Check if there is a deadline
| notdeadline   Check if there is no deadline
| timestamp Check if there is a timestamp (also deadline or scheduled)
| nottimestamp  Check if there is no timestamp (also deadline or scheduled)
| regexpCheck if regexp matches
| notregexp Check if regexp does not match.
| todo  Check if TODO keyword matches
| nottodo   Check if TODO keyword does not match

How is it possible to accomplish this? I think this would require
something like "Check if there is a timestamp (except deadline or
scheduled)" which isn't available yet.

Any ideas on that one?

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/