October 29, 2003

Bulk view

Elisp snippet for sucking data into BBDB

(defun sacha/suck-data-into-bbdb (notes)
  "Create BBDB data given NOTES.
The region should contain data of the form:
name | company | e-mail"
  (interactive "MEnter notes string: ")
  (while (re-search-forward "^\\(.*?\\)\s*|\s*\\(.*?\\)\s*|\s*\\(.*?\\)\s*$" nil t)
    (let* ((name (match-string 1))
           (company (match-string 2))
           (net (match-string 3))
           (record (bbdb-search-simple nil net)))
      (if record
          (bbdb-record-set-notes record (concat (bbdb-record-notes record) "\n" notes))
        (bbdb-create-internal name company net nil nil notes)))))

Controlled dual-booting — linux

From Slashdot:

Set up Lilo with two targets: Linux and Winders.

Make Linux the default target to boot to.

When you’re inside of Linux, and you want to set it so it boots Windows for the next boot, and only the next boot, then you do a

lilo -R windows ; shutdown -r now

The next boot will be into Windows. The boot after that will be back into Linux.