[O] new exporter drops :parameters ?

2012-07-02 Thread Charles Berry


I am trying to put together a derived backend that makes use of Src Block
:parameters attribute.

I can see that the header in a begin_src block is picked up by  

org-element-src-block-parser, as it should be when I try it interactively 

But not when I try

M-: (org-export-to-buffer 'my-latex   "*latex out*") RET

Here is an example:

=

#+BEGIN_SRC emacs-lisp
  (org-export-define-derived-backend my-latex e-latex
  :translate-alist ((src-block . org-rnw-src-block)))
  
  
  (defun org-rnw-src-block (src-block contents info)
(org-element-src-block-interpreter src-block contents))
#+END_SRC

(progn
  (forward-line 3)
  (org-element-src-block-interpreter (org-element-src-block-parser) nil)) 
move cursor back after last paren and type C-x C-e
#+name: bblock
#+BEGIN_SRC R :exports code :et-cetera
rnorm(2)+1
#+END_SRC


===

Typing C-x C-e as above yields

"#+BEGIN_SRC R :exports code :et-cetera
  rnorm(2)+1
#+END_SRC"

but using the org-export-to-buffer line above yields

[much deleted]
#+BEGIN_SRC R
  rnorm(2)+1
#+END_SRC
% Generated by Org mode 7.8.10 in Emacs 23.3.50.1.
\end{document}

I'd really like to have access to the header elements.

AFAICS :parameters is nowhere to be found when using org-export-to-buffer.

What can I do??






Re: [O] Exporting to groff, now in org-export.el ...

2012-07-02 Thread Luis Anaya

Ok, no attributes then :)

I just fixed footnotes, only automated footnotes  for now
I have to wait until I get home when I get a hold of my
UNIX MM book to get custom footnote markers added. 

(I'm on the road on holidays... before you ask, my wife's cousins
are in town. sitting down coding in Emacs LISP is a welcome break).

In terms of keywords, they all have to be revised, and many of them
are going to be removed. (Like long tables). I'll changed them from 
tag=value to :blah value, right now they're not really meaningful for
groff and many of them stubbed. 

I proposed to keep an eye on my github repository. I'll be working
on it and hopefully should be ready for prime time. 

(If I do not collapse of exhaustion taking care of them. :( )

Luis

  


Re: [O] Organizing a collection of papers

2012-07-02 Thread Christian Wittern

On 2012-06-30 01:07, Thomas S. Dye wrote:

"John Wiegley"  writes:


Frank   writes:

I've used org-mode about a year and a half, and I don't think it's the best
application for what you describe.  There are several packages available to
do this; the one I've used most often and successfully is Zotero
(zotero.org).  This is a browswer plug-in which implements a very nice
database for your papers.  At this point, I've indexed 1092 papers (PDFs,
web pages and other materials).  In some cases, I have multiple files
attached to each of them.

If you happen to have a Mac, the application DEVONthink Pro is simply
wonderful for organizing collections like this.  I have about 7k PDFs in a
financial database, and it's always easy to find what I'm looking for.

John



I work in Org mode and LaTeX.  Ebib is integrated with both of them.
I follow an Org mode link or a LaTeX citation to the BibTeX entry in
Ebib, then open the pdf from Ebib using a link stored in the BibTeX
file.  I think Ebib is a splendid tool in this situation.
Again, if you happen to be on a Mac, you can combine Zotero and BibTeX using 
the excellent Zot2Bib Firefox extension.  This will use the Zotero 
translators, but can be configured to transfer the citations to a BibTeX 
file.  This can be managed with BibDesk, but is also available within Emacs 
and can be used for citations in papers written in Org-mode.  I have started 
using this combo about two years ago and am quite pleased with the results.


All the best,

Christian

--
Christian Wittern, Kyoto




Re: [O] how i pass output of one codeblock as iinput of another codeblock without manual copy paste

2012-07-02 Thread Thomas S. Dye
James Kang  writes:

> Hi,
>
> I have been using code blocks with the following way to pass one's
> output to the other's input(or input variable).
> You can notice that I am manually copying/pasting the contents of
> "RESULTS" and create a table with a name "my_table".
> Now, is there anyway I can do this passing the output automatically
> without manual copy/paste?
>
> Thanks
> (using orgmode 7.8)
>
> #+srcname: code1
> #+begin_src sh :exports code :results value table
>  Some codes here
> #+end_src
>
> #+RESULTS:
> |Good results|
> #+tblname: my_table   ### this is copied from the previous results manually
> |Good results|
> #+call: transpose(table=my_table)
>
> #+results: transpose(table=my_table)
> |Good results Processed by transpose|
Aloha James,

The Org mode manual should answer your question:

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

You'll probably want to use #+name: code1 rather than #+srcname: code1

Once you've done that, then #+call: transpose(table=code1) ought to
work, if the Library of Babel is loaded or you have otherwise defined
transpose. 

All the best,
Tom 

-- 
Thomas S. Dye
http://www.tsdye.com



[O] FR: inactive timestamps in log mode (and a sorting FR)

2012-07-02 Thread Samuel Wales
The ([, ], v [) functionality is useful.

I find, however, that it requires you to generate the agenda
twice for each date.

===

Would it make sense to unify this concept with log mode?
Like this:

  1) make it a first-class member of
 org-agenda-log-mode-items like state, clock, etc.
  2) have the semantics be the same as with other
 org-agenda-log-mode-items members

Possible wishlist / brainstorm-type items:

  1) if a header appears more than once with the same
 timestamp, display it only once
  2) make log mode items independently controllable by
 making them quasi-tags and allowing tag filtering
  3) allow sets of tags
 - as an example, show state changes and inactive
   timestamps in one view and closed in another.
 - user supplies list of lists of tags.  each list is
   such a view.
 - replace the log and log-all views with cycling among
   tag sets.
  4) notice how tag filtering and log mode prevent the need
 to regenerate the agenda buffer.  the agenda is too
 slow to regenerate.
 - do the same for sorting
 - cycle among user-specified views
 - allow more than one user-defined sorting strategy
   member
   + this is actually much more important to me than the
 log mode items idea
   + i would like to show different sorts just as i do
 in dired
   + immediate display of deadlines first, then
 immediate display of category order

Related functionality:

  1) the timeline view is for one file.  detailed exposition
 of its algorithm by Carsten exists along with
 discussion by others.
  2) org-find-timestamps.el might provide something similar
 - perhaps it also provides the ability to specify a
   range and display in a timeline
  3) it would be nice to be able to do any type of search
 (such as a text search or a tags search) and have it
 show up in a timeline-like way.  on what dates did I
 talk about "agenda {log.mode} items"?  let me see them
 in order.
  5) in daily/weekly, go to first date that matches text.

I'm not aware of other ways of browsing dates, including
inactive timestamps, across all agenda files.

===

Probably there are a lot of subtleties, but [ and log mode
seem similar to me as a user, so maybe it's possible.

In case the idea is of interest.

Thanks.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com



Re: [O] R and babel on Windows problem

2012-07-02 Thread John Hendy
>
> Anyway:
> - Visited ob-R.el in emacs
> - Found org-babel-R-evaluate-external-process
> - Put the cursor on the line =(defun org-babel-R-evaluate-external-process=
> - Did =M-x C-M-x= and the minibuffer echoed the name of the function
> - Visited my file, test.org and did =C-c C-c= on the R babel block
> - Nothing different occurred; I just got "The system cannot find the
> path specified"
>
> I tried the above again with regular 'ol org-babel-R-evaluate just in
> case and had the same results.
>
> I'm clearly goofing something but have no idea what it is.
>

Okay. I think I may have triggered =edebug-all-defs= when I was
tinkering around earlier and from the page about "instrumenting"
edebug it seemed like that could tweak some things undesirably. I got
that fixed and turned on edebug for
org-babel-R-evaluate-external-process and am getting nothing. The
modeline in my test file has turned to "Org *Debugging* Fill" but
still produces none of the incremental evaluation pauses I would have
expected.

I tried the same with org-babel-execute-src-block in ob.el since
that's what's called first and am still getting no new activity from
edebug. Just the same message about the path.


John


>
> John
>
>
>>
>> If you mess it up (and you probably will a few times), no problem: just try
>> again. And be patient!
>>
>> Good luck,
>> Nick
>>
>>
>>
>>>
>>> John
>>>
>>>
>>> >
>>> > Nick
>>> >
>>> >> Using =M-x R= works find. ESS is finding R. I successfully loaded a
>>> >> .csv, ggplot2 and plotted.
>>> >>
>>> >>
>>> >> John
>>> >>
>>> >> John
>>> >>
>>> >> >
>>> >> > Nick
>>> >> >
>>> >>
>>>



Re: [O] R and babel on Windows problem

2012-07-02 Thread Nick Dokos

John Hendy  wrote:
...
> >
> > Oh, sorry: edebug is described in
> >
> > (info "(elisp) Edebug")
> >
> > The basics: visit ob-R.el, go to the org-babel-R-evaluate-external-process
> > definition and press C-u C-M-x. Then do whatever you were doing to get the
> > problem. It should stop at the function and you can single-step by pressing
> > SPACE. At strategic points, you can evaluate things with "e".
> 
> Eeks. Is the fact that I learned emacs only for org-mode showing. I
> don't even know how to =(info "(elisp) Edebug")= -- do I put an =M-x=
> in front of that? =M-x info= seems to bring me to a help page for
> info!
> 

You have to evaluate it somehow. If you are reading your mail in emacs,
just place the cursor after the closing paren and press C-x C-e. If not,
just go to emacs and "C-h i elisp RET i edebug RET" or equivalently,
type ESC ESC : (info "(elisp) Edebug") RET. Underlying assumption: you
have the Emacs Lisp info files installed.

> Anyway... I just googled edebug and it says about the same as you did
> (except for appending "eval-defun with a prefix argument" onto =C-u
> C-M-x=.
> - http://www.gnu.org/software/emacs/manual/html_node/elisp/Using-Edebug.html
> 
> Anyway:
> - Visited ob-R.el in emacs
> - Found org-babel-R-evaluate-external-process
> - Put the cursor on the line =(defun org-babel-R-evaluate-external-process=
> - Did =M-x C-M-x= and the minibuffer echoed the name of the function

C-u C-M-x please: and the echo area should say "Edebug:
org-babel-R-evaluate-external-process" afterwards.

Nick

> - Visited my file, test.org and did =C-c C-c= on the R babel block
> - Nothing different occurred; I just got "The system cannot find the
> path specified"
> 
> I tried the above again with regular 'ol org-babel-R-evaluate just in
> case and had the same results.
> 
> I'm clearly goofing something but have no idea what it is.
> 
> 
> John
> 
> 
> >
> > If you mess it up (and you probably will a few times), no problem: just try
> > again. And be patient!
> >
> > Good luck,
> > Nick
> >
> >
> >
> >>
> >> John
> >>
> >>
> >> >
> >> > Nick
> >> >
> >> >> Using =M-x R= works find. ESS is finding R. I successfully loaded a
> >> >> .csv, ggplot2 and plotted.
> >> >>
> >> >>
> >> >> John
> >> >>
> >> >> John
> >> >>
> >> >> >
> >> >> > Nick
> >> >> >
> >> >>
> >>
> 



Re: [O] R and babel on Windows problem

2012-07-02 Thread John Hendy
On Mon, Jul 2, 2012 at 4:26 PM, Nick Dokos  wrote:
> John Hendy  wrote:
>
>> On Fri, Jun 29, 2012 at 3:16 PM, Nick Dokos  wrote:
>> > John Hendy  wrote:
>> >
>> >> On Fri, Jun 29, 2012 at 2:37 PM, Nick Dokos  wrote:
>> >> > John Hendy  wrote:
>> >> >
>> >> >> On Fri, Jun 29, 2012 at 1:26 PM, Achim Gratz  wrote:
>> >> >> > [re-sent]
>> >> >> >
>> >> >> > John Hendy writes:
>> >> >> >> I typically use orgmode + babel on Linux and have no problems. 
>> >> >> >> Trying
>> >> >> >> to run on Windows 7 and having issues...
>> >> >> >>
>> >> >> >> (setq org-babel-R-command "C:/Program\ Files/R/R-2.15.0/bin/R")
>> >> >> >
>> >> >> > Try the 8.3 compatible name to avoid the space in the path.  If it 
>> >> >> > ever
>> >> >> > goes through more than one level of unquoting it will otherwise 
>> >> >> > break.
>> >> >> >
>> >> >> > (setq org-babel-R-command "C:/Progra~1/R/R-2.15.0/bin/R")
>> >> >>
>> >> >> Same error. Also, curiously, =M-x customize-variable RET org-babel-R
>> >> >> TAB= yields no results... is this the right variable?
>> >> >>
>> >>
>> >>
>> >> > It is, but it seems not to have a customizable interface I guess: I get
>> >> > the same result you do with customize-variable. OTOH, C-h v
>> >> > org-babel-R-TAB brings it up with no problem.
>> >>
>> >> Good call. It comes up with that and is set to the above (Progra~1
>> >> version) but is still saying command not found when I try C-c C-c on a
>> >> babel block.
>> >>
>> >> Any debug methods?
>> >>
>> >
>> > edebug org-babel-R-evaluate-external-process and single step through it
>> > perhaps? I would clean up .elc files and start a new emacs before trying
>> > that just to makee sure that I have a clean slate. You might have to go
>> > down to org-babel-eval as well and single step through that.
>>
>> Just did a fresh git clone and make via the updated non-gnu-tools
>> method on worg.
>>
>> The above = `M-x edebug org-babel-R-evaluate-external-process`?
>>
>> I've never done this. When I do `M-x edebug TAB` I get various edebug
>> completions but not it as a standalone command.
>>
>
> Oh, sorry: edebug is described in
>
> (info "(elisp) Edebug")
>
> The basics: visit ob-R.el, go to the org-babel-R-evaluate-external-process
> definition and press C-u C-M-x. Then do whatever you were doing to get the
> problem. It should stop at the function and you can single-step by pressing
> SPACE. At strategic points, you can evaluate things with "e".

Eeks. Is the fact that I learned emacs only for org-mode showing. I
don't even know how to =(info "(elisp) Edebug")= -- do I put an =M-x=
in front of that? =M-x info= seems to bring me to a help page for
info!

Anyway... I just googled edebug and it says about the same as you did
(except for appending "eval-defun with a prefix argument" onto =C-u
C-M-x=.
- http://www.gnu.org/software/emacs/manual/html_node/elisp/Using-Edebug.html

Anyway:
- Visited ob-R.el in emacs
- Found org-babel-R-evaluate-external-process
- Put the cursor on the line =(defun org-babel-R-evaluate-external-process=
- Did =M-x C-M-x= and the minibuffer echoed the name of the function
- Visited my file, test.org and did =C-c C-c= on the R babel block
- Nothing different occurred; I just got "The system cannot find the
path specified"

I tried the above again with regular 'ol org-babel-R-evaluate just in
case and had the same results.

I'm clearly goofing something but have no idea what it is.


John


>
> If you mess it up (and you probably will a few times), no problem: just try
> again. And be patient!
>
> Good luck,
> Nick
>
>
>
>>
>> John
>>
>>
>> >
>> > Nick
>> >
>> >> Using =M-x R= works find. ESS is finding R. I successfully loaded a
>> >> .csv, ggplot2 and plotted.
>> >>
>> >>
>> >> John
>> >>
>> >> John
>> >>
>> >> >
>> >> > Nick
>> >> >
>> >>
>>



[O] how i pass output of one codeblock as iinput of another codeblock without manual copy paste

2012-07-02 Thread James Kang
Hi,

I have been using code blocks with the following way to pass one's
output to the other's input(or input variable).
You can notice that I am manually copying/pasting the contents of
"RESULTS" and create a table with a name "my_table".
Now, is there anyway I can do this passing the output automatically
without manual copy/paste?

Thanks
(using orgmode 7.8)

#+srcname: code1
#+begin_src sh :exports code :results value table
 Some codes here
#+end_src

#+RESULTS:
|Good results|
#+tblname: my_table   ### this is copied from the previous results manually
|Good results|


#+call: transpose(table=my_table)

#+results: transpose(table=my_table)
|Good results Processed by transpose|



Re: [O] R and babel on Windows problem

2012-07-02 Thread Nick Dokos
John Hendy  wrote:

> On Fri, Jun 29, 2012 at 3:16 PM, Nick Dokos  wrote:
> > John Hendy  wrote:
> >
> >> On Fri, Jun 29, 2012 at 2:37 PM, Nick Dokos  wrote:
> >> > John Hendy  wrote:
> >> >
> >> >> On Fri, Jun 29, 2012 at 1:26 PM, Achim Gratz  wrote:
> >> >> > [re-sent]
> >> >> >
> >> >> > John Hendy writes:
> >> >> >> I typically use orgmode + babel on Linux and have no problems. Trying
> >> >> >> to run on Windows 7 and having issues...
> >> >> >>
> >> >> >> (setq org-babel-R-command "C:/Program\ Files/R/R-2.15.0/bin/R")
> >> >> >
> >> >> > Try the 8.3 compatible name to avoid the space in the path.  If it 
> >> >> > ever
> >> >> > goes through more than one level of unquoting it will otherwise break.
> >> >> >
> >> >> > (setq org-babel-R-command "C:/Progra~1/R/R-2.15.0/bin/R")
> >> >>
> >> >> Same error. Also, curiously, =M-x customize-variable RET org-babel-R
> >> >> TAB= yields no results... is this the right variable?
> >> >>
> >>
> >>
> >> > It is, but it seems not to have a customizable interface I guess: I get
> >> > the same result you do with customize-variable. OTOH, C-h v
> >> > org-babel-R-TAB brings it up with no problem.
> >>
> >> Good call. It comes up with that and is set to the above (Progra~1
> >> version) but is still saying command not found when I try C-c C-c on a
> >> babel block.
> >>
> >> Any debug methods?
> >>
> >
> > edebug org-babel-R-evaluate-external-process and single step through it
> > perhaps? I would clean up .elc files and start a new emacs before trying
> > that just to makee sure that I have a clean slate. You might have to go
> > down to org-babel-eval as well and single step through that.
> 
> Just did a fresh git clone and make via the updated non-gnu-tools
> method on worg.
> 
> The above = `M-x edebug org-babel-R-evaluate-external-process`?
> 
> I've never done this. When I do `M-x edebug TAB` I get various edebug
> completions but not it as a standalone command.
> 

Oh, sorry: edebug is described in

(info "(elisp) Edebug")

The basics: visit ob-R.el, go to the org-babel-R-evaluate-external-process
definition and press C-u C-M-x. Then do whatever you were doing to get the
problem. It should stop at the function and you can single-step by pressing
SPACE. At strategic points, you can evaluate things with "e".

If you mess it up (and you probably will a few times), no problem: just try
again. And be patient!

Good luck,
Nick



> 
> John
> 
> 
> >
> > Nick
> >
> >> Using =M-x R= works find. ESS is finding R. I successfully loaded a
> >> .csv, ggplot2 and plotted.
> >>
> >>
> >> John
> >>
> >> John
> >>
> >> >
> >> > Nick
> >> >
> >>
> 



[O] Previewing inline-LaTeX with imagemagick?

2012-07-02 Thread Mike Gauland
I've been playing with tikz to create a flowchart in my org file. The image is
rendered correctly when I export to PDF, of course, and setting the 'latex'
option to 'imagemagick' generates a PNG when I export the file to HTML. However,
if I try to preview that block with org-preview-latex-fragment (C-c C-x C-l), I
 just get a blank square (a placeholder).

I think this is because dvipng doesn't handle the postscript generated by tikz.
I've worked around this by shadowing the system dvipng with a script in my local
bin directory, that sends the dvi through dvips then convert to generate the
png. This also works for HTML export (using latex:dvipng).  

The new 'latex:imagemagick' option is a cleaner solution. Would it be possible
to use the same code for previewing fragments?

I'm happy to help with the necessary changes, if some knowledgeable with the
relevant source code can get me started in the right direction.

--Mike





Re: [O] R and babel on Windows problem

2012-07-02 Thread John Hendy
On Fri, Jun 29, 2012 at 3:16 PM, Nick Dokos  wrote:
> John Hendy  wrote:
>
>> On Fri, Jun 29, 2012 at 2:37 PM, Nick Dokos  wrote:
>> > John Hendy  wrote:
>> >
>> >> On Fri, Jun 29, 2012 at 1:26 PM, Achim Gratz  wrote:
>> >> > [re-sent]
>> >> >
>> >> > John Hendy writes:
>> >> >> I typically use orgmode + babel on Linux and have no problems. Trying
>> >> >> to run on Windows 7 and having issues...
>> >> >>
>> >> >> (setq org-babel-R-command "C:/Program\ Files/R/R-2.15.0/bin/R")
>> >> >
>> >> > Try the 8.3 compatible name to avoid the space in the path.  If it ever
>> >> > goes through more than one level of unquoting it will otherwise break.
>> >> >
>> >> > (setq org-babel-R-command "C:/Progra~1/R/R-2.15.0/bin/R")
>> >>
>> >> Same error. Also, curiously, =M-x customize-variable RET org-babel-R
>> >> TAB= yields no results... is this the right variable?
>> >>
>>
>>
>> > It is, but it seems not to have a customizable interface I guess: I get
>> > the same result you do with customize-variable. OTOH, C-h v
>> > org-babel-R-TAB brings it up with no problem.
>>
>> Good call. It comes up with that and is set to the above (Progra~1
>> version) but is still saying command not found when I try C-c C-c on a
>> babel block.
>>
>> Any debug methods?
>>
>
> edebug org-babel-R-evaluate-external-process and single step through it
> perhaps? I would clean up .elc files and start a new emacs before trying
> that just to makee sure that I have a clean slate. You might have to go
> down to org-babel-eval as well and single step through that.

Just did a fresh git clone and make via the updated non-gnu-tools
method on worg.

The above = `M-x edebug org-babel-R-evaluate-external-process`?

I've never done this. When I do `M-x edebug TAB` I get various edebug
completions but not it as a standalone command.


John


>
> Nick
>
>> Using =M-x R= works find. ESS is finding R. I successfully loaded a
>> .csv, ggplot2 and plotted.
>>
>>
>> John
>>
>> John
>>
>> >
>> > Nick
>> >
>>



Re: [O] new exporter

2012-07-02 Thread Achim Gratz
Nicolas Goaziou writes:
> Not exactly. With this version, symbols generated with gensym are never
> used, and the macro isn't hygienic anymore.

Yeah, I missed out on some commas along the way and it probably needs
double quoting (which I was trying to avoid).  The first version interns
the gensymed symbols at compile time, the later one should have done it
each time the code was called.

> I still think your first take about this macro was the good one. I've
> pushed something very similar. Could you verify if it is correct on the
> compiling side?

Yes, the compile error is easy to fix.  Both versions could do the
correct thing, the later one was just trying to be more conservative.
Looking superficially at the generated bytecode I think the current
version should be correct.

>> The org-export-define-derived-backend macro seems similarly starstruck,
>> but I really don't know what you think the expansion should be.
>
> Something along the lines of:
>
> #+begin_src emacs-lisp
> (progn
>   (defconst org-e-beamer-options-alist '(...)
> "Alist between filters keywords and back-end specific filters.
> See `org-export-filters-alist' for more information.")
>   (defvar org-e-beamer-translate-alist '(...)
> "Alist between element or object types and translators."))
> #+end_src
>
>> One of your recent changes introduced four test fail when org-element is
>> compiled.  I haven't yet looked why that would be, the four tests are:
>>
>>FAILED  test-org-export/table-cell-alignment
>>FAILED  test-org-export/table-cell-borders
>>FAILED  test-org-export/table-row-ends-header-p
>>FAILED  test-org-export/table-row-starts-header-p
>
> Could you paste the error reported by ERT? I can't think of any recent
> change in this area.

There's only a backtrace that doesn't make much sense to me:

--8<---cut here---start->8---
Test test-org-export/table-row-starts-header-p backtrace:
  signal(ert-test-failed (((should (equal (quote (yes no no no)) (org-
  ert-fail(((should (equal (quote (yes no no no)) (org-element-map tre
  (if (unwind-protect (setq value-3951 (apply fn-3949 args-3950)) (set
  (unless (unwind-protect (setq value-3951 (apply fn-3949 args-3950)) 
  (let (form-description-3953) (unless (unwind-protect (setq value-395
  (let ((value-3951 (quote ert-form-evaluation-aborted-3952))) (let (f
  (let ((fn-3949 (function equal)) (args-3950 (list (quote (yes no no 
  (should (equal (quote (yes no no no)) (org-element-map tree (quote t
  (let* ((tree (org-element-parse-buffer)) (info (org-export-collect-t
  (prog1 (let* ((tree (org-element-parse-buffer)) (info (org-export-co
  (progn (org-mode) (progn (insert "\n| a |\n| b |\n|---|\n| c |") (go
  (unwind-protect (progn (org-mode) (progn (insert "\n| a |\n| b |\n|-
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
  (with-current-buffer temp-buffer (unwind-protect (progn (org-mode) (
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (with-current-b
  (with-temp-buffer (org-mode) (progn (insert "\n| a |\n| b |\n|---|\n
  (org-test-with-temp-text "\n| a |\n| b |\n|---|\n| c |" (let* ((tree
  (org-test-with-parsed-data "\n| a |\n| b |\n|---|\n| c |" (should (e
  (lambda nil (org-test-with-parsed-data "\n| a |\n| b |\n|---|\n| c |
  byte-code("\306\307!▒q\210\310\216\311 \312\216\313\314\315\316\3
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  byte-code("\306\307!\211▒r\310\311!q\210\312 d\313\223)L\210\314\216
  ert-run-test([cl-struct-ert-test test-org-export/table-row-starts-he
  ert-run-or-rerun-test([cl-struct-ert--stats "\\(org\\|ob\\)" [[cl-st
  ert-run-tests("\\(org\\|ob\\)" #[(event-type &rest event-args) \30
  ert-run-tests-batch("\\(org\\|ob\\)")
  ert-run-tests-batch-and-exit("\\(org\\|ob\\)")
  (let ((org-id-track-globally t) (org-id-locations-file (convert-stan
  org-test-run-batch-tests()
  call-interactively(org-test-run-batch-tests nil nil)
  command-execute(org-test-run-batch-tests)
  command-line-1(("--eval" "(add-to-list 'load-path \"./lisp\")" "--ev
  command-line()
  normal-top-level()
Test test-org-export/table-row-starts-header-p condition:
(ert-test-failed
 ((should
   (equal '...
(org-element-map tree ... ... info)))
  :form
  (equal
   (yes no no no)
   (yes yes no no))
  :value nil :explanation
  (list-elt 1
(different-atoms no yes
--8<---cut here---end--->8---


>> The new org-e-beamer.el doesn't compile at all:
>> org-e-beamer.el:258:1:Error: Wrong type argument: listp,
>> org-e-beamer-export-block
>
> It should be fixed.

Thanks, that works correctly now.


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

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] [ANN] Beamer back-end for org-export in contrib/

2012-07-02 Thread Nicolas Goaziou
Hello,

suvayu ali  writes:

> I recall you saying you would add more overlay support gradually;
> I would like to say it would be nice if there is support for
> replace-like overlays (e.g. \only or \onslide). It would be great if
> I can wrap blocks in these. To illustrate what I mean, I can produce
> the above effect with the following ugly hack:
>
>   #+OPTIONS: H:2
>
>   * Section 
>   ** Frame title Some more text
>
>   #+LATEX: \only<1>{%
>   *** Example block:B_exampleblock:
>   :PROPERTIES:
>   :BEAMER_env: exampleblock
>   :END:
>   Some example text
>
>   *** ignore  :B_ignoreheading:
>   :PROPERTIES:
>   :BEAMER_env: ignoreheading
>   :END:
>   #+LATEX: }
>
>   #+LATEX: \only<2>{%
>   *** Theorem block :B_theorem:
>   :PROPERTIES:
>   :BEAMER_env: theorem
>   :END:
>   Some bla bla ∀ \mathcal{R}
>
>   *** ignore  :B_ignoreheading:
>   :PROPERTIES:
>   :BEAMER_env: ignoreheading
>   :END:
>   #+LATEX: }

This should be possible with `org-e-beamer-environments-extra', i.e.

  (add-to-list 'org-e-beamer-environments-extra
   '("onlyenv" "O" "\\begin{onlyenv}%a" "\\end{onlyenv}"))

Then you set headline's BEAMER_env property to onlyenv and modify
BEAMER_act accordingly.

>> Every plain list has support for `:overlay' attribute (through
>> ATTR_BEAMER affiliated keyword).  Also, ordered (resp. description)
>> lists make use of `:template' (resp. `:long-text') attribute.
>>
>
> I wasn't clear what you meant here. Could you give an example? Did you
> mean I can specify overlay specification for list items with the above
> mechanism? I'm not clear on the syntax here.

These attributes modify the whole list. To set overlays for individual
items, use export snippets. Examples follow:

  #+ATTR_BEAMER: :template "i)" :overlay "<+->"
  1. First item
  2. Second item 

will become

  \begin{enumerate}[<+->][i)]
  \item First item
  \item Second item
  \end{enumerate}

whereas

  1. @@e-beamer:<1>@@ First item
  2. @@e-beamer:<2>@@ Second item

will become

  \begin{enumerate}
  \item<1> First item
  \item<2> Second item
  \end{enumerate}

> I have another feature request (for the distant future) with regards to
> lists; I would like to put tikz nodes in list items. I have tried that
> in the past with very limited success. For an example, you can look
> here:
>
> 

Again, export snippets should allow this. To obtain:

  \begin{itemize}
  \item Anode \tikz[na] \coordinate (s-anode);
  \item Cathode \tikz[na] \coordinate (s-cathode);
  \item Saline bridge \tikz[na] \coordinate (s-bridge);
  \end{itemize}

You can write:

  - Anode @@e-beamer:\tikz[na] \coordinate (s-anode);@@
  - Cathode @@e-beamer:\tikz[na] \coordinate (s-cathode);@@
  - Anode @@e-beamer:\tikz[na] \coordinate (s-bridge);@@

> I presume the beamer options go like the following?
>
>   #+LATEX_CLASS_OPTIONS: [smaller,presentation]

Yes.

> I have a question; are subtree exports supported yet?

I think so. Have you tested them?

Thank you for testing the back-end.


Regards,

-- 
Nicolas Goaziou



Re: [O] new exporter

2012-07-02 Thread Nicolas Goaziou
Hello,

Achim Gratz  writes:

> After some consideration, I think this is what the macro should look
> like:
>
> (defmacro org-export-with-current-buffer-copy (&rest body)
>   "Apply BODY in a copy of the current buffer.
>
> The copy preserves local variables and visibility of the original
> buffer.
>
> Point is at buffer's beginning when BODY is applied."
>   `(org-with-gensyms (original-buffer offset buffer-string overlays)
>  (let ((original-buffer (current-buffer))
>  (offset (1- (point-min)))
>  (buffer-string (buffer-string))
>  (overlays (mapcar
>  'copy-overlay (overlays-in (point-min) (point-max)
>(with-temp-buffer
>(let ((buffer-invisibility-spec nil))
>  (org-clone-local-variables
>   original-buffer
>   
> "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)")
>  (insert buffer-string)
>  (mapc (lambda (ov)
>  (move-overlay
>   ov
>   (- (overlay-start ov) offset)
>   (- (overlay-end ov) offset)
>   (current-buffer)))
>overlays)
>  (goto-char (point-min))
>  (progn ,@body))
> (def-edebug-spec org-export-with-current-buffer-copy (body))

Not exactly. With this version, symbols generated with gensym are never
used, and the macro isn't hygienic anymore.

I still think your first take about this macro was the good one. I've
pushed something very similar. Could you verify if it is correct on the
compiling side?

> The org-export-define-derived-backend macro seems similarly starstruck,
> but I really don't know what you think the expansion should be.

Something along the lines of:

#+begin_src emacs-lisp
(progn
  (defconst org-e-beamer-options-alist '(...)
"Alist between filters keywords and back-end specific filters.
See `org-export-filters-alist' for more information.")
  (defvar org-e-beamer-translate-alist '(...)
"Alist between element or object types and translators."))
#+end_src

> One of your recent changes introduced four test fail when org-element is
> compiled.  I haven't yet looked why that would be, the four tests are:
>
>FAILED  test-org-export/table-cell-alignment
>FAILED  test-org-export/table-cell-borders
>FAILED  test-org-export/table-row-ends-header-p
>FAILED  test-org-export/table-row-starts-header-p

Could you paste the error reported by ERT? I can't think of any recent
change in this area.

> The new org-e-beamer.el doesn't compile at all:
> org-e-beamer.el:258:1:Error: Wrong type argument: listp,
> org-e-beamer-export-block

It should be fixed.

Thank you.


Regards,

-- 
Nicolas Goaziou