Re: [O] Bug: 3 bugs and 2 proposals on ascii/html export [7.8.03]

2012-03-10 Thread Nicolas Goaziou
Hello,

Carsten Dominik carsten.domi...@gmail.com writes:

 For what it is worth, I do agree that this looks wrong now and changing
 it would make it better.  I do not remember why I chose the sequence
 that we have now.  Looking at it now, I would also insert ... after
 ^^, and hope that # and $ never get any use :)

For the record, `e-ascii' back-end currently uses the following default
set-up:

#+begin_src emacs-lisp
(defcustom org-e-ascii-underline '((ascii ?= ?~ ?-)
   (latin1 ?= ?~ ?-)
   (utf-8 ?═ ?─ ?╌ ?┄ ?┈))
  Characters for underlining headings in ASCII export.

Alist whose key is a symbol among `ascii', `latin1' and `utf-8'
and whose value is a list of characters.

For each supported charset, this variable associates a sequence
of underline characters.  In a sequence, the characters will be
used in order for headlines level 1, 2, ...  If no character is
available for a given level, the headline won't be underlined.
  :group 'org-export-e-ascii
  :type '(list
  (cons :tag Underline characters sequence
(const :tag ASCII charset ascii)
(repeat character))
  (cons :tag Underline characters sequence
(const :tag Latin-1 charset latin1)
(repeat character))
  (cons :tag Underline characters sequence
(const :tag UTF-8 charset utf-8)
(repeat character
#+end_src

IMO, , ^, #, $$ are just ugly and should require user's
approval (i.e. customization).


Regards,

-- 
Nicolas Goaziou



Re: [O] suggestion for the manual: mention the #+BEGIN_SRC org trick when describing drawers and plainlists

2012-03-10 Thread Mirko Vukovic
Ilya Shlyakhter ilya_shl at alum.mit.edu writes:

 
 In Org, entry text can't have substructure (other than drawers and plain
lists): you can't have an entry thathas some text, then a subtree, then more
text.I just (re-)discovered that you can get around that by using #+BEGIN_SRC
org to include arbitrary org
 subtrees in the middle of entry text.   That's useful not just when writing in
Org about Org, but anytime you wantto insert an extended sidenote in the middle
of an entry.  As with all source blocks, you edit it in its native (Org)
 mode and it exports correctly.  You can copy links from the main Org and past
them into the nested Org.Just wish I'd learned this sooner :)  So, maybe mention
this in the manual in the sections on drawers and plainlists.ilya

Thank you for the pointer.  I am sometimes also frustrated by that feature.

But using BEGIN/END_SRC is really a hack.  I wonder if instead of using SRC
blocks, we could define (with some amount of coding) a more suitable kind of
blocks.  In my case I would like to have a BEGIN/END_TODO block.  This would
permit a layout such as

* header 1
  text, more text, much more text under header

#+begin_todo
** TODO task

** TODO another task
#+end_todo

  still more text under header 1


Maybe the TODO block is to specific.  Maybe a SUBTREE block would be sufficient.
Though, I am not sure if this would conflict with some major undrlying structure
of orgmode.

Mirko




[O] [babel][patch] Make ob-lilypond audition calls asynchronous

2012-03-10 Thread Martyn Jago
Hi 

A patch to make ob-lilypond audition calls asynchronous (and tests).

Best, Martyn

From 2e7cd607cd6dbc25edd5ff9972fbd2528d48416e Mon Sep 17 00:00:00 2001
From: Martyn Jago martyn.j...@btinternet.com
Date: Sat, 10 Mar 2012 15:00:57 +
Subject: [PATCH] Make auditioning of midi and pdf generations asynchronous, and add easy pdf generation.

* lisp/ob-lilypond.el: Make auditioning of midi and pdf asynchronous,
  and add easy pdf generation in the form of `ly-gen-pdf' variable.

* testing/lisp/test-ob-lilypond.el: Tests for above.
---
 lisp/ob-lilypond.el  |   68 ++---
 testing/lisp/test-ob-lilypond.el |   22 +++-
 2 files changed, 68 insertions(+), 22 deletions(-)

diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el
index 0dde0de..fc9a639 100644
--- a/lisp/ob-lilypond.el
+++ b/lisp/ob-lilypond.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2010-2012  Free Software Foundation, Inc.
 
 ;; Author: Martyn Jago
-;; Keywords: babel language, literate programming
+;; Keywords: babel language, literate programming, music score
 ;; Homepage: https://github.com/mjago/ob-lilypond
 
 ;; This file is part of GNU Emacs.
@@ -23,10 +23,14 @@
 
 ;;; Commentary:
 
