Re: [O] [PATCH] Add support for ordered list to ox-confluence.el

2016-12-09 Thread Lungang Fang
Great! Then, what about using my patch ? It would be my first patch adopted
by any open source project, a real milestone  :)

On Friday, December 9, 2016, Charles Durst 
wrote:

> I have tried the results of both versions and loaded them into the
> Confluence Wiki, and Lungang is correct, from what I can tell, they
> both will work.
>
> So I don't really care which one you choose either.  I just needed the
> functionality.
> --
> Charles Durst
> cwdurst+orgm...@gmail.com 
>
> On Thu, Dec 8, 2016 at 9:32 PM, Lungang Fang  > wrote:
> > Hi Charles and Nicholas,
> >
> > My code also supports nested mixed lists but is simpler. I mean, my code
> > will convert the list given by Charles to
> >
> > # Here
> > -- is
> > -- an
> > # example
> > -- of
> > -- a
> > # mixed
> > # list
> >
> > Although this format is not mentioned in confluence wiki, it is
> supported by
> > conflucence according to my test (in Jira).
> >
> > So, in my opinion, it is a matter of personal preference: more
> complicated
> > code complies with documented interface, or simpler code that exploits
> > undocumented feature.
> >
> > I prefer my code. But you guys feel free to make decision. I am OK with
> > whatever you choose.
> >
> > Cheers,
> > Lungang
> >
> > On Fri, Dec 9, 2016 at 10:37 AM, Charles Durst <
> cwdurst+orgm...@gmail.com >
> > wrote:
> >>
> >> They do conflict.  My version is slightly more complicated since it
> >> also supports nested mixed lists.
> >>
> >> For example:
> >>
> >> 1. Here
> >>* is
> >>* an
> >> 2. example
> >>* of
> >>* a
> >> 3. mixed
> >> 4. list
> >>
> >> Which translates to:
> >>
> >> # Here
> >> #- is
> >> #- an
> >> # example
> >> #- of
> >> #- a
> >> # mixed
> >> # list
> >>
> >> Which is effectively the same as the example in the Confluence
> >> documentation:
> >>
> >> https://confluence.atlassian.com/confcloud/confluence-wiki-
> markup-724765099.html#ConfluenceWikiMarkup-Mixedlists
> >>
> >> --
> >> Charles Durst
> >> cwdurst+orgm...@gmail.com 
> >>
> >>
> >> On Thu, Dec 8, 2016 at 5:49 PM, Nicolas Goaziou  >
> >> wrote:
> >> > Hello,
> >> >
> >> > Lungang Fang > writes:
> >> >
> >> >> Attached is a patch for contrib/lisp/ox-confluence.el generated
> >> >> following
> >> >> instructions on http://orgmode.org/worg/org-contribute.html#patches
> .
> >> >> It
> >> >> adds support for ordered list.
> >> >
> >> > Thank you.
> >> >
> >> > However, this somewhat conflicts with a patch recently sent on the ML,
> >> > but not yet applied, by Charles Durst (Cc'ed).
> >> >
> >> > Could one double-check if one doesn't supersede the other, or if they
> >> > could be merged (although I suspect the former) and report back so
> >> > I know what patch to apply?
> >> >
> >> > Regards,
> >> >
> >> > --
> >> > Nicolas Goaziou
> >
> >
>


Re: [O] Bug with Habits and Active Dates

2016-12-09 Thread Eric S Fraga
On Tuesday,  6 Dec 2016 at 09:58, cra...@gmx.net wrote:
> Hello!
>
> I have run into problems with a TODO entry that has a body which
> contains an active date. Finishing it results in
>
> Entry repeats: SCHEDULED: <2016-12-13 Tue +1w>
>
> being printed to *Messages*, but no actual new SCHEDULED line is added
> to the entry.

But why should it?  The same time stamp is valid forever.
If you go to the agenda, the item should appear every Tuesday.

Maybe I've misunderstood.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.1-49-ga43eac


signature.asc
Description: PGP signature


Re: [O] Bug with Habits and Active Dates

2016-12-09 Thread craven
>> being printed to *Messages*, but no actual new SCHEDULED line is added
>> to the entry.
> But why should it?  The same time stamp is valid forever.
> If you go to the agenda, the item should appear every Tuesday.
> Maybe I've misunderstood.

Sorry, I neglected to mention that the original SCHEDULED line is
removed (but no new line is added).

This only happens if there is an active timestamp in the node contents.

Greetings,
Peter



[O] reproducable orgmode edit crashes emacs..have backtrace..where to report?

2016-12-09 Thread Xebar Saram
Hi all

i have a file (org file) which i edit and 100% crashes emacs all the time

here is a backtrace

https://paste.xinu.at/XCVp/

where does one report this? to this mailing list? somewhere else?

thx alot!

Z


Re: [O] reproducable orgmode edit crashes emacs..have backtrace..where to report?

2016-12-09 Thread Eric S Fraga
On Friday,  9 Dec 2016 at 11:33, Xebar Saram wrote:
> i have a file (org file) which i edit and 100% crashes emacs all the time

[...]

> where does one report this? to this mailing list? somewhere else?

Maybe using M-x report-emacs-bug RET?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.1-49-ga43eac


signature.asc
Description: PGP signature


Re: [O] reproducable orgmode edit crashes emacs..have backtrace..where to report?

2016-12-09 Thread Kaushal Modi
On Fri, Dec 9, 2016, 8:51 AM Eric S Fraga  wrote:

> On Friday,  9 Dec 2016 at 11:33, Xebar Saram wrote:
>
> Maybe using M-x report-emacs-bug RET?
>

Yup, filing a bug report is the best way in this case. Emacs is not
supposed to crash no matter what the user or any package does in the elisp
land.

M-x report-emacs-bug will also provide the devs with info like your emacs
version, which can be useful to debug this crash. Also provide a recipe in
that bug report on how to recreate that crash from an emacs -Q session. It
would be useful also to elaborate on what change you did you think started
these crashes to happen... Updating Emacs, updating org, both, or something
else?

> --

Kaushal Modi


[O] transcluding some org-elements in multiple places

2016-12-09 Thread John Kitchin
Hi all,

I have an idea for how I could transclude "copies" or links to
org-elements in multiple places and keep them up to date. A prototypical
example of this is I have a set of org-contacts in one place, and I want
to create a new list of people for a committee in a new place made of
"copies" of the contact headlines. But I do not really want to duplicate
the headlines, and if I modify one, I want it reflected in the other
places. I do not want just links to those contacts, because then I can
not do things with org-map-entries, and other org-machinery which needs
the actual headlines/properties present. Another example might be I want
a table in two places, but the contents of them should stay
synchronized, ditto for a code block.

This idea was inspired by https://github.com/gregdetre/emacs-freex.

The idea starts with creating (wait for it...) a new link ;) In a
document where I want to transclude a headline, I would enter something like:

