[O] Recent bug? in R source blocks generating images

2016-04-07 Thread William Denton

Sorry about that; hit send too soon.

There's something odd happening to me tonight with R source blocks and :session.

This works, and generates an image:

#+BEGIN_SRC R :results graphics :file example.png
plot(1)
#+END_SRC

But if I start an R session (M-x R) and then run this, with :session, I get an 
error.


#+BEGIN_SRC R :session :results graphics :file example.png
plot(1)
#+END_SRC

The error is

+ + Error: unexpected symbol in:
"plot(1)
},error=function(e){plot(x=-1:1, y=-1:1, type='n"

That error= bit at the end looks related to my plot() example, but I don't think 
it is: the same error appears if I use ggplot2 (which is how I noticed it).


This is with Emacs and Org compiled from current source trees.  It was working 
earlier this week, but I've updated since then.  I refreshed everything 
(including R packages) and still get the error.  I looked at the recent Org 
commits but don't see what might have done it, but I also don't think I'm doing 
anything wrong.


Bill
--
William Denton ↔  Toronto, Canada ↔  https://www.miskatonic.org/

[O] Recent bug in R source blocks generating images

2016-04-07 Thread William Denton

This is

#+BEGIN_SRC R :session :results graphics :file example.png :width 800 :height 
400
library(ggplot2)
ggplot(mpg, aes(class)) + geom_bar()
#+END_SRC


--
William Denton ↔  Toronto, Canada ↔  https://www.miskatonic.org/

Re: [O] org-mime-org-buffer-htmlize can't find back-end

2016-04-07 Thread Rasmus
Peter Davis  writes:

> Actually, after re-reading the old exchange more carefully, it seems
> that I already had (require 'ox-org) in my startup file, but
> still got the error. However, manually loading the ox-org library
> avoided the error.
>
> So it seems that:
>
>  1) the cause of the problem was never identified,
>  2) manually loading ox-org avoids the problem, and,
>  3) I guess I just haven't been using org-mime-org-buffer-htmlize on
> this machine for a while, so I forgot about it.
>
> Interestingly, this all works with no problems on my other MacBook.

Could you check that it doesn't load an old version of ox-org or similar?
E.g. check that find-library finds the right version.

Also, does the backtrace reveal anything useful?

Thanks,
Rasmus

-- 
When in doubt, do it!



Re: [O] org-mime-org-buffer-htmlize can't find back-end

2016-04-07 Thread Peter Davis


On 4/7/16 5:23 PM, Rasmus wrote:

Peter Davis  writes:


Actually, after re-reading the old exchange more carefully, it seems
that I already had (require 'ox-org) in my startup file, but
still got the error. However, manually loading the ox-org library
avoided the error.

So it seems that:

  1) the cause of the problem was never identified,
  2) manually loading ox-org avoids the problem, and,
  3) I guess I just haven't been using org-mime-org-buffer-htmlize on
this machine for a while, so I forgot about it.

Interestingly, this all works with no problems on my other MacBook.

Could you check that it doesn't load an old version of ox-org or similar?
E.g. check that find-library finds the right version.

Also, does the backtrace reveal anything useful?

I'll try to check when I get a chance.

Thanks,
-pd


--

Peter Davis
http://www.techcurmudgeon.com




Re: [O] Enginnering notation in tables exported to LaTeX

2016-04-07 Thread Daniele Nicolodi
On 4/7/16 1:15 AM, Nicolas Goaziou wrote:
> Hello,
> 
> Daniele Nicolodi  writes:
> 
>> when exporting to LaTeX, numbers expressed in engineering notation
>> contained in tables are transformed into a quite confusing notation:
>> 1.234e5 becomes 1.234\,(5) which is rendered by LaTeX as 1.234 (5) with
>> the space being a very narrow one. This notation is confusing because it
>> is usually used (at l;east in physical sciences) to indicate uncertainty.
>>
>> I haven't found mention of this in the manual. There is a way to
>> disable, or customize this conversion?
> 
> See `org-latex-table-scientific-notation'.

Thanks!

Cheers,
Daniele




[O] [PATCH] org.texi: Replace broken example script for batch execution

2016-04-07 Thread Ethan Ligon
There is an example bash script in section  14.12 of the org manual which
is meant to tangle source blocks from a supplied list of org files.

The present version is broken in several small ways (it appears to date
from a period when babel was still part of contrib), and requires a
hard-coded specification of the path ORG_HOME.

I've fixed the issue with ORG_HOME, another issue with grepping for strings
that no longer are emitted by ob-tangle, and removed some obsolete
dependencies.

I'm finding the corrected script a useful thing to call from makefiles.

-Ethan

* doc/org.texi: Example bash script to tangle from *.org file was broken
and obsolete; fixed to now work with recent versions of org.
---
 doc/org.texi | 14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 8b8dc65..f935692 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -16838,14 +16838,12 @@ for i in $@@; do
 done

 emacs -Q --batch \
---eval "(progn
-(add-to-list 'load-path (expand-file-name \"~/src/org/lisp/\"))
-(add-to-list 'load-path (expand-file-name \"~/src/org/contrib/lisp/\" t))
-(require 'org)(require 'org-exp)(require 'ob)(require 'ob-tangle)
-(mapc (lambda (file)
-   (find-file (expand-file-name file \"$DIR\"))
-   (org-babel-tangle)
-   (kill-buffer)) '($FILES)))" 2>&1 |grep tangled
+ --eval "(progn
+ (require 'org)(require 'ob)(require 'ob-tangle)
+ (mapc (lambda (file)
+(find-file (expand-file-name file \"$DIR\"))
+(org-babel-tangle)
+(kill-buffer)) '($FILES)))" 2>&1 |grep -i tangled
 @end example

 @node Miscellaneous


Re: [O] keybinding for inserting simple item, simple plain list

2016-04-07 Thread Nick Dokos
Uwe Brauer  writes:

 "Adam" == Adam Porter  writes:
>
>> org-meta-return (bound to M-RET by default) does this when you're in a 
> plain
>> list.  If you're not in a plain list, it inserts a heading.  So just put 
> the
>> point in a list and it should do what you want.
>
> I know this.
>
>
>> If you want a key to both create a plain list when you're not in one and 
> add
>> another item when you are in one, that wouldn't be hard to do.
>
> Yeah, I know I have such a function, but I hoped org-mode already had
> that functionality.

I've never felt the need: once I'm in a list, I use M- to add
another item, but I always start the list with a dash and a space, typed
explicitly: nothing to go wrong, nothing to remember. BTW, that last
point is getting more important as I get older...

[Aside: I find it more annoying to have to remember to type the
requisite number of RETs at the *end* of the list in order to allow
M-RET to create a headline afterwards: I invariably end up creating a
list item that I have to go back and delete.]

YMMV of course: I'm not saying you shouldn't have such a function.
But I often wonder *why* people would want such a thing (and more often
than I would like to acknowledge, people give good, cogent reasons why
they do, which indicates to me that I often lack imagination.)

--
Nick







Re: [O] keybinding for inserting simple item, simple plain list

2016-04-07 Thread Uwe Brauer
>>> "Adam" == Adam Porter  writes:

   > org-meta-return (bound to M-RET by default) does this when you're in a 
plain
   > list.  If you're not in a plain list, it inserts a heading.  So just put 
the
   > point in a list and it should do what you want.

I know this.


   > If you want a key to both create a plain list when you're not in one and 
add
   > another item when you are in one, that wouldn't be hard to do.

Yeah, I know I have such a function, but I hoped org-mode already had
that functionality.








Re: [O] fontification lost when using org-goto

2016-04-07 Thread Julien Cubizolles
Adam Porter  writes:

> Julien Cubizolles  free.fr> writes:
>
>> I've encountered this problem with several themes (dracula, naquadah)
>> but not with emacs -Q. Are there some special faces to define ?
>
> There are quite a few org-mode faces, like org-level-{1..8} for headings. 
> Do you see this behavior with all themes?  For example, I use solarized, and
> I've never seen this problem.
>
> I'm probably wrong, but I feel like it's not an issue with a theme.

No you're not and I am. I investigated further and have narrowed the
problem to the #+SETUPFILE keyword. The following minimal org file
exhibits the problem: C-c C-j removes all fontification from the file,
whatever the theme. Another keyword (invalide like #+SETUP or valid
#+LATEX_HEADER:) doesn't trigger this bug.

--8<---cut here---start->8---
#+SETUPFILE: setup.org
* Bilan
--8<---cut here---end--->8---
  
Julien.




Re: [O] how to disable smart-tab only on org headline?

2016-04-07 Thread Adam Porter
Upon closer inspection I see that smart-tab-mode refuses to activate in
org-mode, so the behavior you're seeing probably is not caused by smart-tab.  

For me, if the point is on an Org heading without text, like (point marked
by "|"):

* |
lorem ipsum

and I press TAB, Org indents the heading, cycling through the levels.  If
there is any text after the * on the heading line, it cycles its visibility
instead.




Re: [O] keybinding for inserting simple item, simple plain list

2016-04-07 Thread Adam Porter
org-meta-return (bound to M-RET by default) does this when you're in a plain
list.  If you're not in a plain list, it inserts a heading.  So just put the
point in a list and it should do what you want.

If you want a key to both create a plain list when you're not in one and add
another item when you are in one, that wouldn't be hard to do.






Re: [O] fontification lost when using org-goto

2016-04-07 Thread Adam Porter
Julien Cubizolles  free.fr> writes:

> I've encountered this problem with several themes (dracula, naquadah)
> but not with emacs -Q. Are there some special faces to define ?

There are quite a few org-mode faces, like org-level-{1..8} for headings. 
Do you see this behavior with all themes?  For example, I use solarized, and
I've never seen this problem.

I'm probably wrong, but I feel like it's not an issue with a theme.  What
version of Org are you using?

I suggest using a new, clean Emacs profile, installing Org and those themes,
and see if the problem still happens.  If so, it's either Org or a theme. 
If not, it's probably a different package conflicting.

Re: [O] how to disable smart-tab only on org headline?

2016-04-07 Thread Adam Porter
Hi,

It looks like it may be a simple fix to make smart-tab call org-cycle in
org-mode.  I forked the repo and made the change:

https://github.com/alphapapa/smart-tab/tree/org-mode

Note, I have not tested it, but I think it should work.  Let me know what
you find out.






[O] keybinding for inserting simple item, simple plain list

2016-04-07 Thread Uwe Brauer
Hello

This must be completely trival, but I cannot find a solution in the
manual nor in google.

I would like to bind some key, say (super return) to a function which
would insert a simple item in a list.

(meta return) inserts in an org mode file, a heading.

However (meta return) in message mode, with

(add-hook 'message-mode-hook 'turn-on-orgstruct)
(add-hook 'message-mode-hook 'turn-on-orgstruct++)
(add-hook 'message-mode-hook 'turn-on-orgtbl)

Inserts   a newline indents it and adds a "-" such as in 

-  

This is precisely want I want to have in an org-mode file.

How can I do it?

Htanks 




[O] fontification lost when using org-goto

2016-04-07 Thread Julien Cubizolles
I'm using an emacs theme for fontification. The fontification is lost
whenever I use org-goto: no more colors, no more hidden stars. When I
leave the temporary buffer, the fontification is not restored until I
run M-x org-mode or update the #+ lines with C-c C-c.

I've encountered this problem with several themes (dracula, naquadah)
but not with emacs -Q. Are there some special faces to define ?

Julien.




[O] how to disable smart-tab only on org headline?

2016-04-07 Thread Xebar Saram
Hi guys

i found this nifty little package called smart tab that makes using tab in
emacs easier:

https://github.com/genehack/smart-tab/tree/master

the only issue is that when on org headlines instead of
expanding/collapsing it tries to auto add more stars which shifts the whole
structure

i was wondering if there is a way (perhaps a hook) to let emacs know your
on a orgmode headline and then disable smart tab for the fraction of the
time your on the headline? perhaps there is aother better option that im
just no thinking of

i will warn in advance i cant code to save my life ;-) so any lisp examples
on how to achieve this would be greatly appreciated!

thx alot!

Z


Re: [O] Editing Quote blocks remotely

2016-04-07 Thread Nicolas Goaziou
Rasmus  writes:

> With org-narrow-to-block you have to pay attention to the boundaries of
> the block, but indeed it goes most of the way.  Of course it’s trivial to
> fix that.
>
> The nice part would be to be able to edit the content of the block in a
> different buffer.  It’s good for dumping passages and doing further
> editing (e.g. and emphases).

C-x o C-x n b (modulo the block markers to ignore)

>> Also, quote blocks are quite different from example blocks since they
>> can contain other elements, including other blocks. This can lead to
>> surprising behaviour, IMO.
>
> I’m not sure I see how that’s relevant in this case, but I could easily be
> overlooking some detail.

At every buffer position within an example block, `org-element-at-point'
returns an example-block element. This is not true for quote blocks.
IOW, it may not be always obvious that you are within a quote block.

