* XML src block syntax highlighting
@ 2013-04-25 9:57 Tom
2013-04-25 14:24 ` Suvayu Ali
0 siblings, 1 reply; 5+ messages in thread
From: Tom @ 2013-04-25 9:57 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 662 bytes --]
Hi,
I'm in the process of writing documentation for a simple HTTP based API that returns responses as XML.
The included response examples are blocks of the form:
#+BEGIN_SRC xml :exports code
<?xml version="1.0" encoding="utf-8"?>
<validxml>
...
</validxml>
#+END_SRC
I have org-src-fontify-natively = and it works for other code, but xml is fontified as a fundamental buffer, not like nxml-mode shows the block contents. nxml-mode /is/ used when I use C-c ' to edit the contents.
Do I miss something in my setup to let org-mode use nxml-mode for xml src-blocks?
kind regards,
Tom
--
xmpp://tom@sec.goochesa.de
http://www.goochesa.de
[-- Attachment #2: Type: text/html, Size: 865 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: XML src block syntax highlighting
2013-04-25 9:57 XML src block syntax highlighting Tom
@ 2013-04-25 14:24 ` Suvayu Ali
2013-04-25 15:03 ` Tom
0 siblings, 1 reply; 5+ messages in thread
From: Suvayu Ali @ 2013-04-25 14:24 UTC (permalink / raw)
To: emacs-orgmode
On Thu, Apr 25, 2013 at 11:57:49AM +0200, Tom wrote:
>
> #+BEGIN_SRC xml :exports code
> <?xml version="1.0" encoding="utf-8"?>
> <validxml>
> ...
> </validxml>
> #+END_SRC
>
> I have org-src-fontify-natively = and it works for other code, but xml
> is fontified as a fundamental buffer, not like nxml-mode shows the
> block contents. nxml-mode /is/ used when I use C-c ' to edit the
> contents.
Can you try the following:
#+BEGIN_SRC nxml :exports code
..
#+END_SRC
As far as I know, the language is supposed to be the leading part of
<some>-mode. My information is a bit outdated, so I could be wrong.
Hope this helps,
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: XML src block syntax highlighting
2013-04-25 14:24 ` Suvayu Ali
@ 2013-04-25 15:03 ` Tom
2013-04-26 6:50 ` Suvayu Ali
0 siblings, 1 reply; 5+ messages in thread
From: Tom @ 2013-04-25 15:03 UTC (permalink / raw)
To: Suvayu Ali, emacs-orgmode
Hi,
Many thanks for your reply.
Suvayu Ali <fatkasuvayu+linux@gmail.com> schrieb:
>On Thu, Apr 25, 2013 at 11:57:49AM +0200, Tom wrote:
>>
>> #+BEGIN_SRC xml :exports code
>> <?xml version="1.0" encoding="utf-8"?>
>> <validxml>
>> ...
>> </validxml>
>> #+END_SRC
>>
>> I have org-src-fontify-natively = and it works for other code, but
>xml
>> is fontified as a fundamental buffer, not like nxml-mode shows the
>> block contents. nxml-mode /is/ used when I use C-c ' to edit the
>> contents.
>
>Can you try the following:
>
> #+BEGIN_SRC nxml :exports code
> ..
> #+END_SRC
>
>As far as I know, the language is supposed to be the leading part of
><some>-mode. My information is a bit outdated, so I could be wrong.
>
>Hope this helps,
I should have written that in my OP: I tried that to no avail.
I also tried
(add-to-list 'org-src-lang-modes '("xml" . nxml))
Without success.
Regards,
Tom
--
xmpp://tom@sec.goochesa.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: XML src block syntax highlighting
2013-04-25 15:03 ` Tom
@ 2013-04-26 6:50 ` Suvayu Ali
2013-04-26 7:07 ` Tom
0 siblings, 1 reply; 5+ messages in thread
From: Suvayu Ali @ 2013-04-26 6:50 UTC (permalink / raw)
To: Tom; +Cc: emacs-orgmode
On Thu, Apr 25, 2013 at 05:03:37PM +0200, Tom wrote:
> Suvayu Ali <fatkasuvayu+linux@gmail.com> schrieb:
>
> >On Thu, Apr 25, 2013 at 11:57:49AM +0200, Tom wrote:
> >>
> >> #+BEGIN_SRC xml :exports code
> >> <?xml version="1.0" encoding="utf-8"?>
> >> <validxml>
> >> ...
> >> </validxml>
> >> #+END_SRC
> >>
> >> I have org-src-fontify-natively = and it works for other code, but
> >xml
> >> is fontified as a fundamental buffer, not like nxml-mode shows the
> >> block contents. nxml-mode /is/ used when I use C-c ' to edit the
> >> contents.
> >
> >Can you try the following:
> >
> > #+BEGIN_SRC nxml :exports code
> > ..
> > #+END_SRC
> >
> >As far as I know, the language is supposed to be the leading part of
> ><some>-mode. My information is a bit outdated, so I could be wrong.
>
> I should have written that in my OP: I tried that to no avail.
>
> I also tried
>
> (add-to-list 'org-src-lang-modes '("xml" . nxml))
Sorry, I cannot reproduce this. I tried (setq org-src-fontify-natively
t) and both of the following work for me.
#+BEGIN_SRC xml :exports code
..
#+END_SRC
#+BEGIN_SRC nxml :exports code
..
#+END_SRC
Maybe it is your configuration? Did you try a binary search on it?
Comment out half of it at a time and you should be able to find the
problem lines in no time!
GL,
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: XML src block syntax highlighting
2013-04-26 6:50 ` Suvayu Ali
@ 2013-04-26 7:07 ` Tom
0 siblings, 0 replies; 5+ messages in thread
From: Tom @ 2013-04-26 7:07 UTC (permalink / raw)
To: Suvayu Ali; +Cc: emacs-orgmode
Hi Suvayu,
Suvayu Ali <fatkasuvayu+linux@gmail.com> schrieb:
>On Thu, Apr 25, 2013 at 05:03:37PM +0200, Tom wrote:
>> Suvayu Ali <fatkasuvayu+linux@gmail.com> schrieb:
>>
>> >On Thu, Apr 25, 2013 at 11:57:49AM +0200, Tom wrote:
>> >>
>> >> #+BEGIN_SRC xml :exports code
>> >> <?xml version="1.0" encoding="utf-8"?>
>> >> <validxml>
>> >> ...
>> >> </validxml>
>> >> #+END_SRC
>> >>
>> >> I have org-src-fontify-natively = and it works for other code, but
>> >xml
>> >> is fontified as a fundamental buffer, not like nxml-mode shows the
>> >> block contents. nxml-mode /is/ used when I use C-c ' to edit the
>> >> contents.
>> >
>> >Can you try the following:
>> >
>> > #+BEGIN_SRC nxml :exports code
>> > ..
>> > #+END_SRC
>> >
>> >As far as I know, the language is supposed to be the leading part of
>> ><some>-mode. My information is a bit outdated, so I could be wrong.
>>
>> I should have written that in my OP: I tried that to no avail.
>>
>> I also tried
>>
>> (add-to-list 'org-src-lang-modes '("xml" . nxml))
>
>Sorry, I cannot reproduce this. I tried (setq org-src-fontify-natively
>t) and both of the following work for me.
>
> #+BEGIN_SRC xml :exports code
> ..
> #+END_SRC
>
> #+BEGIN_SRC nxml :exports code
> ..
> #+END_SRC
>
>Maybe it is your configuration? Did you try a binary search on it?
>Comment out half of it at a time and you should be able to find the
>problem lines in no time!
Many thanks for checking - I found thw culprit. An old nxml version I installed agea ago via ELPA w
>
>GL,
--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-26 7:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-25 9:57 XML src block syntax highlighting Tom
2013-04-25 14:24 ` Suvayu Ali
2013-04-25 15:03 ` Tom
2013-04-26 6:50 ` Suvayu Ali
2013-04-26 7:07 ` Tom
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).