p-m / org-notify

Notifications for Org-mode
16 stars 8 forks source link

Idea: optionally using tags to define reminders: :rem5:rem3d: #7

Closed novoid closed 1 year ago

novoid commented 2 years ago

Hi,

Thanks for that package.

I was thinking of adding some kind of reminder features to my setup as well. However, I'd like to stay flexible and low-profile.

Flexible: not every appointment does have the same requirements related to notifications. For example, for one appointment, I just need to be briefly prepared, so a five minute reminder is appropriate. For another appointment, I need to bike to a different location which takes 25 minutes to do so. So I need a 35 minute reminder.

Low-profile: with capture, yankpad and similar, handling of properties might be really easy. However, I personally do prefer tags for assigning meta-data for reminders. For the examples above, I would prefer simply tagging with rem5 and rem35 respectively in order to get notifications five and 35 minutes before the associated events do start. This way, I can use pre-defined tags quickly.

For longer period reminders, I'd add the usual abbevations: rem3d (three days), rem2m (two months), and so on.

I know that this is a bold idea to post here in this package since it already introduced a different implementation idea. However, I just want to give food for thought and maybe some day, org-notify will provide both methods to define notifications.

p-m commented 2 years ago

On Mon, Aug 01 2022, Karl Voit wrote:

I personally do prefer tags for assigning meta-data for reminders.

Hello Karl,

Why?

Peter

novoid commented 2 years ago

I prefer using tags for that purpose because it's much less effort for me to press C-c C-q + quick-keys (or TAB rem5 RET RET) or even type :rem5: at the end of a heading than to define a property for it. Furthermore, it's visible in my agenda on my computer and my phone whereas properties are not visible.

While implementing multiple reminders per heading is possible using properties, I do think it's more straight-forward to use multiple tags than multiple properties.

Last but not least, it's explicit per heading instead of implicit for a heading that has a special property set.

p-m commented 2 years ago

On Tue, Aug 02 2022, Karl Voit wrote:

it's much less effort for me to press C-c C-q + quick-keys

With properties that would be possible too with a dedicated function, that would behave similar.

Furthermore, it's visible in my agenda

Ok, that's a good point.

multiple properties.

IMO multiple properties (or tags) don't make sense here.

Peter

novoid commented 2 years ago

ad properties vs. tags: I'm not talking about "it's not possible via properties". My point above reflects my personal preference of using tags instead because of smaller footprint. Of course, everybody does have his/her own preferences. If you don't like my proposed idea, I'm fine with you closing that issue. At least the discussion is archived and somebody else with the same idea is able to find and read about it.

ad multiple reminders: I once had a workflow on Android using Tasker in combination with generic appointments of the Andriod calendar where I once had a working sync with Org-mode in place. Tasker was checking all 5min (I never used reminders that are not */5). When an appointment with "$TIMESTAMP :remY:" ($TIMESTAMP-Y = now) was found, Tasker invoked a reminder. This workflow is not in place any more on my side. However, as long as it worked, I frequently used multiple reminders for appointments such as "rem15" to prepare for a meeting and "rem0" to get notified for the start of the meeting. I am sure that many people do find multiple reminders for the same appointment an interesting idea. My strong guess is that because of the fact that basically no tool is able to provide multiple reminders per appointment, people never started to think about this. YMMV.

p-m commented 2 years ago

On Tue, Aug 02 2022, Karl Voit wrote:

If you don't like my proposed idea,

Personally I don't need it, but I understand your point. It makes sense. The question is rather: is it worth the effort? I don't know. Would you be the only one using tags?

I frequently used multiple reminders for appointments such as "rem15" to prepare for a meeting and "rem0" to get notified for the start of the meeting.

How is this different from the example setup?

Peter

novoid commented 2 years ago

How is this different from the example setup?

As far as I understood the example setup, you get those four configured notifications on each appointment. In my example, the user may choose the amount and notification times on a per-appointment basis.

p-m commented 2 years ago

On Wed, Aug 03 2022, Karl Voit wrote:

you get those four configured notifications on each appointment.

No. What part of my comments makes you think that? I'm sorry, that they are not clear enough. It would be nice, if you could help me to enhance them.

TIA, Peter

novoid commented 2 years ago

I want to thank you for your attitude. I try to follow that for my own projects as well. Communication is a two-way concept where sender as well as receiver need to be aligned in order to make it work. Thank you!

