Re: [O] list items not treated as such.

2013-09-30 Thread Paul Rudin
Paul Rudin p...@rudin.co.uk writes:

 Daniele Pizzolli d...@toel.it writes:

 On 09/29/2013 08:40 PM, Paul Rudin wrote:

 Example:

 1. Some text that extends over more than one line, I'm not sure if the exact
 length is relevant.
 a) stuff; and then
 b) this item will not be recognised as a list item, which can be a bit 
 of a
 pain, so if you're typing with auto-fill on it will be formatted like 
 this,
 but really the second line should align underneath the text of the 
 start of
 the item.


 Is this working as intended? It seems wrong to me - if I type item b)
 above it surely should fill properly?

 Hello Paul,
 Be sure to have this setting:

 #+BEGIN_SRC emacs-lisp :results none
 (setq org-list-allow-alphabetical t)
 #+END_SRC

 Yeah, I have that in my init.el, it's not a general problem with
 alphabetic labels, it's only in some contexts that problem happens.
 hitting alt-enter at the end of item a) works just fine for example - I
 get the b) label inserted correctly for example.

Another data point on this. I have just noticed that if there is a blank
line prior to the first list item then things work as they should.




[O] Different OPTIONS according to export format

2013-09-30 Thread Pascal Quesseveur
Hello,

From what I understand with Org 7.9 it is not possible to configure
different OPTIONS values according to the export format (I wanted to
get numbered headings in PDF output, and no numbering in HTML). Is it
the same with version 8.2?


-- 
Pascal Quesseveur
pques...@gmail.com




Re: [O] Org Tutorials need more structure

