Re: [Orgmode] tea-time?
At Wed, 29 Jul 2009 18:29:19 -0400, Nick Dokos wrote: Samuel Wales samolog...@gmail.com wrote: Hi Bastien, I did not realize that appt could not be used. On 2009-07-29, Bastien bastiengue...@googlemail.com wrote: Please provide more information on how you tried it. It works now. I pulled in the interim, but I don't know if that's the reason. I tried it twice, so I don't think I missed the notification. However, the notification is in the minibuffer / echo area, and can easily be unnoticed if you are typing, as it goes away immediately. Samuel, you could investigate the linking of appt appointment notifications with external display tools, such as libnotify and osd methods. An example is given by Richard Riley in this message in the mailing list archives: http://article.gmane.org/gmane.emacs.orgmode/8235 I use something similar and following is a code extract from my .emacs based on some of Richard's and Nick's codes: --8---cut here---start-8--- ;; and from RichardRiley's entry: http://www.emacswiki.org/emacs/OrgMode-OSD ;; and from Nick Dokos: http://article.gmane.org/gmane.emacs.orgmode/5271 (require 'appt) (defun rgr/xml-escape (s) (setq s (replace-regexp-in-string ' apos; (replace-regexp-in-string \ quot; (replace-regexp-in-string amp; (replace-regexp-in-string lt; (replace-regexp-in-string gt; s))) (when window-system (defun rgr/osd-display (id msg optional delay vattrib hattrib font) Display a message msg using OSD. Currently requires gnome-osd-client (unless vattrib (setq vattrib top)) (unless hattrib (setq hattrib right)) (unless delay (setq delay 5000)) (unless font (setq font Arial 12)) (save-window-excursion (shell-command (format gnome-osd-client -f \message id='%s' osd_fake_translucent_bg='on' osd_font='%s' animations='on' hide_timeout='%d' osd_vposition='%s' osd_halignment='%s'%s/message\ id font delay vattrib hattrib (rgr/xml-escape msg) (defun esf/notification-display (msg min-to-app new-time) (save-window-excursion (shell-command (format notify-send -t 0 -i /home/ucecesf/s/share/emacs-icon.xpm 'Agenda' \In %s minutes:\n%s\ min-to-app msg ) (when window-system (setq appt-display-format 'window) (defun org-osd-display (min-to-app new-time msg) ; (rgr/osd-display msg msg -1 center left Deja Vu Sans 20) (esf/notification-display msg min-to-app new-time) ; (message (format executing notify-send %s minutes with message %s min-to-app msg)) ) (setq appt-disp-window-function (function org-osd-display)) ;; Run once, activate and schedule refresh (run-at-time nil 3600 'org-agenda-to-appt) (appt-activate t)) (setq appt-time-msg-list nil) (org-agenda-to-appt) (defadvice org-agenda-redo (after org-agenda-redo-add-appts) Pressing `r' on the agenda will also add appointments. (progn (setq appt-time-msg-list nil) (org-agenda-to-appt))) (ad-activate 'org-agenda-redo) --8---cut here---end---8--- This code uses the notification system built-in to Gnome/Kde/et al. and pops up a little window. Of course, this assumes you are using X windows. If you're using MS, I don't have anything to help you unfortunately. eric ___ 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
Re: [Orgmode] tea-time?
Eric S Fraga ucec...@ucl.ac.uk writes: At Wed, 29 Jul 2009 18:29:19 -0400, Nick Dokos wrote: Samuel Wales samolog...@gmail.com wrote: Hi Bastien, I did not realize that appt could not be used. On 2009-07-29, Bastien bastiengue...@googlemail.com wrote: Please provide more information on how you tried it. It works now. I pulled in the interim, but I don't know if that's the reason. I tried it twice, so I don't think I missed the notification. However, the notification is in the minibuffer / echo area, and can easily be unnoticed if you are typing, as it goes away immediately. Samuel, you could investigate the linking of appt appointment notifications with external display tools, such as libnotify and osd methods. An example is given by Richard Riley in this message in the mailing list archives: http://article.gmane.org/gmane.emacs.orgmode/8235 I use something similar and following is a code extract from my .emacs based on some of Richard's and Nick's codes: ;; and from RichardRiley's entry: http://www.emacswiki.org/emacs/OrgMode-OSD ;; and from Nick Dokos: http://article.gmane.org/gmane.emacs.orgmode/5271 (require 'appt) (defun rgr/xml-escape (s) (setq s (replace-regexp-in-string ' apos; (replace-regexp-in-string \ quot; (replace-regexp-in-string amp; (replace-regexp-in-string lt; (replace-regexp-in-string gt; s))) (when window-system (defun rgr/osd-display (id msg optional delay vattrib hattrib font) Display a message msg using OSD. Currently requires gnome-osd-client (unless vattrib (setq vattrib top)) (unless hattrib (setq hattrib right)) (unless delay (setq delay 5000)) (unless font (setq font Arial 12)) (save-window-excursion (shell-command (format gnome-osd-client -f \message id='%s' osd_fake_translucent_bg='on' osd_font='%s' animations='on' hide_timeout='%d' osd_vposition='%s' osd_halignment='%s'%s/message\ id font delay vattrib hattrib (rgr/xml-escape msg) (defun esf/notification-display (msg min-to-app new-time) (save-window-excursion (shell-command (format notify-send -t 0 -i /home/ucecesf/s/share/emacs-icon.xpm 'Agenda' \In %s minutes:\n%s\ min-to-app msg ) (when window-system (setq appt-display-format 'window) (defun org-osd-display (min-to-app new-time msg) ; (rgr/osd-display msg msg -1 center left Deja Vu Sans 20) (esf/notification-display msg min-to-app new-time) ; (message (format executing notify-send %s minutes with message %s min-to-app msg)) ) (setq appt-disp-window-function (function org-osd-display)) ;; Run once, activate and schedule refresh (run-at-time nil 3600 'org-agenda-to-appt) (appt-activate t)) (setq appt-time-msg-list nil) (org-agenda-to-appt) (defadvice org-agenda-redo (after org-agenda-redo-add-appts) Pressing `r' on the agenda will also add appointments. (progn (setq appt-time-msg-list nil) (org-agenda-to-appt))) (ad-activate 'org-agenda-redo) On that subject I dont use that stuff anymore, but use this on gnome for erc notifications directed at me (so if erc buffers are hidden I get a pop up when someone directs at msg directly at me). Its a lot nicer than OSD imo and the code (primarily from Andy Stewart) could easily be adjusted for your Org needs too: , | (defvar erc-nick-notify-last '(0 0 0)) | (defvar erc-nick-notify-delay '(0 5 0)) | (defvar erc-nick-notify-cmd notify-send) | (defvar erc-nick-notify-icon ~/images/mail.png) | (defvar erc-nick-notify-timeout 1) | (defvar erc-nick-notify-urgency low) | (defvar erc-nick-notify-category im.received) | | (add-hook 'erc-text-matched-hook | (lambda (match-type nickuserhost message) | (cond | ((eq match-type 'current-nick) | (if (eq (string-match (concat (erc-current-nick) :) message) 0) (shell-command (concat erc-nick-notify-cmd | -i erc-nick-notify-icon | -t (int-to-string |erc-nick-notify-timeout) | -c erc-nick-notify-category | ' message '))) ` It might be of interest to someone. ___ 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
Re: [Orgmode] tea-time?
Hi Bastien, On 2009-07-26, Bastien bastiengue...@googlemail.com wrote: This thread started because it was claimed that tea-time was integrated into org. (Just for the record, this statement came from emacswiki, not from the list... it's hard to keep on eye on emacswiki for such statements!) It also seems to be in your commit at: http://repo.or.cz/w/Worg.git?a=commitdiff;h=35321eebecca824964c01dd5013b0f19dd646b24 :) I have implemented this tea-time functionality in latest Org. Now you can call `org-timer-set-timer' from Org buffers with `C-c C-x ;' and from Org Agendas with `;'. You will be prompted for a number of minutes and you will get a notification about the current headline after this number of minutes. You can set up to three timers. Please test. A remember interface and a horizontal-space-conserving mode line countdown would work well here, allowing you to not be in org mode and showing you how many minutes remain. I tried it and was not reminded. Does it rely on an external command? Thanks. ___ 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
Re: [Orgmode] tea-time?
(Of course, your commit was long after the thread began, but it does show that number of minutes is different functionality.) ___ 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
Re: [Orgmode] tea-time?
Hi Samuel, Samuel Wales samolog...@gmail.com writes: On 2009-07-26, Bastien bastiengue...@googlemail.com wrote: This thread started because it was claimed that tea-time was integrated into org. (Just for the record, this statement came from emacswiki, not from the list... it's hard to keep on eye on emacswiki for such statements!) It also seems to be in your commit at: http://repo.or.cz/w/Worg.git?a=commitdiff;h=35321eebecca824964c01dd5013b0f19dd646b24 Well, this was the patch I created after the original question about tea-time on the mailing list... I have implemented this tea-time functionality in latest Org. Now you can call `org-timer-set-timer' from Org buffers with `C-c C-x ;' and from Org Agendas with `;'. You will be prompted for a number of minutes and you will get a notification about the current headline after this number of minutes. You can set up to three timers. Please test. A remember interface and a horizontal-space-conserving mode line countdown would work well here, allowing you to not be in org mode and showing you how many minutes remain. Agreed. But I won't have time to code this this week. I tried it and was not reminded. Does it rely on an external command? See the function `org-show-notification' and the option `org-show-notification-handler'. What is the output of (org-show-notification Bump!) ? -- Bastien ___ 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
Re: [Orgmode] tea-time?
Hi Bastien, On 2009-07-29, Bastien bastiengue...@googlemail.com wrote: What is the output of (org-show-notification Bump!) ? The string. Perhaps appt can be added to the fallbacks? ___ 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
Re: [Orgmode] tea-time?
Samuel Wales samolog...@gmail.com writes: Perhaps appt can be added to the fallbacks? Nope. org-show-notification is called by a timer, so adding a timer to a timer would be confusing IMO. -- Bastien ___ 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
Re: [Orgmode] tea-time?
Hi Samuel, Samuel Wales samolog...@gmail.com writes: I tried it and was not reminded. Does it rely on an external command? Please provide more information on how you tried it. From the buffer? From the agenda? What is the value of org-show-notification-handler? -- Bastien ___ 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
Re: [Orgmode] tea-time?
Hi Bastien, I did not realize that appt could not be used. On 2009-07-29, Bastien bastiengue...@googlemail.com wrote: Please provide more information on how you tried it. It works now. I pulled in the interim, but I don't know if that's the reason. I tried it twice, so I don't think I missed the notification. However, the notification is in the minibuffer / echo area, and can easily be unnoticed if you are typing, as it goes away immediately. These are just brainstorm ideas, but appt pops up a window for a configurable number of seconds and raises the frame. The mode line can show the number of minutes overdue. type-break.el uses persistent minibuffer text and lets you control whether you continue to be reminded. Raising the frame is important, but beyond that I am not sure which is best. As for sound, I have disabled all emacs sound, but this would be the one thing that would be good to have it enabled for; not sure how to enable it just for this pupose. Perhaps org could use let or flet at notification time if a variable is non-nil. Thanks. ___ 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
Re: [Orgmode] tea-time?
Samuel Wales samolog...@gmail.com wrote: Hi Bastien, I did not realize that appt could not be used. On 2009-07-29, Bastien bastiengue...@googlemail.com wrote: Please provide more information on how you tried it. It works now. I pulled in the interim, but I don't know if that's the reason. I tried it twice, so I don't think I missed the notification. However, the notification is in the minibuffer / echo area, and can easily be unnoticed if you are typing, as it goes away immediately. These are just brainstorm ideas, but appt pops up a window for a configurable number of seconds and raises the frame. The mode line can show the number of minutes overdue. type-break.el uses persistent minibuffer text and lets you control whether you continue to be reminded. Raising the frame is important, but beyond that I am not sure which is best. As for sound, I have disabled all emacs sound, but this would be the one thing that would be good to have it enabled for; not sure how to enable it just for this pupose. Perhaps org could use let or flet at notification time if a variable is non-nil. If you like how your appointments are shown, you can use the appt display mechanism, by setting org-show-notification-handler to something like this: --8---cut here---start-8--- (defun my-org-show-notification-handler (notification) (funcall appt-disp-window-function 0 (current-time-string) notification)) (setq org-show-notification-handler (function my-org-show-notification-handler)) --8---cut here---end---8--- HTH, Nick ___ 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
Re: [Orgmode] tea-time?
Hi Nick, Nick Dokos nicholas.do...@hp.com writes: If you like how your appointments are shown, you can use the appt display mechanism, by setting org-show-notification-handler to something like this: (defun my-org-show-notification-handler (notification) (funcall appt-disp-window-function 0 (current-time-string) notification)) (setq org-show-notification-handler (function my-org-show-notification-handler)) Nice -- could you post this on Worg? I have very little time myself for this right now... Thanks! -- Bastien ___ 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
Re: [Orgmode] tea-time?
Samuel Wales samolog...@gmail.com writes: It works now. I pulled in the interim, but I don't know if that's the reason. I tried it twice, so I don't think I missed the notification. However, the notification is in the minibuffer / echo area, and can easily be unnoticed if you are typing, as it goes away immediately. These are just brainstorm ideas, but appt pops up a window for a configurable number of seconds and raises the frame. The mode line can show the number of minutes overdue. type-break.el uses persistent minibuffer text and lets you control whether you continue to be reminded. Raising the frame is important, but beyond that I am not sure which is best. As for sound, I have disabled all emacs sound, but this would be the one thing that would be good to have it enabled for; not sure how to enable it just for this pupose. Perhaps org could use let or flet at notification time if a variable is non-nil. Thanks for these ideas. I'm busy the next following days, I will work back on this on sunday. -- Bastien ___ 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
Re: [Orgmode] tea-time?
Samuel Wales samolog...@gmail.com writes: My idea was to be thorough, documenting the idea even if it is too hard to implement. I think the interface would be the same as now, except that clicking on the mode line cycles among the timers. In principle you might be clocking a task while timing a few tea-time-type tasks (e.g. your tea has steeped, the meat is defrosted, the laundry is ready for somebody to switch). tea-time and clocking are different things. Thus, you might want to clock without effort, and you might want to simply do org-remember to start a timer. Or you might want to do both at the same time. I see. Unless I am mistaken, your hooks would work for people who want to clock with effort, but not for those two cases. At least not without further code. No you're not mistaken. This thread started because it was claimed that tea-time was integrated into org. (Just for the record, this statement came from emacswiki, not from the list... it's hard to keep on eye on emacswiki for such statements!) I have implemented this tea-time functionality in latest Org. Now you can call `org-timer-set-timer' from Org buffers with `C-c C-x ;' and from Org Agendas with `;'. You will be prompted for a number of minutes and you will get a notification about the current headline after this number of minutes. You can set up to three timers. Please test. Thanks for insisting on this! -- Bastien ___ 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
Re: [Orgmode] tea-time?
On 2009-07-17, Bastien bastiengue...@googlemail.com wrote: The steps are these: - create a task - add an effort estimate - clock in Let me know if this needs to be refined. If a remember template could be made to do it, then maybe the user could do org-remember, the key for the template, the number of minutes, and the reminder text. Does that sound like a reasonable interface? Another question. Let's say you're clocking a task, but you want to set two reminders. Can clocking keep track of 3 timers and does it know what to put in the mode line? Sounds slightly complicated. Thanks. ___ 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
Re: [Orgmode] tea-time?
Samuel Wales samolog...@gmail.com writes: On 2009-07-17, Bastien bastiengue...@googlemail.com wrote: The steps are these: - create a task - add an effort estimate - clock in Let me know if this needs to be refined. If a remember template could be made to do it, then maybe the user could do org-remember, the key for the template, the number of minutes, and the reminder text. Does that sound like a reasonable interface? To me, yes. Also check the example hooks I sent in my previous email. Another question. Let's say you're clocking a task, but you want to set two reminders. Can clocking keep track of 3 timers and does it know what to put in the mode line? Sounds slightly complicated. Well, yes. Maybe at this point you better do M-x doctor RET :) I'm sure you can run several timers at the same time but I'm not sure whether it would be useful. -- Bastien ___ 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
Re: [Orgmode] tea-time?
My idea was to be thorough, documenting the idea even if it is too hard to implement. I think the interface would be the same as now, except that clicking on the mode line cycles among the timers. In principle you might be clocking a task while timing a few tea-time-type tasks (e.g. your tea has steeped, the meat is defrosted, the laundry is ready for somebody to switch). tea-time and clocking are different things. Thus, you might want to clock without effort, and you might want to simply do org-remember to start a timer. Or you might want to do both at the same time. Unless I am mistaken, your hooks would work for people who want to clock with effort, but not for those two cases. At least not without further code. This thread started because it was claimed that tea-time was integrated into org. Perhaps tea-time should just be used separately from org? Thanks. ___ 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
Re: [Orgmode] tea-time?
Samuel Wales samolog...@gmail.com writes: It is said that tea-time.el is integrated into org, but I have not found it in the manual or in customize yet, at least not in a direct way. AFAIK what was implemented so far is a way to display the clocking time against the effort estimate. My understanding is that tea-time is something that tells you X, Y minutes from now. If you have an effort estimate, this is what it does in the modeline: it tells you that your running clock is 9 minute and that the effort is one hour. If it was integrated into org, that suggests to me that I can tell org that I have to do something in one hour from now, and org will somehow notify me. With an effort estimate already in place, this is what it does. And when you reach the amount of estimated effort, you get a warning. It also suggests the possibility that the modeline will count down just as it currently counts up in the clock. But aside from a series of steps, such as create a task, set a time, run org-agenda-to-appt, or some type of steps involving effort estimates that I have not investigated yet, I don't know how to tell org to tell me X in Y minutes. The steps are these: - create a task - add an effort estimate - clock in Let me know if this needs to be refined. Is there a way to tell org, say X in Y minutes? If not, what are the relative merits of appt-add and tea-time and the series of steps? What I find not practical in the current set up is that you have to set an effort estimate *manually* in order to get something like tea-time provides. I added a new hook on the repo: org-clock-in-prepare-hook which makes it easy to modify the task effort property. Examples: --8---cut here---start-8--- ;; Using this hook will set a default effort estimate of 1:00 ;; to each task you clock in and has no effort property. (add-hook 'org-clock-in-prepare-hook 'my-org-mode-add-default-effort) (defvar org-clock-default-effort 1:00) (defun my-org-mode-add-default-effort () Add a default effort estimation. (unless (org-entry-get (point) Effort) (org-set-property Effort org-clock-default-effort))) --8---cut here---end---8--- --8---cut here---start-8--- ;;; Using this hook will let the user (add-hook 'org-clock-in-prepare-hook 'my-org-mode-ask-effort) (defun my-org-mode-ask-effort () Ask for an effort estimate when clocking in. (unless (org-entry-get (point) Effort) (let ((effort (completing-read Effort: (org-entry-get-multivalued-property (point) Effort (unless (equal effort ) (org-set-property Effort effort) --8---cut here---end---8--- I have pushed this example to org-hacks.org on Worg. HTH, -- Bastien ___ 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
Re: [Orgmode] tea-time?
It is said that tea-time.el is integrated into org, but I have not found it in the manual or in customize yet, at least not in a direct way. My understanding is that tea-time is something that tells you X, Y minutes from now. If it was integrated into org, that suggests to me that I can tell org that I have to do something in one hour from now, and org will somehow notify me. It also suggests the possibility that the modeline will count down just as it currently counts up in the clock. But aside from a series of steps, such as create a task, set a time, run org-agenda-to-appt, or some type of steps involving effort estimates that I have not investigated yet, I don't know how to tell org to tell me X in Y minutes. Is there a way to tell org, say X in Y minutes? If not, what are the relative merits of appt-add and tea-time and the series of steps? Thanks. -- Myalgic encephalomyelitis makes you die decades early (Jason et al. 2006) and suffer severely. Conflicts of interest are destroying research. Silence = death. Again. http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm ___ 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
[Orgmode] tea-time?
http://www.emacswiki.org/emacs-en/tea-time says: Functionality of this package was integrated into org-mode (edge on May 2009) Mmh, but where? Regards henry ___ 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
Re: [Orgmode] tea-time?
M-x customize-group RET org-clock The second last item is about playing sounds. Sebastian ___ 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