Re: [O] Remove the build-in orgmode

2014-06-01 Thread Brady Trainor
Shiyuan wrote:

> Hi,
> I updated Org-mode from ELPA. If I start emacs normally, M-x
> org-version does show the new version(8.2.6). But if I start emacs  with
> -Q, emacs will still run the built-in version(7.9.3). This is not
> convenient for debugging purpose. Is there anyway to remove the built-in
> version 7.9.3 completely so that even if I start emacs with -Q, emacs
> still
> use the new version 8.2.6 from ELPA.  Thanks.
> 
> Shiyuan


I have 

   (setq load-path (delete "/usr/share/emacs/24.3/lisp/org" load-path))
   (setq load-path (delete "c:/Program Files (x86)/emacs-24.3/lisp/org" 
load-path))

in my notes, for when I was trying to get the most recent maint repository 
version of org working. There is a better version of these lines somewhere 
at stack exchange... here it is: http://stackoverflow.com/a/20616703/2533127

You could potentially have this in a ~/debugorg.el, and use 

emacs -q -l "~/debugorg.el"

For more exploring, try =cd /usr/share/emacs/=, and =ls=. Also, try =C-h v 
load-path RET C-x o C-s org=. In other words, have Emacs describe the =load-
path= variable, switch to that window and do a search for the term "org". 

(It is somewhere discouraged to remove the built-in org, but hopefully 
someone will give you steps and tips anyway. (Would it simply suffice to 
temporarily move the emacs/24.3/lisp/org directory described above?)) 


Brady






Re: [O] Tests do not work

2014-06-01 Thread Cecil Westerhof
2014-06-01 23:14 GMT+02:00 Bastien :

> Achim Gratz  writes:
>
> > Cecil Westerhof writes:
> >> find: `testing': No such file or directory
> > 
> >
> > That tells you that the testing directory doesn't exist.  Since you seem
> > to be trying the install from a distribution tarball, this is correct:
> > there simply is no testing directory there which means you cannot run
> > the tests.
>
> But why is "make test" available from the tarball then?
>

​Exactly: when there are no tests, there should be no ‘make test’.

-- 
Cecil Westerhof


Re: [O] gnuplot not working with babel

2014-06-01 Thread Omid
And searching with the keywords from the error you're getting, your
first problem is solved by installing gnuplot.el (to drive gnuplot
inside Emacs):
https://lists.gnu.org/archive/html/emacs-orgmode/2013-07/msg00563.html

Omid

Sent from my Emacs

On 06/01/2014 10:48 PM, Lawrence Bottorff wrote:
> I'm just starting out with babel and can't get the example code to run
> (http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.html#sec-4)
> :
> 
> #+begin_src gnuplot :exports code :file file.png
> reset
> 
> set title "Putting it All Together"
> 
> set xlabel "X"
> set xrange [-8:8]
> set xtics -8,2,8
> 
> set ylabel "Y"
> set yrange [-20:70]
> set ytics -20,10,70
> 
> f(x) = x**2
> g(x) = x**3
> h(x) = 10*sqrt(abs(x))
> 
> plot f(x) w lp lw 1, g(x) w p lw 2, h(x) w l lw 3
> #+end_src
> 
> This produces
> 
>org-babel-execute:gnuplot: Cannot open load file: no such file or
> directory, gnuplot
> 
> Also, I tried a straight org-plot/gnuplot call while the cursor was in a
> table with similar results:
> 
>org-plot/gnuplot: Cannot open load file: no such file or directory,
> gnuplot
> 
> I have gnuplot installed and the above code produces the expected output
> graphic when run from the command line. I'm on U14.10, Emacs24.3.50.1,
> and Org 8.2.3a.
> 
> Also, I'm tired of typing the #+begin_src ... #+end_src block every
> time. Is there a quicker key binding for this?
> 
> LB



Re: [O] gnuplot not working with babel

2014-06-01 Thread Omid
Hello,

For your second question, please see Easy Templates as one solution:
http://orgmode.org/manual/Easy-Templates.html

Omid

Sent from my Emacs

On 06/01/2014 10:48 PM, Lawrence Bottorff wrote:
> I'm just starting out with babel and can't get the example code to run
> (http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.html#sec-4)
> :
> 
> #+begin_src gnuplot :exports code :file file.png
> reset
> 
> set title "Putting it All Together"
> 
> set xlabel "X"
> set xrange [-8:8]
> set xtics -8,2,8
> 
> set ylabel "Y"
> set yrange [-20:70]
> set ytics -20,10,70
> 
> f(x) = x**2
> g(x) = x**3
> h(x) = 10*sqrt(abs(x))
> 
> plot f(x) w lp lw 1, g(x) w p lw 2, h(x) w l lw 3
> #+end_src
> 
> This produces
> 
>org-babel-execute:gnuplot: Cannot open load file: no such file or
> directory, gnuplot
> 
> Also, I tried a straight org-plot/gnuplot call while the cursor was in a
> table with similar results:
> 
>org-plot/gnuplot: Cannot open load file: no such file or directory,
> gnuplot
> 
> I have gnuplot installed and the above code produces the expected output
> graphic when run from the command line. I'm on U14.10, Emacs24.3.50.1,
> and Org 8.2.3a.
> 
> Also, I'm tired of typing the #+begin_src ... #+end_src block every
> time. Is there a quicker key binding for this?
> 
> LB



[O] gnuplot not working with babel

2014-06-01 Thread Lawrence Bottorff
I'm just starting out with babel and can't get the example code to run (
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.html#sec-4)
:

#+begin_src gnuplot :exports code :file file.png
reset

set title "Putting it All Together"

set xlabel "X"
set xrange [-8:8]
set xtics -8,2,8

set ylabel "Y"
set yrange [-20:70]
set ytics -20,10,70

f(x) = x**2
g(x) = x**3
h(x) = 10*sqrt(abs(x))

plot f(x) w lp lw 1, g(x) w p lw 2, h(x) w l lw 3
#+end_src

This produces

   org-babel-execute:gnuplot: Cannot open load file: no such file or
directory, gnuplot

Also, I tried a straight org-plot/gnuplot call while the cursor was in a
table with similar results:

   org-plot/gnuplot: Cannot open load file: no such file or directory,
gnuplot

I have gnuplot installed and the above code produces the expected output
graphic when run from the command line. I'm on U14.10, Emacs24.3.50.1, and
Org 8.2.3a.

Also, I'm tired of typing the #+begin_src ... #+end_src block every time.
Is there a quicker key binding for this?

LB


[O] Standard skipping conditions have no effect

2014-06-01 Thread Thomas Morgan
Hello, Org mode hackers,

Here is a recipe for a bug on the maint branch that causes standard
skipping conditions to have no effect.

1. Change the load path setting in `setup.el'.

2. Start Emacs with `emacs -Q -l setup.el'.

3. Customize the agenda commands with `M-x org-agenda C'.

4. Add a new command, change the match field to tag `foo', and add a
   standard skipping condition for TODO states, so that the command
   looks like this in the customization buffer:

   ,
   | INS DEL Choice: Value Menu Single command:
   | Access Key(s) : x
   | [X] Description: Describe command here
   | Choice: Value Menu Tags/Property match (all agenda files)
   | Match (only for some commands): foo
   | Local settings for this command.  Remember to quote values:
   | INS DEL Setting: Value Menu Standard skipping condition:
   | org-agenda-skip-function
   | List:
   | List:
   | Skipping range: Value Menu Skip entry
   | Conditions for skipping:
   | INS DEL Condition type: Value Menu TODO state is:
   | todo
   | Choice: Value Menu any not-done state
   | INS
   | INS
   | [ ] Export:
   | INS
   `

5. Type `M-x org-agenda x'.  The resulting agenda view looks like this:

   ,
   | Headlines with TAGS match: foo
   | Press `C-u r' to search again with new search string
   |   test-case:  TODO Buckle my shoe  
