From: Nick Savage <nick@nicksavage.ca>
To: emacs-orgmode@gnu.org
Subject: Re: Hiding results using :post
Date: Mon, 7 Jun 2021 10:00:34 -0400 [thread overview]
Message-ID: <4a32c014-cc70-f71d-aadf-f830bf5b8af8@nicksavage.ca> (raw)
In-Reply-To: <y651r9d25zc.fsf@mun.ca>
My initial thoughts are that this is very possible. This might be an
area where we could add a new defcustom on always hiding the results to
allow the user to choose it. Without looking at the code, I think it
would be pretty straight forward to make an excursion to the results
line, toggle showing it, then going back to where the point was.
I can take a crack at a patch in the next day or so if no one else wants
to or gets there first.
On 6/7/21 8:51 AM, Roger Mason wrote:
> Hello,
>
> I'd like to be able to hide results, for example when I expect the
> them to span many lines. I know I can hit =tab= on the #+RESULTS: line,
> but I'd like to be able to set this automatically.
>
> My most recent effort:
>
> #+name: hideresults
> #+begin_src emacs-lisp :results none :exports none
> (add-to-invisibility-spec '(org-babel-hide-result . t))
> #+end_src
>
> run like this
>
> #+header: :engine postgresql :dbhost "localhost" :dbuser "rmason" :database "test" :colnames yes
> #+header: :post hideresults
> #+name: pgquery
> #+begin_src sql
> select timestamp,nempty0 from settings where timestamp like '%20210528%'
> #+end_src
>
> produces
>
> #+RESULTS: pgquery
> : nil
>
> I'm sure there is a way to do this, but I need some pointers as to how.
>
> Thanks for any help.
>
> Roger
>
> Org mode version 9.2.3 (release_9.2.3-390-gfb5091 @
> /home/rmason/.emacs.d/org-git/lisp/)
>
> GNU Emacs 27.2 (build 1, amd64-portbld-freebsd11.4, X toolkit, cairo version 1.16.0, Xaw3d scroll bars)
>
next prev parent reply other threads:[~2021-06-07 14:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-07 12:51 Hiding results using :post Roger Mason
2021-06-07 14:00 ` Nick Savage [this message]
2021-06-07 20:42 ` John Kitchin
2021-06-07 21:21 ` George Mauer
2021-06-07 21:30 ` John Kitchin
2021-06-07 21:51 ` George Mauer
2021-06-08 10:38 ` Roger Mason
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=4a32c014-cc70-f71d-aadf-f830bf5b8af8@nicksavage.ca \
--to=nick@nicksavage.ca \
--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).