Function: icalendar--add-diary-entry

icalendar--add-diary-entry is a byte-compiled function defined in icalendar.el.gz.

Signature

(icalendar--add-diary-entry STRING DIARY-FILENAME NON-MARKING &optional SUMMARY)

Documentation

Add STRING to the diary file DIARY-FILENAME.

STRING must be a properly formatted valid diary entry. NON-MARKING determines whether diary events are created as non-marking. If SUMMARY is not nil it must be a string that gives the summary of the entry. In this case the user will be asked whether he wants to insert the entry.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/icalendar.el.gz
(defun icalendar--add-diary-entry (string diary-filename non-marking
                                          &optional summary)
  "Add STRING to the diary file DIARY-FILENAME.
STRING must be a properly formatted valid diary entry.  NON-MARKING
determines whether diary events are created as non-marking.  If
SUMMARY is not nil it must be a string that gives the summary of the
entry.  In this case the user will be asked whether he wants to insert
the entry."
  (when (or (not summary)
            (y-or-n-p (format-message "Add appointment for `%s' to diary? "
                                      summary)))
    (when summary
      (setq non-marking
            (y-or-n-p "Make appointment non-marking? ")))
    (unless diary-filename
      (setq diary-filename
            (read-file-name "Add appointment to this diary file: ")))
    (diary-make-entry string non-marking diary-filename t t))
  ;; return diary-filename in case it has been changed interactively
  diary-filename)