-;; Installation / usage info, and examples are available at
-;; https://github.com/mjago/ob-lilypond
+;; Installation, ob-lilypond documentation, and examples are available at
+;; http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html
+;;
+;; Lilypond documentation can be found at
+;; http://lilypond.org/manuals.html
 
 ;;; Code:
+
 (require 'ob)
 (require 'ob-eval)
 (require 'ob-tangle)
@@ -37,9 +41,11 @@
 (add-to-list 'org-babel-tangle-lang-exts '(LilyPond . ly))
 
 (defvar org-babel-default-header-args:lilypond '()
-  Default header arguments for js code blocks.)
+  Default header arguments for lilypond code blocks.
+NOTE: The arguments are determined at lilypond compile time.
+See (ly-set-header-args))
 
-(defconst ly-version 0.3
+(defconst ly-version 7.6
   The version number of the file ob-lilypond.el.)
 
 (defvar ly-compile-post-tangle t
@@ -86,6 +92,10 @@ LY-GEN-SVG to t)
 HTML generation can be turned on by default by setting
 LY-GEN-HTML to t)
 
+(defvar ly-gen-pdf nil
+PDF generation can be turned on by default by setting
+LY-GEN-PDF to t)
+
 (defvar ly-use-eps nil
 You can force the compiler to use the EPS backend by setting
 LY-USE-EPS to t)
@@ -203,18 +213,20 @@ FILE-NAME is full path to lilypond (.ly) file
 (arg-2 nil);infile
 (arg-3 *lilypond*)   ;buffer
 (arg-4 t)  ;display
-(arg-5 (if ly-gen-png  --png  )) ;rest...
-  (arg-6 (if ly-gen-html --html ))
-(arg-7 (if ly-use-eps  -dbackend=eps ))
-(arg-8 (if ly-gen-svg  -dbackend=svg ))
-(arg-9 (concat --output= (file-name-sans-extension file-name)))
-(arg-10 file-name))
+	(arg-4 t)  ;display
+	(arg-5 (if ly-gen-png  --png  )) ;rest...
+	(arg-6 (if ly-gen-html --html ))
+(arg-7 (if ly-gen-pdf --pdf ))
+(arg-8 (if ly-use-eps  -dbackend=eps ))
+(arg-9 (if ly-gen-svg  -dbackend=svg ))
+(arg-10 (concat --output= (file-name-sans-extension file-name)))
+(arg-11 file-name))
 (if test
-`(,arg-1 ,arg-2 ,arg-3 ,arg-4 ,arg-5
- ,arg-6 ,arg-7 ,arg-8 ,arg-9 ,arg-10)
+`(,arg-1 ,arg-2 ,arg-3 ,arg-4 ,arg-5 ,arg-6
+ ,arg-7 ,arg-8 ,arg-9 ,arg-10, arg-11)
   (call-process
-   arg-1 arg-2 arg-3 arg-4 arg-5
-   arg-6 arg-7 arg-8 arg-9 arg-10
+   arg-1 arg-2 arg-3 arg-4 arg-5 arg-6
+   arg-7 arg-8 arg-9 arg-10 arg-11
 
 (defun ly-check-for-compile-error (file-name optional test)
   Check for compile error.
@@ -307,8 +319,12 @@ If TEST is non-nil, the shell command is returned and is not run
  (concat (ly-determine-pdf-path)   pdf-file)))
 (if test
 cmd-string
-  (shell-command cmd-string)))
-(message  No pdf file generated so can't display!)
+	  (start-process 
+	   \Audition pdf\
+	   *lilypond*
+	   (ly-determine-pdf-path)
+	   pdf-file)))
+	(message  No pdf file generated so can't display!)
 
 (defun ly-attempt-to-play-midi (file-name optional test)
   Attempt to play the generated MIDI file
@@ -322,7 +338,11 @@ If TEST is non-nil, the shell command is returned and is not run
  (concat (ly-determine-midi-path)   midi-file)))
 (if test
 cmd-string
-  (shell-command cmd-string)))
+  (start-process 
+   \Audition midi\
+   *lilypond*
+   (ly-determine-midi-path)
+   midi-file)))
 (message No midi file generated so can't play!)
 
 (defun ly-determine-ly-path (optional test)
@@ -399,6 +419,15 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes
   (message (concat HTML 

Re: [O] ob-lilypond open pdf and midi asynchroniously

2012-03-10 Thread Martyn Jago
Hi Ezequiel

 Ezequiel Birman stormwa...@espiga4.com.ar writes:
 Is there a reason to not append  to shell-command's args? I get
 disconnected from ERC/Bitlbee each time I peek at the score too long.

Apologies for my delayed response - I've been rather busy.

I've pushed a patch to the list to make auditioning of pdf and midi
asynchronous processes. You can either wait to see if the patch makes it
to git, or apply the patch yourself (git am).

Hopefully this will alleviate your problems with ERC!

Thanks for the heads-up.

I'm hoping to introduce remote compiling of Lilypond to help alleviate
the wait time felt when compiling Lilypond (slow but pretty)!

I'm using a similar technique for parallel testing of embedded C,
document generation, and building (using ZeroMQ). 

Best, Martyn





[O] `:html-postamble' and `org-get-file-contents'

2012-03-10 Thread Feng Li

Dear all,


Can someone tell me how to use the function `org-get-file-contents'
together with `:html-postamble'?

I have a line in my .emacs `org-publish-project-alist' as follows


:html-postamble ,(org-get-file-contents 
~/workspace/web/html/style/postamble.html)


where my `postamble.html' is just a sentence Edited by Feng Li. This 
seems to have no effect because I still get the default postamble

like this when I publish the project


Author: Feng Li Date: 2012-03-10 12:46:36 CET Generated by Org
version 7.8.03 with Emacs version 24


While if I change the html-postamble to the string directly


:html-postamble Edited by Feng Li


it shows the postamble changes accordingly.


Thanks in advance!


Feng

--
Feng Li
Department of Statistics
Stockholm University
106 91 Stockholm, Sweden
http://feng.li/




Re: [O] How to get header in second table generated by src block

2012-03-10 Thread Marc-Oliver Ihm

Hi,

if you add :colnames yes, like this:

#+call: raw-to-table[:exports results](table=raw2) :colnames yes

you get the headers, that you expect.

regards, Marc




[O] [babel] Bug with empty results

2012-03-10 Thread Thomas S. Dye
Aloha all,

BEGIN and END are transposed with empty results, as shown in the example
below.  The results shown are from two evaluations of the source code
block.

I'm using Org-mode version 7.8.03 (release_7.8.03.575.g06a1b)

All the best,
Tom

* Empty results
#+begin_src emacs-lisp :results silent
  (org-babel-do-load-languages
   'org-babel-load-languages
   '((R . t)
 ))
#+end_src

#+name: show-bug
#+header: :results output replace org
#+BEGIN_SRC R
#+END_SRC

#+results: show-bug
#+END_ORG
#+BEGIN_ORG
#+END_ORG
#+BEGIN_ORG

-- 
T.S. Dye  Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



Re: [O] suggestion for the manual: mention the #+BEGIN_SRC org trick when describing drawers and plainlists

2012-03-10 Thread suvayu ali
On Sat, Mar 10, 2012 at 16:01, Mirko Vukovic mirko.vuko...@gmail.com wrote:
 But using BEGIN/END_SRC is really a hack.  I wonder if instead of using SRC
 blocks, we could define (with some amount of coding) a more suitable kind of
 blocks.  In my case I would like to have a BEGIN/END_TODO block.  This would
 permit a layout such as

We have inline tasks for that.

About supporting non-tree-like structures in org files, this has been
discussed before. You can look up sometime towards the end of last
year in the archives to see the arguments in favour and against the
feature.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] suggestion for the manual: mention the #+BEGIN_SRC org trick when describing drawers and plainlists

2012-03-10 Thread Mirko Vukovic
On Sat, Mar 10, 2012 at 2:00 PM, suvayu ali fatkasuvayu+li...@gmail.com wrote:
 On Sat, Mar 10, 2012 at 16:01, Mirko Vukovic mirko.vuko...@gmail.com wrote:
 But using BEGIN/END_SRC is really a hack.  I wonder if instead of using SRC
 blocks, we could define (with some amount of coding) a more suitable kind of
 blocks.  In my case I would like to have a BEGIN/END_TODO block.  This would
 permit a layout such as

 We have inline tasks for that.

 About supporting non-tree-like structures in org files, this has been
 discussed before. You can look up sometime towards the end of last
 year in the archives to see the arguments in favour and against the
 feature.

 --
 Suvayu

Thank you.  I was not aware of the inline tasks capability

Mirko



Re: [O] How to get header in second table generated by src block

2012-03-10 Thread Vladimir Lomov
Hello,
** Marc-Oliver Ihm [2012-03-10 17:58:52 +0100]:

 Hi,

 if you add :colnames yes, like this:

 #+call: raw-to-table[:exports results](table=raw2) :colnames yes

 you get the headers, that you expect.
Aha, I thought I should put ~:colnames~ inside ~[]~

 regards, Marc
Thanks Marc.

---
WBR, Vladimir Lomov

-- 
...and the fully armed nuclear warheads, are, of course, merely a
courtesy detail.