2013-09-30 Thread Eric Abrahamsen
Matt Price mopto...@gmail.com writes:

 On Sun, Sep 29, 2013 at 4:44 AM, Eric Abrahamsen
 e...@ericabrahamsen.net wrote:
 Carsten Dominik carsten.domi...@gmail.com writes:

 Hi everyone,

 today I looked at our tutorial page at

 http://orgmode.org/worg/org-tutorials/index.html

 and came away with the feeling that that this page has become
 somewhat useless for people who are really new to Org.  I think
 the page should start with a section of true recommendations
 for beginners, a path we tell every new users to take in order to
 learn about Org mode.

 Can we have a discussion here on how this path should look like?
 When you came to Org-mode as a newby, what were the three resources
 that really made an impression on by being accessible and
 providing feel and promise for digging deeper?

 - Carsten

 My feeling is, the tutorial structure might look like this:

 Start with the basics: outlining and structure editing, plus
 introductions to links and properties.

 Then four other tutorials, presented in no particular order:

 1. TODOs/agendas/task management (plus clocking)
 2. Exporting
 3. Babel
 4. Tables/spreadsheets

 I would only add that exporting is closely linked to writing in
 org whcih is what I mostly do.  This includes topics like footnotes,
 which I haven't really figured out yet after 3 years of using org
 (admittedly I haven't really tried either).

Right, but I think my point was that you can learn pretty much
everything there is to learn about authoring and note-taking in org
(including footnotes and lists and all that good stuff), without even
being aware that the export engine exists. So that can be a completely
self-contained tutorial.

Then one day someone tells you about exporting. You export your document
into six different formats, and your jaw drops. You instantly want to
start tweaking the output, and then (and only then) you read the
tutorial on exporting, which introduces you to backends, export options,
bits of literal backend code, and filters. This tutorial doesn't even
need to touch on issues of content or structure, because you've already
read about that in tutorial one, and this is /only/ about making your
documents appear differently in different output formats.

 It might also be nice if these tutorials included some sample setup
 code to get intermediate-to-advanced features working even before one
 fully understands them.

I fully agree in theory, but when you start thinking about the
complexity of custom agenda commands, or babel header lines, or TBLFM
lines... that's pretty brutal stuff.




Re: [O] [BABEL] BUG - error on tangling - disappears when changing the filename

2013-09-30 Thread Rainer M Krug
Eric Schulte schulte.e...@gmail.com writes:

 Rainer M Krug rai...@krugs.de writes:

 OK - narrowed it down to a post tangle hook which I need for proper
 debugging of R (jumping to source line in org file and not tangled R file):

 ,
 | #+begin_src emacs-lisp
 | (defvar org-babel-tangled-file nil
 |   If non-nill, current file was tangled with org-babel-tangle)
 | (put 'org-babel-tangled-file 'safe-local-variable 'booleanp)
 | 
 | (defun org-babel-mark-file-as-tangled ()
 |   (when  (string-match [.]R (buffer-file-name))
 | (add-file-local-variable 'org-babel-tangled-file t)
 | (add-file-local-variable 'buffer-read-only t)
 | (add-file-local-variable 'eval: '(auto-revert-mode))
 | (basic-save-buffer)))
 | 
 | (add-hook 'org-babel-post-tangle-hook 'org-babel-mark-file-as-tangled)
 | #+end_src
 `

 The question is now why is this function org-babel-mark-file-as-tangled
 receives NULL as a buffer-file-name? 

 I'm not sure, but perhaps you could wrap the body of buffer-file-name in
 a (when (buffer-file-name) ...) form to protect against null files.

Sounds reasonable and I'll put it in to have properly tangled files when
this happens - but then the file-local-variables would not be added if
the file name is null. Is there any way that I could find out why this
is happening (or under which conditions)?

Thanks,

Rainer


 Hope this helps,

 
 I can't remove the when as I am also tangling some files which do
 not have any comment characters (DESCRIPTION file in R packages).

 Any suggestions welcome,

 Rainer


 Rainer M Krug rai...@krugs.de writes:

 Forgot: tried with 8.2 stable release and with version from git - both
 the same.

 Rainer M Krug rai...@krugs.de writes:

 Hi

 I have a strange error when tangling.
[snip:  Now irrlevant stuff (156 lines)]

-- 
Rainer M. Krug

email: RMKrugatgmaildotcom




Re: [O] example filter for code blocks?

2013-09-30 Thread Achim Gratz

Am 30.09.2013 02:45, schrieb John Kitchin:

  /DOS (xxx)
  /Unix (xxx)
  /Mac (#1)

I have not tried to see if you can put them all in. Let me know if it
works to put them all in.


Yes, in fact you should always put all of them since the definitions for 
the other OS will be empty.



Regards,
Achim.




Re: [O] example filter for code blocks?

2013-09-30 Thread Alan Schmitt
jkitc...@andrew.cmu.edu writes:

 It works in Adobe Reader, Adobe, and Bluebeam Revu. I haven't tried any
 others.

I installed Adobe Reader and it's working there. This is great work,
thanks for sharing!

Alan



Re: [O] Exploring data that is in org-mode format

2013-09-30 Thread Alan Schmitt
jw.he...@gmail.com writes:

 For simple exploration, you might have a look at ggobi? [1] It allows
 you to do some really quick/easy exploration by plotting and being
 able to check which variables to use for X and Y, coloring, filtering,
 changing plot type, and so on. There's an R package which allows you
 to call ggobi on an R data object, which you could easily create with
 babel and your existing org tables with the #+name option for the
 table and :var specification in the babel block header.

 I'd also highly recommend taking a look at shiny via R-Studio.[2] Not
 sure if you can call it from Org-mode, but even if you can't... not
 *everything* has to be done with Org. You could use the file to do
 some data munging/summarization/etc., save it as a new data set (.csv
 or similar), and then read that into Shiny. It could be *awesome* for
 something like this. I only recently started playing with it but it's
 just fantastic and would make for the ability to subset, change
 scales/time ranges, and much more in an interactive web app.

Thank you for these suggestions, they will definitely keep me occupied
for a while.

Alan



Re: [O] Org Tutorials need more structure

2013-09-30 Thread Alan Schmitt
fatkasuvayu+li...@gmail.com writes:

 To me the best way to describe Org is: a programmable and dynamic
 plain-text note taking platform.

I really like this description. Short, and to the point.

Alan



Re: [O] [Babel] Padlines

2013-09-30 Thread Sebastien Vauban
Hi Eric,

Eric Schulte wrote:
 The blank line which was inserted between blocks isn't anymore for me.

 [...] results in:

 --8---cut here---start-8---
   data
   datb
 --8---cut here---end---8---

 Note that I tried adding :padline to yes, but I normally should not, as it
 is the default.

 Thanks for this bug report, there was a problem in my previous patch in
 this thread.  I've just pushed up a fix which should solve this problem.

Confirmed!

Thanks a lot.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [Babel] :colnames no no longer default for Emacs Lisp [Was] Lisp error: (wrong-type-argument listp hline)

2013-09-30 Thread Sebastien Vauban
Hi Eric,

Eric Schulte wrote:
 I always wondered why emacs-lisp is the _only_ language with :colnames no
 as its default. Is there a reason therefore? If no really good reason, could
 we suppress that?

 This seemed to make sense early on because Emacs Lisp could easily process
 hlines itself, but at this point it adds more confusion than it is worth.
 I've reverted this default for elisp.

Thanks. This looks more clear, now.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [PATCH] Display a count of items next to each list (or block)

2013-09-30 Thread Sebastien Vauban
Hi Bernt,

Bernt Hansen wrote:
 Sebastien Vauban writes:

 In order to make Org much nicer to use, I felt we missed a count of items
 next to the lists (or blocks, for multi-block agenda views). Here is a patch
 to add this, depending on the new variable
 `org-agenda-display-count-of-items' (enabled by default).

 The count of items must be updated when you apply tag filtering on lists.
 The patch does it as well.

 This patch doesn't report correct counts when a compact agenda is used and
 you filter by some task that doesn't match any entries in your block.

 The block is empty and shows no tasks but the counter is incorrect.

 ;; Compact the block agenda view
 (setq org-agenda-compact-blocks t)

 Filter by some tag not in these blocks

 / TAB PERSONAL RET

 Tasks to Refile (15/0)
 Stuck Projects (15/1)

 If the counts are correct I think this makes a good addition to org-mode.

Thanks for testing!

I may have a hard time when there is no explicit separator between blocks.
Though, I'll try to fix it ASAP and come back with a solution for that edge
case.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-export-async-init-file

2013-09-30 Thread Sebastien Vauban
Hello Rasmus and Thomas,

Rasmus wrote:
 My question: how to change the value of org-export-async-init-file when I
 export the subtree?

 Perhaps babel and org-element?  I'm not sure of the order of
 execution, but perhaps you can can check the title and set the init
 file condtional on that.

A detail: maybe checking on some tags (instead of the title), to make the
solution applicable in many more documents?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] proposed patch for org-export-latex-hyperref-options-format

2013-09-30 Thread Nicolas Goaziou
Hello,


Andrea Rossetti andrea.rosse...@gmail.com writes:

   may I please ask if this tiny patch looks reasonable and can
 be committed by the mantainers.

   Customizable option org-export-latex-hyperref-options-format
 is currently available in Org, but is ignored by the export.
 This patch enables use of org-export-latex-hyperref-options-format.

There is no such variable in Org. It probably comes from the old export
engine.


Regards,

-- 
Nicolas Goaziou



Re: [O] Different OPTIONS according to export format

2013-09-30 Thread Nicolas Goaziou
Hello,

Pascal Quesseveur pques...@gmail.com writes:

 From what I understand with Org 7.9 it is not possible to configure
 different OPTIONS values according to the export format (I wanted to
 get numbered headings in PDF output, and no numbering in HTML). Is it
 the same with version 8.2?

You can do it with options filters. See
`org-export-filter-options-functions'.


Regards,

-- 
Nicolas Goaziou



Re: [O] Network Diagram

2013-09-30 Thread OSiUX
El lun, 30 sep 2013, Noorul Islam K M decía:

 Esben Stien b...@esben-stien.name writes:
 
  Any way to create something like a network diagram with org-mode?
 
  I looked in the manual and found state change diagrams and sequence
  diagrams, but nothing that would help me plan a network with routers and
  switches. 
 
  Any pointers?
 
 You can find example here http://doc.norang.ca/org-mode.html for the
 tools others mentioned in this thread.
 
 Thanks and Regards
 Noorul
 

A good tool is blockdiag:

- http://osiux.com/img/osiux-network.png
- http://pub.osiux.com/osiux-network.diag
- http://blockdiag.com/en/nwdiag/index.html

-- 

::

  Osiris Alejandro Gomez (OSiUX) os...@osiux.com.ar
  DC44 95D2 0D5D D544 FC1A F00F B308 A671 9237 D36C
  http://www.osiux.com.ar http://www.altermundi.net


signature.asc
Description: Digital signature


Re: [O] [bug] how to specify the format for clock table summaries and bug in formula calculations

2013-09-30 Thread Eric S Fraga
Carsten Dominik carsten.domi...@gmail.com writes:

 Hi Eric,

 this would be

 (setq org-time-clocksum-format %d:%02d)

Thanks.  This does the job perfectly!  Is this documented somewhere?  I
did spend quite a bit of time looking in the manual and on Worg but to
no avail.

Given that the default doesn't work in general when using the percentage
formula, it might be a good idea to update the manual to at least point
to this variable?  Maybe something along the attached patch?

Thanks again,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5
From 1218a2045656c563612d4d9f494dcbc4c3225509 Mon Sep 17 00:00:00 2001
From: Eric S Fraga e.fr...@ucl.ac.uk
Date: Mon, 30 Sep 2013 12:36:52 +0100
Subject: [PATCH] Make reference to formatting variable for clock table formula
 option

* doc/org.texi (The clock table): The formula percentage option may
not work properly with the default time summary formatting.  The
documentation refers the reader to the variable that may need to be
adjusted.
---
 doc/org.texi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/doc/org.texi b/doc/org.texi
index bfbc43c..093750b 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -6536,9 +6536,11 @@ but you can specify your own function using the @code{:formatter} parameter.
  @r{property will get its own column.}
 :inherit-props @r{When this flag is @code{t}, the values for @code{:properties} will be inherited.}
 :formula @r{Content of a @code{#+TBLFM} line to be added and evaluated.}
- @r{As a special case, @samp{:formula %} adds a column with % time.}
  @r{If you do not specify a formula here, any existing formula}
  @r{below the clock table will survive updates and be evaluated.}
+ @r{As a special case, @samp{:formula %} adds a column with % time.}
+ @r{For this special case, it may be useful to change the default}
+ @r{formatting of time summaries: see @code{org-time-clocksum-format}}
 :formatter   @r{A function to format clock data and insert it into the buffer.}
 @end example
 To get a clock summary of the current level 1 tree, for the current
-- 
1.8.1.2



Re: [O] [bug] how to specify the format for clock table summaries and bug in formula calculations

2013-09-30 Thread Eric S Fraga
Daniele Pizzolli d...@toel.it writes:

[...]

 I found this snippet in the past:

 #+BEGIN_SRC elisp :results silent
 (setq org-time-clocksum-format '(:hours %d :require-hours t :minutes 
 :%02d :require-minutes t))
 #+END_SRC

Thanks.  This is a longer version of Carsten's answer.  Very helpful!
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.2.1-60-g31d1f2




Re: [O] org-table-duplicate-column

2013-09-30 Thread Karl Voit
* Michael Brand michael.ch.br...@gmail.com wrote:
 Hi Karl

Hi Michael!

 On Sun, Sep 29, 2013 at 9:56 PM, Karl Voit devn...@karl-voit.at wrote:
 | *Option* | *Evaluation 123* | *Evaluation 234* |
 |--+--+--|
 | Option 1 |   27 |   26 |
 | Option 2 |   22 |   24 |
 | Option 3 |   16 |   16 |
 | Option 4 |   16 | 13.5 |
 | Option 5 |8 |9 |
 | Option 6 |2 |4 |
 |--+--+--|
 |  |   91 | 92.5 |
 #+TBLFM: @8$2=vsum(@I$2..@II$2)::@8$3=vsum(@I$3..@II$3)

 I would use

 #+TBLFM: @$..@$ = vsum(@I$0..@II$0)
 or the shorter
 #+TBLFM: @$..@$ = vsum(@I..@II)

Never used this kind of reference yet. 

What about alternating data (no summary value at bottom row) and
evaluation columns?

| Data 1 | Eval 1 | Data 2 | Eval 2 |

What about moving columns:

Switching two columns from:
| Eval 1 | Eval 2 | foo | bar |
to:
| Eval 1 | foo | Eval 2 | bar |

(foo and bar do not have those formula fields like Eval columns)

Besides the fact that I personally prefer single column
formulas for legibility and maintainability. I had to spend a minute
to understand @$..@$ = vsum(@I..@II) and I am afraid that I
have to re-spend this minute in three weeks when I have to add data
to the table.

So, yes you clearly helped with the example I posted. However, I
have got the feeling that this method is not able to solve my issue
in all cases. I still tend to think that org-table-duplicate-column
would be handy in many cases.

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
get Memacs from https://github.com/novoid/Memacs 

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] Network Diagram

2013-09-30 Thread Karl Voit
* Esben Stien b...@esben-stien.name wrote:
 Any way to create something like a network diagram with org-mode?

Maybe [1] is able to help you. Not exactly the same topic but close
I guess.

  1. http://orgmode.org/worg/org-tutorials/org-dot-diagrams.html
-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
get Memacs from https://github.com/novoid/Memacs 

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




[O] input data for babel blocks

2013-09-30 Thread Alan Schmitt
Hello,

In my quest for analyzing my data in org mode tables, I'm trying to see
if I can use my favorite language (i.e., ocaml). I'm thus looking at how
to input such tables in a caml program. I found that the following works
well:

--8---cut here---start-8---
#+name: data
| 12 |
| 42 |

#+BEGIN_SRC ocaml :var x=data
x
#+END_SRC

#+RESULTS:
: - : int array array = [|[|12|]; [|42|]|]
--8---cut here---end---8---

(The only bad thing is that a single value is an array, but this is
probably related to the following thing.) Unfortunately (for interaction
with org mode), caml is strongly typed, and arrays must be
homogeneous. Thus the following fails:

--8---cut here---start-8---
#+name: myinput
| x | 12 |
| y | 24 |

#+BEGIN_SRC ocaml :var x=myinput
x
#+END_SRC
--8---cut here---end---8---

with the error in the toplevel:

--8---cut here---start-8---
# let x = [|[|x; 12|]; [|y; 24|]|];;
x;;
org-babel-ocaml-eoe;;
Characters 17-19:
  let x = [|[|x; 12|]; [|y; 24|]|];;
   ^^
Error: This expression has type int but an expression was expected of type
 string
--8---cut here---end---8---

I would like to change the parsing of table in ob-ocaml so that it
generates an array of _tuples_, for instance for the previous example:

#+BEGIN_SRC ocaml
let x = [| (x, 12); (y, 24) |];;
#+END_SRC

I looked at the code, and this seems to be the relevant part:

#+BEGIN_SRC emacs-lisp
(defun org-babel-variable-assignments:ocaml (params)
  Return list of ocaml statements assigning the block's variables.
  (mapcar
   (lambda (pair) (format let %s = %s;; (car pair)
  (org-babel-ocaml-elisp-to-ocaml (cdr pair
   (mapcar #'cdr (org-babel-get-header params :var

(defun org-babel-ocaml-elisp-to-ocaml (val)
  Return a string of ocaml code which evaluates to VAL.
  (if (listp val)
  (concat [| (mapconcat #'org-babel-ocaml-elisp-to-ocaml val ; ) |])
(format %S val)))
#+END_SRC

I tried tweaking this to the following:

#+BEGIN_SRC emacs-lisp
(defun org-babel-variable-assignments:ocaml (params)
  Return list of ocaml statements assigning the block's variables.
  (mapcar
   (lambda (pair) (format let %s = %s;; (car pair)
  (org-babel-ocaml-elisp-to-ocaml (cdr pair
   (mapcar #'cdr (org-babel-get-header params :var

(defun org-babel-ocaml-elisp-to-ocaml (val)
  Return a string of ocaml code which evaluates to VAL.
  (if (listp val)
  (concat [| (mapconcat #'org-babel-ocaml-elisp-to-ocaml-tuple val ; ) 
|])
(format %S val)))

(defun org-babel-ocaml-elisp-to-ocaml-tuple (val)
  Return a string of ocaml code which evaluates to VAL, as a tuple.
  (if (listp val)
  (concat ( (mapconcat #'org-babel-ocaml-elisp-to-ocaml-tuple val , ) 
))
(format %S val)))
#+END_SRC

Now the example seems to work:

--8---cut here---start-8---
#+name: myinput
| x | 12 |
| y | 24 |

#+BEGIN_SRC ocaml :var x=myinput
x
#+END_SRC

#+RESULTS:
: - : (string * int) array = [|(x, 12); (y, 24)|]
--8---cut here---end---8---

(and the previous example is even nicer:
--8---cut here---start-8---
#+name: data
| 12 |
| 42 |

#+BEGIN_SRC ocaml :var x=data
x
#+END_SRC

#+RESULTS:
: - : int array = [|12; 42|]
--8---cut here---end---8---
)

I have the following questions for the list:
- can I always assume that tables are passed as lists of lists?
- would the patch above be a useful way to deal with this?
- is there a way to specify the :var parsing in a code block or in the table?

Thanks,

Alan



Re: [O] build errors on os x

2013-09-30 Thread Skip Collins
Build test failures are still happening.

On Thu, Sep 26, 2013 at 10:38 AM, Rick Frankel r...@rickster.com wrote:
 On 2013-09-25 20:44, Skip Collins wrote:

 The problem persists. Can anyone else confirm? Perhaps this should be
 added to the bug tracker file. For the record, my local.mk file is:


 FWIW, on solaris i get the following on th latest master branch, commit
 ec28c33062b3468abc2fa2458118df11165b096d:

 Ran 453 tests, 443 results as expected, 10 unexpected (2013-09-26
 10:36:04-0400)
 6 expected failures

 10 unexpected results:
 FAILED  ob-exp/use-case-of-reading-entry-properties

 FAILED  test-ob/org-babel-remove-result--results-code
 FAILED  test-ob/org-babel-remove-result--results-default
 FAILED  test-ob/org-babel-remove-result--results-html
 FAILED  test-ob/org-babel-remove-result--results-latex
 FAILED  test-ob/org-babel-remove-result--results-list
 FAILED  test-ob/org-babel-remove-result--results-org
 FAILED  test-ob/org-babel-remove-result--results-pp
 FAILED  test-ob/org-babel-remove-result--results-wrap
 FAILED  test-ob/specific-colnames


 So, this is not a mac specific problem.

 rick




Re: [O] Network Diagram

2013-09-30 Thread Esben Stien
OSiUX xu...@osiux.com.ar writes:

 A good tool is blockdiag:

 - http://osiux.com/img/osiux-network.png
 - http://pub.osiux.com/osiux-network.diag
 - http://blockdiag.com/en/nwdiag/index.html

Yeah, that's pretty wicked. Thanks;)

-- 
Esben Stien is b0ef@e s  a 
 http://www. s tn m
  irc://irc.  b  -  i  .   e/%23contact
   sip:b0ef@   e e 
   jid:b0ef@n n



[O] Limit subtree to a specific export backend

2013-09-30 Thread Sebastian Wiesner
Hello,

can I limit a subtree to be exported with specific backends only?
I.e. only to HTML, but not Texinfo or LaTeX?

Background:  I am trying to simplify the documentation of one of my
projects, and combine the website and the user manual into a single
document.  Naturally, there is some content on the website that should
not appear in the manual and vice versa.

So long,
Sebastian Wiesner



[O] ``make test'' failures

2013-09-30 Thread Nick Dokos
Just a heads-up: with Org-mode version 8.2.1 (release_8.2.1-60-g31d1f2)
when I do ``make test'', I get:

,
| ...
| Ran 467 tests, 459 results as expected, 8 unexpected (2013-09-30 
10:11:32-0400)
| 4 expected failures
| 
| 8 unexpected results:
|FAILED  test-ob/org-babel-remove-result--results-code
|FAILED  test-ob/org-babel-remove-result--results-default
|FAILED  test-ob/org-babel-remove-result--results-html
|FAILED  test-ob/org-babel-remove-result--results-latex
|FAILED  test-ob/org-babel-remove-result--results-list
|FAILED  test-ob/org-babel-remove-result--results-org
|FAILED  test-ob/org-babel-remove-result--results-pp
|FAILED  test-ob/org-babel-remove-result--results-wrap
`

--
Nick




Re: [O] Limit subtree to a specific export backend

2013-09-30 Thread Sebastien Vauban
Sebastian Wiesner wrote:
 can I limit a subtree to be exported with specific backends only?
 I.e. only to HTML, but not Texinfo or LaTeX?

 Background:  I am trying to simplify the documentation of one of my
 projects, and combine the website and the user manual into a single
 document.  Naturally, there is some content on the website that should
 not appear in the manual and vice versa.

A partly manual solution would be to use tags for which sections to export in
which backend, make a sparse tree with the backend you're interested to export,
and export what's visible?

If working, such a thing could be automated in a ELisp block.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] I cannot follow radio links

2013-09-30 Thread Daniel Clemente

  Hi, since a few days, when I press C-c C-o on a highlighted word that points 
to a radio link, I get this error:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match(^id: nil)
  org-open-at-point(nil)
  call-interactively(org-open-at-point nil nil)
  command-execute(org-open-at-point)


I think this in enough to correct it:


diff --git a/lisp/org.el b/lisp/org.el
index 6d34bce..0571bc1 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -10542,7 +10542,8 @@ application the system uses for this file type.
   ((and (string= type thisfile)
 (or (run-hook-with-args-until-success
  'org-open-link-functions path)
-(and (string-match ^id: link)
+(and link
+ (string-match ^id: link)
  (or (featurep 'org-id) (require 'org-id))
  (progn
(funcall (nth 1 (assoc id org-link-protocols))



Latest org-mode, emacs from 26.m8.2013.  Thanks





[O] org-store-link broken for bibtex file

2013-09-30 Thread Scott Otterson
Hi,  I've just updated to emacs 24.3.1 and org-mode 8.2, and the very
useful org-store-link function is now broken.

For years, I've been inserting bibtex file links into my org files with
this simple procedure:

  1. Put cursor on an article in a bibtex file
  2. C-c l
  3. Put cursor in org file
   4. C-c C-l

The result is a clean link in my org file that looks like this:

  Chow et al. 2010: Dynamic

But after the update, org-store-link (bound to C-c l) leaves the link
description empty, so that the link now looks like this:

  file:energy.bib::Chow10dynPCAintTransf

Does anyone know how I can recover the old org-store-link behavior?

Thanks,

Scott


Re: [O] Network Diagram

2013-09-30 Thread Russell Adams
On Sun, Sep 29, 2013 at 11:46:03PM -0400, Nick Dokos wrote:
 Michael Gauland mikely...@amuri.net writes:

  Esben Stien b0ef at esben-stien.name writes:
  Any way to create something like a network diagram with org-mode?

I've started using yEd for all of my diagrams. It's just
straightforward topology (ie: not Visio), but it can auto-arrange
beautifully! Export to PDF and include in Org when publishing.

Thanks.

--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3



Re: [O] Limit subtree to a specific export backend

2013-09-30 Thread Rasmus
Hi Sebastian,

Sebastian Wiesner lunary...@gmail.com writes:

 can I limit a subtree to be exported with specific backends only?
 I.e. only to HTML, but not Texinfo or LaTeX?

 Background:  I am trying to simplify the documentation of one of my
 projects, and combine the website and the user manual into a single
 document.  Naturally, there is some content on the website that should
 not appear in the manual and vice versa.

As Sebastien suggests, if you can identify export status depending on
tags you can do it with a filter.

Here's an example that's perhaps a bit too verbose and not thoroughly
tested:

#+BEGIN_SRC Org
#+TITLE: Conditional export
#+options: tags:nil
* Common intro
  txt
** Pdf heading:latex:
   the math is really pretty!
** HTML heading:html:
   the text features hyperlinks!
** More common notes
   Intro over
   
* Code :noexport:
#+begin_src emacs-lisp
  (defun rasmus/conditional-export (settings backend)
Change SETTINGS to include dynamically set export-tags.
  
Enable the use of BACKEND as EXPORT_TAGS.  A derived backend is
treated as its parent.
(let ((backends (remove-duplicates
 (mapcar (lambda (x)
   (or (org-export-backend-parent x)
   (org-export-backend-name x)))
 org-export--registered-backends)))
  ;; for treating derived backend and parent backends differently: 
  ;; (backend-or-parent backend)
  (backend-or-parent (dolist (b org-export--registered-backends return)
   (when  (eq (org-export-backend-name b) backend)
 (return (or (org-export-backend-parent b)
 (org-export-backend-name b)))
  (plist-put 
   settings :exclude-tags 
   (append (plist-get settings :exclude-tags)
   (mapcar 'symbol-name
   (remove backend-or-parent backends))

  (add-to-list 'org-export-filter-options-functions 'rasmus/conditional-export)
#+end_src
#+END_SRC


-- 
Enough with the bla bla!




Re: [O] list items not treated as such.

2013-09-30 Thread Daniele Pizzolli

On 09/29/2013 09:05 PM, Paul Rudin wrote:

Daniele Pizzolli writes:


[]


Yeah, I have that in my init.el, it's not a general problem with
alphabetic labels, it's only in some contexts that problem happens.
hitting alt-enter at the end of item a) works just fine for example - I
get the b) label inserted correctly for example.


Hello Paul,
With my setup I experience the correct auto-fill.
Maybe you want to try a more recent version of org-mode?
Which one are you using now?

Regards,
Daniele




Re: [O] input data for babel blocks

2013-09-30 Thread Charles Berry
Alan Schmitt alan.schmitt at polytechnique.org writes:

 
 Hello,
 
 In my quest for analyzing my data in org mode tables, I'm trying to see
 if I can use my favorite language (i.e., ocaml). I'm thus looking at how

[discussion of revising org-babel-variable-assignments:lang deleted]

 
 I have the following questions for the list:
 - can I always assume that tables are passed as lists of lists?
 - would the patch above be a useful way to deal with this?
 - is there a way to specify the :var parsing in a code block or in the table?

Alan,

Nice description of a problem that has vexed me, too.

It would be nice to have more flexibility in passing objects to src blocks
in ones favored language via the :var header arg.

Lacking that, another alternative to the approach you have crafted is to
use elisp src blocks to set up the commands needed to create the objects,
and then place the results of executing the elisp src block in the src
block of your favored language using noweb, for example

#+BEGIN_SRC mylang :noweb yes
  elisp-conversion-to-mylang(arg1,arg2)
#+END_SRC
 
might convert 'arg2' to an object of the desired type named 'arg1' in a 
'mylang' src block.

FWIW, my own usage of this approach is to write LaTeX code including 
backslashes and unmatched quotes, then convert the code to a valid R
character string for labelling figures (which undoubled backslashes and 
unmatched quotes would invalidate).

HTH,

Chuck






Re: [O] list items not treated as such.

2013-09-30 Thread Paul Rudin
Daniele Pizzolli d...@toel.it writes:

 On 09/29/2013 09:05 PM, Paul Rudin wrote:
 Daniele Pizzolli writes:

 []

 Yeah, I have that in my init.el, it's not a general problem with
 alphabetic labels, it's only in some contexts that problem happens.
 hitting alt-enter at the end of item a) works just fine for example - I
 get the b) label inserted correctly for example.

 Hello Paul,
 With my setup I experience the correct auto-fill.
 Maybe you want to try a more recent version of org-mode?
 Which one are you using now?

Apparently:
Org-mode version 8.2 (8.2-4-ga1a0ac-elpa @ 
/home/paul/.emacs.d/elpa/org-20130923/)





Re: [O] Bug: dates in heading break beamer export

2013-09-30 Thread Marcin Borkowski
Dnia 2013-09-30, o godz. 18:02:51
Daniele Pizzolli d...@toel.it napisał(a):

  It's a LaTeX Beamer problem: it doesn't like
 
 \section{title \textit{[2013-09-29 Sun]}}
 
  produced by Org, although regular LaTeX accepts it.
 
  Do you know about a workaround for this?
 
 Not really.
 
  This is really a workaround: put a \protect before \textit.
 
 Or why not drop \textit?

Sounds good for me.  (NB: there's a similar problems with tags, AFAIR.
And (AFAIR!) it's even worse, since the exporter uses a low-level TeX
command \hfill.)

  In general, putting formatting commands in \section title etc.,
  even if not erroneous, is considered a bad practice.
 
 But org-mode allow this!
 
 I think that if something is allowed in org-mode syntax but not by the
 underlining tools used for export, the exporter should take care to
 find a suitable workaround.

Definitely agreed.  The point is, what is a suitable workaround?

One idea is to define a command \orgsection, with syntax like this:
\orgsection[timestamp=...,tags={...,...}]{title proper}
This could be even defined in a specialized package, call it org.sty,
which is then turned on by means of \usepackage in exported files.
This is probably the cleanest solution I can think of, but has one
disadvantage: it diverges from LaTeX syntax, so if I edit manually (or
worse, transform automatically) such a file, I can encounter problems:
the (non-TeX) parser (e.g. an editor's one) may not know that
\orgsection is in fact a flavor of \section.  For pdf export this is a
non-issue, but AFAIK people use Org LaTeX export to create a file for
further work on it.

Another idea is to redefine \section so that it either accepts optional
arguments (therefore breaking its default interface!), or allow
something like this:

\timestamp{...}
\tags{...,...}
\section{title proper}

This is easy to do, but far from elegant.  Also, it does not help
further maintenance of such a LaTeX file.

Yet another solution would be to forget about LaTeX and use ConTeXt,
where defining custom sections etc. is much easier.  Of course, this is
fine only assuming that (1) I do not want to e.g. submit my file to a
LaTeX-accepting journal and (2) I'm fine with learning ConTeXt, which -
even though much better than LaTeX in terms of UI (and also
featurewise, btw) - has its own learning curve.

 I just found that the same problem (work in latex, does not work in
 beamer) exists for footnotes in header!

Quite possible.  You can always use \footnotemark and \footnotetext.
(Beamer hacks deeply into LaTeX innards, so things like this are no
surprise.)

 A feature request would be to have some checks on org files a la
 flymake, at least for common potential sources of problems that
 usually break the export like:
 
 - missing two empty lines after footnotes
 - missing empty line after RESULTS:
 - =string=[footnote]

Just curious: what's the problem with =string=[footnote]?

 Maybe something already exists and I am simply not aware.
 
 Regards,
 Daniele

Best,

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



Re: [O] org-store-link broken for bibtex file

2013-09-30 Thread Scott Otterson
Huh.

org-store-link worked perfectly after I ran my bibtex file through JabRef's
cleanup function.

I have not been able to isolate the change that caused the problem with
org-store-link, but apparently, the bad link description was my bibtex
file's fault.

Sorry for the false alarm!


On Mon, Sep 30, 2013 at 5:16 PM, Scott Otterson sco...@sharpleaf.orgwrote:

 Hi,  I've just updated to emacs 24.3.1 and org-mode 8.2, and the very
 useful org-store-link function is now broken.

 For years, I've been inserting bibtex file links into my org files with
 this simple procedure:

   1. Put cursor on an article in a bibtex file
   2. C-c l
   3. Put cursor in org file
4. C-c C-l

 The result is a clean link in my org file that looks like this:

   Chow et al. 2010: Dynamic

 But after the update, org-store-link (bound to C-c l) leaves the link
 description empty, so that the link now looks like this:

   file:energy.bib::Chow10dynPCAintTransf

 Does anyone know how I can recover the old org-store-link behavior?

 Thanks,

 Scott






Re: [O] AUCTeX key bindings within Org documents

2013-09-30 Thread Fabrice Niessen



Hello,

Fabrice Niessen wrote:
 Nicolas Richard wrote:
 Fabrice Niessen writes:
 Due to a friend's request, I've tried to offer AUCTeX key bindings within 
 Org
 documents via a minor mode, called org-auctex-keys.

 I checked that out because I often find myself doing C-c C-e while in
 org-mode, but I expected it would insert

 #+BEGIN_SRC latex
   \begin{prompted_env}

   \end{prompted_env}
 #+END_SRC
 instead of a new item.

 Why not?  It makes sense -- and the list item did not make such sense...

 OTOH, I don't really want such a feature, because when I do this, I
 usually realize that it's time for me to export the tree to LaTeX and go
 on from there.

 If you're interested, check it out at
 https://github.com/fniessen/org-auctex-key-bindings.

 I see no licence, which I think (though IANAL) is equal to a strict and
 super restrictive copyright ; is that intended ?

 No, it's just that I'm lost when it comes down to copyrights, copylefts, and
 all the subtle meanings and implications of that.

 Any advice on what to put? The purpose is, of course, that it can be freely
 used, copied, etc.

FYI, I've added the suggested key bindings (from you and from Marcin), and
added a copyright (Emacs-alike).

Currently implemented:

| Shortcut| What it runs   |
|-+|
| C-c C-s | org-insert-heading |
| C-c C-j | org-insert-heading-respect-content |
| C-c C-f C-e | org-auckeys-font (emphasize)   |
| C-c C-f C-b | org-auckeys-font (bold)|
| C-c C-f C-t | org-auckeys-font (typewriter)  |
| C-c C-f C-i | org-auckeys-font (italic)  |
| C-c C-e | org-auckeys-environment|
| C-c C-c | org-export-dispatch|

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium





Re: [O] example filter for code blocks?

2013-09-30 Thread Thomas S. Dye
Thanks Achim,

This is good to know.

All the best,
Tom

Achim Gratz strom...@nexgo.de writes:

 Am 30.09.2013 02:45, schrieb John Kitchin:
   /DOS (xxx)
   /Unix (xxx)
   /Mac (#1)

 I have not tried to see if you can put them all in. Let me know if it
 works to put them all in.

 Yes, in fact you should always put all of them since the definitions
 for the other OS will be empty.


 Regards,
 Achim.




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



Re: [O] Needing help on org-gnus + LaTeX export -

2013-09-30 Thread Eric S Fraga

Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:



 Hi,

 I would be very happy to use LaTeX in gnus in scientific correspondence,
 instead of using LaTeX it with Thunderbird.



What specifically do wish to be able to do?  I don't know about LaTeX with Thunderbird.



If you want to write equations, such as  and images, you can write using the normal org mode constructs and then execute M-x org-mime-htmlize just before sending the message.  This will send an email in HTML (with text/plain as well).



This email was composed in this way.






Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5



Re: [O] Org Tutorials need more structure

2013-09-30 Thread Eric S Fraga
Alan Schmitt alan.schm...@polytechnique.org writes:

 fatkasuvayu+li...@gmail.com writes:

 To me the best way to describe Org is: a programmable and dynamic
 plain-text note taking platform.

 I really like this description. Short, and to the point.

but it's missing what for me is the key point which got me into org:
time management!  So how about

  a programmable and dynamic plain-text note taking time management platform
  
but I'm sure somebody else will think something is missing and make
this sentence even longer ;-)

To me, org is like a graph.  A newbie may be attracted to any given node
(time management, note taking, literate programming, database, tables,
spreadsheet, exporting, publishing...) and then move along edges to
other nodes in the graph.  I think any given order of tutorials is
likely to work for some but not others, but so be it?

For me, the info manual is very well structured.  It got me started
quickly but still provided the depth when needed later.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5




Re: [O] Org Tutorials need more structure

2013-09-30 Thread Thomas S. Dye
Aloha Suvayu,

I like this, too, except that I miss the capabilities of the export
framework.  How about?:

 a programmable and dynamic plain-text note taking platform and markup
 language

All the best,
Tom

Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 Hi,

 On Sat, Sep 28, 2013 at 07:29:26PM -0500, John Hendy wrote:
 On Sat, Sep 28, 2013 at 6:29 PM, Thomas S. Dye t...@tsdye.com wrote:
 
  In this vein, I think it would be useful to have a brief statement about
  Org-mode that gives the interested reader from any background a good
  feel for the scope of Org-mode and how it presents itself to the user.
  I don't think the current statements about what Org-mode is do this
  very effectively, though they might have done so in the past.
 
 
 Absolutely love that, and this puts some of your earlier comments in
 perspective -- you're looking for the 30sec elevator pitch for
 Org-mode, and saying this outline-y task manager is not cutting it.

 To me the best way to describe Org is: a programmable and dynamic
 plain-text note taking platform.  All its features are essentially built
 on this ability: planning  task management, authoring or publishing,
 literate programming, and what not.  On top of this, it can interact
 with external applications for tasks like referencing (links, citation,
 etc).  Of course trying to faithfully outline this in a few words is a
 herculean task.

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



Re: [O] proposed patch for org-export-latex-hyperref-options-format

2013-09-30 Thread Andrea Rossetti

Hello,

  apologies for my mistake. Nicolas you were right,
org-export-latex-hyperref-options-format was present
only in the old exporter, in a file named org-latex.el.

  I'd like to suggest a customizable hypersetup string
as a future, non-urgent enhancement of ox-latex.el; the
defcustom at line 324 of this old file:

http://repo.or.cz/w/emacs.git/blob/HEAD:/lisp/org/org-latex.el

could fit reasonably well for variable name, default value,
type and docstring. 

  Thanks for your attention, kindest regards.

Andrea
http://github.com/thesoftwarebin



Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,


 Andrea Rossetti andrea.rosse...@gmail.com writes:

   may I please ask if this tiny patch looks reasonable and can
 be committed by the mantainers.

   Customizable option org-export-latex-hyperref-options-format
 is currently available in Org, but is ignored by the export.
 This patch enables use of org-export-latex-hyperref-options-format.

 There is no such variable in Org. It probably comes from the old export
 engine.


 Regards,



Re: [O] Needing help on org-gnus + LaTeX export -

2013-09-30 Thread Joseph Vidal-Rosset
Hi Eric,

2013/9/30 Eric S Fraga e.fr...@ucl.ac.uk

 What specifically do wish to be able to do? I don't know about LaTeX with
 Thunderbird.


For information:

https://addons.mozilla.org/fr/thunderbird/addon/latex-it/


  If you want to write equations, such as [image: \(y = \int x dx\)] and
 images, you can write using the normal org mode constructs and then execute 
 M-x
 org-mime-htmlize just before sending the message. This will send an email
 in HTML (with text/plain as well).

I have certainly a problem of installation, because of my test of
conversion with org-mode fail.

With gnus, here is the message error :

org-mime-htmlize: Cannot open load file: aucun fichier ou dossier de ce
type, ox-org

 I appreciate a lot the kind help of people of this list.

Best wishes,

Jo.


Re: [O] Transpose or open functions for table cells

2013-09-30 Thread Michael Brand
Hi Suvayu

On Sun, Sep 29, 2013 at 11:57 PM, Suvayu Ali
fatkasuvayu+li...@gmail.com wrote:
 Yes, the above allows easy rearrangement of table cells.  I'm looking
 for something that allows me to insert cells in a row or column.  In my
 example from the earlier email, I insert a cell in a column.

As soon as I remembered that there are org-table-cut-region and
org-table-paste-rectangle I could not resist the mental exercise for
fun to implement f-org-table-open-field-in-row-grow and
f-org-table-open-field-in-column-grow. The latter gets you from

| a |  b | c |
|---++---|
| d |  9 | e |
| f | 10 | g |
|---++---|
| h | 11 | i |

to

| a |  b | c |
|---++---|
| d || e |
| f |  9 | g |
|---++---|
| h | 10 | i |
|   | 11 |   |

Please read again the rearranged
http://orgmode.org/worg/org-hacks.html#field-same-row-or-column

Michael



[O] [PATCH] org-table-transpose-table-at-point: Preserve indentation and point

2013-09-30 Thread Michael Brand
Hi all

On Mon, Sep 30, 2013 at 8:30 PM, Michael Brand
michael.ch.br...@gmail.com wrote:
 http://orgmode.org/worg/org-hacks.html#field-same-row-or-column

For the use case of org-table-transpose-table-at-point there, I made a
patch for org-table-transpose-table-at-point to preserve indentation
and point after transposition.
From 119aad10f2144a1397f2b034bef46dc891dbae5a Mon Sep 17 00:00:00 2001
From: Michael Brand michael.ch.br...@gmail.com
Date: Mon, 30 Sep 2013 20:32:29 +0200
Subject: [PATCH] org-table-transpose-table-at-point: Preserve indentation and
 point

* lisp/org-table.el (org-table-transpose-table-at-point): Preserve
indentatinon of first row. Restore point to transposed field in
transposed table.
---
 lisp/org-table.el | 21 +++--
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 5bc754c..7be77cc 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -1834,7 +1834,7 @@ blindly applies a recipe that works for simple tables.
  (goto-char beg)
 
 (defun org-table-transpose-table-at-point ()
-  Transpose orgmode table at point and eliminate hlines.
+  Transpose Org table at point and eliminate hlines.
 So a table like
 
 | 1 | 2 | 4 | 5 |
@@ -1849,9 +1849,11 @@ will be transposed as
 | 4 | c | g |
 | 5 | d | h |
 
-Note that horizontal lines disappeared.
+Note that horizontal lines disappear.
   (interactive)
   (let* ((table (delete 'hline (org-table-to-lisp)))
+(dline_old (org-table-current-line))
+(col_old (org-table-current-column))
 (contents (mapcar (lambda (p)
 (let ((tp table))
   (mapcar
@@ -1861,10 +1863,17 @@ Note that horizontal lines disappeared.
(setq tp (cdr tp
table)))
   (car table
-(delete-region (org-table-begin) (org-table-end))
-(insert (mapconcat (lambda(x) (concat |  (mapconcat 'identity x  |  ) 
  |\n ))
-   contents ))
-(org-table-align)))
+(goto-char (org-table-begin))
+(re-search-forward |)
+(backward-char)
+(delete-region (point) (org-table-end))
+(insert (mapconcat
+(lambda(x)
+  (concat |  (mapconcat 'identity x  |  )   |\n ))
+contents ))
+(org-table-goto-line col_old)
+(org-table-goto-column dline_old))
+  (org-table-align))
 
 ;;;###autoload
 (defun org-table-wrap-region (arg)
-- 
1.7.12.4 (Apple Git-37)



Re: [O] Org Tutorials need more structure

2013-09-30 Thread Peter Neilson

On Mon, 30 Sep 2013 13:01:57 -0400, Eric S Fraga e.fr...@ucl.ac.uk wrote:


but I'm sure somebody else will think something is missing


I'll admit that I've only dabbled in org mode thus far, but here's what I  
see as lacking in the tutorial documentation:


1. Non-video presentations for beginners. Some of us are (for one reason  
or another) badly set up to use video. Perhaps our network connection is  
slow, or our system is flaky and crashes with video. Or perhaps we only  
have five or ten minutes at a time to study. Or perhaps we are mostly  
trying to learn from hard copy we've printed out. A few of us might even  
be blind.


2. Goal-oriented presentations. Instead of telling us, The XX widget  
allows you to do the YY operation, we might be hoping to see, To  
accomplish ZZ (for instance, task scheduling), do something like this:  
(neat example with pointers to syntax)


The user will hope to see examples, even annotated examples. Sometimes  
negative examples: DON'T try it this way... It seems right, and it's  
alluring, but ultimately it won't work, and you'll never figure out what's  
wrong.


There ought to be discussions of why we should think of the problem THIS  
WAY and not THAT WAY.


It may be that there are portions of the existing docs that cover  
everything I see as deficient, and I've just not found them. Perhaps a  
pointer to LOOK HERE FIRST is needed for those docs.


I'll end with a quotation from a leader in a club to which I once  
belonged: Yes, I can see how you might think that's a problem. How would  
you like to CHAIR THE COMMITTEE to solve that for next year's convention?


Perhaps I'm volunteering!



Re: [O] Needing help on org-gnus + LaTeX export -

2013-09-30 Thread Joseph Vidal-Rosset
Hi Eric, Hi everybody,

Here is the beginning of my init.el in my .emacs.d/ :


(message * --[ Loading my Emacs init file ]--)
(add-to-list 'load-path ~/.emacs.d/org-8.2/lisp)
(add-to-list 'load-path /.emacs.d/org-8.2/contrib/lisp t)
(package-initialize)

last stable version of org-mode is correctly installed:

Org-mode version 8.2 (8.2-dist @ /home/joseph/.emacs.d/org-8.2/lisp/)

org-mime installed via elpa

Now test of org-mime-htmlize :

org-uniquify: Wrong type argument: sequencep, my-fill-nobreak-predicate

And test of C-e C-l  for conversion of a file.org  into a .tex file :

org-uniquify: Wrong type argument: sequencep, my-fill-nobreak-predicate

Your help is welcome, because nothing works...

Best wishes

Jo.





2013/9/30 Eric S Fraga e.fr...@ucl.ac.uk

 Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

  Hi,
 
  I would be very happy to use LaTeX in gnus in scientific correspondence,
  instead of using LaTeX it with Thunderbird.

 What specifically do wish to be able to do? I don't know about LaTeX with
 Thunderbird.

 If you want to write equations, such as [image: \(y = \int x dx\)] and
 images, you can write using the normal org mode constructs and then execute 
 M-x
 org-mime-htmlize just before sending the message. This will send an email
 in HTML (with text/plain as well).

 This email was composed in this way.

 –

 Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5




Re: [O] org-table-duplicate-column

2013-09-30 Thread Michael Brand
Hi Karl

On Mon, Sep 30, 2013 at 1:43 PM, Karl Voit devn...@karl-voit.at wrote:
 What about alternating data (no summary value at bottom row) and
 evaluation columns?

 | Data 1 | Eval 1 | Data 2 | Eval 2 |

 What about moving columns:

 Switching two columns from:
 | Eval 1 | Eval 2 | foo | bar |
 to:
 | Eval 1 | foo | Eval 2 | bar |

Alternation and moving can be handled with conditional formulas

#+TBLFM: @$..@$ = if(subvec(@1, 2, 6) == Eval, 42, $0)

in Calc or even simpler (regex) with Lisp. Don't worry, For this I had
to cheat and look in testing/lisp/test-org-table.el with the ERTs that
should also be an advanced documentation. In this case
test-org-table/compare for the comparison and
test-org-table/copy-field for the substring.

 I still tend to think that org-table-duplicate-column
 would be handy in many cases.

I can not understand how with a variable if you mean that
literally. Also with macros for TBLFM as I imagine, that could be
difficult because already now there are conflicts and traps with the
TBLFM syntax.

Michael



Re: [O] Elpa color-theme with emacs24

2013-09-30 Thread Rene
Carsten Dominik carsten.dominik at gmail.com writes:

 would you like to prepare a patch for the site?

As requested, a possible contribution could be the following.

--

* DefTheme: The enhanced theme-handling system for Emacs24

As a replacement for =Color Theme=, Emacs 24+ comes with a different
system called =DefTheme=.

DefTheme offers a selection of built-in themes that you can choose
from.

In order to choose a different theme from the default one just do a

=M-x load-theme=

You can also change your default theme to _theme-name_ by adding the
following your Emacs configuration

  =(load-theme 'theme-name t)=

If you’d like to return to the default-theme just do a

  =M-x disable-theme=

Here is a list of some extra elpa packages that have been specifically
customized to org-mode.  Note that the proper deftheme naming
convention is _name-theme.el_ (instead of _color-theme-name.el_ used with
the old =color-theme= package).

Some deftheme elpa packages useful to org users: =cyberpunk-theme=,
=leuven-theme=, =tangotango-theme=, =zenburn-theme=



--
Rene






Re: [O] Org Tutorials need more structure

2013-09-30 Thread Eduardo Ochs
On Mon, Sep 30, 2013 at 3:36 PM, Peter Neilson neil...@windstream.netwrote:

 1. Non-video presentations for beginners. Some of us are (for one reason
 or another) badly set up to use video. Perhaps our network connection is
 slow, or our system is flaky and crashes with video. Or perhaps we only
 have five or ten minutes at a time to study. Or perhaps we are mostly
 trying to learn from hard copy we've printed out. A few of us might even be
 blind.


Any chance of an MP4 version of Carsten's Google Tech talk being
produced and uploaded to a public place, with a wget-able URL? It
would be trivial to add to this tutorial - or to some other - the code
to download it and to make mplayer play it from given positions...

  http://angg.twu.net/eev-intros/find-videos-intro.html
  http://angg.twu.net/eev-intros/find-audiovideo-intro.html

and integrating into Org the feature described there - namely: with a
certain minor mode activated `M-p' opens the current default video at
the first time offset of the current line - should be little more than
a 10-line hack...

Btw, that would make indices of time offsets in videos like the one in

http://orgmode.org/worg/org-tutorials/org-screencasts/org-mode-google-tech-talk.html
http://orgmode.org/worg/org-tutorials/org-screencasts/org-mode-google-tech-talk.org.html

trivial to execute. I don't have (yet) the skills to make things like
=1:23= become active links that do that in Org, though.

Cheers,
  Eduardo Ochs
  eduardoo...@gmail.com
  http://angg.twu.net/#eev
  edrx at freenode.org (at #eev, #org-mode, etc)


Re: [O] input data for babel blocks

2013-09-30 Thread Eric Schulte
Alan Schmitt alan.schm...@polytechnique.org writes:

 Hello,

 In my quest for analyzing my data in org mode tables, I'm trying to see
 if I can use my favorite language (i.e., ocaml). I'm thus looking at how
 to input such tables in a caml program. I found that the following works
 well:

 --8---cut here---start-8---
 #+name: data
 | 12 |
 | 42 |

 #+BEGIN_SRC ocaml :var x=data
 x
 #+END_SRC

 #+RESULTS:
 : - : int array array = [|[|12|]; [|42|]|]
 --8---cut here---end---8---

 (The only bad thing is that a single value is an array, but this is
 probably related to the following thing.) Unfortunately (for interaction
 with org mode), caml is strongly typed, and arrays must be
 homogeneous. Thus the following fails:

 --8---cut here---start-8---
 #+name: myinput
 | x | 12 |
 | y | 24 |

 #+BEGIN_SRC ocaml :var x=myinput
 x
 #+END_SRC
 --8---cut here---end---8---

 with the error in the toplevel:

 --8---cut here---start-8---
 # let x = [|[|x; 12|]; [|y; 24|]|];;
 x;;
 org-babel-ocaml-eoe;;
 Characters 17-19:
   let x = [|[|x; 12|]; [|y; 24|]|];;
^^
 Error: This expression has type int but an expression was expected of type
  string
 --8---cut here---end---8---

 I would like to change the parsing of table in ob-ocaml so that it
 generates an array of _tuples_, for instance for the previous example:

 #+BEGIN_SRC ocaml
 let x = [| (x, 12); (y, 24) |];;
 #+END_SRC

 I looked at the code, and this seems to be the relevant part:

 #+BEGIN_SRC emacs-lisp
 (defun org-babel-variable-assignments:ocaml (params)
   Return list of ocaml statements assigning the block's variables.
   (mapcar
(lambda (pair) (format let %s = %s;; (car pair)
 (org-babel-ocaml-elisp-to-ocaml (cdr pair
(mapcar #'cdr (org-babel-get-header params :var

 (defun org-babel-ocaml-elisp-to-ocaml (val)
   Return a string of ocaml code which evaluates to VAL.
   (if (listp val)
   (concat [| (mapconcat #'org-babel-ocaml-elisp-to-ocaml val ; ) |])
 (format %S val)))
 #+END_SRC

 I tried tweaking this to the following:

 #+BEGIN_SRC emacs-lisp
 (defun org-babel-variable-assignments:ocaml (params)
   Return list of ocaml statements assigning the block's variables.
   (mapcar
(lambda (pair) (format let %s = %s;; (car pair)
 (org-babel-ocaml-elisp-to-ocaml (cdr pair
(mapcar #'cdr (org-babel-get-header params :var

 (defun org-babel-ocaml-elisp-to-ocaml (val)
   Return a string of ocaml code which evaluates to VAL.
   (if (listp val)
   (concat [| (mapconcat #'org-babel-ocaml-elisp-to-ocaml-tuple val ; 
 ) |])
 (format %S val)))

 (defun org-babel-ocaml-elisp-to-ocaml-tuple (val)
   Return a string of ocaml code which evaluates to VAL, as a tuple.
   (if (listp val)
   (concat ( (mapconcat #'org-babel-ocaml-elisp-to-ocaml-tuple val , ) 
 ))
 (format %S val)))
 #+END_SRC

 Now the example seems to work:

 --8---cut here---start-8---
 #+name: myinput
 | x | 12 |
 | y | 24 |

 #+BEGIN_SRC ocaml :var x=myinput
 x
 #+END_SRC

 #+RESULTS:
 : - : (string * int) array = [|(x, 12); (y, 24)|]
 --8---cut here---end---8---

 (and the previous example is even nicer:
 --8---cut here---start-8---
 #+name: data
 | 12 |
 | 42 |

 #+BEGIN_SRC ocaml :var x=data
 x
 #+END_SRC

 #+RESULTS:
 : - : int array = [|12; 42|]
 --8---cut here---end---8---
 )

 I have the following questions for the list:
 - can I always assume that tables are passed as lists of lists?

Currently this is the default behavior in (I believe) every language.

 
 - would the patch above be a useful way to deal with this?

My problem with the patch above is that it makes OCaml different from
every other language (especially ob-haskell which has similar type
restraints), and that it doesn't work for tables with different
alignment, e.g.,

| x | y |
| 0 | 1 |

I guess one possible correct solution would be to use a variant type
with something like the following.

type orgCell =
  | Int of int
  | Float of float
  | String of string

 - is there a way to specify the :var parsing in a code block or in the
 table?


Currently there is not.  Perhaps there is an elegant solution using a
new header argument to control how values are represented in literal
source code.

This is an interesting question.  I'm not sure what is best here, but
ideally any solution will generalize to other strongly typed languages,
will support all possible tables, and will work simply for simple tables
allowing users to use tables without having to jump through typed hoops.

Cheers,


 Thanks,

 Alan


-- 
Eric Schulte

Re: [O] [BABEL] BUG - error on tangling - disappears when changing the filename

2013-09-30 Thread Eric Schulte

 The question is now why is this function org-babel-mark-file-as-tangled
 receives NULL as a buffer-file-name? 

 I'm not sure, but perhaps you could wrap the body of buffer-file-name in
 a (when (buffer-file-name) ...) form to protect against null files.

 Sounds reasonable and I'll put it in to have properly tangled files when
 this happens - but then the file-local-variables would not be added if
 the file name is null. Is there any way that I could find out why this
 is happening (or under which conditions)?


I'm not sure why this is happening.  You could use edebug to step
through the tangling process by edebugging the `org-babel-tangle'
function with (C-u C-M-x) i.e., (eval-defun 'edebug-it).

Cheers,

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] input data for babel blocks

2013-09-30 Thread Eric Schulte
Charles Berry ccbe...@ucsd.edu writes:

 Alan Schmitt alan.schmitt at polytechnique.org writes:

 
 Hello,
 
 In my quest for analyzing my data in org mode tables, I'm trying to see
 if I can use my favorite language (i.e., ocaml). I'm thus looking at how

 [discussion of revising org-babel-variable-assignments:lang deleted]

 
 I have the following questions for the list:
 - can I always assume that tables are passed as lists of lists?
 - would the patch above be a useful way to deal with this?
 - is there a way to specify the :var parsing in a code block or in the table?

 Alan,

 Nice description of a problem that has vexed me, too.

 It would be nice to have more flexibility in passing objects to src blocks
 in ones favored language via the :var header arg.

 Lacking that, another alternative to the approach you have crafted is to
 use elisp src blocks to set up the commands needed to create the objects,
 and then place the results of executing the elisp src block in the src
 block of your favored language using noweb, for example

 #+BEGIN_SRC mylang :noweb yes
   elisp-conversion-to-mylang(arg1,arg2)
 #+END_SRC
  
 might convert 'arg2' to an object of the desired type named 'arg1' in a 
 'mylang' src block.

 FWIW, my own usage of this approach is to write LaTeX code including 
 backslashes and unmatched quotes, then convert the code to a valid R
 character string for labelling figures (which undoubled backslashes and 
 unmatched quotes would invalidate).

 HTH,

 Chuck


Hi Chuck,

This looks like a very powerful approach, with the added benefit of not
requiring the addition of any new constructs to Org-mode code blocks.

For now I'd say this is the best way to handle these typing problems.
I'd say it would be nice to document this solution somewhere, but I have
no idea where would be a good place for it to live (i.e., where future
users would find it), so hopefully for now text search through the
mailing list will suffice.  With that in mind please ignore the
following string of keywords which are purely for SEO.

keywords
table type string integer number cell tuple strongly typed haskell ocaml
/keywords

Cheers,

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] Needing help on org-gnus + LaTeX export -

2013-09-30 Thread Nick Dokos
Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 Hi Eric, Hi everybody,

 Here is the beginning of my init.el in my .emacs.d/ :

 (message * --[ Loading my Emacs init file ]--)
 (add-to-list 'load-path ~/.emacs.d/org-8.2/lisp)
 (add-to-list 'load-path /.emacs.d/org-8.2/contrib/lisp t)
 (package-initialize)

 last stable version of org-mode is correctly installed: 


Not necessarily: org-version might work, but that does not mean
that the rest of org does.

 Org-mode version 8.2 (8.2-dist @ /home/joseph/.emacs.d/org-8.2/lisp/)


Do ordinary operation in org-mode work? Try adding some headlines and
some text, moving around (perhaps using the menu if you don't know the
keydefs yet), adding some timestamps, tags, properties etc.

 org-mime installed via elpa

 Now test of org-mime-htmlize :

 org-uniquify: Wrong type argument: sequencep, my-fill-nobreak-predicate


Where is my-fill-nobreak-predicate defined? That is not an emacs
variable afaik, so it must come from your configuration.

Also, can you get a backtrace here? I cannot see how this arises.  See section
1.4, Feedback, in the org manual on how to produce a useful
backtrace. OTOH, it might not be worth it for this problem: the
installation seems really borked.

NB: however, it will certainly be worth knowing how to get a backtrace
once you get these problems solved - there *will* be other problems in
the future and backtraces are useful tools for diagnosis.

 And test of C-e C-l for conversion of a file.org into a .tex file :

 org-uniquify: Wrong type argument: sequencep, my-fill-nobreak-predicate


This all seems screwed-up in various mysterious and tangled ways.  Is
there somebody with emacs experience nearby who could help you?  If not,
I would go back to the beginning: start with a default emacs
installation with *no* customizations at all, then add latest org-mode
and the bare minimum of customizations so that it is chosen in
preference to the org-mode that comes with emacs. Then test it carefully
and thoroughly before you try adding other customizations and org-mime.
Add things one at a time and keep testing.

-- 
Nick




Re: [O] Org Tutorials need more structure

2013-09-30 Thread Suvayu Ali
Hi Alan, Eric, Thomas, and others,

On Mon, Sep 30, 2013 at 06:01:57PM +0100, Eric S Fraga wrote:
 Alan Schmitt alan.schm...@polytechnique.org writes:
 
  fatkasuvayu+li...@gmail.com writes:
 
  To me the best way to describe Org is: a programmable and dynamic
  plain-text note taking platform.
 
  I really like this description. Short, and to the point.
 
 but it's missing what for me is the key point which got me into org:
 time management!  So how about
 
   a programmable and dynamic plain-text note taking time management platform
   
 but I'm sure somebody else will think something is missing and make
 this sentence even longer ;-)

I'm glad people seem to like it :).  Although I would refrain from
extending that particular sentence.  This is what was going through my
head:

1. What does an Org document look like?  It is primarily a text outline.
2. Is there more to the outline?  Well I can:
   - export it,
   - put metadata on it, like: timestamps, clocks, etc,
   - put TODO markers on it, ... and so on
3. What about the text (content)?  It is really just text, but supports
   a few nifty things.
   - Links to other documents, other applications, executable lisp, etc.
   - It also supports nifty formatting and structural markup.
   - Tables with a deceptively advanced math engine underneath to do
 spreadsheet tasks.
   - Source blocks, optionally which can be evaluated and can interact
 with other text content in the Org file: tables, other source
 blocks, etc.

But then I thought, Hmm, I can't put all that.  So what is at the
core?  Outline with text, lets just call that notes.  And all the cool
features?  I can use special markup to add enhance the text, aggregate
and filter it, and present it in many ways; that is quite dynamic.  I
can also program it in pretty much any language.

Hence: Org is a programmable and dynamic note taking platform.

This still does not do justice, so lets put in supporting follow-up
sentences highlighting my favourite bits.

Hence my following sentence: All its features are essentially built on
this ability: planning  task management, authoring or publishing,
literate programming, and what not.

Now others can tack on a description for their favourite bit of Org as
supporting sentences.  Anyway, I thought clarifying my thoughts would
help improve the discussion.

Hope this helps,

:)

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [Babel] Padlines

2013-09-30 Thread Vladimir Lomov
Hello,
** Eric Schulte [2013-09-28 06:17:51 -0600]:


 The blank line which was inserted between blocks isn't anymore for me.

 ECM:

 --8---cut here---start-8---
 * Tangle these blocks
   :PROPERTIES:
   :tangle:   yes
   :padline:  yes
   :END:

 #+begin_src emacs-lisp :file test.csv
   data
 #+end_src

 #+begin_src emacs-lisp :file test.csv
   datb
 #+end_src
 --8---cut here---end---8---

 results in:

 --8---cut here---start-8---
   data
   datb
 --8---cut here---end---8---

 Note that I tried adding :padline to yes, but I normally should not, as it 
 is
 the default.

 Best regards,
   Seb

 Hi Seb,

 Thanks for this bug report, there was a problem in my previous patch in
 this thread.  I've just pushed up a fix which should solve this problem.

And seems that you miss another 'padline' in function
'org-babel-spec-to-string', line 323. I attached small patch which
removes that line so I can tangle Org document with shell scripts.

---
WBR, Vladimir Lomov

-- 
Coming to Stores Near You:

101 Grammatically Correct Popular Tunes Featuring:

(You Aren't Anything but a) Hound Dog
It Doesn't Mean a Thing If It Hasn't Got That Swing
I'm Not Misbehaving

And A Whole Lot More...
diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 63d0a47..f655711 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -322,7 +322,6 @@ that the appropriate major-mode is set.  SPEC has the form:
 	 (insert-comment (lambda (text)
 			   (when (and comments (not (string= comments no))
   ( (length text) 0))
-			 (when padline (insert \n))
 			 (comment-region (point) (progn (insert text) (point)))
 			 (end-of-line nil) (insert \n)
 (when comment (funcall insert-comment comment))