* export literal examples font-lock: ess-mode
@ 2012-08-17 13:23 Paul
2012-08-17 15:12 ` Ista Zahn
0 siblings, 1 reply; 5+ messages in thread
From: Paul @ 2012-08-17 13:23 UTC (permalink / raw)
To: Emacs-orgmode
I write do-files for Stata code in emacs using ESS, which marks up my
code and sends it to a comint-mode buffer for evaluation. I'd like to
include some source code in an org file, as in the below examle:
#+begin_src -n
foreach var of varlist _all{
rename `var' new_`var'
}
#+end_src
I have a couple of questions:
How can I use ess fontification in this snippet and in the file to
which I export? The manual says I "need to specify the name of the
major mode," however including "#+begin_src ess -n" results in the
following error "org-edit-src-code: No such language mode: nil-mode."
I've tried using ess-mode, and anything else I can think of, to no
avail. What should I include?
Also, assuming I'm able to get the fontification to work, is there a
way to customize it for exporting?
Finally, org-babel looks tremendously useful. Is there a way to
harness it's capabilities for an unsupported language like Stata's?
Thanks to everyone who read this through, and in particular to anyone
who can help!
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: export literal examples font-lock: ess-mode
2012-08-17 13:23 export literal examples font-lock: ess-mode Paul
@ 2012-08-17 15:12 ` Ista Zahn
2012-08-17 15:33 ` Paul Burkander
0 siblings, 1 reply; 5+ messages in thread
From: Ista Zahn @ 2012-08-17 15:12 UTC (permalink / raw)
To: Paul; +Cc: Emacs-orgmode
On Fri, Aug 17, 2012 at 9:23 AM, Paul <paulburk314@gmail.com> wrote:
> I write do-files for Stata code in emacs using ESS, which marks up my
> code and sends it to a comint-mode buffer for evaluation. I'd like to
> include some source code in an org file, as in the below examle:
>
> #+begin_src -n
> foreach var of varlist _all{
> rename `var' new_`var'
> }
> #+end_src
>
> I have a couple of questions:
> How can I use ess fontification in this snippet
#+begin_src stata
foreach var of varlist _all{
rename `var' new_`var'
}
#+end_src
works for me.
and in the file to
> which I export?
I think this depends on your export target. It should "just work" for
html, but pdf will be more work.
The manual says I "need to specify the name of the
> major mode," however including "#+begin_src ess -n" results in the
> following error "org-edit-src-code: No such language mode: nil-mode."
> I've tried using ess-mode, and anything else I can think of, to no
> avail. What should I include?
I think "#+begin_src stata" is correct.
>
> Also, assuming I'm able to get the fontification to work, is there a
> way to customize it for exporting?
>
> Finally, org-babel looks tremendously useful. Is there a way to
> harness it's capabilities for an unsupported language like Stata's?
C-c ' will open a temporary buffer in ess mode so you can edit and run
the code using ess, and tangling will work as expected. The only thing
you need babel support for is actually running the code in org-mode
and inserting the results block.
I've made weak attempts to add stata support to babel, but my
elisp-foo is not strong enough.
>
> Thanks to everyone who read this through, and in particular to anyone
> who can help!
> Paul
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: export literal examples font-lock: ess-mode
2012-08-17 15:12 ` Ista Zahn
@ 2012-08-17 15:33 ` Paul Burkander
2012-08-19 6:28 ` Bastien
0 siblings, 1 reply; 5+ messages in thread
From: Paul Burkander @ 2012-08-17 15:33 UTC (permalink / raw)
To: Ista Zahn; +Cc: Paul, Emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2017 bytes --]
ah! for some reason capitalizing BEGIN_SRC seems to have been causing
problems.
Thanks for your help!
On Fri, Aug 17, 2012 at 11:12 AM, Ista Zahn <istazahn@gmail.com> wrote:
> On Fri, Aug 17, 2012 at 9:23 AM, Paul <paulburk314@gmail.com> wrote:
> > I write do-files for Stata code in emacs using ESS, which marks up my
> > code and sends it to a comint-mode buffer for evaluation. I'd like to
> > include some source code in an org file, as in the below examle:
> >
> > #+begin_src -n
> > foreach var of varlist _all{
> > rename `var' new_`var'
> > }
> > #+end_src
> >
> > I have a couple of questions:
> > How can I use ess fontification in this snippet
>
> #+begin_src stata
> foreach var of varlist _all{
> rename `var' new_`var'
> }
> #+end_src
>
> works for me.
>
> and in the file to
> > which I export?
>
> I think this depends on your export target. It should "just work" for
> html, but pdf will be more work.
>
> The manual says I "need to specify the name of the
> > major mode," however including "#+begin_src ess -n" results in the
> > following error "org-edit-src-code: No such language mode: nil-mode."
> > I've tried using ess-mode, and anything else I can think of, to no
> > avail. What should I include?
>
> I think "#+begin_src stata" is correct.
>
> >
> > Also, assuming I'm able to get the fontification to work, is there a
> > way to customize it for exporting?
> >
> > Finally, org-babel looks tremendously useful. Is there a way to
> > harness it's capabilities for an unsupported language like Stata's?
>
> C-c ' will open a temporary buffer in ess mode so you can edit and run
> the code using ess, and tangling will work as expected. The only thing
> you need babel support for is actually running the code in org-mode
> and inserting the results block.
>
> I've made weak attempts to add stata support to babel, but my
> elisp-foo is not strong enough.
>
> >
> > Thanks to everyone who read this through, and in particular to anyone
> > who can help!
> > Paul
> >
>
[-- Attachment #2: Type: text/html, Size: 2835 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: export literal examples font-lock: ess-mode
2012-08-17 15:33 ` Paul Burkander
@ 2012-08-19 6:28 ` Bastien
2012-08-19 17:11 ` Paul Burkander
0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2012-08-19 6:28 UTC (permalink / raw)
To: Paul Burkander; +Cc: Paul, Emacs-orgmode, Ista Zahn
Hi Paul,
Paul Burkander <paul@burkander.com> writes:
> ah! for some reason capitalizing BEGIN_SRC seems to have been causing
> problems.
This should not cause problem. I've pushed a small fix for this,
but this may not exactly be the one you needed.
Can you pull from latest git and test again with a minimal example
and BEGIN_SRC ?
Thanks!
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: export literal examples font-lock: ess-mode
2012-08-19 6:28 ` Bastien
@ 2012-08-19 17:11 ` Paul Burkander
0 siblings, 0 replies; 5+ messages in thread
From: Paul Burkander @ 2012-08-19 17:11 UTC (permalink / raw)
To: Bastien; +Cc: Paul, Emacs-orgmode, Ista Zahn
[-- Attachment #1: Type: text/plain, Size: 476 bytes --]
it works!
Thanks.
On Sun, Aug 19, 2012 at 2:28 AM, Bastien <bzg@altern.org> wrote:
> Hi Paul,
>
> Paul Burkander <paul@burkander.com> writes:
>
> > ah! for some reason capitalizing BEGIN_SRC seems to have been causing
> > problems.
>
> This should not cause problem. I've pushed a small fix for this,
> but this may not exactly be the one you needed.
>
> Can you pull from latest git and test again with a minimal example
> and BEGIN_SRC ?
>
> Thanks!
>
> --
> Bastien
>
[-- Attachment #2: Type: text/html, Size: 917 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-08-19 17:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-17 13:23 export literal examples font-lock: ess-mode Paul
2012-08-17 15:12 ` Ista Zahn
2012-08-17 15:33 ` Paul Burkander
2012-08-19 6:28 ` Bastien
2012-08-19 17:11 ` Paul Burkander
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).