emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* begin_src problems
@ 2009-05-19  0:23 Tom Tobin
  2009-05-19  0:47 ` Dan Davison
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Tobin @ 2009-05-19  0:23 UTC (permalink / raw)
  To: emacs-orgmode

I'm having some issues using #+BEGIN_SRC; doing the following doesn't
seem to use the org-code face, and doesn't seem to work correctly with
"C-c i":

#+BEGIN_SRC html-mode
<p>foobar</p>
#+END_SRC

Am I missing something?  The "short" form for code literals
(prepending a line with colon-space) seems to work fine.

I was using org-mode 6.13, but just upgraded to the latest HEAD from
the master git branch and had the same issue.

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

* Re: begin_src problems
  2009-05-19  0:23 begin_src problems Tom Tobin
@ 2009-05-19  0:47 ` Dan Davison
  2009-05-19  2:32   ` Tom Tobin
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Davison @ 2009-05-19  0:47 UTC (permalink / raw)
  To: Tom Tobin; +Cc: emacs-orgmode

Hi Tom,

Tom Tobin <korpios@korpios.com> writes:

> I'm having some issues using #+BEGIN_SRC; doing the following doesn't
> seem to use the org-code face, and doesn't seem to work correctly with
> "C-c i":

C-c i is undefined with my setup. Did you mean C-c '?

>
> #+BEGIN_SRC html-mode
> <p>foobar</p>
> #+END_SRC

I think you want #+BEGIN_SRC html. Then it works for me.

Dan

>
> Am I missing something?  The "short" form for code literals
> (prepending a line with colon-space) seems to work fine.
>
> I was using org-mode 6.13, but just upgraded to the latest HEAD from
> the master git branch and had the same issue.
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: begin_src problems
  2009-05-19  0:47 ` Dan Davison
@ 2009-05-19  2:32   ` Tom Tobin
  2009-05-19  3:15     ` Dan Davison
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Tobin @ 2009-05-19  2:32 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, May 18, 2009 at 7:47 PM, Dan Davison <davison@stats.ox.ac.uk> wrote:
> Tom Tobin <korpios@korpios.com> writes:
>> I'm having some issues using #+BEGIN_SRC; doing the following doesn't
>> seem to use the org-code face, and doesn't seem to work correctly with
>> "C-c i":
>
> C-c i is undefined with my setup. Did you mean C-c '?

Yeah, sorry; I meant C-c '.

>> #+BEGIN_SRC html-mode
>> <p>foobar</p>
>> #+END_SRC
>
> I think you want #+BEGIN_SRC html. Then it works for me.

Hmm ... C-c ' now works only if the block is flush with the left
margin.  Is this intentional?  Org-mode tries to align it with the
header it falls under, which seems "right" to me.  The block still
doesn't get the org-code face either way (although the "#+BEGIN_SRC
html" and "#+END_SRC" gets their own face if the block is against the
left margin).

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

* Re: begin_src problems
  2009-05-19  2:32   ` Tom Tobin
@ 2009-05-19  3:15     ` Dan Davison
  2009-05-19  4:55       ` Tom Tobin
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Davison @ 2009-05-19  3:15 UTC (permalink / raw)
  To: Tom Tobin; +Cc: emacs-orgmode

Tom Tobin <korpios@korpios.com> writes:

> On Mon, May 18, 2009 at 7:47 PM, Dan Davison <davison@stats.ox.ac.uk> wrote:
>> Tom Tobin <korpios@korpios.com> writes:
>>> I'm having some issues using #+BEGIN_SRC; doing the following doesn't
>>> seem to use the org-code face, and doesn't seem to work correctly with
>>> "C-c i":
>>
>> C-c i is undefined with my setup. Did you mean C-c '?
>
> Yeah, sorry; I meant C-c '.
>
>>> #+BEGIN_SRC html-mode
>>> <p>foobar</p>
>>> #+END_SRC
>>
>> I think you want #+BEGIN_SRC html. Then it works for me.
>
> Hmm ... C-c ' now works only if the block is flush with the left
> margin.  Is this intentional?  

Yes, it's intentional. The # has to be the first character on the
line. It's the same with the other org syntax which starts #+.

> Org-mode tries to align it with the
> header it falls under, which seems "right" to me.  The block still
> doesn't get the org-code face either way (although the "#+BEGIN_SRC

Not quite sure what you mean by 'org-code' face. The source code gets
fontified, in a different buffer, when you hit C-c ' (fontification is
according to the language major mode specified in the header,
i.e. html-mode in your example). Does this happen for you? The code in
the original org buffer never gets fontified according to language. It
used to be the case that nothing much happened to it, but if you are
using bleeding-edge org from today's commits then it is subject to some
different magic.

Dan



> html" and "#+END_SRC" gets their own face if the block is against the
> left margin).
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: begin_src problems
  2009-05-19  3:15     ` Dan Davison
@ 2009-05-19  4:55       ` Tom Tobin
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Tobin @ 2009-05-19  4:55 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, May 18, 2009 at 10:15 PM, Dan Davison <davison@stats.ox.ac.uk> wrote:
> Tom Tobin <korpios@korpios.com> writes:
>> Hmm ... C-c ' now works only if the block is flush with the left
>> margin.  Is this intentional?
>
> Yes, it's intentional. The # has to be the first character on the
> line. It's the same with the other org syntax which starts #+.

Ahh, that explains it.  It looks kind of odd not indented like the
rest of the content under a header, which is probably what threw me
off.


>> Org-mode tries to align it with the
>> header it falls under, which seems "right" to me.  The block still
>> doesn't get the org-code face either way (although the "#+BEGIN_SRC
>
> Not quite sure what you mean by 'org-code' face. The source code gets
> fontified, in a different buffer, when you hit C-c ' (fontification is
> according to the language major mode specified in the header,
> i.e. html-mode in your example). Does this happen for you? The code in
> the original org buffer never gets fontified according to language. It
> used to be the case that nothing much happened to it, but if you are
> using bleeding-edge org from today's commits then it is subject to some
> different magic.

Yes, that happens for me (now that I have it left-flushed); I think my
expectation was that the lines between the #+ lines would become light
gray, like lines starting with ": " (colon-space) do (by default,
anyway).

Thanks, though!

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

end of thread, other threads:[~2009-05-19  4:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-19  0:23 begin_src problems Tom Tobin
2009-05-19  0:47 ` Dan Davison
2009-05-19  2:32   ` Tom Tobin
2009-05-19  3:15     ` Dan Davison
2009-05-19  4:55       ` Tom Tobin

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