emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* how can I get the output of a =#+begin_src org= in the current buffer?
@ 2023-08-12 10:59 Edgar Lux
  2023-08-12 11:07 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Edgar Lux @ 2023-08-12 10:59 UTC (permalink / raw)
  To: Emacs Orgmode

Hello, how can I get the output of a =#+begin_src org= in the current buffer?

#+begin_src emacs-lisp
  (org-babel-do-load-languages 
     'org-babel-load-languages 
     '((shell       . t)
       (latex       . t)
       (emacs-lisp  . t)
       (org         . t)
       ))
#+end_src

#+caption: This shows the contents of the block in the mini-buffer with =C-c C-v e= (=org-babel-execute-maybe=)
#+begin_src org
  #+latex_header: \usepackage{nil}
#+end_src

What I want is to get =#+latex_header: \usepackage{nil}= in the current buffer. The documentation (Org-info and the docstring of =org-babel-execute-src-block=) says that this command would
#+begin_quote
Insert the results of execution into the buffer
#+end_quote

Tips, advice? Thank you!

Org 9.4.6
Emacs 28.2
Linux

P.S.
- I saw this, but it is unrelated (a src block inside another src block).
https://emacs.stackexchange.com/questions/35489/babel-src-block-inside-src-block
- There is a typo in the info pages (parses as see see; remove see from below):
  (org) Results of Evaluation
  #+begin_quote
   The ‘file-desc’ header argument defines the description (see *note
     Link Format::) for the link
  #+end_quote

-- 
Sent with https://mailfence.com  
Secure and private email


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how can I get the output of a =#+begin_src org= in the current buffer?
  2023-08-12 10:59 how can I get the output of a =#+begin_src org= in the current buffer? Edgar Lux
@ 2023-08-12 11:07 ` Ihor Radchenko
  2023-08-12 13:54   ` Edgar Lux
  0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2023-08-12 11:07 UTC (permalink / raw)
  To: Edgar Lux; +Cc: Emacs Orgmode

Edgar Lux <edgarlux@mailfence.com> writes:

> #+begin_src org
>   #+latex_header: \usepackage{nil}
> #+end_src
>
> What I want is to get =#+latex_header: \usepackage{nil}= in the current buffer. The documentation (Org-info and the docstring of =org-babel-execute-src-block=) says that this command would
> #+begin_quote
> Insert the results of execution into the buffer
> #+end_quote
>
> Tips, advice? Thank you!

See https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-org.html
You need

#+begin_src org :results replace
  #+latex_header: \usepackage{nil}
#+end_src

> - There is a typo in the info pages (parses as see see; remove see from below):
>   (org) Results of Evaluation
>   #+begin_quote
>    The ‘file-desc’ header argument defines the description (see *note
>      Link Format::) for the link
>   #+end_quote

May you elaborate?

-- 
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] 4+ messages in thread

* Re: how can I get the output of a =#+begin_src org= in the current buffer?
  2023-08-12 11:07 ` Ihor Radchenko
@ 2023-08-12 13:54   ` Edgar Lux
  2023-08-13  8:21     ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Edgar Lux @ 2023-08-12 13:54 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Emacs Orgmode

[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]

Thanks!!!

Regarding the typo, it does not show here. But in the info buffer, the =(see *note...= becomes (see see ...).

See (:P) attachment

On Aug 12, 2023 at 1:07 PM, Ihor Radchenko <yantar92@posteo.net> wrote:Edgar Lux <edgarlux@mailfence.com> writes:

> #+begin_src org
>   #+latex_header: \usepackage{nil}
> #+end_src
>
> What I want is to get =#+latex_header: \usepackage{nil}= in the current
buffer. The documentation (Org-info and the docstring of
=org-babel-execute-src-block=) says that this command would
> #+begin_quote
> Insert the results of execution into the buffer
> #+end_quote
>
> Tips, advice? Thank you!

See https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-org.html
You need

#+begin_src org :results replace
  #+latex_header: \usepackage{nil}
#+end_src

> - There is a typo in the info pages (parses as see see; remove see from
below):
>   (org) Results of Evaluation
>   #+begin_quote
>    The ‘file-desc’ header argument defines the description (see *note
>      Link Format::) for the link
>   #+end_quote

May you elaborate?

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

-- 
Sent with https://mailfence.com  
Secure and private email

[-- Attachment #2: File Attachment: scr.png --]
[-- Type: image/png, Size: 13584 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how can I get the output of a =#+begin_src org= in the current buffer?
  2023-08-12 13:54   ` Edgar Lux
@ 2023-08-13  8:21     ` Ihor Radchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2023-08-13  8:21 UTC (permalink / raw)
  To: Edgar Lux; +Cc: Emacs Orgmode

Edgar Lux <edgarlux@mailfence.com> writes:

> Regarding the typo, it does not show here. But in the info buffer, the =(see *note...= becomes (see see ...).
>
> See (:P) attachment

This is some info rendering bug in Emacs 28. Nothing to do with Org.
Also, it no longer occurs in Emacs 29.

-- 
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] 4+ messages in thread

end of thread, other threads:[~2023-08-13  8:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-12 10:59 how can I get the output of a =#+begin_src org= in the current buffer? Edgar Lux
2023-08-12 11:07 ` Ihor Radchenko
2023-08-12 13:54   ` Edgar Lux
2023-08-13  8:21     ` 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).