From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erwin Panen Subject: Alarms in orgmode Date: Thu, 05 Nov 2009 15:46:29 +0100 Message-ID: <4AF2E545.3060309@fastmail.fm> Reply-To: erwinpanen@fastmail.fm Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070605030906030409060403" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N63bj-0001oJ-A9 for emacs-orgmode@gnu.org; Thu, 05 Nov 2009 09:46:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N63be-0001ln-Fy for emacs-orgmode@gnu.org; Thu, 05 Nov 2009 09:46:38 -0500 Received: from [199.232.76.173] (port=52716 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N63be-0001lg-80 for emacs-orgmode@gnu.org; Thu, 05 Nov 2009 09:46:34 -0500 Received: from out4.smtp.messagingengine.com ([66.111.4.28]:38329) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N63bd-0000AH-Jo for emacs-orgmode@gnu.org; Thu, 05 Nov 2009 09:46:33 -0500 Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id DB2FDBE231 for ; Thu, 5 Nov 2009 09:46:31 -0500 (EST) Received: from [192.168.80.242] (unknown [83.101.78.37]) by mail.messagingengine.com (Postfix) with ESMTPSA id F20CD34EE0 for ; Thu, 5 Nov 2009 09:46:30 -0500 (EST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------070605030906030409060403 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi everyone, I was looking to set an audible alarm or at least display a message of some kind. Google brought me no results, apart from capabilities that are within Emacs itself, namely the diary & appointments. http://www.gnu.org/software/emacs/manual/html_node/emacs/Appointments.html Can anyone point me to how to do this, if possible at all. (I'm on windows environment, but interested in Linux too.) Thanks for your help! Erwin --------------070605030906030409060403 Content-Type: text/html; name="www.gnu.org/software/emacs/manual/html_node/emacs/Appointments.html" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename*0="www.gnu.org/software/emacs/manual/html_node/emacs/Appointmen"; filename*1="ts.html" Content-Base: "http://www.gnu.org/software/emacs/manu al/html_node/emacs/Appointments.htm l" Content-Location: "http://www.gnu.org/software/emacs/manu al/html_node/emacs/Appointments.htm l" Appointments - GNU Emacs Manual

Next: , Previous: Diary, Up: Calendar/Diary


38.11 Appointments

If you have a diary entry for an appointment, and that diary entry begins with a recognizable time of day, Emacs can warn you several minutes beforehand that that appointment is pending. Emacs alerts you to the appointment by displaying a message in your chosen format, as specified by the variable appt-display-format. If the value of appt-audible is non-nil, the warning includes an audible reminder. In addition, if appt-display-mode-line is non-nil, Emacs displays the number of minutes to the appointment on the mode line.

If appt-display-format has the value window, then the variable appt-display-duration controls how long the reminder window is visible for; and the variables appt-disp-window-function and appt-delete-window-function give the names of functions used to create and destroy the window, respectively.

To enable appointment notification, use the command M-x appt-activate. With a positive argument, it enables notification; with a negative argument, it disables notification; with no argument, it toggles. Enabling notification also sets up an appointment list for today from the diary file, giving all diary entries found with recognizable times of day, and reminds you just before each of them.

For example, suppose the diary file contains these lines:

     Monday
       9:30am Coffee break
      12:00pm Lunch

Then on Mondays, you will be reminded at around 9:20am about your coffee break and at around 11:50am about lunch. The variable appt-message-warning-time specifies how many minutes (default 12) in advance to warn you.

You can write times in am/pm style (with ‘12:00am’ standing for midnight and ‘12:00pm’ standing for noon), or 24-hour European/military style. You need not be consistent; your diary file can have a mixture of the two styles. Times must be at the beginning of diary entries if they are to be recognized.

Emacs updates the appointments list from the diary file automatically just after midnight. You can force an update at any time by re-enabling appointment notification. Both these actions also display the day's diary buffer, unless you set appt-display-diary to nil. The appointments list is also updated whenever the diary file is saved.

