Skip to content

Instantly share code, notes, and snippets.

@scottdw
Created May 31, 2010 23:35
Show Gist options
  • Save scottdw/420386 to your computer and use it in GitHub Desktop.
Save scottdw/420386 to your computer and use it in GitHub Desktop.
An elisp function for encoding a region into a QR code from emacs. Uses java class http://gist.github.com/420377 and core.jar from http://code.google.com/p/zxing/
;;; qr-encode.el ---
;;
;; Description: A function for encoding a region into a QR code from emacs.
;; Uses java class http://gist.github.com/420377 and core.jar from
;; http://code.google.com/p/zxing/
;;
;; URL: http://gist.github.com/420386
;;
;; Author: Scott Douglas-Watson
(defun qr-encode-region (start end)
(interactive "r")
(let ((b "QR-Encode"))
(kill-buffer (get-buffer-create b))
(call-process-region start end "java"
nil b nil
"-cp"
"c:\\Users\\scottdw\\src\\CmdZXing\\dist\\CmdZXing.jar"
"scottdw.cmd.zxing.InToQrPbm")
(switch-to-buffer b)
(image-mode)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment