[O] ob-clojure.el (org-babel for Clojure)

2014-10-02 Thread Daniel Szmulewicz
Executing Clojure in a code block results in a Code block produced no output.

Any code. For example:

#+BEGIN_SRC clojure
(+ 1 1)
#+END_SRC


I am running CIDER 0.8.0alpha (package: 20141001.738) (Java 1.8.0_05, Clojure 
1.6.0, nREPL 0.2.6)
Ob-clojure.el from master. 
Org-mode 8.2.7c

Thank you in advance.
--
Daniel Szmulewicz
daniel.szmulew...@gmail.com






[O] [ox-latex] How to force ALL captions below their referents?

2014-10-02 Thread James Harkins
I'm struggling a bit with caption placement in LaTeX export.

In the document I'm working on now, I have:

- Image links, exported as floating figures (by inclusion of a
  caption). ox-latex places the caption at the end of the figure
  environment, so the caption appears below the image.

#+name: fig1
#+caption: blah blah
#+attr_latex: :width 0.75\textwidth
[[./img/blahblah.png]]

\begin{figure}[htb]
\centering
\includegraphics[width=0.75\textwidth]{./img/blahblah.png}
\caption{\label{fig1}blah blah}
\end{figure}

- A figure block containing some figures. The entire block should be
  captioned. ox-latex places a caption first in the figure environment,
  so the caption is on top.

#+name: product1
#+caption: blah blah
#+begin_figure
#+begin_latex
\begin{subfigure}[b]{0.4\textwidth}
\includegraphics[width=\textwidth]{./img/blah1.png}
\end{subfigure} \hfill \begin{subfigure}[b]{0.4\textwidth}
\includegraphics[width=\textwidth]{./img/blah2.png}
\end{subfigure}
#+end_latex
#+end_figure

\begin{figure}
\caption{\label{product1}blah blah}
\begin{subfigure}.. (omitted)
\end{figure}

I don't like the typographical inconsistency. It would be much better,
I think, if I could specify in one place that I want *all* captions
below or above the entity being captioned.

It seems somebody recognized a while ago that this was a problem, and
introduced org-latex-table-caption-above. But this applies only to
tables, not to figure special blocks, nor to source code blocks, and
probably some other cases that I can't think of. Well,  I can customize
org-latex-listings-options to include (captionpos b), but I think
this is not quite ideal because:

a/ image captions always go at the bottom;
b/ table captions can be configured;
c/ listings captions can be configured in a different variable;
d/ many types of captions always go at the top, conflicting with a/.

Is there a plan to deal with this, other than my hacking ox-latex
locally?

hjh






Re: [O] [patch, ox] #+INCLUDE resolves links

2014-10-02 Thread Xavier Garrido

Hi,

Following the discussion here 
http://article.gmane.org/gmane.emacs.orgmode/91322/match=improved+way, I 
have quickly tested the patch and it perfectly fits my needs. So thanks 
again.


Just one remark : there is an undefined @ref tag in org.texi (line 
10011) file that should referred to search option in file link. 
Compilation fails due to error in documentation generation.


Cheers,
Xavier

Le 01/10/2014 23:27, Rasmus a écrit :

Hi,

Nicolas Goaziou m...@nicolasgoaziou.fr writes:


It isn't very important, but you forgot full stops at the end of
comments in the test file.


Fixed.


I want to discuss one more important potential issue before having the
patch applied.  Currently, location is ignored if the included part is
not an env (line 3381) and not a block (3392).  I'm not sure this is
right.  I could do one of the following:

1. Nothing (current state)
2. Throw an error if location and env or block are combined.
3. Try to use location even if block is set.  Recall, though, that
   location is resolved using org-mode.
4. Let location be a general regexp if env or block is non-nil.
   But then we are breaking with the org file-link idea.
5. Make location work for org files when env or block, otherwise
   throw an error.

WDYT?


