Make QR code buffer readonly
This commit is contained in:
parent
73a87ed767
commit
68b36fc922
|
@ -931,6 +931,7 @@ Which covers my (potential) GPG/SSH usage within Emacs. Now, anytime a I perform
|
|||
(with-current-buffer (get-buffer-create "*qr*")
|
||||
;; in case the buffer still exists and image-mode is active
|
||||
(fundamental-mode)
|
||||
(read-only-mode -1)
|
||||
(erase-buffer)
|
||||
(insert text)
|
||||
(let ((file-format
|
||||
|
@ -938,6 +939,7 @@ Which covers my (potential) GPG/SSH usage within Emacs. Now, anytime a I perform
|
|||
(call-process-region nil nil "qrencode" t t nil "-o" "-" "-t" file-format)
|
||||
(when (and (display-graphic-p) (string= file-format "PNG"))
|
||||
(image-mode)))
|
||||
(read-only-mode)
|
||||
(display-buffer (current-buffer))))
|
||||
#+end_src
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ This function relies on qrencode(1) being present in your $PATH."
|
|||
(with-current-buffer (get-buffer-create "*qr*")
|
||||
;; in case the buffer still exists and image-mode is active
|
||||
(fundamental-mode)
|
||||
(read-only-mode -1)
|
||||
(erase-buffer)
|
||||
(insert text)
|
||||
(let ((file-format
|
||||
|
@ -24,4 +25,5 @@ This function relies on qrencode(1) being present in your $PATH."
|
|||
(call-process-region nil nil "qrencode" t t nil "-o" "-" "-t" file-format)
|
||||
(when (and (display-graphic-p) (string= file-format "PNG"))
|
||||
(image-mode)))
|
||||
(read-only-mode)
|
||||
(display-buffer (current-buffer))))
|
||||
|
|
Loading…
Reference in a new issue