unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Org-mode: toggle between source block and its results
@ 2023-02-06 17:55 Jonas Damm
  2023-02-06 18:25 ` H. Dieter Wilhelm
  2023-02-07 10:05 ` Jean Louis
  0 siblings, 2 replies; 13+ messages in thread
From: Jonas Damm @ 2023-02-06 17:55 UTC (permalink / raw)
  To: help-gnu-emacs

Hi, I would like to make a presentation about music in org-present.
I want to show musical lilypond snippets, but I don't want the source
block itself to show. Is it possible to toggle visablitly of the
source block and its results?

Thanks



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

* Re: Org-mode: toggle between source block and its results
  2023-02-06 17:55 Org-mode: toggle between source block and its results Jonas Damm
@ 2023-02-06 18:25 ` H. Dieter Wilhelm
  2023-02-07  8:51   ` Jonas Damm
  2023-02-07 10:05 ` Jean Louis
  1 sibling, 1 reply; 13+ messages in thread
From: H. Dieter Wilhelm @ 2023-02-06 18:25 UTC (permalink / raw)
  To: Jonas Damm; +Cc: help-gnu-emacs

Jonas Damm <emails@jonas-damm.de> writes:

> Hi, I would like to make a presentation about music in org-present.
> I want to show musical lilypond snippets, but I don't want the source
> block itself to show. Is it possible to toggle visablitly of the
> source block and its results?

I don't know org-present.  But did you realise that you can fold source
blocks, so that they might be not as annoying for you as unfolded?

        Dieter

-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany



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

* Re: Org-mode: toggle between source block and its results
  2023-02-06 18:25 ` H. Dieter Wilhelm
@ 2023-02-07  8:51   ` Jonas Damm
  2023-02-07 17:27     ` H. Dieter Wilhelm
  0 siblings, 1 reply; 13+ messages in thread
From: Jonas Damm @ 2023-02-07  8:51 UTC (permalink / raw)
  To: H. Dieter Wilhelm; +Cc: help-gnu-emacs

Yes,
I know that, but that still leaves an empty line. I thought maybe there
is a toggle between source and its results.
Thank you.

Jonas
"H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de> writes:

> Jonas Damm <emails@jonas-damm.de> writes:
>
>> Hi, I would like to make a presentation about music in org-present.
>> I want to show musical lilypond snippets, but I don't want the source
>> block itself to show. Is it possible to toggle visablitly of the
>> source block and its results?
>
> I don't know org-present.  But did you realise that you can fold source
> blocks, so that they might be not as annoying for you as unfolded?
>
>         Dieter




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

* Re: Org-mode: toggle between source block and its results
  2023-02-06 17:55 Org-mode: toggle between source block and its results Jonas Damm
  2023-02-06 18:25 ` H. Dieter Wilhelm
@ 2023-02-07 10:05 ` Jean Louis
  2023-02-08  5:22   ` tomas
  2023-02-08  8:19   ` Jonas Damm
  1 sibling, 2 replies; 13+ messages in thread
From: Jean Louis @ 2023-02-07 10:05 UTC (permalink / raw)
  To: Jonas Damm; +Cc: help-gnu-emacs

* Jonas Damm <emails@jonas-damm.de> [2023-02-06 21:03]:
> Hi, I would like to make a presentation about music in org-present.
> I want to show musical lilypond snippets, but I don't want the source
> block itself to show. Is it possible to toggle visablitly of the
> source block and its results?

Here is one possible solution:
(info "(org) Blocks") <-- evaluate

which implies you would then export "visible only".

I have tried it this way:

#+STARTUP: hideblocks
#+STARTUP: nohideblocks

#+BEGIN_SRC emacs-lisp
(message "Hello")
#+END_SRC

#+RESULTS:
: Hello

And I could see only result, and not the block.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

* Re: Org-mode: toggle between source block and its results
  2023-02-07  8:51   ` Jonas Damm
@ 2023-02-07 17:27     ` H. Dieter Wilhelm
  2023-02-07 18:39       ` Bruno Barbier
  0 siblings, 1 reply; 13+ messages in thread
From: H. Dieter Wilhelm @ 2023-02-07 17:27 UTC (permalink / raw)
  To: Jonas Damm; +Cc: help-gnu-emacs

Sorry I don't get "toggle between source and...". Maybe you should better ask on the org-mode mailing list.. :-)

  Dieter

On 7 February 2023 09:51:17 CET, Jonas Damm <emails@jonas-damm.de> wrote:
>Yes,
>I know that, but that still leaves an empty line. I thought maybe there
>is a toggle between source and its results.
>Thank you.
>
>Jonas
>"H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de> writes:
>
>> Jonas Damm <emails@jonas-damm.de> writes:
>>
>>> Hi, I would like to make a presentation about music in org-present.
>>> I want to show musical lilypond snippets, but I don't want the source
>>> block itself to show. Is it possible to toggle visablitly of the
>>> source block and its results?
>>
>> I don't know org-present.  But did you realise that you can fold source
>> blocks, so that they might be not as annoying for you as unfolded?
>>
>>         Dieter
>


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

* Re: Org-mode: toggle between source block and its results
  2023-02-07 17:27     ` H. Dieter Wilhelm
