;;; rfc.el - Fast access to RFCs ;; FIXME: ;; multiple ftp sites ;; what to do if the file comes back empty? (defun rfc (num) (interactive "sRFC #") (let* ((ftppath "/anonymous@ftp.isi.edu:in-notes/") (filename (concat "rfc" num ".txt")) (locfullname (concat "~/doc/rfc/" filename)) (ftpfullname (concat ftppath filename))) (if (file-exists-p locfullname) (find-file locfullname) (or (get-buffer "in-notes") ;; FIXME: We can't visit the file unless we first visit the ;; directory. (find-file-noselect ftppath)) (message (concat "Looking for " filename "...")) (sit-for 1) (find-file ftpfullname) (write-file locfullname)))) ;;; rfc.el ends here