/usr/share/doc/edb/examples/arb-demo.dba is in edb 1.31-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | ;;; arb-demo.dba -*- emacs-lisp -*-
;;;
;;; This database auxiliary file is for use with the database file arb-demo.
(database-set-fieldnames-to-list database '(place time purpose))
(setf (database-print-name database) "Mike's Time & Place Database")
(let ((r-si (database-record-sepinfo database)))
(setf
;; Separating
(sepinfo-sep-string r-si) "\n\n"
;; Extra characters at end of file
(sepinfo-post-last-string r-si) "\n"))
(setf
;; Reading
(database-read-record-from-region database) 'arb-demo-rrfr
;; Writing
(database-write-region-from-record database) 'arb-demo-wrfr)
;; This function (correctly) assumes the buffer is narrowed to the region.
(defun arb-demo-rrfr ()
(if (re-search-forward
"Place:[ \t]*\\(.*\\)\nTime:[ \t]*\\(.*\\)\nPurpose:[ \t]*\\(.*\\)" nil t)
(list 'place (match-string 1)
'time (match-string 2)
'purpose (match-string 3))
(error "arb-demo-rrfr: This line region didn't look like a record to me.")))
(defun arb-demo-wrfr (record)
(insert "Place: " (db-record-field record 'place)
"\nTime: " (db-record-field record 'time)
"\nPurpose: " (db-record-field record 'purpose)))
;; Automatically choose the appropriate format for the current record.
(defun arb-demo-set-format-from-data (record)
(if (string= "Home" (db-record-field record 'place))
(db-change-format "home format")
(db-change-format "non-home format")))
(setq dbf-format-name-spec-alist
'(("home format" . "arb-demo.home-fmt")
("non-home format" . "arb-demo.fmt"))
dbf-before-display-record-function
'arb-demo-set-format-from-data)
;;; arb-demo.dba ends here
|