:foo:
   `

   I expected the TODO item to be filtered out.

   This is the value of `org-agenda-custom-commands':

   ,
   | (("x" "Describe command here" tags "foo"
   |   ((org-agenda-skip-function
   | '(org-agenda-skip-entry-if todo todo
   |  ("n" "Agenda and all TODO's"
   |   ((agenda "" nil)
   |(alltodo "" nil))
   |   nil))
   `

   The problem seems to be that the arguments to
   `org-agenda-skip-entry-if' are unquoted.  The following steps verify
   that.

6. Change `org-agenda-custom-commands', quoting the arguments to
   `org-agenda-skip-entry-if'.

   ,
   | (setq org-agenda-custom-commands
   |   '(("x" "Describe command here" tags "foo"
   |  ((org-agenda-skip-function
   |'(org-agenda-skip-entry-if 'todo 'todo
   | ("n" "Agenda and all TODO's"
   |  ((agenda "" nil)
   |   (alltodo "" nil))
   |  nil)))
   `

7. Remake the custom agenda view with `M-x org-agenda x'.

   ,
   | Headlines with TAGS match: foo
   | Press `C-u r' to search again with new search string
   `

   As expected, the TODO item is filtered.

Best,

Thomas



Re: [O] Standard skipping conditions have no effect

2014-06-01 Thread Thomas Morgan
Attached are the files referred to in the bug report.

Thomas Morgan  writes:

> Hello, Org mode hackers,
>
> Here is a recipe for a bug on the maint branch that causes standard
> skipping conditions to have no effect.
>
> 1. Change the load path setting in `setup.el'.
>
> 2. Start Emacs with `emacs -Q -l setup.el'.
>
> 3. Customize the agenda commands with `M-x org-agenda C'.
>
> 4. Add a new command, change the match field to tag `foo', and add a
>standard skipping condition for TODO states, so that the command
>looks like this in the customization buffer:
>
>,
>| INS DEL Choice: Value Menu Single command:
>| Access Key(s) : x
>| [X] Description: Describe command here
>| Choice: Value Menu Tags/Property match (all agenda files)
>| Match (only for some commands): foo
>| Local settings for this command.  Remember to quote values:
>| INS DEL Setting: Value Menu Standard skipping condition:
>| org-agenda-skip-function
>| List:
>| List:
>| Skipping range: Value Menu Skip entry
>| Conditions for skipping:
>| INS DEL Condition type: Value Menu TODO state is:
>| todo
>| Choice: Value Menu any not-done state
>| INS
>| INS
>| [ ] Export:
>| INS
>`
>
> 5. Type `M-x org-agenda x'.  The resulting agenda view looks like this:
>
>,
>| Headlines with TAGS match: foo
>| Press `C-u r' to search again with new search string
>|   test-case:  TODO Buckle my shoe
>   :foo:
>`
>
>I expected the TODO item to be filtered out.
>
>This is the value of `org-agenda-custom-commands':
>
>,
>| (("x" "Describe command here" tags "foo"
>|   ((org-agenda-skip-function
>| '(org-agenda-skip-entry-if todo todo
>|  ("n" "Agenda and all TODO's"
>|   ((agenda "" nil)
>|(alltodo "" nil))
>|   nil))
>`
>
>The problem seems to be that the arguments to
>`org-agenda-skip-entry-if' are unquoted.  The following steps verify
>that.
>
> 6. Change `org-agenda-custom-commands', quoting the arguments to
>`org-agenda-skip-entry-if'.
>
>,
>| (setq org-agenda-custom-commands
>|   '(("x" "Describe command here" tags "foo"
>|  ((org-agenda-skip-function
>|'(org-agenda-skip-entry-if 'todo 'todo
>| ("n" "Agenda and all TODO's"
>|  ((agenda "" nil)
>|   (alltodo "" nil))
>|  nil)))
>`
>
> 7. Remake the custom agenda view with `M-x org-agenda x'.
>
>,
>| Headlines with TAGS match: foo
>| Press `C-u r' to search again with new search string
>`
>
>As expected, the TODO item is filtered.
>
> Best,
>
> Thomas
>


* TODO Buckle my shoe 			:foo:


setup.el
Description: application/emacs-lisp


[O] Preset filter sometimes persistent

2014-06-01 Thread Thomas Morgan
Hello, Org mode hackers,

Here is a recipe for a bug on the maint branch that causes a preset tag
filter to be carried over to another agenda view in some cases.

1. Change the load path setting in `setup.el'.

2. Start Emacs with `emacs -Q -l setup.el'.

3. Open a TODO list with `M-x org-agenda t'.

4. Move point to the TODO item with `C-s elisp RET'.

5. Evaluate the Elisp code link with `C-c C-o yes RET'.  This brings up
   a custom TODO list with the `foo' tag filtered.  This is a preset tag
   filter.  The TODO list is empty, as expected.

6. Return to the first TODO list with `M-x org-agenda t'.

7. Refresh it with `r'.  Now this TODO list is empty too and `{-foo}'
   appears in the mode line, indicating that the preset tag filter was
   carried over from one agenda view to another.

Best,

Thomas

* TODO [[elisp:(org-agenda%20nil%20"x")][elisp:(org-agenda nil "x")]]   :foo:


setup.el
Description: application/emacs-lisp


Re: [O] latex markup in org?

2014-06-01 Thread Steven Arntson
John Kitchin  writes:

> Maybe you can include the sty file as a code block that will be
> tangled before export. You should put that block in a section tagged
> no-export. Depending on your setup, you may need to make a code block
> to build your latex file and/or pdf to make sure the tangling happens.
>
> at the top keep this
> #+LATEX_HEADER: \usepackage{filestyle}
>
> and in the last section do this
> * build :noexport:
>
> #+begin_src text :tangle filestyle.sty
> latex code for style
> #+end_src
>
> #+begin_src emacs-lisp
> (org-babel-tangle)
> (save-buffer)
> (org-latex-export-to-pdf)
> #+end_src
>
> and finally put your cursor in the last block, and type C-c C-c. that
> should do what you want. 
>
> John
>
> ---
> John Kitchin
> Associate Professor
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> http://kitchingroup.cheme.cmu.edu
>
> On Sun, Jun 1, 2014 at 2:57 AM, Steven Arntson
>  wrote:
>
> I've been learning to export from org to latex (to pdf), and have
> had
> great success. There's a simplification to the process I'd like to
> make,
> though, if it's possible.
> 
> Right now I use files: file.org and filestyle.sty. The .sty gives
> the latex-specific instruction, and I point to it from file.org
> with a
> line of #+LATEX_HEADER: \usepackage{filestyle}. This works great,
> but
> I'd love to have just one file, not two, to keep things simple.
> 
> So I tried putting the contents of filestyle.sty near the top of
> file.org
> inside of #+BEGIN_latex and #+END_latex, but it doesn't quite
> work. It
> incompletely works, which is perplexing...
> 
> I'd appreciate any ideas about this--can it be done?
> 
> Thank you!
> Steven
> 
> 
Thanks for this--great idea. I'll give it a try.

-steven




Re: [O] src blocks not fontified

2014-06-01 Thread Omid
One way is to use the package htmlize, which you can install from ELPA
using M-x package-install RET htmlize

http://www.emacswiki.org/emacs/Htmlize

Omid

Sent from my Emacs

On 06/01/2014 06:40 PM, Shiyuan wrote:
> That solves the problem. Thanks Omid. 
> Should this be the default setup? It seems more nature to fontify the
> src block than not.  
> 
> Also, when I export the org file to html, the src block is not fontified
> in the resulting html webpage. Is there another option to turn this
> function on? Thanks. 
> 
> 
> On Sun, Jun 1, 2014 at 3:17 PM, Omid  > wrote:
> 
> Hi Shiyuan,
> 
> Add
> 
> (setq org-src-fontify-natively t)
> 
> to your .emacs.
> 
> Omid
> 
> Sent from my Emacs
> 
> On 06/01/2014 06:13 PM, Shiyuan wrote:
> > Hi,
> > I am using Emacs 24.3 with the built-in org mode(7.9.3). The src
> > code block is not fontified (Emacs is started with -Q option)
> > #+BEGIN_SRC emacs-lisp
> > (defun org-xor (a b)
> >   "Exclusive or."
> > (if a (not b) b))
> > #+END_SRC
> >
> > This is my first time to use org-mode, so I could miss some setup
> > steps.Do I need to do any setup in my .emacs if I just use the
> built-in
> > org?
> >
> > Thanks.
> >
> > Shiyuan
> 
> 



Re: [O] src blocks not fontified

2014-06-01 Thread Shiyuan
That solves the problem. Thanks Omid.
Should this be the default setup? It seems more nature to fontify the src
block than not.

Also, when I export the org file to html, the src block is not fontified in
the resulting html webpage. Is there another option to turn this function
on? Thanks.


On Sun, Jun 1, 2014 at 3:17 PM, Omid  wrote:

> Hi Shiyuan,
>
> Add
>
> (setq org-src-fontify-natively t)
>
> to your .emacs.
>
> Omid
>
> Sent from my Emacs
>
> On 06/01/2014 06:13 PM, Shiyuan wrote:
> > Hi,
> > I am using Emacs 24.3 with the built-in org mode(7.9.3). The src
> > code block is not fontified (Emacs is started with -Q option)
> > #+BEGIN_SRC emacs-lisp
> > (defun org-xor (a b)
> >   "Exclusive or."
> > (if a (not b) b))
> > #+END_SRC
> >
> > This is my first time to use org-mode, so I could miss some setup
> > steps.Do I need to do any setup in my .emacs if I just use the built-in
> > org?
> >
> > Thanks.
> >
> > Shiyuan
>
>


[O] Remove the build-in orgmode

2014-06-01 Thread Shiyuan
Hi,
I updated Org-mode from ELPA. If I start emacs normally, M-x
org-version does show the new version(8.2.6). But if I start emacs  with
-Q, emacs will still run the built-in version(7.9.3). This is not
convenient for debugging purpose. Is there anyway to remove the built-in
version 7.9.3 completely so that even if I start emacs with -Q, emacs still
use the new version 8.2.6 from ELPA.  Thanks.

Shiyuan


Re: [O] src blocks not fontified

2014-06-01 Thread Omid
Hi Shiyuan,

Add

(setq org-src-fontify-natively t)

to your .emacs.

Omid

Sent from my Emacs

On 06/01/2014 06:13 PM, Shiyuan wrote:
> Hi, 
> I am using Emacs 24.3 with the built-in org mode(7.9.3). The src
> code block is not fontified (Emacs is started with -Q option)  
> #+BEGIN_SRC emacs-lisp
> (defun org-xor (a b)
>   "Exclusive or."
> (if a (not b) b))
> #+END_SRC
> 
> This is my first time to use org-mode, so I could miss some setup
> steps.Do I need to do any setup in my .emacs if I just use the built-in
> org? 
> 
> Thanks. 
> 
> Shiyuan 



[O] src blocks not fontified

2014-06-01 Thread Shiyuan
Hi,
I am using Emacs 24.3 with the built-in org mode(7.9.3). The src code
block is not fontified (Emacs is started with -Q option)
#+BEGIN_SRC emacs-lisp
(defun org-xor (a b)
  "Exclusive or."
(if a (not b) b))
#+END_SRC

This is my first time to use org-mode, so I could miss some setup steps.Do
I need to do any setup in my .emacs if I just use the built-in org?

Thanks.

Shiyuan


[O] babel C, C++, D enhancement

2014-06-01 Thread Thierry Banel
Hi Bastien, hi all

Here is a Babel enhancement for C, C++ and D languages
- support for non-homogeneous tables (mixing numerics and strings)
- support for table headers
- easier iterating over a table
- added some error handling
- new D support for simple lists and vectors
- new unit tests

Current documentation is here :
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-C.html
Draft of future documentation is here :
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-C-new.html

Have fun
Thierry

>From e66e6545776c0506a1f15db800dfe6424c6f997e Mon Sep 17 00:00:00 2001
From: Thierry Banel 
Date: Sun, 1 Jun 2014 23:30:20 +0200
Subject: [PATCH] enhanced table handling in Babel C, C++, D

---
 lisp/ob-C.el   |  302 +++-
 testing/examples/ob-C-test.org |   88 
 testing/lisp/test-ob-C.el  |  103 --
 3 files changed, 384 insertions(+), 109 deletions(-)

diff --git a/lisp/ob-C.el b/lisp/ob-C.el
index 793981a..b1846de 100644
--- a/lisp/ob-C.el
+++ b/lisp/ob-C.el
@@ -34,8 +34,6 @@
   (require 'cl))
 (require 'ob)
 (require 'cc-mode)
-(eval-when-compile
-  (require 'cl))
 
 (declare-function org-entry-get "org"
 		  (pom property &optional inherit literal-nil))
@@ -72,40 +70,25 @@ This function calls `org-babel-execute:C++'."
 This function is called by `org-babel-execute-src-block'."
   (let ((org-babel-c-variant 'cpp)) (org-babel-C-execute body params)))
 
-;;(defun org-babel-expand-body:C++ (body params) ;; unused
-;;  "Expand a block of C++ code with org-babel according to it's
-;;header arguments (calls `org-babel-C-expand')."
-;;  (let ((org-babel-c-variant 'cpp)) (org-babel-C-expand body params)))
-
 (defun org-babel-execute:D (body params)
   "Execute a block of D code with org-babel.
 This function is called by `org-babel-execute-src-block'."
   (let ((org-babel-c-variant 'd)) (org-babel-C-execute body params)))
 
-;; (defun org-babel-expand-body:D (body params) ;; unused
-;;  "Expand a block of D code with org-babel according to it's
-;;header arguments (calls `org-babel-C-expand')."
-;;  (let ((org-babel-c-variant 'd)) (org-babel-C-expand body params)))
-
 (defun org-babel-execute:C (body params)
   "Execute a block of C code with org-babel.
 This function is called by `org-babel-execute-src-block'."
   (let ((org-babel-c-variant 'c)) (org-babel-C-execute body params)))
 
-;; (defun org-babel-expand-body:c (body params) ;; unused
-;;  "Expand a block of C code with org-babel according to it's
-;;header arguments (calls `org-babel-C-expand')."
-;;  (let ((org-babel-c-variant 'c)) (org-babel-C-expand body params)))
-
 (defun org-babel-C-execute (body params)
   "This function should only be called by `org-babel-execute:C'
 or `org-babel-execute:C++' or `org-babel-execute:D'."
   (let* ((tmp-src-file (org-babel-temp-file
 			"C-src-"
-			(cond
-			 ((equal org-babel-c-variant 'c  ) ".c"  )
-			 ((equal org-babel-c-variant 'cpp) ".cpp")
-			 ((equal org-babel-c-variant 'd  ) ".d"  
+			(case org-babel-c-variant
+			 (c   ".c"  )
+			 (cpp ".cpp")
+			 (d   ".d"  
 	 (tmp-bin-file (org-babel-temp-file "C-bin-" org-babel-exeext)) ;; not used for D
 	 (cmdline (cdr (assoc :cmdline params)))
 	 (cmdline (if cmdline (concat " " cmdline) ""))
@@ -113,43 +96,62 @@ or `org-babel-execute:C++' or `org-babel-execute:D'."
 	 (flags (mapconcat 'identity
 			   (if (listp flags) flags (list flags)) " "))
 	 (full-body
-	  (cond ((equal org-babel-c-variant 'c  ) (org-babel-C-expand-C   body params))
-		((equal org-babel-c-variant 'cpp) (org-babel-C-expand-C++ body params))
-		((equal org-babel-c-variant 'd  ) (org-babel-C-expand-D   body params)
+	  (case org-babel-c-variant
+	(c   (org-babel-C-expand-C   body params))
+	(cpp (org-babel-C-expand-C++ body params))
+	(d   (org-babel-C-expand-D   body params)
 (with-temp-file tmp-src-file (insert full-body))
-(if (memq org-babel-c-variant '(c cpp)) ;; no separate compilation for D
-	(org-babel-eval
-	 (format "%s -o %s %s %s"
-		 (cond
-		  ((equal org-babel-c-variant 'c  ) org-babel-C-compiler)
-		  ((equal org-babel-c-variant 'cpp) org-babel-C++-compiler))
-		 (org-babel-process-file-name tmp-bin-file)
-		 flags
-		 (org-babel-process-file-name tmp-src-file)) ""))
+(case org-babel-c-variant
+  ((c cpp)
+   (org-babel-eval
+	(format "%s -o %s %s %s"
+		(case org-babel-c-variant
+		 (c   org-babel-C-compiler)
+		 (cpp org-babel-C++-compiler))
+		(org-babel-process-file-name tmp-bin-file)
+		flags
+		(org-babel-process-file-name tmp-src-file)) ""))
+  (d nil)) ;; no separate compilation for D
 (let ((results
-	   (org-babel-trim
-	(org-remove-indentation
-	 (org-babel-eval
-	  (cond ((memq org-babel-c-variant '(c cpp))
-		 (concat tmp-bin-file cmdline))
-		((equal org-babel-c-variant 'd)
-		 (format "%s %s %s %s"
-			 org-babel-D-compiler
-			 flags
-			 (org-babel-process-file-name tmp-src-fi

Re: [O] Tests do not work

2014-06-01 Thread Bastien
Achim Gratz  writes:

> Cecil Westerhof writes:
>> find: `testing': No such file or directory
> 
>
> That tells you that the testing directory doesn't exist.  Since you seem
> to be trying the install from a distribution tarball, this is correct:
> there simply is no testing directory there which means you cannot run
> the tests.

But why is "make test" available from the tarball then?

-- 
 Bastien



Re: [O] Patch for testing `org-open-at-point'

2014-06-01 Thread Bastien
Achim Gratz  writes:

> York Zhao writes:
>> Thank you very much for implementing this. Really appreciated. So do you 
>> think
>> it is a good idea to add my test (the patch) now for testing this?
>
> Shouldn't the test check that the desired target is actually
> reached?

That would be too complicated.  Checking that `org-open-at-point'
does not throw an error is enough IMO.

-- 
 Bastien



Re: [O] Tests do not work

2014-06-01 Thread Achim Gratz
Cecil Westerhof writes:
> find: `testing': No such file or directory


That tells you that the testing directory doesn't exist.  Since you seem
to be trying the install from a distribution tarball, this is correct:
there simply is no testing directory there which means you cannot run
the tests.


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

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] Implementing Reproducible Research

2014-06-01 Thread Thomas S. Dye
Aloha Christophe,

Chapter 8, Reproducible Research for Large-Scale Data Analysis, by
Holger Hoefling and Anthony Rossini uses Org mode for literate
programming and for reproducible research.  The article focuses on the
challenges faced by a large-scale data analysis, where the full R code
base might run hours or days to produce a final result.  The working
solution involves a program, makepp, that implements make based on hash
codes of files, rather than timestamps, which change with every
tangling.

Org mode was clearly central to the work.  It is favorably compared to
the tools sweave and knitr familiar to R programmers.

Thanks for pointing this out.

All the best,
Tom

Christophe Pouzat  writes:

> Hi All,
>
> The book "Implementing Reproducible Research" edited by V. Stodden, F.
> Leisch and R. D. Peng came out last month (I don't have a copy) and I just
> found out that you can get the chapters (in PDF) from the editors' site:
> https://osf.io/s9tya/
> I did not have enough time to go trhough all of it but org is mentioned a
> couple of times!
>
> Christophe
>
> -- 
> A Master Carpenter has many tools and is expert with most of them. If you
> only know how to use a hammer, every problem starts to look like a nail.
> Stay away from that trap.
>
> Richard B Johnson.
>
> --
>
> Christophe Pouzat
> MAP5 - Mathématiques Appliquées à Paris 5
> CNRS UMR 8145
> 45, rue des Saints-Pères
> 75006 PARIS
> France
>
> tel: +33142863828
> mobile: +33662941034
> web: http://xtof.disque.math.cnrs.fr
> Hi All,
>
> The book "Implementing Reproducible Research" edited by V. Stodden, F.
> Leisch and R. D. Peng came out last month (I don't have a copy) and I
> just found out that you can get the chapters (in PDF) from the
> editors' site: https://osf.io/s9tya/
> I did not have enough time to go trhough all of it but org is
> mentioned a couple of times!
>
> Christophe

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



Re: [O] Tests do not work

2014-06-01 Thread Cecil Westerhof
2014-06-01 21:14 GMT+02:00 Bastien :

>
> Cecil Westerhof  writes:
>
> > I saw my version was outdated (8.2.1), so I upgraded to 8.2.6. Seems
> > to have gone OK, but when running:
> > make test
> > I get:
> > install -m 755 -d /tmp/tmp-orgtest
> > TMPDIR=/tmp/tmp-orgtest emacs -batch -Q --eval '(setq
> > vc-handled-backends nil)'  --eval '(add-to-list '"'"'load-path "./
> > lisp")' --eval '(add-to-list '"'"'load-path "./testing")'  -l
> > org-loaddefs.el -l testing/org-test.el --eval '(require '"'"'ob-awk)'
> > --eval '(require '"'"'ob-C)' --eval '(require '"'"'ob-fortran)'
> > --eval '(require '"'"'ob-maxima)' --eval '(require '"'"'ob-lilypond)'
> > --eval '(require '"'"'ob-octave)' --eval '(require '"'"'ob-python)'
> > --eval '(require '"'"'ob-sh)' --eval '(require '"'"'ob-perl)'  --eval
> > '(setq org-confirm-babel-evaluate nil)' -f org-test-run-batch-tests
> > Cannot open load file: testing/org-test.el
> > make: *** [test] Error 255
> >
> > ​What is going wrong here?
>
> What returns M-x org-version RET ?
>

​Org-mode version 8.2.6 (8.2.6-dist @ /usr/share/emacs/site-lisp/org/)​




> Perhaps run "make cleanall" before running "make test".
>

​Gives:
rm -fr /tmp/tmp-orgtest
rm -f
find . \( -name \*~ -o -name \*# -o -name .#\* \) -exec rm -f {} \;
find contrib testing mk \( -name \*~ -o -name \*.elc \) -exec rm -f {} \;
find: `testing': No such file or directory
make: [cleanall] Error 1 (ignored)


And ‘make test’ after this still gives:​
​install -m 755 -d /tmp/tmp-orgtest
TMPDIR=/tmp/tmp-orgtest emacs -batch -Q --eval '(setq vc-handled-backends
nil)'  --eval '(add-to-list '"'"'load-path "./lisp")' --eval '(add-to-list
'"'"'load-path "./testing")'  -l org-loaddefs.el -l testing/org-test.el
--eval '(require '"'"'ob-awk)' --eval '(require '"'"'ob-C)' --eval
'(require '"'"'ob-fortran)' --eval '(require '"'"'ob-maxima)' --eval
'(require '"'"'ob-lilypond)' --eval '(require '"'"'ob-octave)' --eval
'(require '"'"'ob-python)' --eval '(require '"'"'ob-sh)' --eval '(require
'"'"'ob-perl)'  --eval '(setq org-confirm-babel-evaluate nil)' -f
org-test-run-batch-tests
Cannot open load file: testing/org-test.el
make: *** [test] Error 255

-- 
Cecil Westerhof


Re: [O] Patch for testing `org-open-at-point'

2014-06-01 Thread Achim Gratz
York Zhao writes:
> Thank you very much for implementing this. Really appreciated. So do you think
> it is a good idea to add my test (the patch) now for testing this?

Shouldn't the test check that the desired target is actually reached?


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

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




Re: [O] latex markup in org?

2014-06-01 Thread John Kitchin
Maybe you can include the sty file as a code block that will be tangled
before export. You should put that block in a section tagged no-export.
Depending on your setup, you may need to make a code block to build your
latex file and/or pdf to make sure the tangling happens.

at the top keep this
#+LATEX_HEADER: \usepackage{filestyle}

and in the last section do this
* build :noexport:

#+begin_src text :tangle filestyle.sty
latex code for style
#+end_src

#+begin_src emacs-lisp
(org-babel-tangle)
(save-buffer)
(org-latex-export-to-pdf)
#+end_src

and finally put your cursor in the last block, and type C-c C-c. that
should do what you want.

John

---
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Sun, Jun 1, 2014 at 2:57 AM, Steven Arntson 
wrote:

> I've been learning to export from org to latex (to pdf), and have had
> great success. There's a simplification to the process I'd like to make,
> though, if it's possible.
>
> Right now I use files: file.org and filestyle.sty. The .sty gives
> the latex-specific instruction, and I point to it from file.org with a
> line of #+LATEX_HEADER: \usepackage{filestyle}. This works great, but
> I'd love to have just one file, not two, to keep things simple.
>
> So I tried putting the contents of filestyle.sty near the top of file.org
> inside of #+BEGIN_latex and #+END_latex, but it doesn't quite work. It
> incompletely works, which is perplexing...
>
> I'd appreciate any ideas about this--can it be done?
>
> Thank you!
> Steven
>
>
>


Re: [O] An org password manager

2014-06-01 Thread Bastien
Dear Jorge,

jorge.a.alf...@gmail.com (Jorge A. Alfaro-Murillo) writes:

> This is my first time submitting a patch, so I do not know if
> this is the way I am supposed to do it.

Yes, the commit message looks good. 

Can you resent the patch as an attachment?

Simply create a dedicated branch from master, check this branch out,
commit your change, then do git format-patch master to get the patch
in the proper .patch format that you can attach.

Thanks in advance,

-- 
 Bastien



Re: [O] Tests do not work

2014-06-01 Thread Bastien
Hi Cecil,

Cecil Westerhof  writes:

> I saw my version was outdated (8.2.1), so I upgraded to 8.2.6. Seems
> to have gone OK, but when running:
>     make test
> I get:
> install -m 755 -d /tmp/tmp-orgtest
> TMPDIR=/tmp/tmp-orgtest emacs -batch -Q --eval '(setq
> vc-handled-backends nil)'  --eval '(add-to-list '"'"'load-path "./
> lisp")' --eval '(add-to-list '"'"'load-path "./testing")'  -l
> org-loaddefs.el -l testing/org-test.el --eval '(require '"'"'ob-awk)'
> --eval '(require '"'"'ob-C)' --eval '(require '"'"'ob-fortran)'
> --eval '(require '"'"'ob-maxima)' --eval '(require '"'"'ob-lilypond)'
> --eval '(require '"'"'ob-octave)' --eval '(require '"'"'ob-python)'
> --eval '(require '"'"'ob-sh)' --eval '(require '"'"'ob-perl)'  --eval
> '(setq org-confirm-babel-evaluate nil)' -f org-test-run-batch-tests
> Cannot open load file: testing/org-test.el
> make: *** [test] Error 255
>
> ​What is going wrong here?

What returns M-x org-version RET ?

Perhaps run "make cleanall" before running "make test".

-- 
 Bastien



Re: [O] [bug] f36b19eef6 uses font-lock-ensure, which is only implemented in emacs-trunk

2014-06-01 Thread Bastien
Achim Gratz  writes:

> Done in e6883dd03d.

Thanks!

-- 
 Bastien



Re: [O] Difference between two rows

2014-06-01 Thread Thierry Banel
Le 01/06/2014 13:38, Cecil Westerhof a écrit :
> I like to calculate in a table the difference between the value in a
> field in the current row and the previous field. How would I do that?
>
> Something like:
> |---+|
> | value | difference |
> |---+|
> |12 ||
> |15 |  3 |
> |83 | 68 |
> |87 |  4 |
> |85 | -2 |
> |---+|
>
>
> -- 
> Cecil Westerhof
|   | value | difference |
|---+---+|
|   |12 ||
| # |15 |  3 |
| # |83 | 68 |
| # |87 |  4 |
| # |85 | -2 |
|---+---+|
#+TBLFM: $3=$2-@-1$2

The first row does not have a #, and therefore it is not computed.

--
Thierry





Re: [O] [bug] f36b19eef6 uses font-lock-ensure, which is only implemented in emacs-trunk

2014-06-01 Thread Achim Gratz
Bastien writes:
> I expected the compatibility alias to be available from Emacs trunk,
> but I should have checked.  I don't have time to fix time right now,
> so if you can add it to org-compat.el, please go ahead.  Otherwise I
> will look at this later on.

Done in e6883dd03d.

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

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] Export to iCalendar only not DONE, scheduled tasks?

2014-06-01 Thread Chris Poole
On Wed, May 14, 2014 at 11:31 PM, Arun Persaud  wrote:
>
> had another look and org-export-filter-final-output-functions is the
> wrong function to use. ...
>

So, I ended up solving my problem, via an alternative route. The code is
here:

https://github.com/chrispoole643/org-gtd/blob/dcfe7122fa496de51a8de3a8f02184bc7aec05b9/org-gtd.el#L143

Essentially, the icalendar function that combines the agendas and exports
stuff just calls a function that happens to accept a restricted list of
items to export. So, I use this function directly, but first I look through
my agenda files and mark where the scheduled tasks are. I then pass these
as the restricted list, and all works well :)

Thanks for the help,
Chris


Re: [O] #+INCLUDE: myfile.html html does not include /literally/; Org processes

2014-06-01 Thread Achim Gratz
Nicolas Goaziou writes:
> However, note that "wrap" is confusing because it sounds like Babel's
> keyword and yet does something different.

I'm not wedded to the name, maybe "export" has a nicer ring to it (but
that#s also been used differently in Babel, just like almost anything
else you#d be able to come up with).

>> And since I think the list of NAMES that fit this description and is
>> known in advance (by org syntax) ...
>
> Unfortunately, that assumption is slightly wrong. Export blocks are
> defined by export back-ends. If the export back-end is not loaded, the
> block is a special block.

What I'm talking about is the list of blocks that never can be export
blocks (CENTER, QUOTE, SRC, COMMENT, EXAMPLE, VERSE).  These can be
flagged as errors, anything else is the responsibility of the user.


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

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra




Re: [O] Difference between two rows

2014-06-01 Thread Cecil Westerhof
2014-06-01 15:18 GMT+02:00 Michael Brand :

> Hi Cecil
>
> On Sun, Jun 1, 2014 at 2:24 PM, Cecil Westerhof 
> wrote:
> > But what if I would want to know the
> > difference between the previous filled one, divided by the distance?
> >
> > For example:
> > |---+|
> > | value | difference |
> > |---+|
> > |12 ||
> > |15 |  3 |
> > |   ||
> > |83 | 34 |
> > |   ||
> > |   ||
> > |   ||
> > |87 |  1 |
> > |   ||
> > |   ||
> > |   ||
> > |85 |   -0.5 |
> > |   ||
> > |---+|
>
> More as a demonstration of what Calc can do, divided up into some
> intermediate steps:
>
> |---+-|
> | value | difference  |
> |---+-|
> |12 | |
> |15 | [15, 12]|
> |   | |
> |83 | [83, nan, 15, 12]   |
> |   | |
> |   | |
> |   | |
> |87 | [87, nan, nan, nan, 83, nan, 15, 12]|
> |   | |
> |   | |
> |   | |
> |85 | [85, nan, nan, nan, 87, nan, nan, nan, 83, nan, 15, 12] |
> |   | |
> |---+-|
> #+TBLFM: $2 = if(vlen(@-I$1..@0$1) == 1 || "$1" == "nan", string(""),
> rev(@-I$1..@0$1)); E
>
> |---+|
> | value | difference |
> |---+|
> |12 ||
> |15 | [0, 0] |
> |   ||
> |83 | [0, nan, 0, 0] |
> |   ||
> |   ||
> |   ||
> |87 | [0, nan, nan, nan, 0, nan, 0, 0]   |
> |   ||
> |   ||
> |   ||
> |85 | [0, nan, nan, nan, 0, nan, nan, nan, 0, nan, 0, 0] |
> |   ||
> |---+|
> #+TBLFM: $2 = if(vlen(@-I$1..@0$1) == 1 || "$1" == "nan", string(""),
> 0 * rev(@-I$1..@0$1)); E
>
> Distance to previous element:
>
> |---+|
> | value | difference |
> |---+|
> |12 ||
> |15 |  1 |
> |   ||
> |83 |  2 |
> |   ||
> |   ||
> |   ||
> |87 |  4 |
> |   ||
> |   ||
> |   ||
> |85 |  4 |
> |   ||
> |---+|
> #+TBLFM: $2 = if(vlen(@-I$1..@0$1) == 1 || "$1" == "nan", string(""),
> find(0 * rev(@-I$1..@0$1), 0, 2) - 1); E
>
> Previous element:
>
> |---+|
> | value | difference |
> |---+|
> |12 ||
> |15 | 12 |
> |   ||
> |83 | 15 |
> |   ||
> |   ||
> |   ||
> |87 | 83 |
> |   ||
> |   ||
> |   ||
> |85 | 87 |
> |   ||
> |---+|
> #+TBLFM: $2 = if(vlen(@-I$1..@0$1) == 1 || "$1" == "nan", string(""),
> subscr(rev(@-I$1..@0$1), find(0 * rev(@-I$1..@0$1), 0, 2)); E
>
> Combined:
>
> |---+|
> | value | difference |
> |---+|
> |12 ||
> |15 |  3 |
> |   ||
> |83 | 34 |
> |   ||
> |   ||
> |   ||
> |87 |  1 |
> |   ||
> |   ||
> |   ||
> |85 |   -0.5 |
> |   ||
> |---+|
> #+TBLFM: $2 = if(vlen(@-I$1..@0$1) == 1 || "$1" == "nan", string(""),
> ($1 - subscr(rev(@-I$1..@0$

[O] Tests do not work

2014-06-01 Thread Cecil Westerhof
I saw my version was outdated (8.2.1), so I upgraded to 8.2.6. Seems to
have gone OK, but when running:
make test
I get:
install -m 755 -d /tmp/tmp-orgtest
TMPDIR=/tmp/tmp-orgtest emacs -batch -Q --eval '(setq vc-handled-backends
nil)'  --eval '(add-to-list '"'"'load-path "./lisp")' --eval '(add-to-list
'"'"'load-path "./testing")'  -l org-loaddefs.el -l testing/org-test.el
--eval '(require '"'"'ob-awk)' --eval '(require '"'"'ob-C)' --eval
'(require '"'"'ob-fortran)' --eval '(require '"'"'ob-maxima)' --eval
'(require '"'"'ob-lilypond)' --eval '(require '"'"'ob-octave)' --eval
'(require '"'"'ob-python)' --eval '(require '"'"'ob-sh)' --eval '(require
'"'"'ob-perl)'  --eval '(setq org-confirm-babel-evaluate nil)' -f
org-test-run-batch-tests
Cannot open load file: testing/org-test.el
make: *** [test] Error 255

​What is going wrong here?
​

-- 
Cecil Westerhof


Re: [O] #+INCLUDE: myfile.html html does not include /literally/; Org processes

2014-06-01 Thread Nicolas Goaziou
Achim Gratz  writes:

> I'm still not getting your argument or I misunderstand what you're
> trying to say.  Using "wrap" should produce an export block and nothing
> else.  So as long as there can be no export block named "center", the
> INCLUDE above would simply raise a user-error (yes, that check isn't in
> the quick&dirty patch I posted).

I thought you wanted to be able to wrap the contents within any block.
If you limit it to export blocks, then we're suggesting the same idea.
However, note that "wrap" is confusing because it sounds like Babel's
keyword and yet does something different.

> And since I think the list of NAMES that fit this description and is
> known in advance (by org syntax) ...

Unfortunately, that assumption is slightly wrong. Export blocks are
defined by export back-ends. If the export back-end is not loaded, the
block is a special block. This is not great, but in practice, it doesn't
matter much as we can safely assume all used back-ends are required
already at the time of export. The only export block we know for sure is
the one defined in the current back-end, hence my initial proposal.

Of course, it is still possible to raise a user-error (e.g., "unknown
export block") in front of anything unknown at the time of export.


Regards,

-- 
Nicolas Goaziou



Re: [O] Escaping again!

2014-06-01 Thread Nicolas Goaziou
Hello,

Gregor Zattler  writes:

> I'd like to be able to use a mix of "-" or "+" in list items as to
> indicate positive respective negative aspects of something:
>
> * should org-mode support a mix of "+" and "-" as the first char in plain 
> lists? 
>   + would be a great to indicate positive and negative aspects of
> something
>   - difficult to implement

This was suggested a couple of years ago, and rejected. This would be
confusing. For example, it would not be always possible to "fix" mixed
bullets if mixing was not intended.

You can use two lists to separate positive and negative aspects of
something. IMO, this is also clearer.

Note that this is orthogonal to the issue at hand, so it belongs to
another thread.


Regards,

-- 
Nicolas Goaziou



Re: [O] Difference between two rows

2014-06-01 Thread Michael Brand
Hi Cecil

On Sun, Jun 1, 2014 at 2:24 PM, Cecil Westerhof  wrote:
> But what if I would want to know the
> difference between the previous filled one, divided by the distance?
>
> For example:
> |---+|
> | value | difference |
> |---+|
> |12 ||
> |15 |  3 |
> |   ||
> |83 | 34 |
> |   ||
> |   ||
> |   ||
> |87 |  1 |
> |   ||
> |   ||
> |   ||
> |85 |   -0.5 |
> |   ||
> |---+|

More as a demonstration of what Calc can do, divided up into some
intermediate steps:

|---+-|
| value | difference  |
|---+-|
|12 | |
|15 | [15, 12]|
|   | |
|83 | [83, nan, 15, 12]   |
|   | |
|   | |
|   | |
|87 | [87, nan, nan, nan, 83, nan, 15, 12]|
|   | |
|   | |
|   | |
|85 | [85, nan, nan, nan, 87, nan, nan, nan, 83, nan, 15, 12] |
|   | |
|---+-|
#+TBLFM: $2 = if(vlen(@-I$1..@0$1) == 1 || "$1" == "nan", string(""),
rev(@-I$1..@0$1)); E

|---+|
| value | difference |
|---+|
|12 ||
|15 | [0, 0] |
|   ||
|83 | [0, nan, 0, 0] |
|   ||
|   ||
|   ||
|87 | [0, nan, nan, nan, 0, nan, 0, 0]   |
|   ||
|   ||
|   ||
|85 | [0, nan, nan, nan, 0, nan, nan, nan, 0, nan, 0, 0] |
|   ||
|---+|
#+TBLFM: $2 = if(vlen(@-I$1..@0$1) == 1 || "$1" == "nan", string(""),
0 * rev(@-I$1..@0$1)); E

Distance to previous element:

|---+|
| value | difference |
|---+|
|12 ||
|15 |  1 |
|   ||
|83 |  2 |
|   ||
|   ||
|   ||
|87 |  4 |
|   ||
|   ||
|   ||
|85 |  4 |
|   ||
|---+|
#+TBLFM: $2 = if(vlen(@-I$1..@0$1) == 1 || "$1" == "nan", string(""),
find(0 * rev(@-I$1..@0$1), 0, 2) - 1); E

Previous element:

|---+|
| value | difference |
|---+|
|12 ||
|15 | 12 |
|   ||
|83 | 15 |
|   ||
|   ||
|   ||
|87 | 83 |
|   ||
|   ||
|   ||
|85 | 87 |
|   ||
|---+|
#+TBLFM: $2 = if(vlen(@-I$1..@0$1) == 1 || "$1" == "nan", string(""),
subscr(rev(@-I$1..@0$1), find(0 * rev(@-I$1..@0$1), 0, 2)); E

Combined:

|---+|
| value | difference |
|---+|
|12 ||
|15 |  3 |
|   ||
|83 | 34 |
|   ||
|   ||
|   ||
|87 |  1 |
|   ||
|   ||
|   ||
|85 |   -0.5 |
|   ||
|---+|
#+TBLFM: $2 = if(vlen(@-I$1..@0$1) == 1 || "$1" == "nan", string(""),
($1 - subscr(rev(@-I$1..@0$1), find(0 * rev(@-I$1..@0$1), 0, 2))) /
(find(0 * rev(@-I$1..@0$1), 0, 2) - 1)); E

For many here on the list it would probably be easier and more
interesting to write a TBLFM in Lisp.

Michael



Re: [O] #+INCLUDE: myfile.html html does not include /literally/; Org processes

2014-06-01 Thread Achim Gratz
Nicolas Goaziou writes:
> As explained in this thread, it is not necessary to support:
>
>   #+INCLUDE: "file.ext" wrap center

I'm still not getting your argument or I misunderstand what you're
trying to say.  Using "wrap" should produce an export block and nothing
else.  So as long as there can be no export block named "center", the
INCLUDE above would simply raise a user-error (yes, that check isn't in
the quick&dirty patch I posted).  And since I think the list of NAMES
that fit this description and is known in advance (by org syntax) and
short, that check is cheap.


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

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves




Re: [O] Escaping again!

2014-06-01 Thread Gregor Zattler
Hi Bastien,
* Bastien  [30. May. 2014]:
[...]
> For now description lists accept both "-" and "+".  I'm all for
> allowing only "-" so that we could use 
[...]
> in your example.
> 
> What do you and others think?

I'd like to be able to use a mix of "-" or "+" in list items as to
indicate positive respective negative aspects of something:

* should org-mode support a mix of "+" and "-" as the first char in plain 
lists? 
  + would be a great to indicate positive and negative aspects of
something
  - difficult to implement


Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-



Re: [O] Difference between two rows

2014-06-01 Thread Cecil Westerhof
2014-06-01 13:57 GMT+02:00 Michael Brand :

> On Sun, Jun 1, 2014 at 1:38 PM, Cecil Westerhof 
> wrote:
> > I like to calculate in a table the difference between the value in a
> field
> > in the current row and the previous field. How would I do that?
> >
> > Something like:
> > |---+|
> > | value | difference |
> > |---+|
> > |12 ||
> > |15 |  3 |
> > |83 | 68 |
> > |87 |  4 |
> > |85 | -2 |
> > |---+|
>
> For such cases I prefer vlen():
>
> #+TBLFM: $2 = if(vlen(@II..@0) == 1, string(""), $1 - @-1$1); E
>

​Combining it with your previous help I now have (not every field will be
filled, and the table is a little different):
#+TBLFM: @-I$4..@+I$4 = if("$3" == "nan", string(""), $3 - $2) ; E f-1 ::
@-I$5..@+I$5 = if(vlen(@II..@0) == 1 || "$3" == "nan", string(""), $3 -
@-1$3); E f-1​


​At the moment this is good enough. But what if I would want to know the
difference between the previous filled one, divided by the ​distance?

For example:
|---+|
| value | difference |
|---+|
|12 ||
|15 |  3 |
|   ||
|83 | 34 |
|   ||
|   ||
|   ||
|87 |  1 |
|   ||
|   ||
|   ||
|85 |   -0.5 |
|   ||
|---+|

-- 
Cecil Westerhof


Re: [O] Difference between two rows

2014-06-01 Thread Michael Brand
Hi Cecil

On Sun, Jun 1, 2014 at 1:38 PM, Cecil Westerhof  wrote:
> I like to calculate in a table the difference between the value in a field
> in the current row and the previous field. How would I do that?
>
> Something like:
> |---+|
> | value | difference |
> |---+|
> |12 ||
> |15 |  3 |
> |83 | 68 |
> |87 |  4 |
> |85 | -2 |
> |---+|

For such cases I prefer vlen():

#+TBLFM: $2 = if(vlen(@II..@0) == 1, string(""), $1 - @-1$1); E

Michael



[O] Difference between two rows

2014-06-01 Thread Cecil Westerhof
I like to calculate in a table the difference between the value in a field
in the current row and the previous field. How would I do that?

Something like:
|---+|
| value | difference |
|---+|
|12 ||
|15 |  3 |
|83 | 68 |
|87 |  4 |
|85 | -2 |
|---+|


-- 
Cecil Westerhof


Re: [O] Check on empty does not work

2014-06-01 Thread Cecil Westerhof
2014-06-01 12:58 GMT+02:00 Michael Brand :

> On Sun, Jun 1, 2014 at 12:00 PM, Cecil Westerhof 
> wrote:
> > 2014-06-01 11:50 GMT+02:00 Cecil Westerhof :
> >> I am trying the following:
> >> #+TBLFM: @-I$4..@+I$4 = if("$3" == "nan", string(""), $3 - $2) ;
> %.1f
> >> and:
> >> #+TBLFM: @-I$4..@+I$4 = if("$3" == "", string(""), $3 - $2) ; %.1f
> >>
> >> But in both case the fourth field is filled when the third field is
> empty.
> >> What am I doing wrong?
> >>
> >> I am using version 8.2.1.
> >
> > The following does work:
> > #+TBLFM: @-I$4..@+I$4 = if($3 - $2 == -$2, string(""), $3 - $2) ;
> >
> > But is not what is described.
> >
> > I removed
> > %.1f
> > because that displays an empty string as 0.0.
> >
> > Is it possible to use %.1f without making an empty field displayed as
> 0.0?
>
> I suggest that I will improve the TBLFM example about "nan" in the
> manual like this:
>
> `if("$1" == "nan" || "$2" == "nan", string(""), $1 + $2); E f-1'
>  Sum of the first two columns.  When at least one of the input
>  fields is empty the Org table result field is set to empty.  `E'
>  is required to leave empty fields without conversion to 0.  `f-1'
>  is an optional Calc format string similar to `%.1f' but leaves
>  empty results empty.
>
> Would this have answered all your questions?
>

​That does what I want. Thanks.

-- 
Cecil Westerhof


Re: [O] #+INCLUDE: myfile.html html does not include /literally/; Org processes

2014-06-01 Thread Nicolas Goaziou
Achim Gratz  writes:

> Nicolas Goaziou writes:
>> I didn't like the "wrap" parameter because it mixes parsed blocks (e.g.,
>> wrap quote) and raw blocks (e.g., wrap html). It is important to know if
>> the parser should parse the contents of the file or not. Therefore, the
>> new syntax, if any, should make it clear. In the current problem, we
>> mustn't parse the contents of the file.
>
> That's the only problem?  Aside from "quote" not being an export
> backend, I'm afraid I don't really see the difference between
>
> #+INCLUDE: "file.ext" src  results: 
>
> and
>
> #+INCLUDE: "file.ext" wrap 

As explained in this thread, it is not necessary to support:

  #+INCLUDE: "file.ext" wrap center

> in this case.  We can always check if  maps to a valid export
> block and drop back to quoting the whole thing like we do with "src" if
> not.

The "check" part is useless if we assume that any "wrap", "export",
"raw" or whatever parameter implies that the contents of the file are
specific to an export back-end.


Regards,

-- 
Nicolas Goaziou



Re: [O] #+INCLUDE: myfile.html html does not include /literally/; Org processes

2014-06-01 Thread Nicolas Goaziou
Hello,

Omid  writes:

> I think #+INCLUDE: should be just that: Include whatever the user is
> asking to. No header arguments dumps the file in Org (as it does now),
> subject to the usual processing, and a header argument like html wraps
> it in the appropriate delimiter, subject to processing according to
> that delimiter.

We don't need support for arbitrary blocks in keywords INCLUDE. Using
actual blocks will work just fine:

  #+BEGIN_QUOTE
  #+INCLUDE: "file.org"
  #+END_QUOTE

This is very regular: no need for redundancy in these cases.

Though, it cannot work for verbatim blocks[1] for obvious reasons.
That's why INCLUDE syntax provides parameters for both "example" and
"src" blocks. At the moment, there's no support for export blocks. We
just need to add that.


Regards,

[1] And verse blocks, but I'd rather put it aside for now.

-- 
Nicolas Goaziou



Re: [O] Hiding checked items in a checkbox list (FR?)

2014-06-01 Thread Alexis

Sergio Pokrovskij writes:

> Yes (actually I have about 80 items in my Springpad list; if the full
> list consists of mere 10 items, it fits the screen of my smartphone,
> and there is no real need to hide the checked items).

*nod* Fair enough; i was just making up some numbers in order to be
concrete.

>   Al> 2. Initially mark all of them as 'unneeded' by checking all
>   Al> items with a single command.
>
> Possibly so.  Actually all the performed items get checked as I buy
> them, and those which for some reason I could not buy should preserve
> their open (unchecked, unimplemented) status.  So normally I need not
> perform this step (provided that what I have checked at the store gets
> synchronized back to the Big Brother); but in some infrequent cases it
> is nice to have such a command (though I guess it can be easily done
> with an M-% in emacs).

*nod*

>   Al> 3. Uncheck (say) 3 items that are 'needed'.
>   Al> 4. Run org-mobile-push.
>
> Do I have to do it manually every time (more than once)?  Aren't such
> files synchronized automatically?

It depends on how you've set up MobileOrg. i sync via ssh, and thus sync
manually via org-mobile-push and org-mobile-pull from within Emacs. If
you use e.g. Dropbox, things might be different - i can't comment on
that.

>   Al> 5. MobileOrg displays only the 3 'needed' items; the other 7
>   Al> checked (i.e. unneeded) items are hidden.
>
> Yes (in fact, normally there are more of them, a dozen at least).

See above - at this stage, for the purposes of understanding the core of
the flow you're wanting, the exact numbers don't matter so much. But in
terms of potential UI access to such flows, i'll certainly keep in mind
that lists might include many dozens of items.

>   Al> 6. As items are purchased and checked off the list, they can
>   Al>either:
>   Al>(a) remain visible; or
>   Al>(b) become hidden upon being checked.
>
>   Al> Is that correct?
>
> Yes.  Normally (b) is sufficient for me, because normally I have just
> a screenful of interesting items.  But I can imagine that people who
> need longer shopping lists (more that one screen of them) would prefer
> to have a MobileOrg command to hide the newly-checked items as well.

*nod* Fair enough. i'll check the MobileOrg issues page:

https://github.com/matburt/mobileorg-android/issues

for any equivalent and/or similar proposals, and submit a new issue if
there aren't any. Either way, i'll see what i can do about adding this
functionality. :-) Note, though, that i'm not the lead developer, so i
don't have any control over if/when any such functionality will be (a)
included in the master branch and (b) included in a release.


Alexis.



Re: [O] Check on empty does not work

2014-06-01 Thread Michael Brand
Hi Cecil

On Sun, Jun 1, 2014 at 12:00 PM, Cecil Westerhof  wrote:
> 2014-06-01 11:50 GMT+02:00 Cecil Westerhof :
>> I am trying the following:
>> #+TBLFM: @-I$4..@+I$4 = if("$3" == "nan", string(""), $3 - $2) ; %.1f
>> and:
>> #+TBLFM: @-I$4..@+I$4 = if("$3" == "", string(""), $3 - $2) ; %.1f
>>
>> But in both case the fourth field is filled when the third field is empty.
>> What am I doing wrong?
>>
>> I am using version 8.2.1.
>
> The following does work:
> #+TBLFM: @-I$4..@+I$4 = if($3 - $2 == -$2, string(""), $3 - $2) ;
>
> But is not what is described.
>
> I removed
> %.1f
> because that displays an empty string as 0.0.
>
> Is it possible to use %.1f without making an empty field displayed as 0.0?

I suggest that I will improve the TBLFM example about "nan" in the
manual like this:

`if("$1" == "nan" || "$2" == "nan", string(""), $1 + $2); E f-1'
 Sum of the first two columns.  When at least one of the input
 fields is empty the Org table result field is set to empty.  `E'
 is required to leave empty fields without conversion to 0.  `f-1'
 is an optional Calc format string similar to `%.1f' but leaves
 empty results empty.

Would this have answered all your questions?

Michael



Re: [O] Hiding checked items in a checkbox list (FR?)

2014-06-01 Thread Sergio Pokrovskij
> "Al" == Alexis  wrote:

  Al> Sergio Pokrovskij writes:

  >> The next problem is that MobileOrg should respect the preliminary
  >> hiding done before the visit to the shop.  I do not request that it
  >> hide the checked (= bought) items as well (actually I'd prefer it to
  >> leave them checked and visible; but also its hiding-on-the-fly is
  >> quite acceptable).

  Al> Sorry, but i'm not sure i follow. Do you mean something like
  Al> the following example workflow?

  Al> 1. Have list of (say) 10 grocery items in org-mode.

Yes (actually I have about 80 items in my Springpad list; if the
full list consists of mere 10 items, it fits the screen of my
smartphone, and there is no real need to hide the checked items).

  Al> 2. Initially mark all of them as 'unneeded' by checking all
  Al> items with a single command.

Possibly so.  Actually all the performed items get checked as I
buy them, and those which for some reason I could not buy should
preserve their open (unchecked, unimplemented) status.  So
normally I need not perform this step (provided that what I have
checked at the store gets synchronized back to the Big Brother);
but in some infrequent cases it is nice to have such a command
(though I guess it can be easily done with an M-% in emacs).

  Al> 3. Uncheck (say) 3 items that are 'needed'.
  Al> 4. Run org-mobile-push.

Do I have to do it manually every time (more than once)?  Aren't
such files synchronized automatically?

  Al> 5. MobileOrg displays only the 3 'needed' items; the other 7
  Al> checked (i.e. unneeded) items are hidden.

Yes (in fact, normally there are more of them, a dozen at least).

  Al> 6. As items are purchased and checked off the list, they can
  Al>either:
  Al>(a) remain visible; or
  Al>(b) become hidden upon being checked.

  Al> Is that correct?

Yes.  Normally (b) is sufficient for me, because normally I have
just a screenful of interesting items.  But I can imagine that
people who need longer shopping lists (more that one screen of
them) would prefer to have a MobileOrg command to hide the
newly-checked items as well.

-- 
Sergio




Re: [O] #+INCLUDE: myfile.html html does not include /literally/; Org processes

2014-06-01 Thread Achim Gratz
Nicolas Goaziou writes:
> I didn't like the "wrap" parameter because it mixes parsed blocks (e.g.,
> wrap quote) and raw blocks (e.g., wrap html). It is important to know if
> the parser should parse the contents of the file or not. Therefore, the
> new syntax, if any, should make it clear. In the current problem, we
> mustn't parse the contents of the file.

That's the only problem?  Aside from "quote" not being an export
backend, I'm afraid I don't really see the difference between

#+INCLUDE: "file.ext" src  results: 

and

#+INCLUDE: "file.ext" wrap 

in this case.  We can always check if  maps to a valid export
block and drop back to quoting the whole thing like we do with "src" if
not.


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

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




Re: [O] #+INCLUDE: myfile.html html does not include /literally/; Org processes

2014-06-01 Thread Omid
Thank you for the patch, Achim.

On 06/01/2014 05:26 AM, Achim Gratz wrote:
> Nicolas Goaziou writes:
>> Thanks for the patch. However, I'd rather not allow arbitrary blocks
>> around included files, as it can be the source of some headache (e.g.,
>> a quote block around an Org file containing a headline). Also we don't
>> really need it since most use-cases are already supported.
> 
> Fair enough.  FWIW, I'm pretty sure the problem of the OP can also be
> solved with Babel, perhaps even with an inline function, but I haven't
> yet tried and it's likely to be quite a bit less intuitive than using
> INCLUDE.
> 
>> Actually, I think there are two possible ways to handle this:
>>
>>   1. Add a new "export" (or something else) parameter which will wrap
>>  file contents within an export block relative to the current
>>  back-end. Unfortunately, this will not work for exotic back-ends
>>  that do not provide such a block (:export-block property in its
>>  definition). We can always fallback to an example block in this
>>  case, though.
> 
> Please not.
> 
>>   2. Extend "src" syntax to allow Babel parameters after the language.
>>  E.g.,
>>
>>#+INCLUDE: "file.html" src html :results html
> 
> That looks better, but still isn't quite self-explanatory.  What
> happens if I write
> 
> #+INCLUDE: "file.html" src html :results elisp
> 
> for instance?  That would still wrap the include file with an almost
> arbitrary block, no?  I don't think you can check that the file to be
> included fulfills all the requirements of being included at that point
> anyway.  Here are two more options with different degrees of iffyness:
> 
> #+INCLUDE_HTML: "file.html"
> 
> #+BEGIN_HTML
> <<"file.html">>
> #+END_HTML
> 
I think #+INCLUDE: should be just that: Include whatever the user is
asking to. No header arguments dumps the file in Org (as it does now),
subject to the usual processing, and a header argument like html wraps
it in the appropriate delimiter, subject to processing according to
that delimiter. I is up to the user to make sure the included content
doesn't break things or lead to unexpected behavior. This
functionality will be an extension of C's #include (the extension
being the addition of delimiters around the included content if the
user asks that) and in that sense I think it would be most
appropriate.
> 
> Regards,
> Achim.
> 

Regards,

Omid

Sent from my Emacs



Re: [O] Check on empty does not work

2014-06-01 Thread Cecil Westerhof
2014-06-01 11:50 GMT+02:00 Cecil Westerhof :

> I am trying the following:
> #+TBLFM: @-I$4..@+I$4 = if("$3" == "nan", string(""), $3 - $2) ; %.1f
> and:
> #+TBLFM: @-I$4..@+I$4 = if("$3" == "", string(""), $3 - $2) ; %.1f
>
> But in both case the fourth field is filled when the third field is empty.
> What am I doing wrong?
>
> I am using version 8.2.1.
>

​The following does work:
#+TBLFM: @-I$4..@+I$4 = if($3 - $2 == -$2, string(""), $3 - $2) ;

But is not what is described.

I removed
%.1f
because that displays an empty string as 0.0.

Is it possible to use %.1f without making an empty field displayed as 0.0?

-- 
Cecil Westerhof


Re: [O] #+INCLUDE: myfile.html html does not include /literally/; Org processes

2014-06-01 Thread Nicolas Goaziou
Achim Gratz  writes:

> Nicolas Goaziou writes:

>> Actually, I think there are two possible ways to handle this:
>>
>>   1. Add a new "export" (or something else) parameter which will wrap
>>  file contents within an export block relative to the current
>>  back-end. Unfortunately, this will not work for exotic back-ends
>>  that do not provide such a block (:export-block property in its
>>  definition). We can always fallback to an example block in this
>>  case, though.
>
> Please not.

Why?

>>   2. Extend "src" syntax to allow Babel parameters after the language.
>>  E.g.,
>>
>>#+INCLUDE: "file.html" src html :results html
>
> That looks better, but still isn't quite self-explanatory.  What
> happens if I write
>
> #+INCLUDE: "file.html" src html :results elisp
>
> for instance?

The same as if you write

  #+INCLUDE: "file.html" src html

but with an additional :results elisp Babel parameter, whatever it may
mean.

> That would still wrap the include file with an almost arbitrary block,
> no?

> I don't think you can check that the file to be included fulfills
> all the requirements of being included at that point anyway.

We don't need to.

I didn't like the "wrap" parameter because it mixes parsed blocks (e.g.,
wrap quote) and raw blocks (e.g., wrap html). It is important to know if
the parser should parse the contents of the file or not. Therefore, the
new syntax, if any, should make it clear. In the current problem, we
mustn't parse the contents of the file.

> Here are two more options with different degrees of iffyness:
>
> #+INCLUDE_HTML: "file.html"

This would extend Org syntax, by a large part. This is not necessary for
the problem at hand.

> #+BEGIN_HTML
> <<"file.html">>
> #+END_HTML

Again, I don't want to extend Org syntax, or only by a tiny part, hence
the two proposals above.


Regards,

-- 
Nicolas Goaziou



[O] Check on empty does not work

2014-06-01 Thread Cecil Westerhof
I am trying the following:
#+TBLFM: @-I$4..@+I$4 = if("$3" == "nan", string(""), $3 - $2) ; %.1f
and:
#+TBLFM: @-I$4..@+I$4 = if("$3" == "", string(""), $3 - $2) ; %.1f

But in both case the fourth field is filled when the third field is empty.
What am I doing wrong?

I am using version 8.2.1.

-- 
Cecil Westerhof


Re: [O] #+INCLUDE: myfile.html html does not include /literally/; Org processes

2014-06-01 Thread Achim Gratz
Nicolas Goaziou writes:
> Thanks for the patch. However, I'd rather not allow arbitrary blocks
> around included files, as it can be the source of some headache (e.g.,
> a quote block around an Org file containing a headline). Also we don't
> really need it since most use-cases are already supported.

Fair enough.  FWIW, I'm pretty sure the problem of the OP can also be
solved with Babel, perhaps even with an inline function, but I haven't
yet tried and it's likely to be quite a bit less intuitive than using
INCLUDE.

> Actually, I think there are two possible ways to handle this:
>
>   1. Add a new "export" (or something else) parameter which will wrap
>  file contents within an export block relative to the current
>  back-end. Unfortunately, this will not work for exotic back-ends
>  that do not provide such a block (:export-block property in its
>  definition). We can always fallback to an example block in this
>  case, though.

Please not.

>   2. Extend "src" syntax to allow Babel parameters after the language.
>  E.g.,
>
>#+INCLUDE: "file.html" src html :results html

That looks better, but still isn't quite self-explanatory.  What
happens if I write

#+INCLUDE: "file.html" src html :results elisp

for instance?  That would still wrap the include file with an almost
arbitrary block, no?  I don't think you can check that the file to be
included fulfills all the requirements of being included at that point
anyway.  Here are two more options with different degrees of iffyness:

#+INCLUDE_HTML: "file.html"

#+BEGIN_HTML
<<"file.html">>
#+END_HTML


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] latex markup in org?

2014-06-01 Thread Glyn Millington
Steven Arntson  writes:

> I've been learning to export from org to latex (to pdf), and have had
> great success. There's a simplification to the process I'd like to make,
> though, if it's possible.
>
> Right now I use files: file.org and filestyle.sty. The .sty gives
> the latex-specific instruction, and I point to it from file.org with a
> line of #+LATEX_HEADER: \usepackage{filestyle}. This works great, but
> I'd love to have just one file, not two, to keep things simple.
>
> So I tried putting the contents of filestyle.sty near the top of file.org
> inside of #+BEGIN_latex and #+END_latex, but it doesn't quite work. It
> incompletely works, which is perplexing...
>
> I'd appreciate any ideas about this--can it be done?

I'm sure it can, but not that way!

As I understand it, blocks like this 

#+BEGIN_LaTeX
\marginpar{\color{red} \tiny \raggedright
\vspace{18pt}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat.}
#+END_LaTeX

work where they are and not file-wide.

For file-wide instructions you need to put 'em in 

#+LATEX_HEADER lines.

Exactly how to do that will depend on the precise contents of
filestyle.sty.

atb



Glyn




Re: [O] Patch for testing `org-open-at-point'

2014-06-01 Thread Bastien
Hi York,

York Zhao  writes:

> Thank you very much for implementing this. Really appreciated. So do you think
> it is a good idea to add my test (the patch) now for testing this?

Yes.

> For your convenience, I've attached again in this message the same patch I had
> sent on April 10.

Installed, thanks,

-- 
 Bastien



Re: [O] Moving footnotes

2014-06-01 Thread Bastien
Hi Nicolas,

Nicolas Goaziou  writes:

> Done. Though, I changed `org-footnote-action' instead of
> `org-footnote-new', since the latter should, IMO, return an error when
> called from a point where no footnote is allowed.

Right, thanks,

-- 
 Bastien



Re: [O] [bug] f36b19eef6 uses font-lock-ensure, which is only implemented in emacs-trunk

2014-06-01 Thread Bastien
Achim Gratz  writes:

> This needs a compatibility alias,
> function or macro since the behaviour of font-lock-fontify-buffer has
> been changed to interactive-only.

I expected the compatibility alias to be available from Emacs trunk,
but I should have checked.  I don't have time to fix time right now,
so if you can add it to org-compat.el, please go ahead.  Otherwise I
will look at this later on.

Thanks,

-- 
 Bastien



Re: [O] Escaping again!

2014-06-01 Thread Nicolas Goaziou
Hello,

Bastien  writes:

> For now description lists accept both "-" and "+".  I'm all for
> allowing only "-" so that we could use 
>
> + \(+\) :: Int → Int → Int
> + \(-\) :: Int → Int →Int
> + \(\leq\) :: Int → Int → Bool
> + \(=\) :: Int → Int → Bool
>
> in your example.
>
> What do you and others think?

I have no objection, with appropriate documentation, obviously. 

Be careful, though, as some functions need to be updated accordingly:
`org-list-struct', `org-element--list-struct',
`org-at-item-description-p', `org-list-item-body-column',
`org-at-item-timer-p', `org-list-insert-item'... The latter should
probably use `org-at-item-description-p'.


Regards,

-- 
Nicolas Goaziou



[O] [bug] f36b19eef6 uses font-lock-ensure, which is only implemented in emacs-trunk

2014-06-01 Thread Achim Gratz

As the subject says, aside from this that particular change should have
been in a separate commit since it's completely unrelated to what the
commit summary says it is doing.  This needs a compatibility alias,
function or macro since the behaviour of font-lock-fontify-buffer has
been changed to interactive-only.


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] #+INCLUDE: myfile.html html does not include /literally/; Org processes

2014-06-01 Thread Nicolas Goaziou
Hello,

Achim Gratz  writes:

> That's not yet possible.  The following patch would implement it, but I
> guess there are a few things that need to be discussed before this gets
> official, if at all.  I haven't given it much testing either.
>
> From 425b53146b99b1dd9b9b5d9b96e950dfea81835c Mon Sep 17 00:00:00 2001
> From: Achim Gratz 
> Date: Sun, 1 Jun 2014 09:49:48 +0200
> Subject: [PATCH] ox: implement "wrap" for #+INCLUDE
>
> * lisp/ox.el (org-export-expand-include-keyword): Implement additional
>   "wrap" parameter for including files literally, wrapped in an
>   appropriate block (usually an export block).  The contents of the
>   file gets included literally.

Thanks for the patch. However, I'd rather not allow arbitrary blocks
around included files, as it can be the source of some headache (e.g.,
a quote block around an Org file containing a headline). Also we don't
really need it since most use-cases are already supported.

Actually, I think there are two possible ways to handle this:

  1. Add a new "export" (or something else) parameter which will wrap
 file contents within an export block relative to the current
 back-end. Unfortunately, this will not work for exotic back-ends
 that do not provide such a block (:export-block property in its
 definition). We can always fallback to an example block in this
 case, though.

  2. Extend "src" syntax to allow Babel parameters after the language.
 E.g.,

   #+INCLUDE: "file.html" src html :results html

WDYT?


Regards,

-- 
Nicolas Goaziou



Re: [O] #+INCLUDE: myfile.html html does not include /literally/; Org processes

2014-06-01 Thread Achim Gratz
Omid writes:
> I am trying to include an HTML file (say myfile.html, which has only
> the ) in an Org file so that upon export the contents of
> myfile.html are /literally/ inserted in the appropriate section of the
> exported HTML file.

That's not yet possible.  The following patch would implement it, but I
guess there are a few things that need to be discussed before this gets
official, if at all.  I haven't given it much testing either.

>From 425b53146b99b1dd9b9b5d9b96e950dfea81835c Mon Sep 17 00:00:00 2001
From: Achim Gratz 
Date: Sun, 1 Jun 2014 09:49:48 +0200
Subject: [PATCH] ox: implement "wrap" for #+INCLUDE

* lisp/ox.el (org-export-expand-include-keyword): Implement additional
  "wrap" parameter for including files literally, wrapped in an
  appropriate block (usually an export block).  The contents of the
  file gets included literally.

This is experimental, the documentation and testing for this feature
is missing!
---
 lisp/ox.el | 18 +-
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index be843e6..26d2a9e 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -3305,9 +3305,10 @@ (defun org-export-expand-include-keyword (&optional included dir)
 			value)
 		   (prog1 (match-string 1 value)
 			 (setq value (replace-match "" nil nil value)
-		 (env (cond ((string-match "\\" value) 'example)
-			((string-match "\\" value) 'example)
+			((string-match "\\

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

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada


Re: [O] latex markup in org?

2014-06-01 Thread Omid
Hello Steven,

LaTeX .sty files are special. They are not meant to be included in a
.tex file. See
https://tex.stackexchange.com/questions/91167/why-use-sty-files for
more information.

Omid

Sent from my Emacs

On 06/01/2014 02:57 AM, Steven Arntson wrote:
> I've been learning to export from org to latex (to pdf), and have had
> great success. There's a simplification to the process I'd like to make,
> though, if it's possible.
> 
> Right now I use files: file.org and filestyle.sty. The .sty gives
> the latex-specific instruction, and I point to it from file.org with a
> line of #+LATEX_HEADER: \usepackage{filestyle}. This works great, but
> I'd love to have just one file, not two, to keep things simple.
> 
> So I tried putting the contents of filestyle.sty near the top of file.org
> inside of #+BEGIN_latex and #+END_latex, but it doesn't quite work. It
> incompletely works, which is perplexing...
> 
> I'd appreciate any ideas about this--can it be done?
> 
> Thank you!
> Steven
> 
>