[[transclude:some-file.org::*headline title]]

Then, I would rely on the font-lock system to replace that link with the
headline and its contents (via the :activate-func link property), and to
put an overlay on it with a bunch of useful properties, including
modification hooks that would update the source if I change the the
element in this document, and some visual indication that it is
transcluded (e.g. light gray background/tooltip).

I would create a kill-buffer hook function that would replace that
transcluded content with the original link. A focus-in hook function
would make sure the transcluded content is updated when you enter the
frame. So when the file is not open, there is just a transclude link
indicating what should be put there, and when it is open, the overlay
modification hooks and focus hook should ensure everything stays
synchronized (as long as external processes are not modifying the
contents).

It seems like this could work well for headlines, and named tables, src
blocks, and probably any other element that can be addressed by a
name/ID.

Any thoughts? Do you see any potential issues?




-- 
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



[O] ox-icalendar's org-icalendar-include-todo and export for TODOs with custom DONE states

2016-12-09 Thread Olivier Berger
Hi.

I have a TODO file with additional TODO/DONE states.

It seems that when org-icalendar-include-todo is set to 't', it should
"include tasks that are not in DONE state.".

In my TODO file I have the following configuration of TODO states :
#+SEQ_TODO: TODO(t) DEMARRE(e) ATTENTE(a) RDV(v) | DONE(d) ANNULE(n) REPORTE(r)

