aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/lisp')
-rw-r--r--emacs/.emacs.d/lisp/my/my-pdf-tools.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-pdf-tools.el b/emacs/.emacs.d/lisp/my/my-pdf-tools.el
index 8fe884c..0d498eb 100644
--- a/emacs/.emacs.d/lisp/my/my-pdf-tools.el
+++ b/emacs/.emacs.d/lisp/my/my-pdf-tools.el
@@ -196,5 +196,20 @@
(defun my-pdf-view-enlarge-a-bit () (interactive) (pdf-view-enlarge 1.01))
(defun my-pdf-view-shrink-a-bit () (interactive) (pdf-view-enlarge .99))
+(defvar my-pdf-dptrp1-ip nil
+ "IP address of digital paper device for dpt-rp1 to connect to.")
+
+(defvar my-pdf-dptrp1-program "dptrp1" "The name of the dpt-rp1 program.")
+
+(defun my-pdf-dptrp1-upload (dest)
+ (interactive (list (read-string "[dptrp1] Upload to: " "Document/")))
+ (let ((file (buffer-file-name)))
+ (with-temp-buffer
+ (if (= (call-process my-pdf-dptrp1-program nil (current-buffer) nil
+ "--addr" my-pdf-dptrp1-ip "upload" file dest)
+ 0)
+ (message "Uploaded %s to %s" file dest)
+ (message "Failed to upload %s to %s: %s" file dest (buffer-string))))))
+
(provide 'my-pdf-tools)
;;; my-pdf-tools.el ends here