(defun org-synch ()
- (let* ((date (shell-command-to-string "/bin/date '+%Y%m%d'"))
- (dir (expand-file-name "/home/elpa/packages-new"))
- (archive-file (expand-file-name "archive-contents" dir))
+ (let* ((date (shell-command-to-string "/bin/date '+%Y%m%d'")) ; TODO: should use the Emacs built-ins
+ (archive-file "archive-contents")
(package-name 'org)
package-file contents entry)
(setq date (substring date 0 (- (length date) 1))
package-file (concat (symbol-name package-name) "-" date ".tar"))
- (unless (file-exists-p (expand-file-name package-file dir))
+ (unless (file-exists-p package-file)
(error "No package file found"))
+ (unless (file-exists-p archive-file)
+ (error "No archive file found"))
(find-file archive-file)
(setq contents (read (current-buffer))
entry (assq package-name contents))