summaryrefslogtreecommitdiff
path: root/lisp/ledger-exec.el
diff options
context:
space:
mode:
authorRémi Vanicat <vanicat@debian.org>2016-05-28 15:35:09 +0200
committerRémi Vanicat <vanicat@debian.org>2016-05-28 15:39:23 +0200
commit097abf2be5bb1260b27ce98d66d813f279acf48f (patch)
tree285465467dcac67a87525b987877d9e12451bbd4 /lisp/ledger-exec.el
parent8bdc0bba7cbd2b1c404553793468ced78170849a (diff)
downloadfork-ledger-097abf2be5bb1260b27ce98d66d813f279acf48f.tar.gz
fork-ledger-097abf2be5bb1260b27ce98d66d813f279acf48f.tar.bz2
fork-ledger-097abf2be5bb1260b27ce98d66d813f279acf48f.zip
inhibit read only when inserting in *Ledger Error*
When ledger-exec-handle-error is called a second time, it try to insert the error in a buffer that is already read-only. inhibit-read-only permit the insertion.
Diffstat (limited to 'lisp/ledger-exec.el')
-rw-r--r--lisp/ledger-exec.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/ledger-exec.el b/lisp/ledger-exec.el
index 4ba9134d..75a05262 100644
--- a/lisp/ledger-exec.el
+++ b/lisp/ledger-exec.el
@@ -48,7 +48,8 @@
(defun ledger-exec-handle-error (ledger-output)
"Deal with ledger errors contained in LEDGER-OUTPUT."
(with-current-buffer (get-buffer-create "*Ledger Error*")
- (insert-buffer-substring ledger-output)
+ (let ((inhibit-read-only t))
+ (insert-buffer-substring ledger-output))
(view-mode)
(setq buffer-read-only t)))