Browse Source

C-u C-u C-c ! inserts an active timestamp.

I suggest the following change so that C-u C-u C-c ! inserts an inactive
timestamp. I also document the INACTIVE argument of org-time-stamp.

--
Nicolas.

From 5cdb18297d92f2d99334d98aa2f3b8a40e44702f Mon Sep 17 00:00:00 2001
From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Date: Mon, 29 Apr 2013 09:02:21 +0200
Subject: [PATCH] Enforce the convention that C-c ! inserts inactive
 timestamps.

* lisp/org.el (org-time-stamp): When INACTIVE is non-nil, insert an
  inactive timestamp also with double universal argument.
Nicolas Richard 11 years ago
parent
commit
12de6223dc
1 changed files with 5 additions and 2 deletions
  1. 5 2
      lisp/org.el

+ 5 - 2
lisp/org.el

@@ -16043,7 +16043,10 @@ If there is already a timestamp at the cursor, it will be
 modified.
 modified.
 
 
 With two universal prefix arguments, insert an active timestamp
 With two universal prefix arguments, insert an active timestamp
-with the current time without prompting the user."
+with the current time without prompting the user.
+
+When called from lisp, the timestamp is inactive if INACTIVE is
+non-nil."
   (interactive "P")
   (interactive "P")
   (let* ((ts nil)
   (let* ((ts nil)
 	 (default-time
 	 (default-time
@@ -16090,7 +16093,7 @@ with the current time without prompting the user."
 			    " " repeater ">"))))
 			    " " repeater ">"))))
       (message "Timestamp updated"))
       (message "Timestamp updated"))
      ((equal arg '(16))
      ((equal arg '(16))
-      (org-insert-time-stamp (current-time) t))
+      (org-insert-time-stamp (current-time) t inactive))
      (t
      (t
       (setq time (let ((this-command this-command))
       (setq time (let ((this-command this-command))
 		   (org-read-date arg 'totime nil nil default-time default-input inactive)))
 		   (org-read-date arg 'totime nil nil default-time default-input inactive)))