I think option 1 is perfect. If a block with org contents is needed, one
can always do

   #+begin_center
   #+include: file.org::*headline
   #+end_center

Block and environments are really meant for literal insertion, where
locations do not apply.


Great!  Less work.

We can always tune it later as necessary.


+(only-contents
+ (and (string-match :only-contents *?\\([^: \r\t\n]\\S-*\\)?
value)


Is the shy *? necessary?


No!  Only the * is necessary to catch an implicit nil.  Thanks.

Feel free to commit the attached patch if there's nothing else.

—Rasmus





[O] Adding items in table

2014-10-02 Thread Chris Henderson
I have a table and would like to add all costs (in $) in column 3 as a
total. Wondering how do I do that. I have done =vsum($2..$9) - but this
hangs my org file and I have to kill it with the -9 switch.

Thanks.


Re: [O] Formal description of Org files

2014-10-02 Thread Samuel Loury

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Gustav Wikström gustav.e...@gmail.com writes:

 So my question is; have there been more discussions of constructing
 such a formal grammar? Maybe in EBNF form. I suspect getting every
 aspect of Org mode into such a description would be difficult. But
 imagine the possibilities. Tools such as ANTLR and similar would
 straight away have a way of parsing Org mode. 
 Org mode source files could be parsed in many other languages,
 simplifying the process of expanding Org mode to other platforms (
 Android  iOS, web ).


[...]


 See

   (info (org) Org syntax)
I just read the document on worg¹. It is really good! I imagine we are
not far from a formal grammar. I suppose we could write one in EBNF
form.

Nicolas, I can see on the worg version that it is in draft status. Could
you say what is left to do to consider it mature?

¹  http://orgmode.org/worg/dev/org-syntax.html
-- 
Konubinix
GPG Key: 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A


pgpE1rSh6E3xE.pgp
Description: PGP signature


Re: [O] Adding items in table

2014-10-02 Thread Christian Moe

You probably don't really want to replace the contents of column 3 ($3)
with a sum of columns including column 3 ($2..$9)?

To get useful help you'll need to provide the table, or a minimal
example of a table with the same structure.

Yours,
Christian

Chris Henderson writes:

 I have a table and would like to add all costs (in $) in column 3 as a
 total. Wondering how do I do that. I have done =vsum($2..$9) - but this
 hangs my org file and I have to kill it with the -9 switch.

 Thanks.




Re: [O] [patch, ox] #+INCLUDE resolves links

2014-10-02 Thread Rasmus
Xavier Garrido xavier.garr...@gmail.com writes:

 Following the discussion here
 http://article.gmane.org/gmane.emacs.orgmode/91322/match=improved+way,
 I have quickly tested the patch and it perfectly fits my needs. So
 thanks again.

I'm happy that it works well for you.

 Just one remark : there is an undefined @ref tag in org.texi (line
 10011) file that should referred to search option in file
 link. Compilation fails due to error in documentation generation.

Shoot.  Fixed in attached (tested with texi2pdf).

—Rasmus

PS: How can I get commit access?  I'm starting to feel like the Nick K
of the org-list.

-- 
Sådan en god dansk lagereddike kan man slet ikke bruge mere
From 17a647c28f07a505670a7e0d0cc341d700f7bb87 Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Sun, 28 Sep 2014 21:05:17 +0200
Subject: [PATCH] ox: Allow file-links with #+INCLUDE-keyword

* org.el (org-edit-special): Handle file-links for INCLUDE.
* ox.el (org-export--prepare-file-contents): Handle links and
add option no-heading.
* ox.el (org-export-expand-include-keyword): Resolve headline
links and add option :only-contents.
* orgguide.texi (Include files)
org.texi (Include files): Updated.
* testing/examples/include.org: New examples.
* test-ox.el (test-org-export/expand-include): New tests.
---
 doc/org.texi |  17 +++
 doc/orgguide.texi|   9 +++-
 lisp/org.el  |   9 ++--
 lisp/ox.el   | 117 +++
 testing/examples/include.org |  25 +
 testing/lisp/test-ox.el  |  59 +-
 6 files changed, 220 insertions(+), 16 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 7d98d51..537b21b 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -10008,6 +10008,23 @@ to use the obvious defaults.
 #+INCLUDE: ~/.emacs :lines 10-@r{Include lines from 10 to EOF}
 @end example
 
+Finally, you may use a file-link to extract an object as matched by
+@code{org-link-search}@footnote{Note that
+@code{org-link-search-must-match-exact-headline} is locally bound to non-nil.
+Therefore, @code{org-link-search} only matches headlines and named elements.}
+(@pxref{Search options}).  If the @code{:only-contents} property is non-nil,
+only the contents of the requested element will be included, omitting
+properties drawer and planning-line if present.  The @code{:lines} keyword
+operates locally with respect to the requested element.  Some examples:
+
+@example
+#+INCLUDE: ./paper.org::#theory :only-contents t
+   @r{Include the body of the heading with the custom id @code{theory}}
+#+INCLUDE: ./paper.org::mytable  @r{Include named element.}
+#+INCLUDE: ./paper.org::*conclusion :lines 1-20
+   @r{Include the first 20 lines of the headline named conclusion.}
+@end example
+
 @table @kbd
 @kindex C-c '
 @item C-c '
diff --git a/doc/orgguide.texi b/doc/orgguide.texi
index ca8e052..4feeaca 100644
--- a/doc/orgguide.texi
+++ b/doc/orgguide.texi
@@ -2264,8 +2264,13 @@ include your @file{.emacs} file, you could use:
 The optional second and third parameter are the markup (i.e., @samp{example}
 or @samp{src}), and, if the markup is @samp{src}, the language for formatting
 the contents.  The markup is optional, if it is not given, the text will be
-assumed to be in Org mode format and will be processed normally. @kbd{C-c '}
-will visit the included file.
+assumed to be in Org mode format and will be processed normally.  File-links
+will be interpreted as well:
+@smallexample
+#+INCLUDE: ./otherfile.org::#my_custom_id :only-contents t
+@end smallexample
+@noindent
+@kbd{C-c '} will visit the included file.
 
 @node Embedded @LaTeX{},  , Include files, Markup
 @section Embedded @LaTeX{}
diff --git a/lisp/org.el b/lisp/org.el
index 9a243b5..9228ba0 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -20525,9 +20525,12 @@ Otherwise, return a user error.
 		   session params))
   (keyword
(if (member (org-element-property :key element) '(INCLUDE SETUPFILE))
-   (find-file-other-window
-(org-remove-double-quotes
- (car (org-split-string (org-element-property :value element)
+   (org-open-link-from-string
+	(format [[%s]]
+		(expand-file-name
+		 (org-remove-double-quotes
+		  (car (org-split-string
+			(org-element-property :value element)))
  (user-error No special environment to edit here)))
   (table
(if (eq (org-element-property :type element) 'table.el)
diff --git a/lisp/ox.el b/lisp/ox.el
index 90c623e..bc3792d 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -3325,13 +3325,25 @@ paths.
 	  ;; Extract arguments from keyword's value.
 	  (let* ((value (org-element-property :value element))
 		 (ind (org-get-indentation))
+		 location
 		 (file (and (string-match
 			 ^\\(\.+?\\\|\\S-+\\)\\(?:\\s-+\\|$\\) value)
-			(prog1 (expand-file-name
-(org-remove-double-quotes
- (match-string 1 value))
-dir)
+			 

[O] Fwd: Re: Adding items in table

2014-10-02 Thread Christian Moe

Christian Moe writes:

You probably don't really want to replace the contents of column 3 ($3)
with a sum of columns including column 3 ($2..$9)?

To get useful help you'll need to provide the table, or a minimal
example of a table with the same structure.

Yours,
Christian


 Chris Henderson writes:

 I have a table and would like to add all costs (in $) in column 3 as a
 total. Wondering how do I do that. I have done =vsum($2..$9) - but this
 hangs my org file and I have to kill it with the -9 switch.

 Thanks.




Re: [O] ob-clojure.el (org-babel for Clojure)

2014-10-02 Thread Thorsten Jolitz
Daniel Szmulewicz daniel.szmulew...@gmail.com writes:

 Executing Clojure in a code block results in a Code block produced no
 output.

Did you try other :results types like 

,
| #+BEGIN_SRC clojure :results raw
`

or 
:results value
:results pp
etc

see http://orgmode.org/manual/Specific-header-arguments.html

-- 
cheers,
Thorsten




Re: [O] Fwd: Re: Adding items in table

2014-10-02 Thread Chris Henderson
Here's an example of the table (hope the line breaks are ok)

|Item | Model | price |
| x | v  | $323.98
| y | x  | $184.45|
| Total |   | ??  |

On Thu, Oct 2, 2014 at 7:01 PM, Christian Moe m...@christianmoe.com wrote:


 Christian Moe writes:

 You probably don't really want to replace the contents of column 3 ($3)
 with a sum of columns including column 3 ($2..$9)?

 To get useful help you'll need to provide the table, or a minimal
 example of a table with the same structure.

 Yours,
 Christian

 
  Chris Henderson writes:
 
  I have a table and would like to add all costs (in $) in column 3 as a
  total. Wondering how do I do that. I have done =vsum($2..$9) - but
 this
  hangs my org file and I have to kill it with the -9 switch.
 
  Thanks.





Re: [O] Fwd: Re: Adding items in table

2014-10-02 Thread Christian Moe

It looks like what you actually want to do is add up the numbers in the
rows of column 3 -- from row 2 to 3 in your example. Your original
formula added up columns (prefixed with `$'). Rows are prefixed with `@'.

You need to get rid of the dollar signs in your cells to let Org know
they contain numbers.

This would work:

| Item  | Model | price ($) |
| x | v |323.98 |
| y | x |184.45 |
| Total |   |508.43 |
#+TBLFM: @4$3=vsum(@2..@3)

I usually prefer to add horizontal lines and make the formula relative
to them:

| Item  | Model | price ($) |
|---+---+---|
| x | v |323.98 |
| y | x |184.45 |
|---+---+---|
| Total |   |508.43 |
#+TBLFM: @4$3=vsum(@I..@II)

Hope this helps,

Christian


Chris Henderson writes:

 Here's an example of the table (hope the line breaks are ok)

 |Item | Model | price |
 | x | v  | $323.98
 | y | x  | $184.45|
 | Total |   | ??  |

 On Thu, Oct 2, 2014 at 7:01 PM, Christian Moe m...@christianmoe.com wrote:


 Christian Moe writes:

 You probably don't really want to replace the contents of column 3 ($3)
 with a sum of columns including column 3 ($2..$9)?

 To get useful help you'll need to provide the table, or a minimal
 example of a table with the same structure.

 Yours,
 Christian

 
  Chris Henderson writes:
 
  I have a table and would like to add all costs (in $) in column 3 as a
  total. Wondering how do I do that. I have done =vsum($2..$9) - but
 this
  hangs my org file and I have to kill it with the -9 switch.
 
  Thanks.







Re: [O] Bug: LaTeX export produces no output; clobbering keybindings [8.2.7c (8.2.7c-64-g01f736-elpa @/home/tbg/.emacs.d/elpa/org-20140915/)]

2014-10-02 Thread Tobias Getzner
Hello Nicolas,

On So, 2014-09-28 at 23:50 +0200, Nicolas Goaziou wrote:
 Hello,
 
 Tobias Getzner tobias.getz...@gmx.de writes:
 
  When using LaTeX-based export targets that produce a .tex file as output
  (export to LaTeX file, PDF, PDF and open), I receive the message «Buffer
  foo.tex modified; kill anyway?». Irrespective of whether I answer y/n,
  no .tex file is produced, and «latexmk» fails with «no such file».
 
 Try killing foo.tex beforehand.

The foo.tex buffer was produced during the export (even when no «export
to buffer» is done), so I cannot kill it beforehand.

  Both after issuing the file-producing exports, and when issuing
  exports to buffer only (export to LaTeX buffer), the keybindings in the
  original org-mode buffer become garbled; e. g., issuing another «C-c
  C-e» after attempting a LaTeX export no longer invokes the export menu,
  but is now bound to the command «LaTeX-enviroment». Actions such as
  «fill-paragraph» also no longer work the way they usually work in
  org-mode. The mode-line still reports «Org» as the major mode, though.
  To get the expected commands back, I have to invoke «M-x org-mode».
 
 I cannot reproduce it. Did you find anything new?
 
 
 Regards,
 

Cf. my follow up at [1]. The issue seems to be related to the issue
(reported at [2]) when using org-mode together with follow-mode. It
should be reproducible when follow-mode is used and
«(TeX-source-correlate-mode)» is hooked into TeX-mode-hook. In contrast
to [2], aliasing «yes-or-no-p» to «y-or-n-p» does not seem to make a
difference, though. For the time being I had to disable follow-mode to
be able to do exports and eval code blocks.

Best regards,
T.

[1] http://article.gmane.org/gmane.emacs.orgmode/91009
[2] http://article.gmane.org/gmane.emacs.orgmode/90981





[O] converting from markdown to org mode?

2014-10-02 Thread Alan Schmitt
Hello,

I've just found out about this very nice bookmarklet
http://brettterpstra.com/2014/10/01/answered-save-your-stackexchange-discoveries/
and I was wondering if there is an easy way to extend it to get the
results in the org format. I guess using pandoc could work … Is it the
best way to convert from markdown?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] [patchattached] Store link to url of eww

2014-10-02 Thread Bastien
Hi Aaron and Marco,

I confirm you are listed in the FSF contributors and we can now accept
patches with no restriction.

I added you to the list of contributors here:
http://orgmode.org/worg/org-contribute.html#contributors_with_fsf_papers

Thanks for contributing!

-- 
 Bastien



Re: [O] [patchattached] Store link to url of eww

2014-10-02 Thread Marco Wahl
Hi Aaron,

 [...] I have pushed your patch to the master branch of the org-mode
 repo.  If you want commit access, you can follow the instructions in the
 wiki: http://orgmode.org/worg/org-contribute.html#devs.

Thank you for your action and the hint about committing.  For my next
contribution (which hopefully will come to existence) I'll try out the
push access.


Best regards,  Marco
-- 
http://www.wahlzone.de
PGP: 0x0A3AE6F2




Re: [O] [patchattached] Store link to url of eww

2014-10-02 Thread Marco Wahl
Hi Bastien,

 I added you to the list of contributors here:
 http://orgmode.org/worg/org-contribute.html#contributors_with_fsf_papers

 Thanks for contributing!

Thanks for adding me!


Best wishes,  Marco
-- 
http://www.wahlzone.de
PGP: 0x0A3AE6F2




Re: [O] ob-clojure.el (org-babel for Clojure)

2014-10-02 Thread Daniel Szmulewicz
Thorsten Jolitz tjolitz at gmail.com writes:

 Did you try other :results types like 
 
 ,
 | #+BEGIN_SRC clojure :results raw
 `
 

Yes, thank you. I tried various switches for the results argument, 
and the result was the same: 

Code block produced no output.

I also wanted to rule out a version mismatch, so I tried in org-mode 
from the main branch, and the result was the same: 

Code block produced no output.

Things are moving fast with Cider, maybe an API that ob-clojure.el was 
relying upon underwent a breaking change?.





[O] [bug] Alignment bug in clock tables

2014-10-02 Thread Francesco Pizzolante
Hi,

I'm having an alignment issue in clock tables, both in the agenda and in
dynamic blocks.

By default, \emsp is displayed in clock tables for level 2 (or above) to
indent headings. To avoid that, I set the variable `org-pretty-entities'
to t, and in this case the alignment of the table is broken when you
regenerate it.

I currently see no solution if I want correct alignment in clock tables
without seeing \emsp.

Any idea how to achieve that?

Here's a small screen capture that shows the issue:
http://screencast.com/t/qpmxDV8R543G

Thanks.

 Francesco



Re: [O] [patch, ox] #+INCLUDE resolves links

2014-10-02 Thread Aaron Ecay
Hi Rasmus,

Thanks for all the work on this patch – I haven’t had anything to say
about it really, but it looks like a really useful feature.

2014ko urriak 2an, Rasmus-ek idatzi zuen:

[...]


 PS: How can I get commit access?  I'm starting to feel like the Nick K
 of the org-list.

TLDR: email your public ssh key to someone.  Details:

http://orgmode.org/worg/org-contribute.html#devs

-- 
Aaron Ecay



Re: [O] Org-mode previews: equation numbers

2014-10-02 Thread Eric S Fraga
On Monday, 29 Sep 2014 at 15:23, Adam Sneller wrote:

[...]

 By-the-way, the only way I could get the equation numbers to
 increment upward was to manually include these with \tag{1} and \tag
 {2}. Otherwise, org-mode numbers each equation as a (1). Is there
 some setting that will enable autonumbering?

I would think that this would be difficult, i.e. not possible, to
achieve as each snippet is a separate LaTeX invocation.  My own view is
that numbers don't actually matter during writing as they are all
ephemeral.  It's in the final complete document that they matter.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.3beta-372-gdd70cf



Re: [O] [patch, ox] #+INCLUDE resolves links

2014-10-02 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 Shoot.  Fixed in attached (tested with texi2pdf).

Applied. Thank you for this patch.


Regards,

-- 
Nicolas Goaziou



Re: [O] [ox-latex] How to force ALL captions below their referents?

2014-10-02 Thread Nicolas Goaziou
Hello,

James Harkins jamshar...@qq.com writes:

 It seems somebody recognized a while ago that this was a problem, and
 introduced org-latex-table-caption-above. But this applies only to
 tables, not to figure special blocks, nor to source code blocks, and
 probably some other cases that I can't think of. Well,  I can customize
 org-latex-listings-options to include (captionpos b), but I think
 this is not quite ideal because:

 a/ image captions always go at the bottom;
 b/ table captions can be configured;
 c/ listings captions can be configured in a different variable;
 d/ many types of captions always go at the top, conflicting with a/.

 Is there a plan to deal with this, other than my hacking ox-latex
 locally?

You mean moving `org-latex-table-caption-above' to
`org-latex-caption-above' and making sure every block complies to the
variable?


Regards,

-- 
Nicolas Goaziou



Re: [O] Formal description of Org files

2014-10-02 Thread Nicolas Goaziou
Hello,

Samuel Loury konubi...@gmail.com writes:

 Nicolas, I can see on the worg version that it is in draft status. Could
 you say what is left to do to consider it mature?

I have plans to change properties drawers syntax soon. Also differences
between export blocks and special blocks should be discussed on the ML
(I started a thread about this) and finalized.

Moreover, emphasis marker syntax is not satisfying, nor is the
description of $...$ constructs, but it is more a long-term plan.

Eventually, I think the description is not always clear. EBNF could help
here.


Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] [patch, ox] #+INCLUDE resolves links

2014-10-02 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 Rasmus ras...@gmx.us writes:

 Shoot.  Fixed in attached (tested with texi2pdf).

 Applied. Thank you for this patch.

Please also apply this patch to make make test pass.

—Rasmus

-- 
Don't panic!!!
From 04d90414a848a55ff602cfbc0b5f300299830732 Mon Sep 17 00:00:00 2001
From: rasmus ras...@pank.eu
Date: Thu, 2 Oct 2014 19:41:31 +0200
Subject: [PATCH] test-ox.el: Fix test-error from 986037a.

* test-ox.el (test-org-export/expand-include): Updated tests.
---
 testing/lisp/test-ox.el | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index 915a5a6..2642f4a 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -804,18 +804,18 @@ text
(org-test-with-temp-text #+INCLUDE: dummy.org
  (org-export-expand-include-keyword)))
   ;; Full insertion with recursive inclusion.
-  (org-test-with-temp-text
-  (format #+INCLUDE: \%s/examples/include.org\ org-test-dir)
-(org-export-expand-include-keyword)
-(should (equal (buffer-string)
-		   Small Org file with an include keyword.
-
-#+BEGIN_SRC emacs-lisp :exports results\n(+ 2 1)\n#+END_SRC
-
-Success!
-
-* Heading
-body\n)))
+  (should
+   (equal
+(with-temp-buffer
+  (insert-file
+   (expand-file-name examples/include.org org-test-dir))
+  (replace-regexp-in-string
+   (regexp-quote #+INCLUDE: \include2.org\)
+   Success! (buffer-string)))
+(org-test-with-temp-text
+	(format #+INCLUDE: \%s/examples/include.org\ org-test-dir)
+  (org-export-expand-include-keyword)
+  (buffer-string
   ;; Localized insertion.
   (org-test-with-temp-text
   (format #+INCLUDE: \%s/examples/include.org\ :lines \1-2\
@@ -829,7 +829,7 @@ body\n)))
 * Top heading\n** Heading\nbody\n
 (org-test-with-temp-text
 	(format
-	 * Top heading\n#+INCLUDE: \%s/examples/include.org\ :lines \9-\
+	 * Top heading\n#+INCLUDE: \%s/examples/include.org\ :lines \9-11\
 	 org-test-dir)
   (org-export-expand-include-keyword)
   (buffer-string
@@ -838,7 +838,7 @@ body\n)))
 * Top heading\n* Heading\nbody\n
 (org-test-with-temp-text
 	(format
-	 * Top heading\n#+INCLUDE: \%s/examples/include.org\ :lines \9-\ :minlevel 1
+	 * Top heading\n#+INCLUDE: \%s/examples/include.org\ :lines \9-11\ :minlevel 1
 	 org-test-dir)
   (org-export-expand-include-keyword)
   (buffer-string
-- 
2.1.2



[O] OT - syncthing

2014-10-02 Thread Nick Dokos
[I know a lot of people on this ML are interested in syncing, so I
thought I'd post this even though it has nothing to do with org.]

I just saw this on LWN's weekly edition (which requires subscription for
access - it will be freely available a week from today):

   http://lwn.net/Articles/612445/

The code is on github however:

   https://github.com/syncthing/syncthing

-- 
Nick




Re: [O] [patch, ox] #+INCLUDE resolves links

2014-10-02 Thread Achim Gratz
Rasmus writes:
 Please also apply this patch to make make test pass.

Applied.  Please always run all tests before committing.


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

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] [patch, ox] #+INCLUDE resolves links

2014-10-02 Thread Rasmus
Achim Gratz strom...@nexgo.de writes:

 Rasmus writes:
 Please also apply this patch to make make test pass.

 Applied.  Please always run all tests before committing.

Thanks.  I only learned about it now from Aaron's link.

-- 
Together we will make the possible totay impossible!




[O] A question on org-element-headline-interperter

2014-10-02 Thread Marcin Borkowski
Hi,

I guess I don't understand something.  I have a headline in a `headline'
variable (say that I did something like (org-element-parse-buffer) and
took one of the headlines from there).  I thought that

(insert
 (org-element-headline-interpreter headline (org-element-property
 :contents headline)))

would put it into the current buffer; however, it only puts the first
line (without the actual contents).

What is my misconception here?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University