I'm referring to this snippet from the header of your el file (since the readme doesn't mention anything relevant):

;; Example setup:
;;
;; (org-notify-add 'appt
;;                 '(:time "-1s" :period "20s" :duration 10
;;                   :actions (-message -ding))
;;                 '(:time "15m" :period "2m" :duration 100
;;                   :actions -notify)
;;                 '(:time "2h" :period "5m" :actions -message)
;;                 '(:time "3d" :actions -email))
;;
;; This means for todo-items with `notify' property set to `appt': 3 days
;; before deadline, send a reminder-email, 2 hours before deadline, start to
;; send messages every 5 minutes, then 15 minutes before deadline, start to
;; pop up notification windows every 2 minutes.  The timeout of the window is
;; set to 100 seconds.  Finally, when deadline is overdue, send messages and
;; make noise." 

From that I interpret that the notification configuration is done in one central place like init.el and every appointment whose property drawer contains :notify: appt will be handled accordingly: one notificaton three days in advance (at the same time), two hours in advance, 15 minutes in advance and one second before (interesting touch, btw.).

Where did my interpretation divert from the actual behavior? I have to admit that I never tried your code so far - so I haven't tested it myself in a real setup.

p-m commented 2 years ago

On Thu, Aug 04 2022, Karl Voit wrote:

every appointment whose property drawer contains :notify: appt will be handled accordingly:

Yes, indeed. And when the property is not "appt", but something else, then another notification strategy will be used.

two hours in advance,

More precisely: 2 hours before deadline, start to send messages every 5 minutes.

15 minutes in advance

More precisely: 15 minutes before deadline, start to pop up notification windows every 2 minutes.

and one second before

No. One second after deadline send messages and make noise. (Of course, this is just symbolic, since you won't run org-notify-process once per second...)

Where did my interpretation divert from the actual behavior?

You could just try it:

Setup:

+begin_src emacs-lisp

(org-notify-add 'default '(:time "100m" :actions notify/window :period "2m" :duration 60)) (org-notify-add 'daily '(:time "3m" :actions (notify/window ding) :period "30s" :duration 10)) (org-notify-add 'birthday '(:time "2d" :actions notify/window :period "15m" :duration 60) '(:time "5d" :actions notify/window :period "2h" :duration 60) '(:time "20d" :actions email :period "2d" :audible nil)) (org-notify-add 'meeting '(:time "5m" :actions (notify/window ding) :period "15s" :duration 10) '(:time "1d" :actions notify/window :period "1h" :duration 60))

+end_src

Org-file:

Peter

novoid commented 1 year ago

The question is rather: is it worth the effort? I don't know. Would you be the only one using tags?

I'm not using org-notify at the moment. My main motivation was to add functionality for the general public so that everybody gets the most out of it.

If org-notify would implement proposed features, I would probably add it to my low prio list to test if org-notify does provide advantages to my current setup and switch if it looks great to me.

I frequently used multiple reminders for appointments such as "rem15" to prepare for a meeting and "rem0" to get notified for the start of the meeting. How is this different from the example setup?

As I remember the example setup, there is exactly one reminder per heading and not a number of different reminders per heading as I would prefer.

p-m commented 1 year ago

As I remember the example setup, there is exactly one reminder per heading and not a number of different reminders per heading as I would prefer.

Could you please provide some example, that illustrates what you want?

novoid commented 1 year ago

See my initial message above.

This would result in ** <timestamp> an event :rem35:rem5: and two separate alarm events.

p-m commented 1 year ago

Perhaps like this:

Setup:

(org-notify-add 'rem35rem5
                '(:time "5m" :actions (notify/window ding) :duration 600)
                '(:time "35m" :actions notify/window :duration 600))

Org-file:

* TODO 1. alarm 35 minutes before, 2. alarm 5 minutes before
DEADLINE: <2022-12-12 Mon 10:00>
:PROPERTIES:
:notify:   rem35rem5
:END:

?

novoid commented 1 year ago

Yes that world probably work from a tech perspective. But from a user's perspective this would require to add elisp in all variants of alarms I'm planning to use while tagging. At least from my perspective this is not a realistic approach to follow in practice.

But for some people, this workarounds you've added here may seem to solve their use-cases. Since my proposal would require too much changes to your concept, I close the issue for now here as we've discussed the idea and some workarounds already. Thank you very much for your effort with this project!