I would expect that exporting the TODOs would only export the ones in
TODO, DEMARRE, ATTENTE or RDV states.

However, TODOs in ANNULE state are exported too, it seems.

Any hints ?

Thanks in advance.

Best regards
-- 
Olivier BERGER 
http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingenieur Recherche - Dept INF
Institut Mines-Telecom, Telecom SudParis, Evry (France)




Re: [O] teaching with live-updating code examples

2016-12-09 Thread Matt Price
On Fri, Dec 9, 2016 at 1:33 AM, Eric S Fraga  wrote:

> On Thursday,  8 Dec 2016 at 18:07, Matt Price wrote:
> > I am preparing a set of lectures for a class teaching HTML, CSS, and
> > javascript ot humanities students.
> >
> > I would like to have slides with a simple code editor on one side,
> > and the results of the code on another:
>
> [...]
>
> > So, I'm looking for other solutions. What do other people do in
> > lecture?
>
> I do this all the time with code snippets but I use beamer which
> supports columns.  I don't think it's easy to do in reveal.js from
> within org, however.
>

I think I am getting closer, actually (details soon, when I have a fully
working  solution)).

Meanwhile, I'd love to see an example in beamer -- I don't know anything
about beamer myself and this might be an opportunity to learn.

Thanks!


> --
> : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.1-49-ga43eac
>


Re: [O] teaching with live-updating code examples

2016-12-09 Thread Eric S Fraga
On Friday,  9 Dec 2016 at 16:42, Matt Price wrote:
> I think I am getting closer, actually (details soon, when I have a
> fully working  solution)).

I look forward to seeing it!

> Meanwhile, I'd love to see an example in beamer -- I don't know
> anything about beamer myself and this might be an opportunity to
> learn. 

Attached are an org file with resulting beamer (using default rather
simple style).

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.1-49-ga43eac
#+options: toc:nil
#+startup: beamer
* The slide
** The code :B_block:BMCOL:
:PROPERTIES:
:BEAMER_col: 0.7
:BEAMER_env: block
:END:
Define an inline function:
#+name: thecode
#+begin_src octave :exports both
  f = @(x) (x(1)-3)^2+(x(2)-5)^2+8;
  f([5, 6])
#+end_src 
** The results  :B_block:BMCOL:
:PROPERTIES:
:BEAMER_col: 0.3
:BEAMER_env: block
:END:
The result from applying that function to the vector [5, 6]:

#+results: thecode
: 13


cols.pdf
Description: Adobe PDF document


signature.asc
Description: PGP signature


Re: [O] Bug with Habits and Active Dates

2016-12-09 Thread Nicolas Goaziou
Hello,

 writes:

>>> being printed to *Messages*, but no actual new SCHEDULED line is added
>>> to the entry.
>> But why should it?  The same time stamp is valid forever.
>> If you go to the agenda, the item should appear every Tuesday.
>> Maybe I've misunderstood.
>
> Sorry, I neglected to mention that the original SCHEDULED line is
> removed (but no new line is added).
>
> This only happens if there is an active timestamp in the node
> contents.

This was fixed recently. You need to wait for the next release.

Regards,

-- 
Nicolas Goaziou



Re: [O] ox-icalendar's org-icalendar-include-todo and export for TODOs with custom DONE states

2016-12-09 Thread Nicolas Goaziou
Hello,

Olivier Berger  writes:

