* Fix the confusing "result silenced" message
@ 2022-11-24 21:20 Rudolf Adamkovič
2022-11-25 2:10 ` Ihor Radchenko
0 siblings, 1 reply; 7+ messages in thread
From: Rudolf Adamkovič @ 2022-11-24 21:20 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 382 bytes --]
Hello smart folks!
With Org Babel, the user can make the results silent, or *silence* them,
with the `:results silent' header argument. However, Org says "result
silenced" after executing source blocks with the `:results none' header
argument. Every time I see that message, I have a "Wait, what?" moment.
The patch attached below fixes this incredibly confusing message.
Rudy
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ob-core-Fix-the-confusing-result-silenced-message.patch --]
[-- Type: text/x-patch, Size: 1048 bytes --]
From 6ffc06e9da723cf04e2c7471e35a46294742be3a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= <salutis@me.com>
Date: Thu, 24 Nov 2022 22:10:29 +0100
Subject: [PATCH] ob-core: Fix the confusing "result silenced" message
* lisp/ob-core.el (org-babel-execute-src-block): Say "discarded"
instead of "silenced" after executing source blocks with `:results
none' to avoid confusion with `:results silent'. Also, capitalize
correctly.
---
lisp/ob-core.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 1259909a0..fb472a00a 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -850,7 +850,7 @@ guess will be made."
(when file
(setq result-params (remove "file" result-params))))))
(if (member "none" result-params)
- (message "result silenced")
+ (message "Result discarded")
(org-babel-insert-result
result result-params info new-hash lang
(time-subtract (current-time) exec-start-time))))
--
2.38.1
[-- Attachment #3: Type: text/plain, Size: 300 bytes --]
--
"Mathematics takes us still further from what is human into the region
of absolute necessity, to which not only the actual world, but every
possible world, must conform."
-- Bertrand Russell, 1902
Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Fix the confusing "result silenced" message
2022-11-24 21:20 Fix the confusing "result silenced" message Rudolf Adamkovič
@ 2022-11-25 2:10 ` Ihor Radchenko
2022-11-25 23:01 ` Rudolf Adamkovič
0 siblings, 1 reply; 7+ messages in thread
From: Ihor Radchenko @ 2022-11-25 2:10 UTC (permalink / raw)
To: Rudolf Adamkovič; +Cc: emacs-orgmode
Rudolf Adamkovič <salutis@me.com> writes:
> Hello smart folks!
>
> With Org Babel, the user can make the results silent, or *silence* them,
> with the `:results silent' header argument. However, Org says "result
> silenced" after executing source blocks with the `:results none' header
> argument. Every time I see that message, I have a "Wait, what?" moment.
> The patch attached below fixes this incredibly confusing message.
> ...
> (if (member "none" result-params)
> - (message "result silenced")
> + (message "Result discarded")
:results none are not discarded. Just not inserted and not displayed.
Otherwise, they can still be used, for example, during noweb expansion.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fix the confusing "result silenced" message
2022-11-25 2:10 ` Ihor Radchenko
@ 2022-11-25 23:01 ` Rudolf Adamkovič
2022-11-26 2:16 ` Ihor Radchenko
0 siblings, 1 reply; 7+ messages in thread
From: Rudolf Adamkovič @ 2022-11-25 23:01 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
Ihor Radchenko <yantar92@posteo.net> writes:
> :results none are not discarded. Just not inserted and not displayed.
> Otherwise, they can still be used, for example, during noweb
> expansion.
Gotcha!
So, what do we say instead of "silenced", to avoid the expected
confusion with ":results silent"?
Some ideas:
- Result not displayed
- Result not shown
- Result hidden
- Result suppressed
Or even something longer:
- Execution done, result not displayed
- Execution done, result not shown
- Execution done, result hidden
- Execution done, result suppressed
Rudy
--
"'Contrariwise,' continued Tweedledee, 'if it was so, it might be; and
if it were so, it would be; but as it isn't, it ain't. That's logic.'"
-- Lewis Carroll, Through the Looking Glass, 1871/1872
Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fix the confusing "result silenced" message
2022-11-25 23:01 ` Rudolf Adamkovič
@ 2022-11-26 2:16 ` Ihor Radchenko
2022-11-30 0:31 ` Rudolf Adamkovič
0 siblings, 1 reply; 7+ messages in thread
From: Ihor Radchenko @ 2022-11-26 2:16 UTC (permalink / raw)
To: Rudolf Adamkovič; +Cc: emacs-orgmode
Rudolf Adamkovič <salutis@me.com> writes:
> Ihor Radchenko <yantar92@posteo.net> writes:
>
>> :results none are not discarded. Just not inserted and not displayed.
>> Otherwise, they can still be used, for example, during noweb
>> expansion.
>
> Gotcha!
>
> So, what do we say instead of "silenced", to avoid the expected
> confusion with ":results silent"?
Hmm. Maybe not displaying message at all?
This message was introduced by me when someone complained about too
verbose tangling process when noweb references are expanded. Previously,
the results were, in fact, displayed in echo area with :results none.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2dfdc8953
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fix the confusing "result silenced" message
2022-11-26 2:16 ` Ihor Radchenko
@ 2022-11-30 0:31 ` Rudolf Adamkovič
2022-11-30 0:36 ` Rudolf Adamkovič
0 siblings, 1 reply; 7+ messages in thread
From: Rudolf Adamkovič @ 2022-11-30 0:31 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 138 bytes --]
Ihor Radchenko <yantar92@posteo.net> writes:
> Hmm. Maybe not displaying message at all?
Agreed. Please, see the updated patch.
Rudy
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ob-core-Remove-the-confusing-result-silenced-message.patch --]
[-- Type: text/x-patch, Size: 1074 bytes --]
From 0c04ca6dec740a5aba7d1934a4d59578ea98ed4e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= <salutis@me.com>
Date: Thu, 24 Nov 2022 22:10:29 +0100
Subject: [PATCH] ob-core: Remove the confusing "result silenced" message
* lisp/ob-core.el (org-babel-execute-src-block): Do not say "silenced"
after executing the source blocks with `:results none' to avoid
confusion with `:results silent'.
---
lisp/ob-core.el | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 5f679a5e9..7abe62022 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -849,8 +849,7 @@ guess will be made."
(setq result (org-babel-ref-resolve post))
(when file
(setq result-params (remove "file" result-params))))))
- (if (member "none" result-params)
- (message "result silenced")
+ (unless (member "none" result-params)
(org-babel-insert-result
result result-params info new-hash lang
(time-subtract (current-time) exec-start-time))))
--
2.38.1
[-- Attachment #3: Type: text/plain, Size: 329 bytes --]
--
"Programming reliably -- must be an activity of an undeniably
mathematical nature […] You see, mathematics is about thinking, and
doing mathematics is always trying to think as well as possible."
-- Edsger W. Dijkstra, 1981
Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Fix the confusing "result silenced" message
2022-11-30 0:31 ` Rudolf Adamkovič
@ 2022-11-30 0:36 ` Rudolf Adamkovič
2022-12-05 11:27 ` Ihor Radchenko
0 siblings, 1 reply; 7+ messages in thread
From: Rudolf Adamkovič @ 2022-11-30 0:36 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 207 bytes --]
Rudolf Adamkovič <salutis@me.com> writes:
> Agreed. Please, see the updated patch.
Oops, I dropped an important word in the commit message.
Please see the third version of patch below.
Rudy
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ob-core-Remove-the-confusing-result-silenced-message.patch --]
[-- Type: text/x-patch, Size: 1081 bytes --]
From c3896ead3e46d705bc4fbee143df87016fe70389 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= <salutis@me.com>
Date: Thu, 24 Nov 2022 22:10:29 +0100
Subject: [PATCH] ob-core: Remove the confusing "result silenced" message
* lisp/ob-core.el (org-babel-execute-src-block): Do not say "result
silenced" after executing the source blocks with `:results none' to
avoid confusion with `:results silent'.
---
lisp/ob-core.el | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 5f679a5e9..7abe62022 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -849,8 +849,7 @@ guess will be made."
(setq result (org-babel-ref-resolve post))
(when file
(setq result-params (remove "file" result-params))))))
- (if (member "none" result-params)
- (message "result silenced")
+ (unless (member "none" result-params)
(org-babel-insert-result
result result-params info new-hash lang
(time-subtract (current-time) exec-start-time))))
--
2.38.1
[-- Attachment #3: Type: text/plain, Size: 329 bytes --]
--
"Programming reliably -- must be an activity of an undeniably
mathematical nature […] You see, mathematics is about thinking, and
doing mathematics is always trying to think as well as possible."
-- Edsger W. Dijkstra, 1981
Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Fix the confusing "result silenced" message
2022-11-30 0:36 ` Rudolf Adamkovič
@ 2022-12-05 11:27 ` Ihor Radchenko
0 siblings, 0 replies; 7+ messages in thread
From: Ihor Radchenko @ 2022-12-05 11:27 UTC (permalink / raw)
To: Rudolf Adamkovič; +Cc: emacs-orgmode
Rudolf Adamkovič <salutis@me.com> writes:
> Rudolf Adamkovič <salutis@me.com> writes:
>
>> Agreed. Please, see the updated patch.
>
> Oops, I dropped an important word in the commit message.
>
> Please see the third version of patch below.
Thanks!
Applied onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=78d283e27
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-12-05 11:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-24 21:20 Fix the confusing "result silenced" message Rudolf Adamkovič
2022-11-25 2:10 ` Ihor Radchenko
2022-11-25 23:01 ` Rudolf Adamkovič
2022-11-26 2:16 ` Ihor Radchenko
2022-11-30 0:31 ` Rudolf Adamkovič
2022-11-30 0:36 ` Rudolf Adamkovič
2022-12-05 11:27 ` Ihor Radchenko
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).