emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Andreas Gerler <baron@bundesbrandschatzamt.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: [O] [PATCH] ob-eval: display error fix
Date: Fri, 14 Apr 2023 12:44:53 +0000	[thread overview]
Message-ID: <87bkjqmy4a.fsf@localhost> (raw)
In-Reply-To: <BAD93849-5D53-4754-88E6-F4477899E382@bundesbrandschatzamt.de>

Andreas Gerler <baron@bundesbrandschatzamt.de> writes:

> * lisp/ob-eval.el: (org-babel-eval-error-notify): Display standard
> error only if command exits non zero.
>
> The problem is that sql connections might give warnings.
> Now the information is available in the *Org-Babel Error* buffer
> without displaying.
> If you need always display toggle org-babel-eval-error-display-notify.
>

I am looking at this again, and there seems to be no simple way to know
which babel backend is active when org-babel-eval is invoked.

I think that we can use a different approach to handle the problem with
sql connections:

1. Add a new optional parameter to org-babel-eval that will disable
   error buffer completely or when the command exits with 0 exit code.
2. Modify org-babel-execute:sql (and maybe other backends) to pass some
   header argument value to `org-babel-eval'.   

-- 
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>


      parent reply	other threads:[~2023-04-14 12:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-07 13:24 [O] [PATCH] ob-eval: display error fix Andreas Gerler
2023-01-07 21:33 ` Ruijie Yu via General discussions about Org-mode.
2023-01-08 11:16   ` Andreas Gerler
2023-01-27  1:48     ` Ruijie Yu via General discussions about Org-mode.
2023-01-27 13:10     ` Ihor Radchenko
2023-02-03 17:04       ` Andreas Gerler
2023-04-14 12:44 ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bkjqmy4a.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=baron@bundesbrandschatzamt.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).