Function: org-agenda-cleanup-fancy-diary

org-agenda-cleanup-fancy-diary is a byte-compiled function defined in org-agenda.el.gz.

Signature

(org-agenda-cleanup-fancy-diary)

Documentation

Remove unwanted stuff in buffer created by diary-fancy-display.

This gets rid of the date, the underline under the date, and the dummy entry installed by Org mode to ensure non-empty diary for each date. It also removes lines that contain only whitespace.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-agenda.el.gz
(defun org-agenda-cleanup-fancy-diary ()
  "Remove unwanted stuff in buffer created by `diary-fancy-display'.
This gets rid of the date, the underline under the date, and the
dummy entry installed by Org mode to ensure non-empty diary for
each date.  It also removes lines that contain only whitespace."
  (goto-char (point-min))
  (if (looking-at ".*?:[ \t]*")
      (progn
	(replace-match "")
	(re-search-forward "\n=+$" nil t)
	(replace-match "")
	(while (re-search-backward "^ +\n?" nil t) (replace-match "")))
    (re-search-forward "\n=+$" nil t)
    (delete-region (point-min) (min (point-max) (1+ (match-end 0)))))
  (goto-char (point-min))
  (while (re-search-forward "^ +\n" nil t)
    (replace-match ""))
  (goto-char (point-min))
  (when (re-search-forward "^Org mode dummy\n?" nil t)
    (replace-match ""))
  (run-hooks 'org-agenda-cleanup-fancy-diary-hook))