Re: [O] [PATCH v3] fix SETUPFILE pathname expansion with subdirectories

2015-09-24 Thread Nicolas Goaziou
Hello,

Richard Hansen  writes:

> Any other feedback on this patch?

Apparently, no. Applied. Thank you.

Would it make sense to do the same for INCLUDE? If so, would you want to
have a look at it?

Regards,

-- 
Nicolas Goaziou



[O] tangle on export

2015-09-24 Thread Alan Schmitt
Hello,

I have a question I feel is very basic but I did not find the answer in
the manual. How can I trigger the tangling of a block upon export.

More precisely, I want to give the following example in a lecture:

#+name:hello
#+begin_src ocaml :tangle myprog.ml
Printf.printf "Bonjour le monde !\n"
#+end_src

#+BEGIN_SRC sh :exports both :results verbatim
ocamlc -o myprog myprog.ml
./myprog
#+END_SRC

where I show a program to be compiled and actually compile it. Is there
a header I should put on the "hello" block to tangle it when I export
it?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ (Updated September 22, 2015, Mauna Loa Obs.): 397.77 ppm


signature.asc
Description: PGP signature


Re: [O] tangle on export

2015-09-24 Thread Rainer M Krug
Alan Schmitt  writes:

> Hello,
>
> I have a question I feel is very basic but I did not find the answer in
> the manual. How can I trigger the tangling of a block upon export.

Tangling and exporting are two different paths (well - one could see
tangling as a special case of exporting).

You have to use an export hook (see
http://orgmode.org/tmp/worg/org-configs/org-hooks.html for a list of
hooks in org).

I have done something similar to run a post-tangle hook:

#+begin_src emacs-lisp
(defvar org-babel-tangle-run-postTangleScript nil
  "If non-nil, postTangleScript.sh will be executed")
(put 'org-babel-tangle-run-postTangleScript 'safe-local-variable 'booleanp)

(defun org-babel-run-post-tangle-script ()
  (when org-babel-tangle-run-postTangleScript
(message "running the postTangleScript.sh bash shell script")
(shell-command "bash ./postTangleScript.sh")))

(add-hook 'org-babel-post-tangle-hook 'org-babel-run-post-tangle-script)
#+end_src

Cheers,

Rainer

>
> More precisely, I want to give the following example in a lecture:
>
> #+name:hello
> #+begin_src ocaml :tangle myprog.ml
> Printf.printf "Bonjour le monde !\n"
> #+end_src
> #+BEGIN_SRC sh :exports both :results verbatim
> ocamlc -o myprog myprog.ml
> ./myprog
> #+END_SRC
>
> where I show a program to be compiled and actually compile it. Is there
> a header I should put on the "hello" block to tangle it when I export
> it?
>
> Thanks,
>
> Alan

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] [PATCH] ox-latex: Add scrartcl LaTeX class

2015-09-24 Thread Eric S Fraga
On Wednesday, 23 Sep 2015 at 14:27, Ista Zahn wrote:
> On Wed, Sep 23, 2015 at 2:16 PM, Eric S Fraga  wrote:

[...]