@ 2023-02-07 18:39       ` Bruno Barbier
  2023-02-08  8:08         ` Jonas Damm
  0 siblings, 1 reply; 13+ messages in thread
From: Bruno Barbier @ 2023-02-07 18:39 UTC (permalink / raw)
  To: H. Dieter Wilhelm, Jonas Damm; +Cc: help-gnu-emacs



"H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de> writes:

> Sorry I don't get "toggle between source and...". Maybe you should better ask on the org-mode mailing list.. :-)
>

It looks like this request/issue, on the org-present package devel site:
   https://github.com/rlister/org-present/issues/28


Bruno



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

* Re: Org-mode: toggle between source block and its results
  2023-02-07 10:05 ` Jean Louis
@ 2023-02-08  5:22   ` tomas
  2023-02-08  8:19   ` Jonas Damm
  1 sibling, 0 replies; 13+ messages in thread
From: tomas @ 2023-02-08  5:22 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: Jonas Damm

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

On Tue, Feb 07, 2023 at 01:05:05PM +0300, Jean Louis wrote:
> * Jonas Damm <emails@jonas-damm.de> [2023-02-06 21:03]:
> > Hi, I would like to make a presentation about music in org-present.

[...]

> Here is one possible solution:
> (info "(org) Blocks") <-- evaluate
> 
> which implies you would then export "visible only".

AFAIK, OP was talking about org-present. Has nothing to do
with export.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: Org-mode: toggle between source block and its results
  2023-02-07 18:39       ` Bruno Barbier
@ 2023-02-08  8:08         ` Jonas Damm
  2023-02-08 20:25           ` Jean Louis
  0 siblings, 1 reply; 13+ messages in thread
From: Jonas Damm @ 2023-02-08  8:08 UTC (permalink / raw)
  To: Bruno Barbier; +Cc: H. Dieter Wilhelm, help-gnu-emacs

Yes indeed.
I guess there is no way.
Thanks anyway!

Bruno Barbier <brubar.cs@gmail.com> writes:

> "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de> writes:
>
>> Sorry I don't get "toggle between source and...". Maybe you should better ask on the org-mode mailing list.. :-)
>>
>
> It looks like this request/issue, on the org-present package devel site:
>    https://github.com/rlister/org-present/issues/28
>
>
> Bruno




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

* Re: Org-mode: toggle between source block and its results
  2023-02-07 10:05 ` Jean Louis
  2023-02-08  5:22   ` tomas
@ 2023-02-08  8:19   ` Jonas Damm
  2023-02-08 20:18     ` Jean Louis
  1 sibling, 1 reply; 13+ messages in thread
From: Jonas Damm @ 2023-02-08  8:19 UTC (permalink / raw)
  To: Jean Louis; +Cc: help-gnu-emacs

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

Thank you for this advice. For some reason it does not work for me
though..
Attached is my example presentation, if you want to try that.

Jonas


