emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* source block breaks when code looks like heading
@ 2017-08-08  1:08 bruce robertson
  2017-08-08  7:45 ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: bruce robertson @ 2017-08-08  1:08 UTC (permalink / raw)
  To: emacs-orgmode

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

multi-line comments or expressions appearing to be headings break block.

* top
#+begin_src php
/*
*do not prepend a space to 'do'
*/
b = 2
*3; // do not prepend a space to '3'
#+end_src

GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version
10.9.5 (Build 13F1911)) of 2016-09-20
Org mode version 9.0.9 (release_9.0.9-736-gf1b2a9 @
/Users/brucer42/git/org-mode/lisp/)

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

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

* Re: source block breaks when code looks like heading
  2017-08-08  1:08 source block breaks when code looks like heading bruce robertson
@ 2017-08-08  7:45 ` Nicolas Goaziou
  2017-08-08  8:06   ` bruce robertson
  2017-08-13 15:17   ` Uwe Koloska
  0 siblings, 2 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2017-08-08  7:45 UTC (permalink / raw)
  To: bruce robertson; +Cc: emacs-orgmode

Hello,

bruce robertson <brucer42@gmail.com> writes:

> multi-line comments or expressions appearing to be headings break block.
>
> * top
>
> #+begin_src php
> /*
> *do not prepend a space to 'do'
> */
> b = 2
> *3; // do not prepend a space to '3'
> #+end_src

You need to prepend a comma before the asterisks. See (info "(org)Literal
examples").

Regards,

-- 
Nicolas Goaziou

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

* Re: source block breaks when code looks like heading
  2017-08-08  7:45 ` Nicolas Goaziou
@ 2017-08-08  8:06   ` bruce robertson
  2017-08-08 15:08     ` Adam Porter
  2017-08-08 23:03     ` Nicolas Goaziou
  2017-08-13 15:17   ` Uwe Koloska
  1 sibling, 2 replies; 8+ messages in thread
From: bruce robertson @ 2017-08-08  8:06 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

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

How would the source for the math then work?

On Tue, Aug 8, 2017 at 12:45 AM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> bruce robertson <brucer42@gmail.com> writes:
>
> > multi-line comments or expressions appearing to be headings break block.
> >
> > * top
> >
> > #+begin_src php
> > /*
> > *do not prepend a space to 'do'
> > */
> > b = 2
> > *3; // do not prepend a space to '3'
> > #+end_src
>
> You need to prepend a comma before the asterisks. See (info "(org)Literal
> examples").
>
> Regards,
>
> --
> Nicolas Goaziou
>

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

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

* Re: source block breaks when code looks like heading
  2017-08-08  8:06   ` bruce robertson
@ 2017-08-08 15:08     ` Adam Porter
  2017-08-08 23:03     ` Nicolas Goaziou
  1 sibling, 0 replies; 8+ messages in thread
From: Adam Porter @ 2017-08-08 15:08 UTC (permalink / raw)
  To: emacs-orgmode

bruce robertson <brucer42@gmail.com> writes:

> How would the source for the math then work?

If you edit the code-block with C-c ', the escape characters will be
handled automatically.

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

* Re: source block breaks when code looks like heading
  2017-08-08  8:06   ` bruce robertson
  2017-08-08 15:08     ` Adam Porter
@ 2017-08-08 23:03     ` Nicolas Goaziou
  2017-08-09  0:12       ` bruce robertson
  1 sibling, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2017-08-08 23:03 UTC (permalink / raw)
  To: bruce robertson; +Cc: emacs-orgmode

Hello,

bruce robertson <brucer42@gmail.com> writes:

> How would the source for the math then work?

I'm not sure to understand. Have you tried the suggested solution?

Regards,

-- 
Nicolas Goaziou                                                0x80A93738

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

* Re: source block breaks when code looks like heading
  2017-08-08 23:03     ` Nicolas Goaziou
@ 2017-08-09  0:12       ` bruce robertson
  0 siblings, 0 replies; 8+ messages in thread
From: bruce robertson @ 2017-08-09  0:12 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

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

I see what you mean now. I haven't tried evaluating the code in the block
yet. I assume it removes the commas automatically.

On Tue, Aug 8, 2017 at 4:03 PM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> bruce robertson <brucer42@gmail.com> writes:
>
> > How would the source for the math then work?
>
> I'm not sure to understand. Have you tried the suggested solution?
>
> Regards,
>
> --
> Nicolas Goaziou                                                0x80A93738
>

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

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

* Re: source block breaks when code looks like heading
  2017-08-08  7:45 ` Nicolas Goaziou
  2017-08-08  8:06   ` bruce robertson
@ 2017-08-13 15:17   ` Uwe Koloska
  2017-08-13 16:50     ` Nicolas Goaziou
  1 sibling, 1 reply; 8+ messages in thread
From: Uwe Koloska @ 2017-08-13 15:17 UTC (permalink / raw)
  To: emacs-orgmode

Am 08.08.2017 um 09:45 schrieb Nicolas Goaziou:
> You need to prepend a comma before the asterisks. See (info "(org)Literal
> examples").

This is not documented directly but only in a footnote describing how
`org-edit-special' handles lines starting with special characters.

What type of blocks are affected by this?

Regards
Uwe

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

* Re: source block breaks when code looks like heading
  2017-08-13 15:17   ` Uwe Koloska
@ 2017-08-13 16:50     ` Nicolas Goaziou
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2017-08-13 16:50 UTC (permalink / raw)
  To: Uwe Koloska; +Cc: emacs-orgmode

Hello,

Uwe Koloska <orgmode@koloro.de> writes:

> Am 08.08.2017 um 09:45 schrieb Nicolas Goaziou:
>> You need to prepend a comma before the asterisks. See (info "(org)Literal
>> examples").
>
> This is not documented directly but only in a footnote describing how
> `org-edit-special' handles lines starting with special characters.
>
> What type of blocks are affected by this?

Verbatim blocks. You cannot insert a headline in the others (e.g.,
center, quote).

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2017-08-13 16:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-08  1:08 source block breaks when code looks like heading bruce robertson
2017-08-08  7:45 ` Nicolas Goaziou
2017-08-08  8:06   ` bruce robertson
2017-08-08 15:08     ` Adam Porter
2017-08-08 23:03     ` Nicolas Goaziou
2017-08-09  0:12       ` bruce robertson
2017-08-13 15:17   ` Uwe Koloska
2017-08-13 16:50     ` Nicolas Goaziou

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