summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBasil L. Contovounesios <contovob@tcd.ie>2020-04-14 15:26:04 +0100
committerBasil L. Contovounesios <contovob@tcd.ie>2020-04-17 11:38:25 +0100
commit7f1dae114dffbf4bdec60e38ada4eb0673cfb4e2 (patch)
tree8a9ed4b2bf55a46e704ad68dea72736ff0b199e6
parent763ec05cc17973134c440f2d0afb6eb5d095d0d4 (diff)
downloademacs-7f1dae114dffbf4bdec60e38ada4eb0673cfb4e2.tar.gz
Fix effect-free warning in ob-screen.el while loop
The warning was introduced and detected by an optimizer addition proposed in the following thread: https://lists.gnu.org/archive/html/emacs-devel/2019-12/msg00711.html * lisp/org/ob-screen.el (org-babel-screen-test): Avoid 'value returned from (format "...") is unused' warning by doing something more useful than busy string manipulation while waiting for an asynchronous subprocess to make the temporary file readable.
-rw-r--r--lisp/org/ob-screen.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/org/ob-screen.el b/lisp/org/ob-screen.el
index ad00ee070d4..837c18f8407 100644
--- a/lisp/org/ob-screen.el
+++ b/lisp/org/ob-screen.el
@@ -126,7 +126,7 @@ The terminal should shortly flicker."
;; XXX: need to find a better way to do the following
(while (not (file-readable-p tmpfile))
;; do something, otherwise this will be optimized away
- (format "org-babel-screen: File not readable yet."))
+ (sit-for 0.1))
(setq tmp-string (with-temp-buffer
(insert-file-contents-literally tmpfile)
(buffer-substring (point-min) (point-max))))