[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] ob-eval: display error fix
From: |
Ruijie Yu |
Subject: |
Re: [O] [PATCH] ob-eval: display error fix |
Date: |
Sat, 07 Jan 2023 15:33:25 -0600 |
User-agent: |
mu4e 1.8.13; emacs 29.0.60 |
Hi Andreas,
- (display-buffer buf))
+ (if org-babel-eval-error-display-notify
+ (display-buffer buf)
+ (if (or (not (numberp exit-code))
+ (> exit-code 0))
+ (display-buffer buf))))
Quick question, does it help or hurt readability if we change this
nested `if' into a `cond' expression?
Or, alternatively, since both the outer then branch and the inner then
branch are the same expression, maybe we can just combine all three
conditions into a single `or' call?
Something like
(when (or org-babel-eval-error-display-notify
(not (numberp exit-code))
(> exit-code 0))
(display-buffer buf))
Best,
RY