Browse Source

Erase `org-insert-labeled-timestamps-at-point'

* lisp/org.el (org-insert-labeled-timestamps-at-point): Remove
  variable.
(org-add-planning-info): Remove reference to removed variable.

* lisp/org-agenda.el (org-agenda-schedule, org-agenda-deadline):
  Remove reference to removed variable.

* etc/ORG-NEWS (Skipping): Document removal.

Org syntax assumes planning info line is always right below the
headline.  Setting this variable to anything but nil defeats that and,
as a consequence, produces invalid planning lines.
Nicolas Goaziou 10 years ago
parent
commit
ae9ac316a5
3 changed files with 7 additions and 19 deletions
  1. 4 0
      etc/ORG-NEWS
  2. 0 2
      lisp/org-agenda.el
  3. 3 17
      lisp/org.el

+ 4 - 0
etc/ORG-NEWS

@@ -86,6 +86,10 @@ styles when changing the shell type.  Changing the shell type can now
 be done directly from the source block and the quoting style has to be
 compatible across all shells, so a customization doesn't make sense
 anymore.  The chosen hard coded quoting style conforms to POSIX.
+*** Removed option ~org-insert-labeled-timestamps-at-point~
+Setting this option to anything else that the default value (nil)
+would create invalid planning info.  This dangerous option is now
+removed.
 ** New features
 *** Additional markup with =#+INCLUDE= keyword
 The content of the included file can now be optionally marked up, for

+ 0 - 2
lisp/org-agenda.el

@@ -9237,7 +9237,6 @@ ARG is passed through to `org-schedule'."
 	 (type (marker-insertion-type marker))
 	 (buffer (marker-buffer marker))
 	 (pos (marker-position marker))
-	 (org-insert-labeled-timestamps-at-point nil)
 	 ts)
     (set-marker-insertion-type marker t)
     (org-with-remote-undo buffer
@@ -9258,7 +9257,6 @@ ARG is passed through to `org-deadline'."
 		     (org-agenda-error)))
 	 (buffer (marker-buffer marker))
 	 (pos (marker-position marker))
-	 (org-insert-labeled-timestamps-at-point nil)
 	 ts)
     (org-with-remote-undo buffer
       (with-current-buffer buffer

+ 3 - 17
lisp/org.el

@@ -3100,14 +3100,6 @@ as an argument and return the numeric priority."
   :tag "Org Time"
   :group 'org)
 
-(defcustom org-insert-labeled-timestamps-at-point nil
-  "Non-nil means SCHEDULED and DEADLINE timestamps are inserted at point.
-When nil, these labeled time stamps are forces into the second line of an
-entry, just after the headline.  When scheduling from the global TODO list,
-the time stamp will always be forced into the second line."
-  :group 'org-time
-  :type 'boolean)
-
 (defcustom org-time-stamp-rounding-minutes '(0 5)
   "Number of minutes to round time stamps to.
 These are two values, the first applies when first creating a time stamp.
@@ -13513,21 +13505,15 @@ be removed."
       (when what
 	(setq time
 	      (if (stringp time)
-		  ;; This is a string (relative or absolute), set proper date
-		  (apply 'encode-time
+		  ;; This is a string (relative or absolute), set
+		  ;; proper date.
+		  (apply #'encode-time
 			 (org-read-date-analyze
 			  time default-time (decode-time default-time)))
 		;; If necessary, get the time from the user
 		(or time (org-read-date nil 'to-time nil nil
 					default-time default-input)))))
 
-      (when (and org-insert-labeled-timestamps-at-point
-		 (memq what '(scheduled deadline)))
-	(insert
-	 (if (eq what 'scheduled) org-scheduled-string org-deadline-string) " ")
-	(org-insert-time-stamp time org-time-was-given
-			       nil nil nil (list org-end-time-was-given))
-	(setq what nil))
       (org-with-wide-buffer
        (let (col list elt ts buffer-invisibility-spec)
 	 (org-back-to-heading t)