>> One solution, but not an ideal one, is to use file local variables to
>> define org-latex-classes (and any other variables) as appropriate for
>> the document.  It's not ideal because unfortunately most of org's
>> variables (as well as many of emacs's own) are "global" and hence affect
>> the functionality of org visiting other buffers.  I find myself having
>> separate emacs instances for some org files for this reason.
>
> Doesn't "setq-local" solve this problem?

Seems to!  Thanks.  I have done the following:
#+begin_src org
  ,#+title: Testing setq-loccal
  ,#+latex_class: esftest
  ,* settings   
   :noexport:
  ,#+name: startup
  ,#+begin_src emacs-lisp :results none
(setq-local org-latex-classes '(("esftest" "\\documentclass{scrartcl}" 
("\\section*{%s}" . "\\section*{%s}") ("\\subsection{%s}" . 
"\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") 
("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . 
"\\subparagraph*{%s}"
  ,#+end_src

  # Local Variables:
  # eval: (esf/execute-startup-block)
  # End:
#+end_src
where esf/execute-startup-block executes the src block named "startup".

The issue is complicated by the fact that exporters generate a new
buffer which has its own variables (hence the use of #+bind:) so some
variables should be set using bind but others potentially using
setq-local.

Thanks again,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.1-203-g4ca3d3



[O] Solved: [ ] Checkboxes or count of completed TODOs in subtree?

2015-09-24 Thread Rainer M Krug
Suvayu Ali  writes:

> On Thu, Sep 24, 2015 at 10:41:19AM +0200, Rainer M Krug wrote:
>> 
>> I would like to be able to use something like checkboxes in a tree of
>> headers.
>> 
>> I understand that checkboxes only work in simple lists, i.e. not on
>> headers and trees of headers.
>> 
>> But I would like to see in my document (an ongoing analysis, of which
>> certain parts in each subtree are completed and others still need to
>> be done) which subtree contains how many TODO subheaders, effectively as
>> I can do with simple lists and checkboxes.
>> 
>> But as this is the basis for a paper, I want to keep the headers and not
>> use simple lists.
>> 
>> Is this possible? Is there a way to see how many active TODOs are still
>> under each header?
>
> You can use statistics cookies for TODO states on the parent headline.

Thanks - perfect. Exactly what I was looking for.


Cheers,

Rainer

>
>   * Parent [1/3]
>   
>   ** TODO Section 1
>   
>   ** WInP Section 2
>   
>   ** DONE Section 3
>
> Hope this helps,

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] org-babel-execute:dot -- why doesn't this work?

2015-09-24 Thread Matt Price
On Thu, Sep 24, 2015 at 12:00 AM, Nick Dokos  wrote:

> Matt Price  writes:
>
> > I would, however, like to avoid the clumsy intermediate step and use
> something like this instead:
> > #+name: graph-from-tables
> > #+HEADER: :var nodes=students-table graph=students-graph horiz='t
> > #+BEGIN_SRC emacs-lisp :file ~/example-diagram.png :colnames yes
> :exports results
> >   (org-babel-execute:dot
> >(concat
> > "graph {\n"
> > (when horiz "rankdir=LR;\n")   ;up-down or left-right
> > (mapconcat
> >  (lambda (x)
> >(format "%s [label=\"%s\" shape=%s style=\"filled\"
> fillcolor=\"%s\"]"
> >(car x)
> >(nth 1 x)
> >(if (string= "" (nth 2 x)) "box" (nth 2 x))
> >(if (string= "" (nth 3 x)) "none" (nth 3 x))
> >)) nodes "\n")
> > "\n"
> > (mapconcat
> > (lambda (x)
> >   (format "%s -- %s;"
> >   (car x) (nth 1 x) )) graph "\n")
> > "}\n") params)
> > #+END_SRC
> >
>
> There are a couple of problems, one minor (the :colnames yes part
> truncates the graph so you have only two edges), and one major: the
> "params" argument is not defined.
>
> When a dot source block is passed to org-babel-execute:dot, the params
> argument I get [fn:1] is:
>
> ((:comments . #1="") (:shebang . #1#) (:cache . "no") (:padline . #1#)
>  (:noweb . "no") (:tangle . "no") (:exports . "results")
>  (:results . "file replace") (:session . "none") (:hlines . "no")
>  (:file . "Images/foobar.png") (:result-type . value)
>  (:result-params "file" "replace") (:rowname-names) (:colname-names))
>
> So I tried passing it to org-babel-execute:dot and somewhat
> to my surprise it worked [fn:2] - try evaluating the following in your
> *scratch* buffer (make sure there is an Images subdir under the
> current directory of that buffer):
>
> --8<---cut here---start->8---
>
> (org-babel-execute:dot
>  "graph {
> rankdir=LR;
> a [label=\"Omar\" shape=ellipse style=\"filled\" fillcolor=\"green\"]
> b [label=\"Hindia\" shape=ellipse style=\"filled\" fillcolor=\"orange\"]
> c [label=\"Yuvrai\" shape=ellipse style=\"filled\" fillcolor=\"purple\"]
> a -- b;
> a -- c;
> b -- c;
> }
> "
>  '((:comments . #1="") (:shebang . #1#) (:cache . "no") (:padline . #1#)
>  (:noweb . "no") (:tangle . "no") (:exports . "results")
>  (:results . "file replace") (:session . "none") (:hlines . "no")
>  (:file . "Images/foobar.png") (:result-type . value)
>  (:result-params "file" "replace") (:rowname-names) (:colname-names)))
> --8<---cut here---end--->8---
>
> But I would hardly call this method less clumsy than your earlier
> attempt.
>
> Footnotes:
>
> [fn:1]  I made a simple dot source block with your graph
>
> #+BEGIN_SRC dot :file Images/foobar.png
> graph {
> rankdir=LR;
> a [label="Omar" shape=ellipse style="filled" fillcolor="green"]
> b [label="Hindia" shape=ellipse style="filled" fillcolor="orange"]
> c [label="Yuvrai" shape=ellipse style="filled" fillcolor="purple"]
> a -- b;
> a -- c;
> b -- c;
> }
> #+END_SRC
>
> and instrumented org-babel-execute:dot under edebug - when I executed the
> code
> block, the debugger kicked in when the function got called and I could
> get the "params" argument.
>
> [fn:2] I thought the #1 and #1# constructs (which I don't understand at
>all) would make it blow up.
>
> --
> Nick
>
> Many thanks, Nick, and especially to the pointer to edebug (so obvious
once you say it!).  With my original code, I stepped through the whole
function and I can't quite understand why it's not working. The code block
text is generated as expected, but somehow it's not getting written, or
perhaps not executed by dot, as hoped.  Here is the debugging output:

(nodes (quote (("a" "Omar" "ellipse" "green") ("b" "Hindia" "ellipse"
"orange") ("c" "Yuvrai" "ellipse" "purple"

(graph (quote (("a" "b") ("a" "c"

(horiz (quote t))

funcall-interactively: Buffer is read-only: # [4 times]

Result: ((:comments . #1="") (:shebang . #1#) (:cache . "no") (:padline .
#1#) (:noweb . "no") (:tangle . "no") (:exports . "results") (:results .
"file replace") (:var nodes ("a" "Omar" "ellipse" "green") ("b" "Hindia"
"ellipse" "orange") ("c" "Yuvrai" "ellipse" "purple")) (:var graph ("a"
"b") ("a" "c")) (:var horiz . t) (:colnames . "yes") (:file .
"~/example-diagram.png") (:hlines . "no") (:session . "none") (:result-type
. value) (:result-params "file" "replace") (:rowname-names) (:colname-names
(nodes "*node*" "*label*" "*shape*" "*fillcolor*") (graph "From" "To")))

Result: (:result-params "file" "replace")

Result: ("file" "replace")

Stop

Result: ((:comments . #1="") (:shebang . #1#) (:cache . "no") (:padline .
#1#) (:noweb . "no") (:tangle . "no") (:exports . "results") (:results .
"file replace") (:var nodes ("a" "Omar" "ellipse" "green") ("b" "Hindia"
"ellipse" "orange") ("c" "Yuvrai" "ellipse" 

Re: [O] [ ] Checkboxes or count of completed TODOs in subtree?

2015-09-24 Thread Suvayu Ali
On Thu, Sep 24, 2015 at 10:41:19AM +0200, Rainer M Krug wrote:
> 
> I would like to be able to use something like checkboxes in a tree of
> headers.
> 
> I understand that checkboxes only work in simple lists, i.e. not on
> headers and trees of headers.
> 
> But I would like to see in my document (an ongoing analysis, of which
> certain parts in each subtree are completed and others still need to
> be done) which subtree contains how many TODO subheaders, effectively as
> I can do with simple lists and checkboxes.
> 
> But as this is the basis for a paper, I want to keep the headers and not
> use simple lists.
> 
> Is this possible? Is there a way to see how many active TODOs are still
> under each header?

You can use statistics cookies for TODO states on the parent headline.

  * Parent [1/3]
  
  ** TODO Section 1
  
  ** WInP Section 2
  
  ** DONE Section 3

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [BUG] R src blocks untabify literal constant TABs

2015-09-24 Thread Nicolas Goaziou
Hello,

"Charles C. Berry"  writes:

> On Tue, 22 Sep 2015, Charles C. Berry wrote:
>
> Just to tie this up, this is an issue with `org-src-preserve-indentation', 
> see
>
>   (info "(org) Editing source code")
>
> for the best documentation. I found the "replace sequences of spaces with 
> tab characters" for nil values confusing. The opposite is happening in 
> this example.

Would you want to write a documentation patch about it?

Regards,

-- 
Nicolas Goaziou



Re: [O] Tangle including code generating graphics for :results graphics

2015-09-24 Thread Andreas Leha
Hi Rainer,

Rainer M Krug  writes:
> Hi
>
> Is it possible to tangle an R code block including the code which is
> generating the graphs when using =:results graphics= ?
>
> I would like to tangle these code blocks generating the graphs as I
> would like to have a script which I can use to easily update all graphs
> when the simulated input data is updated. I have this for the actual
> analysis which works perfectly, but would like to have the same for the
> graphs. At the same time, I like the clarity of specifying :width and
> :height and other parameter for the plotting as header arguments.
>
> I have
>
> ,
> | :PROPERTIES:
> | :header-args+: :prologue "env <- fitBFGS; attach(env)"
> | :header-args+: :epilogue "detach(env); rm(env)"
> | :END:
> `
>
> and this is tangled perfectly - but obviously not the code for
> plotting. Is there an argument / setting to enable this?
>
> Thanks,
>
> Rainer

That is a very relevant question and I'd be interested in the answer as
well.  But I am not aware of any support by Org mode for this.

I guess calling `org-babel-expand-src-block' prior to tangling would
answer your needs?

This would be desirable not only for plotting code blocks, also data
passed to code block is 'lost' during tangling.

I think it would be good to have a source block header argument, say
`:tangleexpanded', controlling such functionality.

WDYT?

Regards,
Andreas




[O] [ ] Checkboxes or count of completed TODOs in subtree?

2015-09-24 Thread Rainer M Krug
Hi

I would like to be able to use something like checkboxes in a tree of
headers.

I understand that checkboxes only work in simple lists, i.e. not on
headers and trees of headers.

But I would like to see in my document (an ongoing analysis, of which
certain parts in each subtree are completed and others still need to
be done) which subtree contains how many TODO subheaders, effectively as
I can do with simple lists and checkboxes.

But as this is the basis for a paper, I want to keep the headers and not
use simple lists.

Is this possible? Is there a way to see how many active TODOs are still
under each header?

Thanks,

Rainer

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


[O] Tangle including code generating graphics for :results graphics

2015-09-24 Thread Rainer M Krug
Hi

Is it possible to tangle an R code block including the code which is
generating the graphs when using =:results graphics= ?

I would like to tangle these code blocks generating the graphs as I
would like to have a script which I can use to easily update all graphs
when the simulated input data is updated. I have this for the actual
analysis which works perfectly, but would like to have the same for the
graphs. At the same time, I like the clarity of specifying :width and
:height and other parameter for the plotting as header arguments.

I have

,
| :PROPERTIES:
| :header-args+: :prologue "env <- fitBFGS; attach(env)"
| :header-args+: :epilogue "detach(env); rm(env)"
| :END:
`

and this is tangled perfectly - but obviously not the code for
plotting. Is there an argument / setting to enable this?

Thanks,

Rainer

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] Tangle including code generating graphics for :results graphics

2015-09-24 Thread Rainer M Krug
Andreas Leha  writes:

> Hi Rainer,
>
> Rainer M Krug  writes:
>> Hi
>>
>> Is it possible to tangle an R code block including the code which is
>> generating the graphs when using =:results graphics= ?
>>
>> I would like to tangle these code blocks generating the graphs as I
>> would like to have a script which I can use to easily update all graphs
>> when the simulated input data is updated. I have this for the actual
>> analysis which works perfectly, but would like to have the same for the
>> graphs. At the same time, I like the clarity of specifying :width and
>> :height and other parameter for the plotting as header arguments.
>>
>> I have
>>
>> ,
>> | :PROPERTIES:
>> | :header-args+: :prologue "env <- fitBFGS; attach(env)"
>> | :header-args+: :epilogue "detach(env); rm(env)"
>> | :END:
>> `
>>
>> and this is tangled perfectly - but obviously not the code for
>> plotting. Is there an argument / setting to enable this?
>>
>> Thanks,
>>
>> Rainer
>
> That is a very relevant question and I'd be interested in the answer as
> well.  But I am not aware of any support by Org mode for this.
>
> I guess calling `org-babel-expand-src-block' prior to tangling would
> answer your needs?

I don't think so - as this is doing the same as C-c.

The graphics code is only added in the call of org-babel-execute:R so
some refactoring would be necessary. 

In org-babel-execute:R there is the following code:

#+begin_src emacs-lisp 
(full-body
(let ((inside
   (list (org-babel-expand-body:R body params graphics-file
  (mapconcat 'identity
 (if graphics-file
 (append
  (list (org-babel-R-construct-graphics-device-call
 graphics-file params))
  inside
  (list "},error=function(e){plot(x=-1:1, y=-1:1, 
type='n', xlab='', ylab='', axes=FALSE); text(x=0, y=0, labels=e$message, 
col='red'); paste('ERROR', e$message, sep=' : ')}); dev.off()"))
   inside)
 "\n")))
 #+end_src

If this expansion is moved into org-babel-expand-body:R, it should
work and *always* expand the graphics code (as org-babel-expand-body:R
adds the :epilogue and :prologue).

Then one would just need a new header argument and it should work.

>
> This would be desirable not only for plotting code blocks, also data
> passed to code block is 'lost' during tangling.

Yes - debugging the whole process of evaluation would also be much easier.

>
> I think it would be good to have a source block header argument, say
> `:tangleexpanded', controlling such functionality.
>
> WDYT?

Yes - that would be an ideal solution. But expanded is already used in a
different context (noweb), so something like :tangleaseval would make
sense, making clear that the code is tangled as it would be evaluated.

Unfortunately, I have no time for looking into this at the moment.

But it should be possible without to much hassle.

Thanks,

Rainer

>
> Regards,
> Andreas
>
>

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] tangle on export

2015-09-24 Thread Andreas Leha
Hi Alan,

Alan Schmitt  writes:
> Hi Andreas,
>
> On 2015-09-24 14:14, Andreas Leha  writes:
>
>> if all of this is for a single block, you can get away quite cheaply
>> with sth along (untested)
>>
>> #+begin_src emacs-lisp :results silent
>>   (save-excursion
>> ;; tangle
>> (org-babel-goto-named-src-block "hello")
>> (org-babel-tangle '(4)))
>> #+end_src
>>
>> and make sure this gets executed during export.
>
> I’ve tried this and somehow it replaces the whole org file with
> a version with comments and src block headers removed, and macros
> expanded. I have no idea why it does this …
>

That's what I feared.  So, you better go for the other suggestions in
this thread, the hook or calling the export from that same source block
-- now making sure not to evaluate the block again.

Best,
Andreas




Re: [O] tangle on export

2015-09-24 Thread John Kitchin
I would add a third Elisp block that calls org-babel-tangle. Assuming all
your code blocks execute on export that will make it tangle. Or I have also
made an Elisp block that does the tangle and then runs the export command.
I.e. Not using the keyboard shortcuts for export.

On Thursday, September 24, 2015, Alan Schmitt <
alan.schm...@polytechnique.org> wrote:

> Hello,
>
> I have a question I feel is very basic but I did not find the answer in
> the manual. How can I trigger the tangling of a block upon export.
>
> More precisely, I want to give the following example in a lecture:
>
> #+name:hello
> #+begin_src ocaml :tangle myprog.ml
> Printf.printf "Bonjour le monde !\n"
> #+end_src
>
> #+BEGIN_SRC sh :exports both :results verbatim
> ocamlc -o myprog myprog.ml
> ./myprog
> #+END_SRC
>
> where I show a program to be compiled and actually compile it. Is there
> a header I should put on the "hello" block to tangle it when I export
> it?
>
> Thanks,
>
> Alan
>
> --
> OpenPGP Key ID : 040D0A3B4ED2E5C7
> Athmospheric CO₂ (Updated September 22, 2015, Mauna Loa Obs.): 397.77 ppm
>


-- 
John

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


Re: [O] tangle on export

2015-09-24 Thread Alan Schmitt
Hi Rainer,

On 2015-09-24 13:17, Rainer M Krug  writes:

> Alan Schmitt  writes:
>
>> Hello,
>>
>> I have a question I feel is very basic but I did not find the answer in
>> the manual. How can I trigger the tangling of a block upon export.
>
> Tangling and exporting are two different paths (well - one could see
> tangling as a special case of exporting).
>
> You have to use an export hook (see
> http://orgmode.org/tmp/worg/org-configs/org-hooks.html for a list of
> hooks in org).
>
> I have done something similar to run a post-tangle hook:
>
> #+begin_src emacs-lisp
> (defvar org-babel-tangle-run-postTangleScript nil
>   "If non-nil, postTangleScript.sh will be executed")
> (put 'org-babel-tangle-run-postTangleScript 'safe-local-variable 'booleanp)
>
> (defun org-babel-run-post-tangle-script ()
>   (when org-babel-tangle-run-postTangleScript
> (message "running the postTangleScript.sh bash shell script")
> (shell-command "bash ./postTangleScript.sh")))
>
> (add-hook 'org-babel-post-tangle-hook 'org-babel-run-post-tangle-script)
> #+end_src

Thanks, I’ll give this a try.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ (Updated September 22, 2015, Mauna Loa Obs.): 397.23 ppm


signature.asc
Description: PGP signature


[O] Bug: External links buggy with 8.3.1 [8.3.1 (8.3.1-dist @ c:/org-mode/org/)]

2015-09-24 Thread AW
To: emacs-orgmode@gnu.org
Subject: Bug: External links buggy with 8.3.1 [8.3.1 (8.3.1-dist @ c:/org-
mode/org/)]
From: aw@PC-21-W8.i-did-not-set--mail-host-address--so-tickle-me
--text follows this line--

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


I'm using link abbrevations. The abbrevations are stored in a file and
this file is loaded in my .emacs. I hit this bug only on Windows 8.1,
not under Linux. 

Code of abbrevations as example:

(setq org-link-abbrev-alist
   (if (eq system-type 'windows-nt)
  '(("NameA" . "//Sbs2011/Bilder/2011/271-2011/%s")
("NameB" .  "//Sbs2011/Bilder/2012/351-2012/%s")
)
  '(("NameA" . "/home/AW/Dokumente/2011-271/%s")
("NameB" .  "/home/AW/Dokumente/2012-351/%s")
)))

With orgmode 8.2.10 the links work. Example for link: [[NameA:filename.pdf]
[whatever]]

With orgmode 8.3.1 I get the message e.g.:

user-error: No such file: u:/Sbs2011/Bilder/2011/271-2011/filename.pdf

You see, orgmode 8.3.1 modifies for no apparent reason the link from
"//sbs2011..." to "u:/sbs2011..."

The share "u:" exists, HOME is u:/emacs. This is the orgmode version from 
orgmode.org, not elpa. 

Emacs  : GNU Emacs 25.0.50.5 (x86_64-w64-mingw32)
 of 2015-09-21 on PC-21-W8
Package: Org-mode version 8.3.1 (8.3.1-dist @ c:/org-mode/org/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook org-show-block-all
append local]
   5]
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
  org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-link-abbrev-alist   '(("NameA" . "//Sbs2011/Bilder/2011/271-2011/%s")
("NameB" .  
"//Sbs2011/Bilder/2012/351-2012/%s")
);;; CAVE: I deleted the real output and wrote my example 
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-agenda-files '("u:/Emacs/Sonstiges.org" "u:/Emacs/this.org"
"u:/Emacs/that.org" "u:/Emacs/Privat.org"
)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )
-



Re: [O] org-babel-execute:dot -- why doesn't this work?

2015-09-24 Thread Matt Price
On Thu, Sep 24, 2015 at 7:10 AM, Matt Price  wrote:

>
>
> On Thu, Sep 24, 2015 at 12:00 AM, Nick Dokos  wrote:
>
>> Matt Price  writes:
>>
>
> -
> it looks about right until the very end; Manually running "dot
> /tmp/babel-2749DTL/dot-2749Nkt -Tpng -o /home/matt/example-diagram.png"
> from a shell works fine. However, the result of:
>
> (org-babel-eval
>  (concat cmd
>  " " (org-babel-process-file-name in-file)
>  " " cmdline
>  " -o " (org-babel-process-file-name out-file)) "")
>
> is "nil".  Any idea why that might be?
>
>
Just a quick addendum.  Pausing during debugging and running

(with-temp-file in-file )
(org-babel-eval
 "dot /tmp/babel-2749DTL/dot-2749Nkt -Tpng -o
/home/matt/example-diagram.png"  "")

from a scratch buffer also works.  So I am really confused -- maybe there
is something wrong with ob-dot itself?

Again, many thanks,
> Matt
>


Re: [O] tangle on export

2015-09-24 Thread Alan Schmitt
Hi Andreas,

On 2015-09-24 14:14, Andreas Leha  writes:

> if all of this is for a single block, you can get away quite cheaply
> with sth along (untested)
>
> #+begin_src emacs-lisp :results silent
>   (save-excursion
> ;; tangle
> (org-babel-goto-named-src-block "hello")
> (org-babel-tangle '(4)))
> #+end_src
>
> and make sure this gets executed during export.

I’ve tried this and somehow it replaces the whole org file with
a version with comments and src block headers removed, and macros
expanded. I have no idea why it does this …

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ (Updated September 22, 2015, Mauna Loa Obs.): 397.23 ppm


signature.asc
Description: PGP signature


Re: [O] tangle on export

2015-09-24 Thread Andreas Leha
Hi Alan,

Rainer M Krug  writes:
> Alan Schmitt  writes:
>
>> Hello,
>>
>> I have a question I feel is very basic but I did not find the answer in
>> the manual. How can I trigger the tangling of a block upon export.
>
> Tangling and exporting are two different paths (well - one could see
> tangling as a special case of exporting).
>
> You have to use an export hook (see
> http://orgmode.org/tmp/worg/org-configs/org-hooks.html for a list of
> hooks in org).
>
> I have done something similar to run a post-tangle hook:
>
> #+begin_src emacs-lisp
> (defvar org-babel-tangle-run-postTangleScript nil
>   "If non-nil, postTangleScript.sh will be executed")
> (put 'org-babel-tangle-run-postTangleScript 'safe-local-variable 'booleanp)
>
> (defun org-babel-run-post-tangle-script ()
>   (when org-babel-tangle-run-postTangleScript
> (message "running the postTangleScript.sh bash shell script")
> (shell-command "bash ./postTangleScript.sh")))
>
> (add-hook 'org-babel-post-tangle-hook 'org-babel-run-post-tangle-script)
> #+end_src
>
> Cheers,
>
> Rainer
>
>>
>> More precisely, I want to give the following example in a lecture:
>>
>> #+name:hello
>> #+begin_src ocaml :tangle myprog.ml
>> Printf.printf "Bonjour le monde !\n"
>> #+end_src
>> #+BEGIN_SRC sh :exports both :results verbatim
>> ocamlc -o myprog myprog.ml
>> ./myprog
>> #+END_SRC
>>
>> where I show a program to be compiled and actually compile it. Is there
>> a header I should put on the "hello" block to tangle it when I export
>> it?
>>
>> Thanks,
>>
>> Alan

if all of this is for a single block, you can get away quite cheaply
with sth along (untested)

#+begin_src emacs-lisp :results silent
  (save-excursion
;; tangle
(org-babel-goto-named-src-block "hello")
(org-babel-tangle '(4)))
#+end_src

and make sure this gets executed during export.

Regards,
Andreas




[O] Bug: org-capture-refile doc inconsistency, refile bug [8.3.1 (8.3.1-129-ga7c8d2-elpaplus @ /home/jeeger/.emacs.d/elpa/org-plus-contrib-20150921/)]

2015-09-24 Thread Jan Seeger
Greetings!

I've discovered that org-capture-refile's documentation states that
org-capture-refile finalizes the buffer first, and then refiles the
entry. This is incorrect, the implementation of org-capture-refile
first refiles the entry and then calls org-capture-finalize.

While this is a small inconsistency, it leads to errors with
org-finalize: The cursor possition during finalization is that of the
entry before the refile, while normally, the cursor is positioned at
the start of the newly inserted entry when org-capture-finalize is
called. This leads to superfluous newlines, and possibly other
problems, such as timestamps and checkboxes not being updated.

I've fixed this bug for me by reversing the order of finalization and
refiling, as stated in the documentation. I've attached a patch to do
this, but I'm not entirely sure about the side effects caused by the
patch. The test suite does pass though. If someone could weigh in on
this, I'd be grateful!

Regards,
Jan


Emacs  : GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.16.6)
 of 2015-09-22 on bean
Package: Org-mode version 8.3.1 (8.3.1-129-ga7c8d2-elpaplus @ 
/home/jeeger/.emacs.d/elpa/org-plus-contrib-20150921/)


diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 67dc319..d60929d 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -793,14 +793,15 @@ already gone.  Any prefix argument will be passed to the 
refile command."
   (let ((pos (point))
(base (buffer-base-buffer (current-buffer)))
(org-refile-for-capture t))
+(org-capture-finalize))
 (save-window-excursion
   (with-current-buffer (or base (current-buffer))
(save-excursion
  (save-restriction
(widen)
(goto-char pos)
-   (call-interactively 'org-refile)
-(org-capture-finalize)))
+   (call-interactively 'org-refile))
+
 
 (defun org-capture-kill ()
   "Abort the current capture process."


Re: [O] html export list of figures

2015-09-24 Thread Cook, Malcolm
Hi,
> I am not aware of anything in html for this. In latex, org is just passing the
 > baton to Latex to generate the list of tables/figures. For HTML, you will
 > probably have to generate the code yourself.
 > 
 > In org-ref I provide a list-of-tables and list-of-figures link, which has 
 > the latex
 > export code you show, but it is also clickable and generates an org buffer 
 > with
 > a clickable list of tables or figures. See:
 > 
 > https://github.com/jkitchin/org-ref/blob/master/org-ref.el#L932
 > 
 > while there is no html export code there, the clicking functions lay out how 
 > to
 > get the information. I guess you would need one more detail of putting some
 > kind of anchor or something on the tables/figures so you could click on the 
 > list
 > and jump to the table. it might get you stated anyway.

Great John, thanks, I will see what I can add.  Is this package part of any 
library available via that package manager?

 > 
 > Cook, Malcolm writes:
 > 
 > > Hi,
 > >
 > > I see know what to generate a list of figures to appear in my html
 > > export in addition to my current
 > >
 > >   #+TOC: listings
 > >   #+TOC: tables
 > >
 > > Exporting latex provides
 > >
 > >   #+LATEX: \listoffigures
 > >
 > > To complement
 > >
 > >   #+LATEX: \tableofcontents
 > >   #+LATEX: \listoftables
 > >
 > > But I see nothing analogous for HTML
 > >
 > > Am I missing something?
 > >
 > > Thanks,
 > >
 > > Malcolm Cook
 > 
 > --
 > 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



Re: [O] [BUG] R src blocks untabify literal constant TABs

2015-09-24 Thread Charles C. Berry

On Thu, 24 Sep 2015, Nicolas Goaziou wrote:


Hello,

"Charles C. Berry"  writes:


On Tue, 22 Sep 2015, Charles C. Berry wrote:

Just to tie this up, this is an issue with `org-src-preserve-indentation',
see

(info "(org) Editing source code")

for the best documentation. I found the "replace sequences of spaces with
tab characters" for nil values confusing. The opposite is happening in
this example.


Would you want to write a documentation patch about it?


I'll take a look.

There are about 70 places where

grep -i -nH -e preserve-indentation\\\|remove-indentation

matches in lisp and several different functions.

So I feel a need to be sure I get it all right.

Chuck





Re: [O] html export list of figures

2015-09-24 Thread Daniele Pizzolli
On Thu, Sep 24 2015, John Kitchin wrote:

[]

Hello,

I am reversing the conversation to figure out the meaning:

>  > In org-ref I provide a list-of-tables and list-of-figures link,
>  > which has the latex

[]

>> Great John, thanks, I will see what I can add.  Is this package part
>> of any library available via that package manager?

[]

> no, for now it is still only available on github.

Well, I made a recipe for el-get some time ago.

Best,
Daniele



[O] Quoting "_" for html and LaTeX output

2015-09-24 Thread Peter Davis
A lot of the information I track in org-mode includes filepaths and 
names and other strings containing underscore ("_") characters. I'd like 
to be able to quote these for HTML and LaTeX output, so I don't wind up 
with unwanted subscripts.


On the other hand, I want the data to be pretty readable within the org 
buffer, so using \under{} pretty much fails that.


Is there another, more concise way to do this, possible for large 
stretches of text at a time? I don't want to use an example block, as I 
still want to format the text and avoid the mono-spaced font.


I understand that "\_" used to work, but doesn't on more recent 
versions. Any chance of getting that back?


Thanks!
-pd




Re: [O] html export list of figures

2015-09-24 Thread John Kitchin
no, for now it is still only available on github.

Cook, Malcolm writes:

> Hi,
>> I am not aware of anything in html for this. In latex, org is just passing 
>> the
>  > baton to Latex to generate the list of tables/figures. For HTML, you will
>  > probably have to generate the code yourself.
>  >
>  > In org-ref I provide a list-of-tables and list-of-figures link, which has 
> the latex
>  > export code you show, but it is also clickable and generates an org buffer 
> with
>  > a clickable list of tables or figures. See:
>  >
>  > https://github.com/jkitchin/org-ref/blob/master/org-ref.el#L932
>  >
>  > while there is no html export code there, the clicking functions lay out 
> how to
>  > get the information. I guess you would need one more detail of putting some
>  > kind of anchor or something on the tables/figures so you could click on 
> the list
>  > and jump to the table. it might get you stated anyway.
>
> Great John, thanks, I will see what I can add.  Is this package part of any 
> library available via that package manager?
>
>  >
>  > Cook, Malcolm writes:
>  >
>  > > Hi,
>  > >
>  > > I see know what to generate a list of figures to appear in my html
>  > > export in addition to my current
>  > >
>  > >   #+TOC: listings
>  > >   #+TOC: tables
>  > >
>  > > Exporting latex provides
>  > >
>  > >   #+LATEX: \listoffigures
>  > >
>  > > To complement
>  > >
>  > >   #+LATEX: \tableofcontents
>  > >   #+LATEX: \listoftables
>  > >
>  > > But I see nothing analogous for HTML
>  > >
>  > > Am I missing something?
>  > >
>  > > Thanks,
>  > >
>  > > Malcolm Cook
>  >
>  > --
>  > 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

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



Re: [O] latex \ulcorner not working?

2015-09-24 Thread Nick Dokos
Lawrence Bottorff  writes:

> In my effort to get org mode just how I want it, I wanted to have some
> sort of way to distinguish "code," or just a single code-like word
> (symbol, command, etc.) inside a .org file. If I type the usual such
> as \beta or \lceiling, the system immediately snaps to the actual
> system. But \ulcorner and the other "corner" symbols don't work. I
> tried to have different highlighting inside the buffer, but apparently
> font locking hates to be overridden. Any idea why just corner doesn't
> work? I would accept a simple stackoverflow solution, i.e., background
> gray and/or mono font.
>

Add an entity?

C-h v org-entities-user RET

-- 
Nick




Re: [O] Quoting "_" for html and LaTeX output

2015-09-24 Thread Nicolas Goaziou
Hello,

Peter Davis  writes:

> A lot of the information I track in org-mode includes filepaths and
> names and other strings containing underscore ("_") characters. I'd
> like to be able to quote these for HTML and LaTeX output, so I don't
> wind up with unwanted subscripts.

What about: #+OPTIONS: ^:nil ?

> On the other hand, I want the data to be pretty readable within the
> org buffer, so using \under{} pretty much fails that.

See `org-pretty-entities'

> I understand that "\_" used to work, but doesn't on more recent
> versions. Any chance of getting that back?

Possibly.


Regards,

-- 
Nicolas Goaziou



[O] latex \ulcorner not working?

2015-09-24 Thread Lawrence Bottorff
In my effort to get org mode just how I want it, I wanted to have some sort
of way to distinguish "code," or just a single code-like word (symbol,
command, etc.) inside a .org file. If I type the usual such as \beta or
\lceiling, the system immediately snaps to the actual system. But \ulcorner
and the other "corner" symbols don't work. I tried to have different
highlighting inside the buffer, but apparently font locking hates to be
overridden. Any idea why just corner doesn't work? I would accept a simple
stackoverflow solution, i.e., background gray and/or mono font.

LB


Re: [O] Commit ceae5d651b80295f35c01ecfc53661c7e8eceba7 Breaks syncing with Android

2015-09-24 Thread Sergey Gordienko
On Sat, Sep 12, 2015 at 3:11 AM, Charles Philip Chan  wrote:
> On 11 Aug 2015, cpc...@bell.net wrote:
> On 11 Aug 2015, m...@nicolasgoaziou.fr wrote:
>
>>> Do you have any other information to share? E.g., what happens when
>>> syncing breaks?
>
>> Yes. The sync fails with a "Syntax error in regexp pattern near index
>> 383" error on the Android (version 5.1.1) side.
>
> I just upgraded to the latest git version of org-mode and this problem
> still persists. I have to use an older version of org-mobile for syncing
> to work.
>
> Charles
>
> --
> "Are [Linux users] lemmings collectively jumping off of the cliff of
> reliable, well-engineered commercial software?"
> (By Matt Welsh)
>
>
> --
> Linux!  Guerrilla UNIX Development Venimus, Vidimus, Dolavimus.
> (By m...@ka4ybr.com, Mark A. Horton KA4YBR)

Could you send to me index.org, agendas.org and checksums.dat files
which break the sync  (unless they don't contain a sensitive data)?
-- 
Sergey Gordienko



Re: [O] Quoting "_" for html and LaTeX output

2015-09-24 Thread Nick Dokos
Peter Davis  writes:

> A lot of the information I track in org-mode includes filepaths and
> names and other strings containing underscore ("_") characters. I'd
> like to be able to quote these for HTML and LaTeX output, so I don't
> wind up with unwanted subscripts.
>
> On the other hand, I want the data to be pretty readable within the
> org buffer, so using \under{} pretty much fails that.
>
> Is there another, more concise way to do this, possible for large
> stretches of text at a time? I don't want to use an example block, as
> I still want to format the text and avoid the mono-spaced font.
>

#+OPTIONS: ^:{}

See

   (info "(org) Export settings")
   
> I understand that "\_" used to work, but doesn't on more recent
> versions. Any chance of getting that back?
>

I don't remember that that ever worked - did it? OTOH, my memory isn't
what it used to be (and it was pretty bad to begin with).

-- 
Nick




[O] help debugging org-element crashes?

2015-09-24 Thread Peter Salazar
Hey everyone,

I'm finding my Emacs crashing a lot; other times I get errors like these
which I assume are related to the crashes:
http://pastebin.com/Tncs79r0
http://pastebin.com/jfdEYwVk

I mean total Emacs crashes, where I have to force quit Emacs itself. It's
happened in various org-mode situations including:
- pasting text from OSX clipboard
- promoting/demoting org-headings
- moving subtree up or down (i.e. using org-metadown org org-metaup)

My details:

Mac OSX Yosemite 10.10.5
GNU Emacs 24.5.1 (x86_64-apple-darwin14.5.0, Carbon Version 157 AppKit
1348.17)
Org-mode version 8.3.1 (8.3.1-129-ga7c8d2-elpaplus @
org-plus-contrib-20150921/)

I've tried reinstalling org-plus-contrib... I have also enabled
org-element-debug.

Any suggestions on how I can track this down and fix it?

Thanks!


Re: [O] The Org Manual

2015-09-24 Thread Rasmus
nascii boy  writes:

> Org advancement manual in org
>
> https://github.com/nasciiboy/TheOrgManual

Interesting.  Is this a port of the current org manual?  Does it produce
good texi code with ox-texi?

Thanks,
Rasmus

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




[O] [PATCH 2/2] fix SETUPFILE pathname expansion from within an INCLUDE

2015-09-24 Thread Richard Hansen
* lisp/ox.el (defun org-export-expand-include-keyword):  cd instead of
passing DIR to expand-file-name so that if the INCLUDE file has a
SETUPFILE line with a relative pathname the full pathname to the
SETUPFILE will be expanded properly.

Assume the following files:

  /home/foo/a.org:
#+INCLUDE: subdir/b.org

  /home/foo/subdir/b.org:
#+SETUPFILE: c.org

  /home/foo/subdir/c.org:
stuff

Before, if /home/foo/a.org was opened and exported, org-mode would try
(and fail) to read /home/foo/c.org.  With this change, org-mode reads
/home/foo/subdir/c.org as expected.

!!! TEST CASE NEEDED !!!

TINYCHANGE
---
 lisp/ox.el | 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 0adbdf2..186a378 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -3149,14 +3149,13 @@ locally for the subtree through node properties."
   (car key)
   (if (org-string-nw-p val) (format " %s" val) ""
 
-(defun org-export-expand-include-keyword ( included dir footnotes)
+(defun org-export-expand-include-keyword ( included footnotes)
   "Expand every include keyword in buffer.
 Optional argument INCLUDED is a list of included file names along
 with their line restriction, when appropriate.  It is used to
-avoid infinite recursion.  Optional argument DIR is the current
-working directory.  It is used to properly resolve relative
-paths.  Optional argument FOOTNOTES is a hash-table used for
-storing and resolving footnotes.  It is created automatically."
+avoid infinite recursion.  Optional argument FOOTNOTES is a
+hash-table used for storing and resolving footnotes.  It is
+created automatically."
   (let ((case-fold-search t)
(file-prefix (make-hash-table :test #'equal))
(current-prefix 0)
@@ -3194,8 +3193,7 @@ storing and resolving footnotes.  It is created 
automatically."
   (replace-match "" nil nil matched 1)))
   (expand-file-name
(org-remove-double-quotes
-matched)
-   dir)))
+matched
 (setq value (replace-match "" nil nil value)
 (only-contents
  (and (string-match ":only-contents *\\([^: \r\t\n]\\S-*\\)?"
@@ -3261,6 +3259,8 @@ storing and resolving footnotes.  It is created 
automatically."
   (t
(insert
 (with-temp-buffer
+  (setq default-directory
+(file-name-directory file))
   (let ((org-inhibit-startup t)
 (lines
  (if location
@@ -3276,7 +3276,6 @@ storing and resolving footnotes.  It is created 
automatically."
   footnotes)))
   (org-export-expand-include-keyword
(cons (list file lines) included)
-   (file-name-directory file)
footnotes)
   (buffer-string)
  ;; Expand footnotes after all files have been included.
-- 
2.5.3




[O] [PATCH 1/2] test INCLUDE pathname expansion with subdirectories

2015-09-24 Thread Richard Hansen
* lisp/test-ox.el (test-org-export/expand-include): Modify the
INCLUDE test to ensure that a.org including subdir/b.org including
c.org causes subdir/c.org to be read, not c.org.

TINYCHANGE
---
 testing/examples/include.org| 2 +-
 testing/examples/{include2.org => include3.org} | 0
 testing/examples/subdir/include2.org| 1 +
 testing/lisp/test-ox.el | 8 
 4 files changed, 6 insertions(+), 5 deletions(-)
 rename testing/examples/{include2.org => include3.org} (100%)
 create mode 100644 testing/examples/subdir/include2.org

diff --git a/testing/examples/include.org b/testing/examples/include.org
index f4dcc20..7122716 100644
--- a/testing/examples/include.org
+++ b/testing/examples/include.org
@@ -4,7 +4,7 @@ Small Org file with an include keyword.
 (+ 2 1)
 #+END_SRC
 
-#+INCLUDE: "include2.org"
+#+INCLUDE: "subdir/include2.org"
 
 * Heading
 body
diff --git a/testing/examples/include2.org b/testing/examples/include3.org
similarity index 100%
rename from testing/examples/include2.org
rename to testing/examples/include3.org
diff --git a/testing/examples/subdir/include2.org 
b/testing/examples/subdir/include2.org
new file mode 100644
index 000..68df86e
--- /dev/null
+++ b/testing/examples/subdir/include2.org
@@ -0,0 +1 @@
+#+INCLUDE: "../include3.org"
diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index ccffa89..1af5c21 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -925,7 +925,7 @@ text
   (insert-file
(expand-file-name "examples/include.org" org-test-dir))
   (replace-regexp-in-string
-   (regexp-quote "#+INCLUDE: \"include2.org\"")
+   (regexp-quote "#+INCLUDE: \"subdir/include2.org\"")
"Success!" (buffer-string)))
 (org-test-with-temp-text
(format "#+INCLUDE: \"%s/examples/include.org\"" org-test-dir)
@@ -992,7 +992,7 @@ text
 "#+BEGIN_CENTER\nSuccess!\n#+END_CENTER\n"
 (org-test-with-temp-text
(format
-"#+INCLUDE: \"%s/examples/include2.org\" CENTER"
+"#+INCLUDE: \"%s/examples/include3.org\" CENTER"
 org-test-dir)
   (org-export-expand-include-keyword)
   (buffer-string
@@ -1132,11 +1132,11 @@ Footnotes[fn:2], foot[fn:test], digit only[3], and 
[fn:inline:anonymous footnote
   (should-not
(equal
 (org-test-with-temp-text
-   (format "#+INCLUDE: \"%s/examples/include2.org\" src emacs-lisp" 
org-test-dir)
+   (format "#+INCLUDE: \"%s/examples/include3.org\" src emacs-lisp" 
org-test-dir)
   (org-export-expand-include-keyword)
   (buffer-string))
 (org-test-with-temp-text
-   (format "#+INCLUDE: \"%s/examples/include2.org\" src emacs-lisp 
:minlevel 1" org-test-dir)
+   (format "#+INCLUDE: \"%s/examples/include3.org\" src emacs-lisp 
:minlevel 1" org-test-dir)
   (org-export-expand-include-keyword)
   (buffer-string
   ;; INCLUDE assigns the relative :minlevel conditional on narrowing.
-- 
2.5.3




Re: [O] [PATCH v3] fix SETUPFILE pathname expansion with subdirectories

2015-09-24 Thread Richard Hansen
On 2015-09-24 04:22, Nicolas Goaziou wrote:
> Applied. Thank you.

Thank you!

> 
> Would it make sense to do the same for INCLUDE? If so, would you want to
> have a look at it?

A chain of #+INCLUDEs already works OK.  I'll send a patch that tweaks
the test-org-export/expand-include test case to ensure that it continues
to work.

The intended meanings of #+INCLUDE and #+SETUPFILE have never been clear
to me, so I have a couple of questions:

  * What is supposed to happen if you have a #+SETUPFILE that has
an #+INCLUDE?

  * What is supposed to happen if you have an #+INCLUDE file that
has a #+SETUPFILE line?

-Richard



[O] OT - gmane problems? [was: Re: Bug: org-capture-refile doc inconsistency, refile bug [8.3.1 (8.3.1-129-ga7c8d2-elpaplus @ /home/jeeger/.emacs.d/elpa/org-plus-contrib-20150921/)]]

2015-09-24 Thread Nick Dokos
Nicolas Goaziou  writes:

> Hello,
>
> Jan Seeger  writes:
>
>> I've fixed this bug for me by reversing the order of finalization and
>> refiling, as stated in the documentation. I've attached a patch to do
>> this, but I'm not entirely sure about the side effects caused by the
>> patch. The test suite does pass though. If someone could weigh in on
>> this, I'd be grateful!
>
> Thank you for the patch. However, it contradicts
> 47b0eec8dc39990731f400640d64ab70a8356ccd.
>
> See thread starting
>  for an
> explanation.
>

Anybody else having trouble getting to gmane? I'm getting

Couldn't contact ciao:8010
The web interface is down for maintenance.

-- 
Nick




[O] Exporter aborts upon encountering even one unresolvable link

2015-09-24 Thread D. C. Toedt
I just updated to 8.3.1 from 8.3beta (from git).  That appears to have been
a terrible mistake on my part.

>From this thread
 I
see that the exporter now throws an error and aborts when it encounters an
unresolvable link.  That makes things really, REALLY difficult.  It means I
can't get a complete, working export to HTML (in my case) until all link
problems are fixed in my 22KLOC .org file (which I use to generate
http://www.CommonDraft.org/index.html
).  That seems EXTREMELY suboptimal.
(I'm trying to be tactful here.)

Worse, the exporter doesn't even generate a list of unresolvable links
before aborting.  That means the only way that I can find and fix busted
links (so far as I know) is to do an export --- which takes several minutes
given the large file  --- and have the export abort on a single link. Then
I fix that one link, export again, and have it abort again. Repeat.
Aaaargg.

I started looking at the hooks, as suggested in a message in the previous
thread, but I'm not nearly skilled enough in elisp to be able to do
anything useful.

Any suggestions?


*D. C. Toedt III  **(My last name is pronounced "Tate"; I go by "D. C.,"
which stands for Dell Charles**) *
Attorney & neutral arbitrator -- tech contracts & IP  |  Adjunct professor,
University of Houston Law Center
​Author, ​​​Common Draft  desk book of
contract clauses & research notes   |  LinkedIn: dctoedt
   |   Calendar

(redacted)
E: d...@toedt.comO: +1 (713) 364-6545C: +1 (713) 516-8968
​​

​
Houston, Texas (Central time zone)

Unless expressly stated otherwise, this message is not intended
to serve as assent to an agreement or other document, whether or not
attached to this message.


Re: [O] http address for cloning org-mode git

2015-09-24 Thread Achim Gratz
Suvayu Ali writes:
>> > That is a mirror, a relic from the old days when that used to be the
>> > official repo.  Maybe try:  http://orgmode.org/org-mode.git
>> 
>> No, that never was the official repo.  I've set up that mirror.
>
> Didn't we used to have the Org repo hosted on repo.or.cz way, way back
> in the old days, pre-2010?  Maybe I'm just confusing a different repo
> because it was on the same domain?

You're right, I didn't look closely enough.  The repo above is a mirror
that Bastien had created and it may well have been the "official" repo
for some time before orgmode.org was taking that position.  Sorry for
any confusion.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html




Re: [O] org-collector unable to handle macros

2015-09-24 Thread Achim Gratz
Nicolas Goaziou writes:
>> It seems that there is no table returned or the interpretation of the
>> returned data as a table fails.
>
> I just applied a patch that may fix these issues.

This bug is fixed, thank you.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




Re: [O] Exporter aborts upon encountering even one unresolvable link

2015-09-24 Thread D. C. Toedt
P.S.:   Thank heavens for Time Machine.




On Thu, Sep 24, 2015 at 9:50 PM, D. C. Toedt  wrote:

> I just updated to 8.3.1 from 8.3beta (from git).  That appears to have
> been a terrible mistake on my part.
>
> From this thread
> 
> I see that the exporter now throws an error and aborts when it encounters
> an unresolvable link.  That makes things really, REALLY difficult.  It
> means I can't get a complete, working export to HTML (in my case) until all
> link problems are fixed in my 22KLOC .org file (which I use to generate
> http://www.CommonDraft.org/index.html
> ).  That seems EXTREMELY
> suboptimal. (I'm trying to be tactful here.)
>
> Worse, the exporter doesn't even generate a list of unresolvable links
> before aborting.  That means the only way that I can find and fix busted
> links (so far as I know) is to do an export --- which takes several minutes
> given the large file  --- and have the export abort on a single link.
> Then I fix that one link, export again, and have it abort again. Repeat.
> Aaaargg.
>
> I started looking at the hooks, as suggested in a message in the previous
> thread, but I'm not nearly skilled enough in elisp to be able to do
> anything useful.
>
> Any suggestions?
>
>
> *D. C. Toedt III  **(My last name is pronounced "Tate"; I go by "D. C.,"
> which stands for Dell Charles**) *
> Attorney & neutral arbitrator -- tech contracts & IP  |  Adjunct
> professor, University of Houston Law Center
> ​Author, ​​​Common Draft  desk book of
> contract clauses & research notes   |  LinkedIn: dctoedt
>    |   Calendar
> 
> (redacted)
> E: d...@toedt.comO: +1 (713) 364-6545C: +1 (713) 516-8968
> ​​
>
> ​
> Houston, Texas (Central time zone)
>
> Unless expressly stated otherwise, this message is not intended
> to serve as assent to an agreement or other document, whether or not
> attached to this message.
>
>
>


[O] Outut file name by backend

2015-09-24 Thread Fabrice Popineau
Hi,

Could it be made possible that the output file name when exporting be
chosen by backend ?
Something like :

:EXPORT_FILE_NAME: (by-backend (latex "PDFL2A/pdf/pdl2a.tex) (html
"PDFL2A/projets.html"))

Am I missing another option here ?

Best regards,

Fabrice


Re: [O] Bug: org-capture-refile doc inconsistency, refile bug [8.3.1 (8.3.1-129-ga7c8d2-elpaplus @ /home/jeeger/.emacs.d/elpa/org-plus-contrib-20150921/)]

2015-09-24 Thread Nicolas Goaziou
Hello,

Jan Seeger  writes:

> I've fixed this bug for me by reversing the order of finalization and
> refiling, as stated in the documentation. I've attached a patch to do
> this, but I'm not entirely sure about the side effects caused by the
> patch. The test suite does pass though. If someone could weigh in on
> this, I'd be grateful!

Thank you for the patch. However, it contradicts
47b0eec8dc39990731f400640d64ab70a8356ccd.

See thread starting
 for an
explanation.


Regards,

-- 
Nicolas Goaziou