[-- Attachment #2: Example --]
[-- Type: application/vnd.lotus-organizer, Size: 368 bytes --]

[-- Attachment #3: Type: text/plain, Size: 762 bytes --]


Jean Louis <bugs@gnu.support> writes:

> [1. text/plain]
> * Jonas Damm <emails@jonas-damm.de> [2023-02-06 21:03]:
>> Hi, I would like to make a presentation about music in org-present.
>> I want to show musical lilypond snippets, but I don't want the source
>> block itself to show. Is it possible to toggle visablitly of the
>> source block and its results?
>
> Here is one possible solution:
> (info "(org) Blocks") <-- evaluate
>
> which implies you would then export "visible only".
>
> I have tried it this way:
>
> [2. text/x-org]
> #+STARTUP: hideblocks
> #+STARTUP: nohideblocks
>
> [3. text/x-org]
> #+BEGIN_SRC emacs-lisp
> (message "Hello")
> #+END_SRC
>
> [4. text/plain]
> #+RESULTS:
> : Hello
>
> And I could see only result, and not the block.


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

* Re: Org-mode: toggle between source block and its results
  2023-02-08  8:19   ` Jonas Damm
@ 2023-02-08 20:18     ` Jean Louis
  2023-02-09  7:10       ` Jonas Damm
  0 siblings, 1 reply; 13+ messages in thread
From: Jean Louis @ 2023-02-08 20:18 UTC (permalink / raw)
  To: Jonas Damm; +Cc: help-gnu-emacs

* Jonas Damm <emails@jonas-damm.de> [2023-02-08 11:21]:
> > * Jonas Damm <emails@jonas-damm.de> [2023-02-06 21:03]:
> >> Hi, I would like to make a presentation about music in org-present.
> >> I want to show musical lilypond snippets, but I don't want the source
> >> block itself to show. Is it possible to toggle visablitly of the
> >> source block and its results?

Help me, and tell me, how to export lilypond? I got the software, but
the Org block is not exporting it, do you use some package for it?

Then I can test it.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

* Re: Org-mode: toggle between source block and its results
  2023-02-08  8:08         ` Jonas Damm
@ 2023-02-08 20:25           ` Jean Louis
  2023-02-09  7:02             ` Jonas Damm
  0 siblings, 1 reply; 13+ messages in thread
From: Jean Louis @ 2023-02-08 20:25 UTC (permalink / raw)
  To: Jonas Damm; +Cc: Bruno Barbier, H. Dieter Wilhelm, help-gnu-emacs

* Jonas Damm <emails@jonas-damm.de> [2023-02-08 11:10]:
> Yes indeed.
> I guess there is no way.

There is way, do not give up too early.

You basically want to show the exported picture, right? But not the
source block?

I cannot handle lilypond, but I can handle emacs-lisp code block, see
below, and try doing same for lilypond, observe ":exports results"

#+BEGIN_SRC emacs-lisp :exports results
(message "Hello")
#+END_SRC

#+RESULTS:
: Hello

Because you only had this:

#+begin_src lilypond :file notes.png

but how about this:

#+begin_src lilypond :file notes.png :exports results

so try it with that line, as I can't try it, I am missing packages
that you may have.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

* Re: Org-mode: toggle between source block and its results
  2023-02-08 20:25           ` Jean Louis
@ 2023-02-09  7:02             ` Jonas Damm
  0 siblings, 0 replies; 13+ messages in thread
From: Jonas Damm @ 2023-02-09  7:02 UTC (permalink / raw)
  To: Jean Louis; +Cc: Bruno Barbier, H. Dieter Wilhelm, help-gnu-emacs

Thanks,

I modified it, as you suggested.
Nothing changed though. What is to be expected excactly? Should the
source block be collapsed, directly after opening the file?

This is what I tried:


#+STARTUP: hideblocks
#+TITLE: Gitarre und Rhythmus

Willkommen!

#+begin_src emacs-lisp :exports results

  (message "hello")
  
#+end_src

#+RESULTS:
: hello



* Rhythmus Notation

** Mehr Beispiele


Jean Louis <bugs@gnu.support> writes:

> [1. text/plain]
> * Jonas Damm <emails@jonas-damm.de> [2023-02-08 11:10]:
>> Yes indeed.
>> I guess there is no way.
>
> There is way, do not give up too early.
>
> You basically want to show the exported picture, right? But not the
> source block?
>
> I cannot handle lilypond, but I can handle emacs-lisp code block, see
> below, and try doing same for lilypond, observe ":exports results"
>
> [2. text/x-org]
> #+BEGIN_SRC emacs-lisp :exports results
> (message "Hello")
> #+END_SRC
>
> [3. text/plain]
> #+RESULTS:
> : Hello
>
> Because you only had this:
>
> #+begin_src lilypond :file notes.png
>
> but how about this:
>
> #+begin_src lilypond :file notes.png :exports results
>
> so try it with that line, as I can't try it, I am missing packages
> that you may have.




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

* Re: Org-mode: toggle between source block and its results
  2023-02-08 20:18     ` Jean Louis
@ 2023-02-09  7:10       ` Jonas Damm
  0 siblings, 0 replies; 13+ messages in thread
From: Jonas Damm @ 2023-02-09  7:10 UTC (permalink / raw)
  To: Jean Louis; +Cc: help-gnu-emacs

Maybe you need this, for org-babel to recognize the source block:


(with-eval-after-load 'org
    (org-babel-do-load-languages
        'org-babel-load-languages
        '((emacs-lisp . t)
          (lilypond . t)
          (python . t)))

    (push '("conf-unix" . conf-unix) org-src-lang-modes))


I also have this in my config:


(setq load-path (append (list (expand-file-name "/usr/share/emacs/site-lisp")) load-path))

  (autoload 'LilyPond-mode "lilypond-mode")
  (setq auto-mode-alist
        (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist))

  (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock)))


Jean Louis <bugs@gnu.support> writes:

> * Jonas Damm <emails@jonas-damm.de> [2023-02-08 11:21]:
>> > * Jonas Damm <emails@jonas-damm.de> [2023-02-06 21:03]:
>> >> Hi, I would like to make a presentation about music in org-present.
>> >> I want to show musical lilypond snippets, but I don't want the source
>> >> block itself to show. Is it possible to toggle visablitly of the
>> >> source block and its results?
>
> Help me, and tell me, how to export lilypond? I got the software, but
> the Org block is not exporting it, do you use some package for it?
>
> Then I can test it.




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

end of thread, other threads:[~2023-02-09  7:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-06 17:55 Org-mode: toggle between source block and its results Jonas Damm
2023-02-06 18:25 ` H. Dieter Wilhelm
2023-02-07  8:51   ` Jonas Damm
2023-02-07 17:27     ` H. Dieter Wilhelm
2023-02-07 18:39       ` Bruno Barbier
2023-02-08  8:08         ` Jonas Damm
2023-02-08 20:25           ` Jean Louis
2023-02-09  7:02             ` Jonas Damm
2023-02-07 10:05 ` Jean Louis
2023-02-08  5:22   ` tomas
2023-02-08  8:19   ` Jonas Damm
2023-02-08 20:18     ` Jean Louis
2023-02-09  7:10       ` Jonas Damm

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