Function: org-remove-timestamp-with-keyword

org-remove-timestamp-with-keyword is a byte-compiled function defined in org.el.gz.

Signature

(org-remove-timestamp-with-keyword KEYWORD)

Documentation

Remove all time stamps with KEYWORD in the current entry.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-remove-timestamp-with-keyword (keyword)
  "Remove all time stamps with KEYWORD in the current entry."
  (let ((re (concat "\\<" (regexp-quote keyword) " +<[^>\n]+>[ \t]*"))
	beg)
    (save-excursion
      (org-back-to-heading t)
      (setq beg (point))
      (outline-next-heading)
      (while (re-search-backward re beg t)
	(replace-match "")
        (if (and (string-match "\\S-" (buffer-substring (line-beginning-position) (point)))
		 (equal (char-before) ?\ ))
	    (delete-char -1)
	  (when (string-match "^[ \t]*$" (buffer-substring
                                          (line-beginning-position) (line-end-position)))
            (delete-region (line-beginning-position)
                           (min (point-max) (1+ (line-end-position))))))))))