> I have a TODO file with additional TODO/DONE states.
>
> It seems that when org-icalendar-include-todo is set to 't', it should
> "include tasks that are not in DONE state.".
>
> In my TODO file I have the following configuration of TODO states :
> #+SEQ_TODO: TODO(t) DEMARRE(e) ATTENTE(a) RDV(v) | DONE(d) ANNULE(n) 
> REPORTE(r)
>
> I would expect that exporting the TODOs would only export the ones in
> TODO, DEMARRE, ATTENTE or RDV states.
>
> However, TODOs in ANNULE state are exported too, it seems.
>
> Any hints ?

According to `org-icalendar-include-todo' docstring, it only controls
creation of VTODO components.

It think you need `org-export-with-tasks'.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: s [8.2.10 (release_8.2.10 @ /usr/local/Cellar/emacs/24.5/share/emacs/24.5/lisp/org/)]

2016-12-09 Thread Nicolas Goaziou
Hello,

Codievilky August  writes:

> In my org-mode, I can't use the Key of S-M-RET to set my line to be a
> TODO or add checkbox in my mission.I have search a lot in the Internet,
> I haven't found any solution to fix this problem.

I cannot reproduce it. Could you try updating to Org 9.0?

Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Add support for ordered list to ox-confluence.el

2016-12-09 Thread Nicolas Goaziou
Hello,

Lungang Fang  writes:

> Great! Then, what about using my patch ? It would be my first patch adopted
> by any open source project, a real milestone  :)

Applied. Thanks to both of you.

Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] org-bibtex.el: Make headline format costomizable

2016-12-09 Thread Nicolas Goaziou
Hello,

Eric Danan  writes:

> Here it is, hope I did everything correctly.

Almost. I changed :version "25.1" to :version "25.2". Also, you seem to
create the entries in the commit message manually. If you are using
Magit, C within the diff buffer can create them for you.

Anyway, I applied your patch. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Add preamble support to ob-plantuml.el

2016-12-09 Thread Nicolas Goaziou
Hello,

Thibault Marin  writes:

> However, ob-plantuml does not seem to support the prologue option.  So I
> am modifying my patch to add support for the :prologue and :epilogue
> header arguments instead of using a new customization variable.  In the
> process, I have added support for header variables which are passed to
> the PlantUML file via the !define macro.  I am also adding a test file
> which checks that the temporary file passed to the plantuml program is
> properly generated (it does not run or check the output of plantuml).

Thank you.

> Please let me know you have any comment on the patch.  Thanks in
> advance.

Comments follow.

> +(defun org-babel-plantuml-var-to-plantuml (var)
> +  "Cleanup plantuml variable (remove quotes)."
> + (replace-regexp-in-string "\"" "" var))

Since this function is used only once in the code, I suggest to not
implement it and use `replace-regexp-in-string' at the appropriate
place.

> +(defun org-babel-variable-assignments:plantuml (params)
> +  "Return a list of PlantUML statements assigning the block's variables."

Could you document what is PARAMS?

> +  (mapcar
> +   (lambda (pair)
> +   (format "!define %s %s"
> +(car pair)
> +(org-babel-plantuml-var-to-plantuml (cdr pair
> +   (org-babel--get-vars params)))
> +
> +(defun org-babel-plantuml-make-body (body params)
> +  "Form PlantUML input string."

Do you mean "Return PlantUML" input string? Also you need to specify
what are body and params.

Besides, the same applies to `org-babel-plantuml-var-to-plantuml' above.
Is this function really needed, as it is a mere `format'.


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Repeated tasks not shown from org-timeline [9.0 (9.0-dist @ c:/wlin/.emacs-lisp/org/lisp/)]

2016-12-09 Thread Nicolas Goaziou
Hello,

Nick Dokos  writes:

> I don't use timeline, so I'm not the best person to answer it, but that
> question has been hanging out there for 5+ years: unless somebody
> speaks up with a compelling reason to keep it, I'd say get rid of it.

I crossed the Rubicon; I removed `org-timeline'.

Regards,

-- 
Nicolas Goaziou



Re: [O] transcluding some org-elements in multiple places

