Browse Source

Make it configurable wether agenda jumping prefers the future

* lisp/org.el (org-agenda-jump-prefer-future): New option.
* lisp/org-agenda.el (org-agenda-goto-date): Use
`org-agenda-jump-prefer-future'.
Carsten Dominik 10 years ago
parent
commit
c9bb51e883
2 changed files with 18 additions and 2 deletions
  1. 2 1
      lisp/org-agenda.el
  2. 16 1
      lisp/org.el

+ 2 - 1
lisp/org-agenda.el

@@ -5823,7 +5823,8 @@ Negative selection means regexp must not match for selection of an entry."
 
 (defun org-agenda-goto-date (date)
   "Jump to DATE in agenda."
-  (interactive (list (let ((org-read-date-prefer-future nil))
+  (interactive (list (let ((org-read-date-prefer-future
+			    (eval org-agenda-jump-prefer-future)))
 		       (org-read-date))))
   (org-agenda-list nil date))
 

+ 16 - 1
lisp/org.el

@@ -2595,13 +2595,28 @@ will work:
 Currently none of this works for ISO week specifications.
 
 When this option is nil, the current day, month and year will always be
-used as defaults."
+used as defaults.
+
+See also `org-agenda-jump-prefer-future'."
   :group 'org-time
   :type '(choice
 	  (const :tag "Never" nil)
 	  (const :tag "Check month and day" t)
 	  (const :tag "Check month, day, and time" time)))
 
+(defcustom org-agenda-jump-prefer-future 'org-read-date-prefer-future
+  "Should the agenda jump command prefer the future for incomplete dates?
+The default is to do the same as configured in `org-read-date-prefer-future'.
+But you can alse set a deviating value here.
+This may t or nil, or the symbol `org-read-date-prefer-future'."
+  :group 'org-agenda 
+  :group 'org-time 
+  :type '(choice
+	  (const :tag "Use org-aread-date-prefer-future"
+		 org-read-date-prefer-future)
+	  (const :tag "Never" nil)
+	  (const :tag "Always" t)))
+
 (defcustom org-read-date-display-live t
   "Non-nil means display current interpretation of date prompt live.
 This display will be in an overlay, in the minibuffer."