Browse Source

org-agenda: Ignore sticky feature when picking date from calendar

* lisp/org-agenda.el (org-calendar-goto-agenda): Ignore sticky
  feature.

Reported-by: Tory S. Anderson <torys.anderson@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94865>
Nicolas Goaziou 10 years ago
parent
commit
23d4d869f5
1 changed files with 7 additions and 3 deletions
  1. 7 3
      lisp/org-agenda.el

+ 7 - 3
lisp/org-agenda.el

@@ -9640,9 +9640,13 @@ argument, latitude and longitude will be prompted for."
   "Compute the Org-mode agenda for the calendar date displayed at the cursor.
 This is a command that has to be installed in `calendar-mode-map'."
   (interactive)
-  (org-agenda-list nil (calendar-absolute-from-gregorian
-			(calendar-cursor-to-date))
-		   nil))
+  ;; Temporarily disable sticky agenda since user clearly wants to
+  ;; refresh view anyway.
+  (let ((org-agenda-buffer-tmp-name "*Org Agenda(a)*")
+	(org-agenda-sticky nil))
+    (org-agenda-list nil (calendar-absolute-from-gregorian
+			  (calendar-cursor-to-date))
+		     nil)))
 
 (defun org-agenda-convert-date ()
   (interactive)