Regards,



Re: [O] org-mime-org-buffer-htmlize can't find back-end

2016-04-07 Thread Peter Davis
Peter Davis  writes:

> Peter Davis  writes:
>
>> Rasmus  writes:
>>
>>> Hi Peter,
>>>
>>> Peter Davis  writes:
>>>
 I used to be able to use org-buffer-org-mime-htmlize to send my org
 documents as multipart/alternative html & text email. For some
 reason, this is stopped working, and now displays

 Unknown "nil" back-end: Aborting export

 In the *Messages* buffer, I see

 org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export

 So how is the back-end supposed to be defined? (And why might it have
 broken?) I haven't not made any related changes in a *long*
 time.
>>>
>>> Could you provide a reproducible example starting with emacs -q?
>>>
>>> I can't reproduce it here by
>>>
>>> 1. starting from emacs -q with latest org from master
>>> 2. creating an org buffer with the content:
>>>- 1
>>>- 2
>>> 3. calling org-mime-org-buffer-htmlize on this buffer.
>>
>> Thank you, Rasmus, but ...
>>
>> If I start emacs with -q, it doesn't know about org. It can't set org-mode, 
>> or run org-mime commands. Is there a way to load this
>> manually?
>>
>> Also, can "the latest org from master" be gotten through package manager?
>
>
> Hmmm. It seems I had this same problem last October, and manually loading 
> ox-org solved it, as it does now. That was suggested by
> Aaron Ecay.
>
> Then, as suggested by Nicolas, I added (require 'ox-org) to my .emacs. I 
> guess that worked for the time being. I haven't changed
> much in my startup file since then, and almost everything following that is 
> commented out. I did, however, try to add startup
> commands for hyperbole, but I never got that working. Perhaps that broke 
> things somehow.


Actually, after re-reading the old exchange more carefully, it seems that I 
already had (require 'ox-org) in my startup file, but
still got the error. However, manually loading the ox-org library avoided the 
error.

So it seems that:

 1) the cause of the problem was never identified,
 2) manually loading ox-org avoids the problem, and,
 3) I guess I just haven't been using org-mime-org-buffer-htmlize on this 
