emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Nested quote blocks?
@ 2020-03-03 17:57 Tim Visher
  2020-03-03 18:26 ` Nicolas Goaziou
  2020-03-04  7:27 ` Fraga, Eric
  0 siblings, 2 replies; 6+ messages in thread
From: Tim Visher @ 2020-03-03 17:57 UTC (permalink / raw)
  To: Emacs Org Mode mailing list

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

Hello,

Is there a way to get nested quotes blocks to work?

AFAICT:

```
#+begin_quote

foo

#+begin_quote
bar
#+end_quote

bat
#end_quote
```

Doesn't work.

Ideally I'm kind of looking for a full functional sub org context inside
there. Maybe I should be using some kind of source block?

--

In Christ,

Timmy V.

https://blog.twonegatives.com
https://five.sentenc.es

[-- Attachment #2: Type: text/html, Size: 775 bytes --]

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

* Re: Nested quote blocks?
  2020-03-03 17:57 Nested quote blocks? Tim Visher
@ 2020-03-03 18:26 ` Nicolas Goaziou
  2020-03-04  7:27 ` Fraga, Eric
  1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2020-03-03 18:26 UTC (permalink / raw)
  To: Tim Visher; +Cc: Emacs Org Mode mailing list

Hello,

Tim Visher <tim.visher@gmail.com> writes:

> Is there a way to get nested quotes blocks to work?

No, you cannot nest quote blocks.

Regards,

-- 
Nicolas Goaziou

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

* Re: Nested quote blocks?
  2020-03-03 17:57 Nested quote blocks? Tim Visher
  2020-03-03 18:26 ` Nicolas Goaziou
@ 2020-03-04  7:27 ` Fraga, Eric
  2020-03-04 17:57   ` Tim Visher
  1 sibling, 1 reply; 6+ messages in thread
From: Fraga, Eric @ 2020-03-04  7:27 UTC (permalink / raw)
  To: Tim Visher; +Cc: Emacs Org Mode mailing list

On Tuesday,  3 Mar 2020 at 12:57, Tim Visher wrote:
> Is there a way to get nested quotes blocks to work?

What is your actual goal?  That is, what you do mean by "to work"?  I
ask because although, as Nicolas has said, you cannot do this directly
with org, you can achieve some specific goals with special blocks and/or
drawers.  For instance, if your goal were to export to LaTeX, this code
would do the job:

#+begin_src org
  ,#+latex_header: \let\myquote\quote
  ,* testing nested blocks
  Joe said:

  ,#+begin_quote
  This is the outer block.

  ,#+begin_myquote
  and this is the inner block
  ,#+end_myquote

  followed by the outer block.
  ,#+end_quote

  and that is all folks.
#+end_src

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-354-g9d5880

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

* Re: Nested quote blocks?
  2020-03-04  7:27 ` Fraga, Eric
@ 2020-03-04 17:57   ` Tim Visher
  2020-03-05  6:45     ` Fraga, Eric
  0 siblings, 1 reply; 6+ messages in thread
From: Tim Visher @ 2020-03-04 17:57 UTC (permalink / raw)
  To: Fraga, Eric; +Cc: Emacs Org Mode mailing list

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

Thanks for responding, Eric. :)

On Wed, Mar 4, 2020 at 2:28 AM Fraga, Eric <e.fraga@ucl.ac.uk> wrote:

> On Tuesday,  3 Mar 2020 at 12:57, Tim Visher wrote:
> > Is there a way to get nested quotes blocks to work?
>
> What is your actual goal?  That is, what you do mean by "to work"?  I
> ask because although, as Nicolas has said, you cannot do this directly
> with org, you can achieve some specific goals with special blocks and/or
> drawers.  For instance, if your goal were to export to LaTeX, this code
> would do the job:
>
> #+begin_src org
>   ,#+latex_header: \let\myquote\quote
>   ,* testing nested blocks
>   Joe said:
>
>   ,#+begin_quote
>   This is the outer block.
>
>   ,#+begin_myquote
>   and this is the inner block
>   ,#+end_myquote
>
>   followed by the outer block.
>   ,#+end_quote
>
>   and that is all folks.
> #+end_src
>

I can demonstrate my goal with Markdown like so
<https://gist.github.com/timvisher/9500d76d609c593b6bcfbb1c6c529ae5>. If
you view the raw file
<https://gist.githubusercontent.com/timvisher/9500d76d609c593b6bcfbb1c6c529ae5/raw/1c5d16ee9c4ad6e33d99f450e5f6e8ce323bdd83/x.md>
you
can see how the quote level nests and yet all of Markdown's markup is
rendered as well. Thus each block quoting 'level' is a fully functional
Markdown context.

IIUC, your solution should work but it's necessarily tied to specific
export backends, right? I would be happy if it could be made to work for
the HTML because that's often my intermediary form these days for getting
text out of Org into something others find less intimidating. :)

[-- Attachment #2: Type: text/html, Size: 2121 bytes --]

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

* Re: Nested quote blocks?
  2020-03-04 17:57   ` Tim Visher
@ 2020-03-05  6:45     ` Fraga, Eric
  2020-03-05 16:14       ` Tim Visher
  0 siblings, 1 reply; 6+ messages in thread
From: Fraga, Eric @ 2020-03-05  6:45 UTC (permalink / raw)
  To: Tim Visher; +Cc: Emacs Org Mode mailing list

On Wednesday,  4 Mar 2020 at 12:57, Tim Visher wrote:
> Thanks for responding, Eric. :)

You're very welcome!

> IIUC, your solution should work but it's necessarily tied to specific
> export backends, right? 

It is partly but the general concept of using special blocks works for
HTML also.  You end up with code that looks like this:

,----
| <div class="myquote">
| <p>
| and this is the inner block
| </p>
| 
| </div>
`----

which means you can customize its appearance using appropriate CSS code.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-354-g9d5880

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

* Re: Nested quote blocks?
  2020-03-05  6:45     ` Fraga, Eric
@ 2020-03-05 16:14       ` Tim Visher
  0 siblings, 0 replies; 6+ messages in thread
From: Tim Visher @ 2020-03-05 16:14 UTC (permalink / raw)
  To: Fraga, Eric; +Cc: Emacs Org Mode mailing list

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

On Thu, Mar 5, 2020 at 1:45 AM Fraga, Eric <e.fraga@ucl.ac.uk> wrote:

> > IIUC, your solution should work but it's necessarily tied to specific
> > export backends, right?
>
> It is partly but the general concept of using special blocks works for
> HTML also.  You end up with code that looks like this:
>
> ,----
> | <div class="myquote">
> | <p>
> | and this is the inner block
> | </p>
> |
> | </div>
> `----
>
> which means you can customize its appearance using appropriate CSS code.


Sounds great. I'll try to hack on this when I have some free time. :)

[-- Attachment #2: Type: text/html, Size: 977 bytes --]

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

end of thread, other threads:[~2020-03-05 16:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-03 17:57 Nested quote blocks? Tim Visher
2020-03-03 18:26 ` Nicolas Goaziou
2020-03-04  7:27 ` Fraga, Eric
2020-03-04 17:57   ` Tim Visher
2020-03-05  6:45     ` Fraga, Eric
2020-03-05 16:14       ` Tim Visher

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