2016-12-09 Thread Eric S Fraga
On Friday,  9 Dec 2016 at 15:29, John Kitchin wrote:
> Hi all,
>
> I have an idea for how I could transclude "copies" or links to

[...]

> Any thoughts? Do you see any potential issues?

Potentially very interesting and useful idea.  Some thoughts/issues:

- not sure about the name but that's just æsthetics...

- can I link to a transcluded headline?  i.e. [[#localheadline]]

- what about more than level of indirection: link to a trancluded
  headline which transcludes to another etc.  What is shown?  Is there a
  performance hit?

- definitely not sure about the name... ;-)

- what happens if the destination moves or gets deleted?  the link to
  it, which looked like something "complete" is now meaningless.  This
  could be quite confusing.  This is probably the most serious issue.

- the table aspect is almost a "view" on a database which is really
  appealing but would benefit from a fully defined syntax a la sql?
  Would table formulas work as expected from the view of the contents?

- maybe view: as the link type?

- could we have "read-only" views?  I may not want the original touched.

- how does an export work?  On the view or the actual contents?

That's it for the moment based on stream of consciousness thinking!

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.1-49-ga43eac


signature.asc
Description: PGP signature


Re: [O] [PATCH] org-bibtex.el: Make headline format costomizable

2016-12-09 Thread Eric Danan
Thanks for the tip, indeed I use magit and was creating the entries manually.

On Fri, Dec 9, 2016 at 9:48 PM, Nicolas Goaziou  wrote:
> Hello,
>
> Eric Danan  writes:
>
>> Here it is, hope I did everything correctly.
>
> Almost. I changed :version "25.1" to :version "25.2". Also, you seem to
> create the entries in the commit message manually. If you are using
> Magit, C within the diff buffer can create them for you.
>
> Anyway, I applied your patch. Thank you.
>
> Regards,
>
> --
> Nicolas Goaziou



Re: [O] buffer local org-src-preserve-indentation not respected

2016-12-09 Thread Nicolas Goaziou
Hello,

David Dynerman  writes:

> I just tried, and I still encounter this buf on the current git code. 
> Reproduction is the same as before:
>
> #+BEGIN_SRC python :tangle preserve-indent.py
> class Foo:
> bar = 5
> #+END_SRC
>
>
> Here is some interstitial text!
>
> #+BEGIN_SRC python :tangle preserve-indent.py
> def __init__(self):
>   self.bar = 7
> #+END_SRC
>
> If I globally set org-src-preserve-indentation to t, then tangle, the
> output file has the correct specified indentation with the second
> block. If I make org-src-preserve-indentation buffer local and set it
> to t, then the second block is tanlged without any leading
> indentation.

Fixed (hopefully) this time. Thank you for the feedback.

Regards,

-- 
Nicolas Goaziou



Re: [O] Disable consistency graphs for some habits

2016-12-09 Thread Nicolas Goaziou
Hello,

Jorge Peixoto de Morais Neto  writes:

> When I am trying to learn a new habit, I often write it in Org Mode.  So I
> have many entries like:
>
> *** TODO Relax: talk, read book, shower or pray
> SCHEDULED: <2016-11-28 Mon 21:30 ++1d>
> :PROPERTIES:
> :ID:   2ff41cfe-156f-4870-a4ef-991cc2cc986c
> :CREATED:  [2016-06-16 Thu 13:23]
>     :STYLE:habit
> :END:
>
> That one is to remember me to quit the computer at 21:30.
>
> I set them up as org-habit habits for the following desirable features:
> - Only show on the agenda for today, not for other days.
> - Appear at the end of the agenda for today.
> - Hide when I type K.

What about using a regular repeater for that instead of an habit? For
example, first point is solved using
`org-agenda-repeating-timestamp-show-all' (or
`org-agenda-show-future-repeats' in master).  

With a custom agenda view, you can make them appear last. You may simply
use another agenda view to remove them (last point).

"habits without a graph" really sounds like "habits without habits"
considering the whole library is about the graph.


Regards,

-- 
Nicolas Goaziou



Re: [O] Add preamble support to ob-plantuml.el

2016-12-09 Thread Thibault Marin

Hi,

Nicolas Goaziou writes:
> Comments follow.
>
>> +(defun org-babel-plantuml-var-to-plantuml (var)
>> +  "Cleanup plantuml variable (remove quotes)."
>> + (replace-regexp-in-string "\"" "" var))
>
> Since this function is used only once in the code, I suggest to not
> implement it and use `replace-regexp-in-string' at the appropriate
> place.
I was trying to match what other ob-*s do.  If the table assignment idea
was to be implemented (for instance), using a separate function may be
cleaner.  But the function is indeed currently not needed, so I removed
it.

>> +(defun org-babel-variable-assignments:plantuml (params)
>> +  "Return a list of PlantUML statements assigning the block's variables."
>
> Could you document what is PARAMS?
I have added more complete docstrings, please let me know if changes are
required.

>> +(defun org-babel-plantuml-make-body (body params)
>> +  "Form PlantUML input string."
>
> Do you mean "Return PlantUML" input string? Also you need to specify
> what are body and params.
Tentatively done.

> Besides, the same applies to `org-babel-plantuml-var-to-plantuml' above.
> Is this function really needed, as it is a mere `format'.
I use this function in the test as well to compare the full text output
so it is convenient to have a separate function.  Alternatively I guess
I could directly test the call to `org-babel-expand-body:generic' but
that seems less interesting as a test (should I remove the test
altogether then?).

The attached patch removes the useless definition of
`org-babel-plantuml-var-to-plantuml' (the regexp is moved to the
`org-babel-variable-assignments:plantuml' function) but keeps the
`org-babel-plantuml-make-body' function, useful for testing.  If you
would like me to remove the `org-babel-plantuml-make-body' function as
well, I will do that (how would you like the test to look like in this
case?)

Thanks for the guidance.

thibault
>From 9e8addc14e628dc7c9c25d96d0cfd630ad15134e Mon Sep 17 00:00:00 2001
From: thibault 
Date: Fri, 9 Dec 2016 22:43:32 -0600
Subject: [PATCH] ob-plantuml.el: Add support for prologue and header variables

* lisp/ob-plantuml.el (org-babel-execute:plantuml) Include prologue and
  header variables to temporary file body.
(org-babel-plantuml-make-body): New function.  Return content of
temporary file used as input to PlantUML program.
(org-babel-variable-assignments:plantuml): New function.  Build list of
variable assignments for source block.

* testing/lisp/test-ob-plantuml.el: New file.  Test body text produced
  by `org-babel-plantuml-make-body'.
---
 lisp/ob-plantuml.el  | 28 ++-
 testing/lisp/test-ob-plantuml.el | 73 
 2 files changed, 100 insertions(+), 1 deletion(-)
 create mode 100644 testing/lisp/test-ob-plantuml.el

diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el
index 9ce65a9..01739c8 100644
--- a/lisp/ob-plantuml.el
+++ b/lisp/ob-plantuml.el
@@ -46,6 +46,31 @@
   :version "24.1"
   :type 'string)
 
+(defun org-babel-variable-assignments:plantuml (params)
+  "Return a list of PlantUML statements assigning the block's variables.
+PARAMS is a property list of source block parameters, which may
+contain multiple entries for the key `:var'.  `:var' entries in PARAMS
+are expected to be scalar variables."
+  (mapcar
+   (lambda (pair)
+   (format "!define %s %s"
+	   (car pair)
+	   (replace-regexp-in-string "\"" "" (cdr pair
+   (org-babel--get-vars params)))
+
+(defun org-babel-plantuml-make-body (body params)
+  "Return PlantUML input string.
+BODY is the content of the source block and PARAMS is a property list
+of source block parameters.  This function relies on the
+`org-babel-expand-body:generic' function to extract `:var' entries
+from PARAMS and on the `org-babel-variable-assignments:plantuml'
+function to convert variables to PlantUML assignments."
+  (concat
+   "@startuml\n"
+   (org-babel-expand-body:generic
+body params (org-babel-variable-assignments:plantuml params))
+   "\n@enduml"))
+
 (defun org-babel-execute:plantuml (body params)
   "Execute a block of plantuml code with org-babel.
 This function is called by `org-babel-execute-src-block'."
@@ -54,6 +79,7 @@ This function is called by `org-babel-execute-src-block'."
 	 (cmdline (cdr (assq :cmdline params)))
 	 (in-file (org-babel-temp-file "plantuml-"))
 	 (java (or (cdr (assq :java params)) ""))
+	 (full-body (org-babel-plantuml-make-body body params))
 	 (cmd (if (string= "" org-plantuml-jar-path)
 		  (error "`org-plantuml-jar-path' is not set")
 		(concat "java " java " -jar "
@@ -85,7 +111,7 @@ This function is called by `org-babel-execute-src-block'."
 			(org-babel-process-file-name out-file)
 (unless (file-exists-p org-plantuml-jar-path)
   (error "Could not find plantuml.jar at %s" org-plantuml-jar-path))
-(with-temp-file in-file (insert (concat "@startuml\n" body "\n@enduml")))
+(with-temp-file in-file (insert full-body))
 (messag

Re: [O] teaching with live-updating code examples

2016-12-09 Thread Matt Price
Thanks, Eric.

On Fri, Dec 9, 2016 at 12:19 PM, Eric S Fraga  wrote:

> On Friday,  9 Dec 2016 at 16:42, Matt Price wrote:
> > I think I am getting closer, actually (details soon, when I have a
> > fully working  solution)).
>
> I look forward to seeing it!
>
> > Meanwhile, I'd love to see an example in beamer -- I don't know
> > anything about beamer myself and this might be an opportunity to
> > learn.
>
> Attached are an org file with resulting beamer (using default rather
> simple style).
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.1-49-ga43eac
>


Re: [O] teaching with live-updating code examples

2016-12-09 Thread Matt Price
On Fri, Dec 9, 2016 at 12:19 PM, Eric S Fraga  wrote:

> On Friday,  9 Dec 2016 at 16:42, Matt Price wrote:
> > I think I am getting closer, actually (details soon, when I have a
> > fully working  solution)).
>
> I look forward to seeing it!
>

OK, I've run into the limits of my knowledge.

There are at least 2 plugins that will give a live code execution
environemnt within an HTML presentation:
- RevealEditor, which adds one global Ace editor instance to the
presentation, and which shows the live rendering of HTML, CSS, and JS code
when the html encoding follows the format:

[1,2,3].map ((x) => x + 1)



- klipse, which  instantiates a new instance of CodeMirror for every
appropriately formatted set of tags in the form:

[1,2,3].map ((x) => x +
1)

Meanwhile, html export (and also reveal export) will give something more like:

[1,2,3].map
((x) => x + 1)

I would like to conditionally export

- revealeditor-compatible code if (a) a flag "org-reveal-use-editor"
is set AND (b) the code block meets certain criteria, e.g. language
and maybe something in the header like "make-live t"

- klipse-compatible code if (a) a flag "org-reveal-klipsify is set AND
similar conditions to (b) above

- standard html output if neither of the above conditions is met.

What are the best ways do achieve this, do you think? Thanks guys,

Matt


Re: [O] [PATCH] Add support for ordered list to ox-confluence.el

2016-12-09 Thread Lungang Fang
Hi Nicolas and Charles,

Thank you both.

Lungang

On Sat, Dec 10, 2016 at 7:34 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Lungang Fang  writes:
>
> > Great! Then, what about using my patch ? It would be my first patch
> adopted
> > by any open source project, a real milestone  :)
>
> Applied. Thanks to both of you.
>
> Regards,
>
> --
> Nicolas Goaziou
>