machine for a while, so I forgot about it.

Interestingly, this all works with no problems on my other MacBook.

Thanks,

-pd



Re: [O] org-mime-org-buffer-htmlize can't find back-end

2016-04-07 Thread Peter Davis
Peter Davis  writes:

> Rasmus  writes:
>
>> Hi Peter,
>>
>> Peter Davis  writes:
>>
>>> I used to be able to use org-buffer-org-mime-htmlize to send my org
>>> documents as multipart/alternative html & text email. For some
>>> reason, this is stopped working, and now displays
>>>
>>> Unknown "nil" back-end: Aborting export
>>>
>>> In the *Messages* buffer, I see
>>>
>>> org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export
>>>
>>> So how is the back-end supposed to be defined? (And why might it have
>>> broken?) I haven't not made any related changes in a *long*
>>> time.
>>
>> Could you provide a reproducible example starting with emacs -q?
>>
>> I can't reproduce it here by
>>
>> 1. starting from emacs -q with latest org from master
>> 2. creating an org buffer with the content:
>>- 1
>>- 2
>> 3. calling org-mime-org-buffer-htmlize on this buffer.
>
> Thank you, Rasmus, but ...
>
> If I start emacs with -q, it doesn't know about org. It can't set org-mode, 
> or run org-mime commands. Is there a way to load this
> manually?
>
> Also, can "the latest org from master" be gotten through package manager?


