0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 22:47:56 +00:00

org-plot: Ignore gnuplot buffer read-only error

* lisp/org-plot.el (org-plot/gnuplot): When
`gnuplot-send-buffer-to-gnuplot` is called, it may emit the error
"kill-region: Text is read-only: #<buffer *gnuplot*>" when the plot
operation has been successful.  This prevents `org-plot/gnuplot` from
executing the rest of the function, which is undesirable.
It's preferable just to ignore this error.
This commit is contained in:
TEC 2021-04-26 23:35:33 +08:00
parent dadbd025fa
commit 73a96c63a9
Signed by: tec
GPG key ID: 779591AFDB81F06C

View file

@ -708,7 +708,8 @@ line directly before or after the table."
(insert (org-plot/gnuplot-script table data-file num-cols params)))
;; Graph table.
(gnuplot-mode)
(gnuplot-send-buffer-to-gnuplot))
(ignore-error buffer-read-only
(gnuplot-send-buffer-to-gnuplot)))
;; Cleanup.
(bury-buffer (get-buffer "*gnuplot*"))
;; Refresh any displayed images