You can also use the appointment notification facility like an alarm clock. The command M-x appt-add adds entries to the appointment list without affecting your diary file. You delete entries from the appointment list with M-x appt-delete. --------------070605030906030409060403 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --------------070605030906030409060403-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: Alarms in orgmode Date: Fri, 06 Nov 2009 14:47:10 +0100 Message-ID: <87r5sbzrxd.fsf@mundaneum.com> References: <4AF2E545.3060309@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Erwin, Erwin Panen wrote: > I was looking to set an audible alarm or at least display a message of so= me > kind. Google brought me no results, apart from capabilities that are with= in > Emacs itself, namely the diary & appointments. > http://www.gnu.org/software/emacs/manual/html_node/emacs/Appointments.html > > Can anyone point me to how to do this, if possible at all. > (I'm on windows environment, but interested in Linux too.) The following works for me (yes, I know, I should clean a bit) under Ubuntu= at least. --8<---------------cut here---------------start------------->8--- (require 'org-agenda) ;; Insinuate appt (require 'appt) (setq appt-time-msg-list nil) (org-agenda-to-appt) ;; When use 'r' (rebuild agenda) reload appt (add-hook 'org-agenda-mode-hook (lambda () (setq appt-time-msg-list nil) (org-agenda-to-appt))) (setq appt-audible t) (setq appt-display-format 'echo) ;; turn appointment checking on (appt-activate 1) ;; time in minutes before an appointment that the warning begins (setq appt-message-warning-time 15) ; 12 ;; number of minutes to wait between checking the appointment list (setq appt-display-interval 5) ; 3 ;; update appt each time agenda opened (add-hook 'org-finalize-agenda-hook 'org-agenda-to-appt) (when window-system (setq appt-display-format 'window) ;; FIXME Check `notify-send' (in `libnotify-bin' Ubuntu package) is i= nstalled (defun rgr/org-display (min-to-app new-time msg) (shell-command (concat "notify-send " "-i /usr/share/icons/gnome/32x32/status/appointment-soon.p= ng " "'Appointment' " "'" msg "'"))) ;; TODO For Windows users: use todochicku.el and the snarl notifier (setq appt-disp-window-function (function rgr/org-display))) --8<---------------cut here---------------end--------------->8--- Take what's of use for you from the above. Best regards, Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erwin Panen Subject: Re: Alarms in orgmode Date: Fri, 06 Nov 2009 18:18:10 +0100 Message-ID: <4AF45A52.9090403@fastmail.fm> References: <4AF2E545.3060309@fastmail.fm> <87r5sbzrxd.fsf@mundaneum.com> Reply-To: erwinpanen@fastmail.fm Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N6SSS-0001Ya-O6 for emacs-orgmode@gnu.org; Fri, 06 Nov 2009 12:18:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N6SSN-0001U1-LG for emacs-orgmode@gnu.org; Fri, 06 Nov 2009 12:18:43 -0500 Received: from [199.232.76.173] (port=34088 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6SSN-0001Tw-Cg for emacs-orgmode@gnu.org; Fri, 06 Nov 2009 12:18:39 -0500 Received: from lo.gmane.org ([80.91.229.12]:57642) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N6SSN-0005oK-0G for emacs-orgmode@gnu.org; Fri, 06 Nov 2009 12:18:39 -0500 Received: from list by lo.gmane.org with local (Exim 4.50) id 1N6SSI-00081c-2y for emacs-orgmode@gnu.org; Fri, 06 Nov 2009 18:18:34 +0100 Received: from 83.101.78.37 ([83.101.78.37]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Nov 2009 18:18:34 +0100 Received: from erwinpanen by 83.101.78.37 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Nov 2009 18:18:34 +0100 In-Reply-To: <87r5sbzrxd.fsf@mundaneum.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: public-emacs-orgmode-mXXj517/zsQ@lo.gmane.org Hi Sébastien, Un grand merci! Big thank you - I'll try this out. Erwin Sébastien Vauban wrote: > Hi Erwin, > > Erwin Panen wrote: >> I was looking to set an audible alarm or at least display a message of some >> kind. Google brought me no results, apart from capabilities that are within >> Emacs itself, namely the diary & appointments. >> http://www.gnu.org/software/emacs/manual/html_node/emacs/Appointments.html >> >> Can anyone point me to how to do this, if possible at all. >> (I'm on windows environment, but interested in Linux too.) > > The following works for me (yes, I know, I should clean a bit) under Ubuntu at > least. > > --8<---------------cut here---------------start------------->8--- > (require 'org-agenda) > > ;; Insinuate appt > (require 'appt) > (setq appt-time-msg-list nil) > (org-agenda-to-appt) > ;; When use 'r' (rebuild agenda) reload appt > (add-hook 'org-agenda-mode-hook (lambda () > (setq appt-time-msg-list nil) > (org-agenda-to-appt))) > (setq appt-audible t) > (setq appt-display-format 'echo) > > ;; turn appointment checking on > (appt-activate 1) > > ;; time in minutes before an appointment that the warning begins > (setq appt-message-warning-time 15) ; 12 > > ;; number of minutes to wait between checking the appointment list > (setq appt-display-interval 5) ; 3 > > ;; update appt each time agenda opened > (add-hook 'org-finalize-agenda-hook 'org-agenda-to-appt) > > (when window-system > (setq appt-display-format 'window) > > ;; FIXME Check `notify-send' (in `libnotify-bin' Ubuntu package) is installed > (defun rgr/org-display (min-to-app new-time msg) > (shell-command > (concat "notify-send " > "-i /usr/share/icons/gnome/32x32/status/appointment-soon.png " > "'Appointment' " > "'" msg "'"))) > ;; TODO For Windows users: use todochicku.el and the snarl notifier > > (setq appt-disp-window-function (function rgr/org-display))) > --8<---------------cut here---------------end--------------->8--- > > Take what's of use for you from the above. > > Best regards, > Seb > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rene Subject: Re: Alarms in orgmode Date: Wed, 12 Jun 2013 13:03:26 +0000 (UTC) Message-ID: References: <4AF2E545.3060309@fastmail.fm> <87r5sbzrxd.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmkiH-0007BH-35 for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 09:03:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmkiF-0003w9-Sc for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 09:03:45 -0400 Received: from plane.gmane.org ([80.91.229.3]:48337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmkiF-0003vu-M3 for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 09:03:43 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UmkiE-0001LM-AF for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 15:03:42 +0200 Received: from proxy-master.esisar.grenoble-inp.fr ([195.220.37.18]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Jun 2013 15:03:42 +0200 Received: from jlr_0 by proxy-master.esisar.grenoble-inp.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Jun 2013 15:03:42 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Sébastien Vauban writes: > --8<---------------cut here---------------start------------->8--- > (defun rgr/org-display (min-to-app new-time msg) > (shell-command > (concat "notify-send " > "-i /usr/share/icons/gnome/32x32/status/appointment-soon.png " > "'Appointment' " > "'" msg "'"))) > ;; TODO For Windows users: use todochicku.el and the snarl notifier > > (setq appt-disp-window-function (function rgr/org-display))) > --8<---------------cut here---------------end--------------->8--- If two (or more) appointments happen to start at the same time then appt-disp-window-function leads to the following error: “Argtype error in ‘appt-disp-window-function’ - update it for multiple appts?” A more suited piece of code would be: (setq appt-disp-window-function (lambda (min-to-app new-time appt-msg) ; these args could be lists (or (listp min-to-app) (setq appt-msg (list appt-msg))) (dotimes (i (length appt-msg)) (shell-command (concat "notify-send " "-i /usr/share/icons/gnome/32x32/status/appointment-soon.png " "-t 1000 " "'Appointment' " "'" (nth i appt-msg) "'")))))