Re: [POLL] [BUG] Inverse behavior from \ [9.6.4 (release_9.6.4-1-g76cf21 @ /Users/johnw/.emacs.d/lisp/org-mode/lisp/)]

2023-06-12 Thread John Wiegley
> Ihor Radchenko  writes:

> Changing the current behaviour will be a breaking change.
>
> I am inclined to change the current behaviour and document it, unless there
> are objections.

I would also note that in Org-mode 8 and earlier, ‘/ ’ would limit to
all untagged entries, which is why I had that expectations.

-- 
John Wiegley  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com  60E1 46C4 BD1A 7AC1 4BA2



Re: How to add custom agenda entries?

2023-06-12 Thread Ihor Radchenko
Marcin Borkowski  writes:

> I'd like to add some custom entries to my agenda.  I wrote myself
> a bunch of functions to remind me when I did some things (see
> https://mbork.pl/2023-06-12_Counting_time%2c_backwards), and it would be
> great if I could incorporate this into the agenda.  Ideally, I would add
> to my agenda setup a function which Org mode would run for every
> headline in my agenda files, and display the string returned from it.
>
> I don't think Org mode has that, but maybe there's some package which
> can do it?

`org-agenda-prefix-format'.
And if you want to modify the entry text, you have to resort to
`org-agenda-finalize-hook' where you can edit the agenda buffer text as
you wish.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



How to add custom agenda entries?

2023-06-12 Thread Marcin Borkowski
Hi all,

I'd like to add some custom entries to my agenda.  I wrote myself
a bunch of functions to remind me when I did some things (see
https://mbork.pl/2023-06-12_Counting_time%2c_backwards), and it would be
great if I could incorporate this into the agenda.  Ideally, I would add
to my agenda setup a function which Org mode would run for every
headline in my agenda files, and display the string returned from it.

I don't think Org mode has that, but maybe there's some package which
can do it?

TIA,

-- 
Marcin Borkowski
http://mbork.pl



Re: Is this proper time format?

2023-06-12 Thread David Masterson
Ihor Radchenko  writes:

> David Masterson  writes:
>
 -To assist project planning, TODO items can be labeled with a date
 -and/or a time.  The specially formatted string carrying the date and
 -time information is called a /timestamp/ in Org mode.
 +To assist project planning, TODO items can be labeled with dates
 +and/or times for purposes described in this chapter.  The specially
 +formatted string carrying the date and time information is called a
 +/timestamp/ in Org mode.
>>>
>>> What is the purpose of this change? The updated sentence is rather
>>> confusing, IMHO.
>>
>> Mostly changing the statement from singular to plural to imply that more
>> than one timestamp can be in a TODO item (SCHEDULED, DEADLINE, multiple
>> plain timestamps) w/o directly mentioning how (leave that for later
>> examples in the chapter).
>
> I am mostly questioning "for purposes described in this chapter".
> All the TODO items can be labelled with multiple dates/times, not just in
> "this chapter".

I see.  I'm trying to say that the rest of this chapter describes how,
where and why you would use dates/times in an Org file.  For example,
the Timestamps subchapter describes what a timestamp looks like and that
it can be used in any header or paragraph in an Org file and how the
timestamp affects the agenda.

 +A timestamp is a specification of a date---possibly with a time or a
 +range of times---in a special format, either =<2003-09-16 Tue>= or
 +=<2003-09-16 Tue 09:39>= or =<2003-09-16 Tue 12:00-12:30>=.  A
 +timestamp can appear anywhere in the headline or body of an Org tree
 +entry.  Its presence causes entries to be shown on specific
 +dates/times in the agenda (see [[*The Weekly/Daily Agenda]]).  We
 +distinguish:
>>>
>>> This is not accurate. Only date is considered by agenda. Not time.
>>> Time can be displayed, but has no effect (by default) on whether an
>>> entry appears in the agenda or not.
>>
>> In testing, I found the following:
>>
>> * TODO summer school
>>   <2023-06-05 Mon 10:30-12:15>--<2023-06-08 Thu 10:30-12:15>
>>
>> ...
>> Is this being done by an add-on package?  I have these, but most of them
>> are not setup:
>
> No. I meant that presence of time has no effect on whether an entry
> appear in agenda or not. Once agenda decides that an entry should
> appear, the time is taken into account when formatting the display.
>
> You modified the manual to "Its presence causes entries to be shown on
> specific dates/times in the agenda". There is no concept of "shown on
> specific time" in agenda views. Just "shown on specific day".

I think I see what you're saying.  I'm fine with dropping "/times".

  - Timestamp with repeater interval ::
  
A timestamp may contain a /repeater interval/, indicating that it
 -  applies not only on the given date, but again and again after
 -  a certain interval of N days (d), weeks (w), months (m), or years
 -  (y).  The following shows up in the agenda every Wednesday:
 +  applies not only on the given date, but again and again after a
 +  certain interval of N hours (h), days (d), weeks (w), months (m), or
 +  years (y).  The following shows up in the agenda every week at the
 +  given day of the week and time:
>>>
>>> I miss the point here. You changed the last sentence to mention time,
>>> but the "following" example does not specify the time (<%%(diary-float t 4 
>>> 2)>).
>>
>> I think you're looking at the patch file, so you're not seeing the line
>> before the 'diary' line which has a time of 22:00-23:00 on it.  I don't
>> use 'diary-float', so did I misinterpret the example?  If so, drop the
>> "and time".  The main purpose was to add in "hours" after N.
>
> "22:00-23:00" has no relation to timestamps.
> Agenda still accounts for it because of
> `org-agenda-search-headline-for-time', but this part of the manual is
> talking about timestamps, not agenda extras. The diary timestamp does
> not set the time.

Ah, then just drop the "and time" change.

-- 
David Masterson



Re: Is this proper time format?

2023-06-12 Thread Ihor Radchenko
David Masterson  writes:

>>> -To assist project planning, TODO items can be labeled with a date
>>> -and/or a time.  The specially formatted string carrying the date and
>>> -time information is called a /timestamp/ in Org mode.
>>> +To assist project planning, TODO items can be labeled with dates
>>> +and/or times for purposes described in this chapter.  The specially
>>> +formatted string carrying the date and time information is called a
>>> +/timestamp/ in Org mode.
>>
>> What is the purpose of this change? The updated sentence is rather
>> confusing, IMHO.
>
> Mostly changing the statement from singular to plural to imply that more
> than one timestamp can be in a TODO item (SCHEDULED, DEADLINE, multiple
> plain timestamps) w/o directly mentioning how (leave that for later
> examples in the chapter).

I am mostly questioning "for purposes described in this chapter".
All the TODO items can be labelled with multiple dates/times, not just in
"this chapter".

>>> +#+cindex: timestamps
>>> +#+cindex: ranges, time
>>> +#+cindex: deadlines
>>> +#+cindex: scheduling
>>
>> We do not need cindex and other index keywords in org-guide.
>
> There are a couple in the diary timestamp section already, but this can
> be dropped if wrong.

Most likely, they are there by mistake.
The guide should be short enough to not require index.

>>> +A timestamp is a specification of a date---possibly with a time or a
>>> +range of times---in a special format, either =<2003-09-16 Tue>= or
>>> +=<2003-09-16 Tue 09:39>= or =<2003-09-16 Tue 12:00-12:30>=.  A
>>> +timestamp can appear anywhere in the headline or body of an Org tree
>>> +entry.  Its presence causes entries to be shown on specific
>>> +dates/times in the agenda (see [[*The Weekly/Daily Agenda]]).  We
>>> +distinguish:
>>
>> This is not accurate. Only date is considered by agenda. Not time.
>> Time can be displayed, but has no effect (by default) on whether an
>> entry appears in the agenda or not.
>
> In testing, I found the following:
>
> * TODO summer school
>   <2023-06-05 Mon 10:30-12:15>--<2023-06-08 Thu 10:30-12:15>
>
> ...
> Is this being done by an add-on package?  I have these, but most of them
> are not setup:

No. I meant that presence of time has no effect on whether an entry
appear in agenda or not. Once agenda decides that an entry should
appear, the time is taken into account when formatting the display.

You modified the manual to "Its presence causes entries to be shown on
specific dates/times in the agenda". There is no concept of "shown on
specific time" in agenda views. Just "shown on specific day".

>>> -<2006-11-02 Thu 20:00-22:00>
>>> +<2006-11-02 Thu 10:00-12:00>
>>
>> I do not mind, but wondering why you changed the time interval.
>
> It seemed strange to have a meeting so late at night.  ;-)

I guess you do not work in academia :)

>>>  - Timestamp with repeater interval ::
>>>  
>>>A timestamp may contain a /repeater interval/, indicating that it
>>> -  applies not only on the given date, but again and again after
>>> -  a certain interval of N days (d), weeks (w), months (m), or years
>>> -  (y).  The following shows up in the agenda every Wednesday:
>>> +  applies not only on the given date, but again and again after a
>>> +  certain interval of N hours (h), days (d), weeks (w), months (m), or
>>> +  years (y).  The following shows up in the agenda every week at the
>>> +  given day of the week and time:
>>
>> I miss the point here. You changed the last sentence to mention time,
>> but the "following" example does not specify the time (<%%(diary-float t 4 
>> 2)>).
>
> I think you're looking at the patch file, so you're not seeing the line
> before the 'diary' line which has a time of 22:00-23:00 on it.  I don't
> use 'diary-float', so did I misinterpret the example?  If so, drop the
> "and time".  The main purpose was to add in "hours" after N.

"22:00-23:00" has no relation to timestamps.
Agenda still accounts for it because of
`org-agenda-search-headline-for-time', but this part of the manual is
talking about timestamps, not agenda extras. The diary timestamp does
not set the time.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Is this proper time format?

2023-06-12 Thread Ihor Radchenko
David Masterson  writes:

>>> Thank you.  I haven't "patched" anything on Savannah and assumed I might
>>> have to do the GNU copyright assignment.  For this, I thought it would
>>> be easy for you.
>>
>> Yes and no. One of the things you get to do when creating a proper patch
>> is commit message describing the changes in detail. This helps to review
>> your own changes and often helps with silly typos.
>
> Is there a form/example for a proper commit message?

https://orgmode.org/worg/org-contribute.html#commit-messages
Also, https://git.savannah.gnu.org/cgit/emacs/org-mode.git/log/

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Interest in an Org video meetup?

2023-06-12 Thread Ihor Radchenko
Russell Adams  writes:

> On Wed, Apr 26, 2023 at 04:13:47PM -0500, Corwin Brust wrote:
>> On Wed, Apr 26, 2023 at 9:31 AM Matt  wrote:
>> >
>> > FSF associate members have access to a FSF hosted Jitsi instance.  I'm an 
>> > FSF associate member and could host it using that if I'm able to make the 
>> > time.
>> >
>>
>> We can make EmacsConf instance of BigBlueButton (BBB) available, as
>> well.  FWIW I had more success with BBB than Jitsi for larger
>> meetings.

CCing Ravi Sagar. He expressed an interest in hosting some Org-related
meetups in https://www.youtube.com/watch?v=v0U_uC8molg

Web-link to this discussion: https://list.orgmode.org/Yz7WCJTmJonuuiMr@tahm/

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [PATCH] ox-icalendar: Unscheduled tasks & repeating tasks

2023-06-12 Thread Ihor Radchenko
Jack Kamm  writes:

> I am attaching an updated patch for ox-icalendar unscheduled and
> repeating TODOs, incorporating some of Ihor's feedback to my RFC some
> months ago.

Thanks! See some comments below.

> +*** New option ~org-icalendar-todo-unscheduled-start~ to control unscheduled 
> TODOs in ox-icalendar
> +*** Add support for repeating tasks in iCalendar export
> ...
> +Also note that only vanilla repeaters are currently exported; the
> +special repeaters ~++~ and ~.+~ are skipped.

Would it make sense to throw a warning instead of silently skipping ~++~
and ~.+~ repeaters?

> +(defcustom org-icalendar-todo-unscheduled-start 'recurring-deadline-warning
> +  "Exported start date of unscheduled TODOs.
> +
> +If `org-icalendar-use-scheduled' contains `todo-start' and a task
> +has a \"SCHEDULED\" timestamp, that is always used as the start
> +date.  Otherwise, this variable controls whether a start date is
> +exported and what its value is.

I think it would make sense to link to this variable in the
`org-icalendar-use-scheduled' docstring and possibly in the manual.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



[POLL] [BUG] Inverse behavior from \ [9.6.4 (release_9.6.4-1-g76cf21 @ /Users/johnw/.emacs.d/lisp/org-mode/lisp/)]

2023-06-12 Thread Ihor Radchenko
"John Wiegley"  writes:

> When I type ‘\ c’, the agenda view limits to my (c)all tags. This is what I
> expected to see.
>
> When I type ‘\ ’, however, it limits to every tag *but* the empty tag.
> This is the opposite of what I expect to see.

Confirmed.

In `org-agenda-filter-by-tag',

((or (eq char ?\s)
  (setq a (rassoc char alist))
  (and tag (setq a (cons tag nil
  (org-agenda-filter-show-all-tag)
  (setq tag (car a))
  (setq org-agenda-tag-filter
(cons (concat (if exclude "-" "+") tag)
  (if accumulate current nil)))
  (org-agenda-filter-apply org-agenda-tag-filter 'tag expand))

"\ " will call

(org-agenda-filter-make-matcher '("+") 'tag nil) ; => (and (or tags))

which matches entries with tags, not the entries without tags.

But  is actually not documented, so I am not sure if it is a bug.
I can see logic with  being "any tag" (it appears alongside other
tag shortcuts), and I can see logic with  being "no tag"
(consistent with `org-set-tags-command').

Changing the current behaviour will be a breaking change.

I am inclined to change the current behaviour and document it, unless
there are objections.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at