ต่อไปนี้เป็นตัวอย่างที่ย่อของวิธีการดึงข้อมูลที่จะเข้าสู่นั้น*Org Agenda*บัฟเฟอร์เมื่อตามปกติโดยใช้ฟังก์ชั่นorg-agenda-listด้วยorg-agenda-entry-typesเช่น:deadline, :scheduled, :timestamp, sexp, และ:deadline* :scheduled*ช่วงของวันที่ - beginและend- ควรจะอยู่ในรูปแบบรายการเกรกอเรียน - '(6 1 2015)เช่น ตัวเลือกปรับแต่งขอผูกพันอยู่และorg-agenda-prefix-format org-agenda-entry-typesฟังก์ชันส่งคืนผลลัพธ์ในรูปแบบของรายการ
(require 'calendar)
(require 'org)
(require 'org-agenda)
(require 'cl)
;; Portions of following code were extracted from:
;;   https://github.com/kiwanami/emacs-calfw written by Masashi Sakurai
;; Said code has been modified by @lawlist hereinbelow.
;;
(defun org-get-entries-fn (begin end)
"Return org schedule items between BEGIN and END.
USAGE:  (org-get-entries-fn '(6 1 2015) '(12 31 2020))"
  (unless
      (and
        (calendar-date-is-valid-p begin)
        (calendar-date-is-valid-p end))
    (let ((debug-on-quit nil))
      (signal 'quit '("One or both of your Gregorian dates are invalid."))))
  (let* (
      result
      (org-agenda-buffer nil) ;; prevent error from `org-compile-prefix-format'
      ;; The variable `org-agenda-only-exact-dates' is apparently not operational.
      (org-scheduled-past-days 0) ;; avoid duplicate entries for overdue items
      (org-agenda-prefix-format "• ")
      (org-agenda-entry-types '(:scheduled))
      (date-after
        (lambda (date num)
          "Return the date after NUM days from DATE."
          (calendar-gregorian-from-absolute
           (+ (calendar-absolute-from-gregorian date) num))))
      (enumerate-days
        (lambda (begin end)
          "Enumerate date objects between BEGIN and END."
          (when (> (calendar-absolute-from-gregorian begin)
                   (calendar-absolute-from-gregorian end))
            (error "Invalid period : %S - %S" begin end))
          (let ((d begin) ret (cont t))
            (while cont
              (push (copy-sequence d) ret)
              (setq cont (not (equal d end)))
              (setq d (funcall date-after d 1)))
            (nreverse ret)))) )
    (org-compile-prefix-format nil)
    (setq result
      (loop for date in (funcall enumerate-days begin end) append
        (loop for file in (org-agenda-files nil 'ifmode) append
          (progn
            (org-check-agenda-file file)
            (apply 'org-agenda-get-day-entries file date org-agenda-entry-types)))))
    result))