Hmmm. It seems I had this same problem last October, and manually loading 
ox-org solved it, as it does now. That was suggested by
Aaron Ecay.

Then, as suggested by Nicolas, I added (require 'ox-org) to my .emacs. I guess 
that worked for the time being. I haven't changed
much in my startup file since then, and almost everything following that is 
commented out. I did, however, try to add startup
commands for hyperbole, but I never got that working. Perhaps that broke things 
somehow.

Thanks again!

-pd



Re: [O] Editing Quote blocks remotely

2016-04-07 Thread Rasmus
Nicolas Goaziou  writes:

>> It would be nice if one could open an editing buffer for quote blocks,
>> e.g. using C-c '.
>>
>> I guess we could use the code already used for remote footnote editing in
>> org-src.el (I think) or whatever is being used for example blocks.  The
>> mode should be Org, I guess.
>>
>> It might be nice to support remote editing for VERSE as well.
>>
>> WDYT?
>
> I'm not sure to understand the "remote" part in your idea. Point is on
> the quote/verse block when you call C-c '. You can as well mark the
> block and narrow to it. There is already a function for that:
> `org-narrow-to-block'.

With org-narrow-to-block you have to pay attention to the boundaries of
the block, but indeed it goes most of the way.  Of course it’s trivial to
fix that.

The nice part would be to be able to edit the content of the block in a
different buffer.  It’s good for dumping passages and doing further
editing (e.g. and emphases).

> Also, quote blocks are quite different from example blocks since they
> can contain other elements, including other blocks. This can lead to
> surprising behaviour, IMO.

I’m not sure I see how that’s relevant in this case, but I could easily be
overlooking some detail.

Rasmus

-- 
You people at the NSA are becoming my new best friends!




Re: [O] Editing Quote blocks remotely

2016-04-07 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> It would be nice if one could open an editing buffer for quote blocks,
> e.g. using C-c '.
>
> I guess we could use the code already used for remote footnote editing in
> org-src.el (I think) or whatever is being used for example blocks.  The
> mode should be Org, I guess.
>
> It might be nice to support remote editing for VERSE as well.
>
> WDYT?

I'm not sure to understand the "remote" part in your idea. Point is on
the quote/verse block when you call C-c '. You can as well mark the
block and narrow to it. There is already a function for that:
`org-narrow-to-block'.

Also, quote blocks are quite different from example blocks since they
can contain other elements, including other blocks. This can lead to
surprising behaviour, IMO.

Regards,

-- 
Nicolas Goaziou



Re: [O] seeking advice on use of drawers vs blocks

2016-04-07 Thread Nicolas Goaziou
Hello,

Christian Wittern  writes:

> Great, thanks.  Yes, this answers a few other questions as well.  For
> example, it seems that a drawer always has to end with :END: in capital
> letters, using :end: is not possible (I usually prefer the non-shouting
> variant if possible).

":end:" is also valid. Syntax is case-insensitive, unless specified in
the document.

Regards,

-- 
Nicolas Goaziou



Re: [O] org-mime-org-buffer-htmlize can't find back-end

2016-04-07 Thread Peter Davis

Rasmus  writes:

> Hi Peter,
>
> Peter Davis  writes:
>
>> I used to be able to use org-buffer-org-mime-htmlize to send my org
>> documents as multipart/alternative html & text email. For some
>> reason, this is stopped working, and now displays
>>
>> Unknown "nil" back-end: Aborting export
>>
>> In the *Messages* buffer, I see
>>
>> org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export
>>
>> So how is the back-end supposed to be defined? (And why might it have
>> broken?) I haven't not made any related changes in a *long*
>> time.
>
> Could you provide a reproducible example starting with emacs -q?
>
> I can't reproduce it here by
>
> 1. starting from emacs -q with latest org from master
> 2. creating an org buffer with the content:
>- 1
>- 2
> 3. calling org-mime-org-buffer-htmlize on this buffer.

Thank you, Rasmus, but ...

If I start emacs with -q, it doesn't know about org. It can't set org-mode, or 
run org-mime commands. Is there a way to load this
manually?

Also, can "the latest org from master" be gotten through package manager?

Thanks!
-pd



Re: [O] seeking advice on use of drawers vs blocks

2016-04-07 Thread Christian Wittern
Hi,

On 2016-04-07 18:05, Christian Moe wrote:
> The syntax document is at http://orgmode.org/worg/dev/org-syntax.html.
> It defines drawers as a "greater element", and says that greater
> elements may contain other greater elements. Exporting a sample block
> wrapped in a drawer works fine with the d:t option. Other complications
> may arise, though...

Great, thanks.  Yes, this answers a few other questions as well.  For
example, it seems that a drawer always has to end with :END: in capital
letters, using :end: is not possible (I usually prefer the non-shouting
variant if possible).

Christian

-- 
Christian Wittern, Kyoto



Re: [O] babel result chain outdated/inconsistent using var

2016-04-07 Thread Daniele Pizzolli
On Thu, Apr 07 2016, Nicolas Goaziou wrote:

> Daniele Pizzolli writes:
>
>> Do I am missing something else?  Thanks again for your assistance.
>
> There seems to be an issue with cache. Call `M-x
> org-element-reset-cache' before calling `org-babel-execute-buffer'.

Hello,

thanks, to be precise this is required to be iterated for every empty
(without result output) named result block (if they are in chain) in
the buffer.

Not straightforward but I can live with that workaround.  Once all the
result block are populated, `M-x org-babel-execute-buffer' updates the
results in a consistent way without the need of `M-x
org-element-reset-cache' call.

Thanks Nicolas for your support,
Daniele



[O] Editing Quote blocks remotely

2016-04-07 Thread Rasmus
Hi,

It would be nice if one could open an editing buffer for quote blocks,
e.g. using C-c '.

I guess we could use the code already used for remote footnote editing in
org-src.el (I think) or whatever is being used for example blocks.  The
mode should be Org, I guess.

It might be nice to support remote editing for VERSE as well.

WDYT?

Thanks,
Rasmus

-- 
Vote for Dick Taid in an election near you!




Re: [O] babel result chain outdated/inconsistent using var

2016-04-07 Thread Nicolas Goaziou
Daniele Pizzolli  writes:

> Do I am missing something else?  Thanks again for your assistance.

There seems to be an issue with cache. Call `M-x
org-element-reset-cache' before calling `org-babel-execute-buffer'.

Regards,



Re: [O] babel result chain outdated/inconsistent using var

2016-04-07 Thread Daniele Pizzolli
On Thu, Apr 07 2016, Nicolas Goaziou wrote:

> Hello,
>
> Daniele Pizzolli writes:
>
>> #+NAME: pid-result
>> #+RESULTS: pid
>> #+NAME: echo-pid
>> #+BEGIN_SRC shell :var DATA=pid-result :results value
>> printf '%s' "${DATA}" #+END_SRC
>>
>> #+RESULTS: echo-pid
>
> You are giving two names to the block, which is not possible.

Hello,

Sorry for the confusion, I deleted one line more than the result ones.
I guess a new line or a comment or a text is enough to separate the
blocks.

> I don't know what you are trying to do here but you seem to confuse
> blocks with their results. They can be named independently.

I copied your example without the results, here is the updated
version, and even with a comment between the block produces the same
error `(error "Reference `pid-result' not found in this buffer")'
after calling `org-babel-execute-buffer'

#+NAME: pid
#+BEGIN_SRC shell :results value :cache no
printf '%s' "${$}"
#+END_SRC

#+NAME: pid-result
#+RESULTS: pid

# Some comment is required here to separate blocks, but it does not
# work either

#+NAME: echo-pid
#+BEGIN_SRC shell :var DATA=pid-result :results value
printf '%s' "${DATA}"
#+END_SRC

#+RESULTS: echo-pid

Do I am missing something else?  Thanks again for your assistance.
Daniele



Re: [O] seeking advice on use of drawers vs blocks

2016-04-07 Thread Marco Wahl
Christian Wittern  writes:

>> On the third hand, have you considered wrapping a block in a drawer?

> No, I had not considered this.  Let me play around with that idea for a
> while. Is this syntactically allowed? I remember there was a document
> discussed a while ago that would define org syntax, but I can't remember now
> where this document is.  Does anybody remember?

http://orgmode.org/worg/dev/org-syntax.html See "Drawers and Property
Drawers".


HTH,
-- 
Marco Wahl
GPG: 0x49010A040A3AE6F2




Re: [O] seeking advice on use of drawers vs blocks

2016-04-07 Thread Christian Moe

Hi,

The syntax document is at http://orgmode.org/worg/dev/org-syntax.html.
It defines drawers as a "greater element", and says that greater
elements may contain other greater elements. Exporting a sample block
wrapped in a drawer works fine with the d:t option. Other complications
may arise, though...

Yours,
Christian

Christian Wittern writes:

> Dear Christian,
> Thank you for your feedback.
> On 2016-04-05 16:54, Christian Moe wrote:
>> On the third hand, have you considered wrapping a block in a drawer?
> No, I had not considered this.  Let me play around with that idea for a
> while. Is this syntactically allowed? I remember there was a document
> discussed a while ago that would define org syntax, but I can't remember now
> where this document is.  Does anybody remember?
>
> All the best,
>
> Christian




Re: [O] babel result chain outdated/inconsistent using var

2016-04-07 Thread Nicolas Goaziou
Hello,

Daniele Pizzolli  writes:

> #+NAME: pid-result
> #+RESULTS: pid
> #+NAME: echo-pid
> #+BEGIN_SRC shell :var DATA=pid-result :results value
> printf '%s' "${DATA}" #+END_SRC
>
> #+RESULTS: echo-pid

You are giving two names to the block, which is not possible. 

I don't know what you are trying to do here but you seem to confuse
blocks with their results. They can be named independently.

Regards,



Re: [O] seeking advice on use of drawers vs blocks

2016-04-07 Thread Christian Wittern
Dear Christian,
Thank you for your feedback.
On 2016-04-05 16:54, Christian Moe wrote:
> On the third hand, have you considered wrapping a block in a drawer?
No, I had not considered this.  Let me play around with that idea for a
while. Is this syntactically allowed? I remember there was a document
discussed a while ago that would define org syntax, but I can't remember now
where this document is.  Does anybody remember?

All the best,

Christian


-- 
Christian Wittern, Kyoto



Re: [O] org-mime-org-buffer-htmlize can't find back-end

2016-04-07 Thread Rasmus
Hi Peter,

Peter Davis  writes:

> I used to be able to use org-buffer-org-mime-htmlize to send my org
> documents as multipart/alternative html & text email. For some
> reason, this is stopped working, and now displays
>
> Unknown "nil" back-end: Aborting export
>
> In the *Messages* buffer, I see
>
> org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export
>
> So how is the back-end supposed to be defined? (And why might it have
> broken?) I haven't not made any related changes in a *long*
> time.

Could you provide a reproducible example starting with emacs -q?

I can't reproduce it here by

1. starting from emacs -q with latest org from master
2. creating an org buffer with the content:
   - 1
   - 2
3. calling org-mime-org-buffer-htmlize on this buffer.

Thanks,
Rasmus

-- 
Together we'll stand, divided we'll fall




Re: [O] babel result chain outdated/inconsistent using var

2016-04-07 Thread Daniele Pizzolli
On Wed, Apr 06 2016, Nicolas Goaziou wrote:

> Daniele Pizzolli writes:
>
>> Thanks Nicolas for the reply.  Ok, but `org-babel-execute-buffer'
>> produces an inconsistent document right now.
>
> This is because you ask it to. See below.
>
>> Mmm, the same reasoning can be used for arguing about the current
>> behaviour: If I C-c C-c on a block, I expect only the code of the
>> block to be executed, not some other part of the document I am
>> editing.  This behaviour will fix my issue.
>
> You are explicitly asking for a re-execution of a remote source block:
>
>   :var DATA=pid
>
> If you are only interested in the results, you should name them, and use
> that instead, e.g.

Hello,

Oh, thanks Nicolas for the tip.  But it does not work in a reliable
manner.

Calling `org-babel-execute-buffer' in the following snippet, raises:
(error "Reference `pid-result' not found in this buffer")

#+NAME: pid
#+BEGIN_SRC shell :results value :cache no
printf '%s' "${$}"
#+END_SRC

#+NAME: pid-result
#+RESULTS: pid

#+NAME: echo-pid
#+BEGIN_SRC shell :var DATA=pid-result :results value
printf '%s' "${DATA}"
#+END_SRC

#+RESULTS: echo-pid

Using the C-c C-c on the blocks also does not work...  unless you also
do a C-c C-c on `#+NAME: pid-result' which is cumbersome if you have a
chain of blocks and results.  Do you think that this can be fixed
easily?

Thanks in advance,
Daniele



Re: [O] bug in ox-koma-letter.el

2016-04-07 Thread Rasmus
Hi,

Thanks for your report.

Thomas Holst  writes:

> with latest org-mode version from git I get the following error when I
> try to export a subtree to pdf via koma-letter:
>
>   if: Symbol's value as variable is void: option
>
> I did a little search: 'option' occurs in commit:
>
>   3ee3663 ox-koma-letter: Add support for LOCATION
>
> I reverted that commit and export works fine. I don't know how to fix
> this so I can't provide a patch - sorry.

I think I messed up Myles' patch when rebasing it.  Could you try the
latest HEAD of master?  I pushed some changes just before seeing your
email.

Thanks,
Rasmus

-- 
Er du tosset for noge' lårt!




Re: [O] [PATCH] ox-koma-letter.el: Add support for 'location' koma variable

2016-04-07 Thread Rasmus
Myles English  writes:

> A patch is attached that fixes some naughty brackets in the recent commit.

Don't worry: I probably added those by accident when rebasing.

Anyway, I pushed both patches and updated the Worg page.  Let me know if
everything is OK.

Rasmus

-- 
Bang bang



[O] bug in ox-koma-letter.el

2016-04-07 Thread Thomas Holst
Hello,

with latest org-mode version from git I get the following error when I
try to export a subtree to pdf via koma-letter:

  if: Symbol's value as variable is void: option

I did a little search: 'option' occurs in commit:

  3ee3663 ox-koma-letter: Add support for LOCATION

I reverted that commit and export works fine. I don't know how to fix
this so I can't provide a patch - sorry.

Thanks for looking into this.

-- 
Thomas



Re: [O] Enginnering notation in tables exported to LaTeX

2016-04-07 Thread Nicolas Goaziou
Hello,

Daniele Nicolodi  writes:

> when exporting to LaTeX, numbers expressed in engineering notation
> contained in tables are transformed into a quite confusing notation:
> 1.234e5 becomes 1.234\,(5) which is rendered by LaTeX as 1.234 (5) with
> the space being a very narrow one. This notation is confusing because it
> is usually used (at l;east in physical sciences) to indicate uncertainty.
>
> I haven't found mention of this in the manual. There is a way to
> disable, or customize this conversion?

See `org-latex-table-scientific-notation'.

Regards,

-- 
Nicolas Goaziou