From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amit Tendulkar Subject: Re: org-notify: Need to get notifications at the start time of the task (in addition to the deadline) Date: Fri, 10 Jun 2016 22:15:22 +0530 Message-ID: <87vb1h3sd9.fsf@persistent.com> References: <871t4bq1l6.fsf@persistent.com> <841t4boj06.fsf@gmail.com> <84inxlsf88.fsf@gmail.com> <87h9d5cvh3.fsf@bell.net> <874m94mohv.fsf@persistent.com> <87d1nr42sp.fsf@bell.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBPYu-000212-Nk for emacs-orgmode@gnu.org; Fri, 10 Jun 2016 12:45:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBPYr-00040x-D0 for emacs-orgmode@gnu.org; Fri, 10 Jun 2016 12:45:36 -0400 Received: from plane.gmane.org ([80.91.229.3]:41494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBPYr-00040k-5n for emacs-orgmode@gnu.org; Fri, 10 Jun 2016 12:45:33 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bBPYp-0006K9-94 for emacs-orgmode@gnu.org; Fri, 10 Jun 2016 18:45:31 +0200 Received: from 116.75.14.64 ([116.75.14.64]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Jun 2016 18:45:31 +0200 Received: from amit_tendulkar by 116.75.14.64 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Jun 2016 18:45:31 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Charles Philip Chan writes: > Amit Tendulkar writes: > > Hi Amit: > >> I put notify.el in my load path and added the following lines in my init >> file. >> >> (autoload 'notify "notify" "Notify TITLE, BODY.") >> (appt-activate 1) >> (org-agenda-to-appt) >> >> Still I am getting only inline intimations for the appointments. Am I >> missing something? > > Sorry, I set this up a long time ago, so I gave you the wrong info, > After searching my configuration files, I found this: > > ;; Update appt list and dbus appt notification > ; Get appointments for today > (defun my-org-agenda-to-appt () > (interactive) > (setq appt-time-msg-list nil) > (let ((org-deadline-warning-days 0)) ;; will be automatic in org 5.23 > (org-agenda-to-appt))) > > ; Run once, activate and schedule refresh > (my-org-agenda-to-appt) > (appt-activate t) > (run-at-time "00:01" nil 'my-org-agenda-to-appt) > > ; 5 minute warnings > (setq appt-message-warning-time 15) > (setq appt-display-interval 5) > > ; Update appt each time agenda opened. > (add-hook 'org-finalize-agenda-hook 'my-org-agenda-to-appt) > > ; Setup zenify, we tell appt to use window, and replace default function > (setq appt-display-format 'window) > (setq appt-disp-window-function (function my-appt-disp-window)) > > (defun my-appt-disp-window (min-to-app new-time msg) > (save-window-excursion > (shell-command > (concat "/home/hoor/bin/org-appt-notify '" msg "' '" min-to-app "'&") > nil nil) > ) > ) > > > and here is the content of "org-appt-notify" > > > #!/bin/sh > SOUND="/home/hoor/GNUstep/Library/WindowMaker/Sounds/Kopete_Received.ogg" > ICON="/home/hoor/GNUstep/Library/Icons/apps/system-config-date.tif" > > ogg123 "$SOUND" > notify-send --icon="$ICON" "APPOINTMENT" "$1\ndue in $2 mins." > > > Charles Thanks Charles. The above is indeed very helpful. I replaced the notify-send command with the below one as the notification popup wasn't visible to me when I was connected to Citrix desktop. Whereas the below command worked. zenity --info --text="$1 due in $2 minutes" --title "APPOINTMENT" --timeout 60 Regards, Amit