From: Nick Daly <nick.m.daly@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: Bug?: org-agenda-to-appt Munging Deadline Dates and Scheduled Times
Date: Tue, 14 May 2013 19:53:10 -0500 [thread overview]
Message-ID: <CAM-YhhD3udY_2NdgcB+gvz7YE04i7Y+Ap8b+zBfpSCqK5XywPA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 443 bytes --]
Hi all, please let me know if the attached minimal example doesn't
come through for whatever reason.
It looks like (org-agenda-to-appt) displays a todo item on its
deadline date at the scheduled time, if the scheduled and deadline
dates are different (and the deadline has no time). The expected
behavior is to not consider the deadline an appointment at a
particular time at all (because it has none specified).
Thanks for your time,
Nick
[-- Attachment #2: schedule-deadline-munging.org --]
[-- Type: application/octet-stream, Size: 3068 bytes --]
* Overview
=org-agenda-to-appt= appears to be munging scheduled and deadline dates: An
appointment with a scheduled time of [2013-05-15 Wed 11:00] appears as an
appointment on its deadline day, at [2013-05-17 Fri 11:00]. Because the
deadline has no time, it should not show up as an appointment on
[2013-05-17 Fri].
** TODO Appointment that Shouldn't Display
DEADLINE: <2013-05-17 Fri> SCHEDULED: <2013-05-15 Wed 11:00-12:00>
This appointment does, but should not, show in the agenda notification
because it was scheduled for last week, not this week.
Unfortunately, it pops up at [2013-05-17 Fri 11:00], seemingly because it
combined the deadline date and the scheduled time.
** TODO Appointment that Should Display
SCHEDULED: <2013-05-17 Fri 11:00-11:30>
This appointment does not, but should, display in the agenda notification,
because it is scheduled for [2013-05-17 Fri 11:00].
* Supporting Source
The =~/.emacs= source required to show messages for upcoming appointments.
Execute each of these source blocks in order to create this issue on
[2013-05-17 Fri 11:00].
** Enable Appointment Notification
Notify when appointments are about to begin.
#+begin_src elisp
(defun appointment-notify ()
"Notify of appointments.
Shamelessly lifted from http://emacs-fu.blogspot.com/2009/11/showing-pop-ups.html"
(defun display-appointments (min-to-app new-time msg)
(appointment-notify (concat "Appointment in " min-to-app " minute(s)") msg))
;; enable notification warnings.
(setq
appt-disp-window-function 'display-appointments
appt-message-warning-time '15
appt-display-format 'window ;; use our func
async-shell-command-buffer 'new-buffer
appt-disp-window-function (function display-appointments))
(appt-activate 1) ;; active appt (appointment notification)
(display-time)) ;; time display is required for this...
(appointment-notify)
#+end_src
** Enable Automatic Agenda Refreshes
Refresh the agenda every 5 minutes.
#+begin_src elisp
(defun org-agenda-timed-refresh ()
"Call org-agenda-redo function even in the non-agenda buffer.
Pulled from http://orgmode.org/worg/org-hacks.html#sec-1-9-12"
(interactive)
(org-save-all-org-buffers)
(org-agenda-to-appt)
(let ((agenda-window (get-buffer-window org-agenda-buffer-name t)))
(when agenda-window
(with-selected-window agenda-window (org-agenda-redo)))))
(run-at-time nil 300 'org-agenda-timed-refresh)
#+end_src
** Notify Appointments are Starting
#+begin_src elisp
(defun appointment-notify (title msg &optional icon sound)
(interactive)
(message (concat title ": " msg)))
#+end_src
** Add this File to the Agenda
#+begin_src elisp
(org-agenda-file-to-front)
#+end_src
** Display the Agenda
#+begin_src elisp
(org-agenda-list)
#+end_src
next reply other threads:[~2013-05-15 0:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-15 0:53 Nick Daly [this message]
2013-05-15 14:32 ` Bug?: org-agenda-to-appt Munging Deadline Dates and Scheduled Times Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAM-YhhD3udY_2NdgcB+gvz7YE04i7Y+Ap8b+zBfpSCqK5XywPA@mail.gmail.com \
--to=nick.m.daly@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).