Re: [O] Export options being ignored

2011-05-05 Thread Nick Dokos
Nick Dokos nicholas.do...@hp.com wrote:

 ,
 | aa6dba8a74016587755c250bb8cc4743a4082ea1 is the first bad commit
 `
 

Taking a look at the commit:

,
| commit aa6dba8a74016587755c250bb8cc4743a4082ea1
| Author: Lawrence Mitchell we...@gmx.li
| Date:   Thu Jan 20 18:23:22 2011 +
| 
| Only match complete words in org-export-add-options-to-plist
| 
| * org-exp.el (org-export-add-options-to-plist): Require match to start
| at a word-boundary.
| 
| Previously, if an option was the suffix of another option (such as TeX
| and LaTeX) the setting for the former would propagator to the latter.
| This seems like an unintended consequence of a lax regexp in
| org-export-add-options-to-plist.  This patch allows options to share a
| suffix with another option by requiring that the match against an
| option starts at a word-boundary.
| 
| diff --git a/lisp/org-exp.el b/lisp/org-exp.el
| index a265c3b..4a10303 100644
| --- a/lisp/org-exp.el
| +++ b/lisp/org-exp.el
| @@ -830,7 +830,7 @@ security risks.
|(let ((op org-export-plist-vars))
|   (while (setq o (pop op))
| (if (and (nth 1 o)
| -(string-match (concat (regexp-quote (nth 1 o))
| +(string-match (concat \\ (regexp-quote (nth 1 o))
|:\\([^ \t\n\r;,.]*\\))
|options))
| (setq p (plist-put p (car o)
`

explains the problem: \ matches the empty string at the beginning of a
word (i.e. if the syntax class of the next character is word) but it
does not at the beginning of a char that is of some other syntax class
(I think it will not match anything in this case).  So Eden diagnosed it
correctly: it *is* a parsing problem and it *does* involve the non-word
options.

At this point, the cure looks worse than the disease, so this commit should
probably be reverted.

Thanks,
Nick





Re: [O] Org table with long lines visibility

2011-05-05 Thread Michael Brand
Hi Johnny

On Wed, May 4, 2011 at 19:48, Johnny yggdra...@gmx.co.uk wrote:
 [...] so I am wondering if there is any way to make the
 'org-table-edit-field' to be permanently visible in a buffer,
 automatically updating while moving around in the table to view the full
 content of the current cell?

There is not such a way yet but I totally agree that it would be
nothing but natural to have keys assigned to the buffer that opens
with C-c ` to move around in the current table. I suggest
S-up/down/left/right for this in honor of the same keys in
the table formula editor (C-c ') used to move around field
references. These keys could be available at least as long as the
buffer/cell content is left unchanged.

Michael



Re: [O] org-capture in message-mode buffer

2011-05-05 Thread Ulf Stegemann
Leo sdl@gmail.com wrote:

 On 2011-05-04 21:14 +0800, Ulf Stegemann wrote:
 The idea behind `org-store-link' (which is triggered by `org-capture')
 in message mode is to store a link to a /sent/ message even though the
 message has not been sent by the time you call `org-store-link'.  This
 currently works only with Gnus and only if there's a Gcc header present
 in the message you are working on.  `org-gnus-store-link' needs the Gcc
 header to determine where the message would go once it has been sent (in
 order to create a link to it).  The error you've encountered means that
 there hasn't been a Gcc header in your message when you've called
 `org-capture'.

 I think org-gnus-store-link is too aggressive.

Hmmm, is it? Suppose that linking to a message yet to be archived
wouldn't be there, then `org-store-link' will tell you `org-store-link:
Cannot link to a buffer which is not visiting a file' when called in a
message buffer (like in any other non-file buffer).

 I also dislike the fact that it inserts the Message-Id header.

As the org link to Gnus messages consists of the group and the message
id the latter one is need (as is the first one, the Gcc header).  No
reliable message id, no org link.  One may argue if it's a good idea to
generate the message id when calling `org-store-link' but I think it's a
fair tradeoff to accept this in order to get the link to the message yet
to be archived.

 Also, the stored link may be useless unless it is referenced in the
 template chosen by the user.

Hmmm, I'm not quite sure what your scenario is here.  If you dislike the
behaviour of `org-store-link' in message mode and furthermore do not
want to store a link at all since your template does not use it, why do
you call `org-capture' from the message mode buffer at all?

Ulf




Re: [O] Export options being ignored

2011-05-05 Thread Carsten Dominik

On 5.5.2011, at 07:08, Nick Dokos wrote:

 Nick Dokos nicholas.do...@hp.com wrote:
 
 ,
 | aa6dba8a74016587755c250bb8cc4743a4082ea1 is the first bad commit
 `
 
 
 Taking a look at the commit:
 
 ,
 | commit aa6dba8a74016587755c250bb8cc4743a4082ea1
 | Author: Lawrence Mitchell we...@gmx.li
 | Date:   Thu Jan 20 18:23:22 2011 +
 | 
 | Only match complete words in org-export-add-options-to-plist
 | 
 | * org-exp.el (org-export-add-options-to-plist): Require match to start
 | at a word-boundary.
 | 
 | Previously, if an option was the suffix of another option (such as TeX
 | and LaTeX) the setting for the former would propagator to the latter.
 | This seems like an unintended consequence of a lax regexp in
 | org-export-add-options-to-plist.  This patch allows options to share a
 | suffix with another option by requiring that the match against an
 | option starts at a word-boundary.
 | 
 | diff --git a/lisp/org-exp.el b/lisp/org-exp.el
 | index a265c3b..4a10303 100644
 | --- a/lisp/org-exp.el
 | +++ b/lisp/org-exp.el
 | @@ -830,7 +830,7 @@ security risks.
 |(let ((op org-export-plist-vars))
 | (while (setq o (pop op))
 |   (if (and (nth 1 o)
 | -  (string-match (concat (regexp-quote (nth 1 o))
 | +  (string-match (concat \\ (regexp-quote (nth 1 o))
 |  :\\([^ \t\n\r;,.]*\\))
 |  options))
 |   (setq p (plist-put p (car o)
 `
 
 explains the problem: \ matches the empty string at the beginning of a
 word (i.e. if the syntax class of the next character is word) but it
 does not at the beginning of a char that is of some other syntax class
 (I think it will not match anything in this case).  So Eden diagnosed it
 correctly: it *is* a parsing problem and it *does* involve the non-word
 options.
 
 At this point, the cure looks worse than the disease, so this commit should
 probably be reverted.

This is fixed now, by looking for white space instead of beginning-of-word.
Thanks for the analysis.

- Carsten




Re: [O] Problems with capture in tables

2011-05-05 Thread Aankhen
Hi,

On Wed, May 4, 2011 at 12:55, Thomas Holst thomas.ho...@de.bosch.com wrote:
 I am trying to put a line into a table via org capture.

 My org file looks like this:
 [snip]

 My capture template looks like this:
 #+begin_src emacs-lisp
 (setq org-capture-templates
      '((x Testing table-line
       (file+headline c:/temp/TestCaptTbl.org Heading 1)
           | # | %t | %^{weight} | | :table-line-pos II-1)))
 #+end_src

 When I invoke capture I get the following error (backtrace):

 [snip]

 Now if I leave `:table-line-pos II-1' out of the template it works fine
 but the line is appended at the end. That's obviously not what I want.

 [snip]

As far as I can tell, the value of ‘:table-line-pos’ is supposed to be
a string.  This seems to work for me:

,
| (setq org-capture-templates
|   '((x Testing table-line
|  (file+headline Z:/temp/TestCaptTbl.org Heading 1)
|  | # | %t | %^{weight} | | :table-line-pos II-1)))
`

Hope this helps.
Aankhen



Re: [O] org-capture in message-mode buffer

2011-05-05 Thread Leo
On 2011-05-05 15:02 +0800, Ulf Stegemann wrote:
 Hmmm, is it? Suppose that linking to a message yet to be archived
 wouldn't be there, then `org-store-link' will tell you `org-store-link:
 Cannot link to a buffer which is not visiting a file' when called in a
 message buffer (like in any other non-file buffer).

When I call org-capture in any buffer not visiting any file except in
message mode, I don't get any error.

 I also dislike the fact that it inserts the Message-Id header.

 As the org link to Gnus messages consists of the group and the message
 id the latter one is need (as is the first one, the Gcc header).  No
 reliable message id, no org link.  One may argue if it's a good idea to
 generate the message id when calling `org-store-link' but I think it's a
 fair tradeoff to accept this in order to get the link to the message yet
 to be archived.

If that depends on the Gcc header being available, it should check it
and do nothing when users does not use one.

 Also, the stored link may be useless unless it is referenced in the
 template chosen by the user.

 Hmmm, I'm not quite sure what your scenario is here.  If you dislike the
 behaviour of `org-store-link' in message mode and furthermore do not
 want to store a link at all since your template does not use it, why do
 you call `org-capture' from the message mode buffer at all?

 Ulf

That seems like a very strange question. The only reason to have a
global keybinding to org-capture is so that one can invoke it anywhere
anytime. For example, while composing a new mail I might have a great
idea I want to add to my Notes but I don't care where I invoke
org-capture as illustrated by the template I use:

 (n Notes entry (file Notes.org) * %?\n  %i :prepend t)

BTW, the reason I have stopped using Gcc (long ago) is that I have gmail
to do archiving for me. It is accessible anytime anywhere and not tied
to a specific machine.

I believe the following patch is due.

Leo

diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index eba4cb44..7290f1c6 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -187,7 +187,8 @@ (defun org-gnus-store-link ()
  group newsgroups message-id x-no-archive))
   (org-add-link-props :link link :description desc)
   link))
-   ((eq major-mode 'message-mode)
+   ((and (eq major-mode 'message-mode)
+(message-fetch-field gcc))
 (setq org-store-link-plist nil)  ; reset
 (save-excursion
   (save-restriction




Re: [O] Export options being ignored

2011-05-05 Thread Lawrence Mitchell
Carsten Dominik wrote:
 On 5.5.2011, at 07:08, Nick Dokos wrote:

[...]

 explains the problem: \ matches the empty string at the beginning of a
 word (i.e. if the syntax class of the next character is word) but it
 does not at the beginning of a char that is of some other syntax class
 (I think it will not match anything in this case).  So Eden diagnosed it
 correctly: it *is* a parsing problem and it *does* involve the non-word
 options.

 This is fixed now, by looking for white space instead of beginning-of-word.
 Thanks for the analysis.

Indeed, thanks.

Lawrence
-- 
Lawrence Mitchell we...@gmx.li




Re: [O] Problems with capture in tables

2011-05-05 Thread Thomas Holst
Hi Aankhen,

thanks for your answer.
· Aankhen aank...@gmail.com wrote:

 Hi,

 On Wed, May 4, 2011 at 12:55, Thomas Holst thomas.ho...@de.bosch.com wrote:
 I am trying to put a line into a table via org capture.

 My org file looks like this:
 [snip]

 My capture template looks like this:
 #+begin_src emacs-lisp
 (setq org-capture-templates
      '((x Testing table-line
       (file+headline c:/temp/TestCaptTbl.org Heading 1)
           | # | %t | %^{weight} | | :table-line-pos II-1)))
 #+end_src

 When I invoke capture I get the following error (backtrace):

 [snip]

 Now if I leave `:table-line-pos II-1' out of the template it works fine
 but the line is appended at the end. That's obviously not what I want.

 [snip]

 As far as I can tell, the value of ‘:table-line-pos’ is supposed to be
 a string.  This seems to work for me:

 ,
 | (setq org-capture-templates
 |   '((x Testing table-line
 |  (file+headline Z:/temp/TestCaptTbl.org Heading 1)
 |  | # | %t | %^{weight} | | :table-line-pos II-1)))
 `

 Hope this helps.
 Aankhen

That did the trick - works like a charm! I was shure I tried the string,
but I assume there was a typing error.

Thanks again.

-- 
Mit freundlichen Grüßen / Best regards 

Thomas Holst 



Re: [O] org-capture in message-mode buffer

2011-05-05 Thread Leo
On 2011-05-05 15:59 +0800, Leo wrote:
 I believe the following patch is due.

Think about it some more, there is a reason to signal an error when
calling org-store-link interactively but it should not when invoked by
org-capture. Otherwise it will get in the way.

Leo




Re: [O] [PATCH] Revised my #+index preprocessor to fontify index entries.

2011-05-05 Thread Carsten Dominik

On 4.5.2011, at 15:10, Robert Goldman wrote:

 On 5/4/11 May 4 -3:03 AM, Carsten Dominik wrote:
 Hi Robert,
 
 I am rejecting this part of the patch for now.  More thinking is needed here,
 also about special characters etc.  No sure yet what the right course will 
 be,
 but this is much too limited.
 
 Carsten,
 
 I don't fully understand the latex exporter, but I believe that
 somewhere in it, LaTeX contexts are protected from translation.
 Question:  would it be possible to somehow mark the argument to \index{}
 as being NOT protected?  If we could do that, I suspect the rest of the
 processing would run its course.
 
 I am working on a manual so correct indexing of monospaced entries is
 critical to me! ;-)

I took another look, and your idea actually works, because the function you 
used does
do quite complete formatting.  I have put this part back into the code.

- Carsten

 
 Best,
 r
 
 
 - Carsten
 
 
 On May 1, 2011, at 6:01 PM, rpgold...@sift.info wrote:
 
 From: Robert P. Goldman rpgold...@real-time.com
 
 ---
 The previous patch wasn't quite right because, e.g., it would index
 #+INDEX: =Class=
 as 
 \\index{=Class=}
 instead of
 \\index{\texttt{Class}}
 This patch attempts to fix that.
 
 Question:  would you prefer to have this reformulated as some kind of 
 unified patch
 with the earlier one?
 
 lisp/org-latex.el |   12 +---
 1 files changed, 9 insertions(+), 3 deletions(-)
 
 diff --git a/lisp/org-latex.el b/lisp/org-latex.el
 index 731d6e6..b8f7019 100644
 --- a/lisp/org-latex.el
 +++ b/lisp/org-latex.el
 @@ -1,4 +1,4 @@
 -;;; org-latex.el --- LaTeX exporter for org-mode
 +;; org-latex.el --- LaTeX exporter for org-mode
 ;;
 ;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 ;;
 @@ -2331,9 +2331,15 @@ The conversion is made depending of STRING-BEFORE 
 and STRING-AFTER.
   (let ((case-fold-search t))
  (re-search-forward ^[ \t]*#\\+index:[ \t]*\\(.*?\\)[ \t]*$ nil t))
   ( (match-end 1) (match-beginning 1)))
 +;;  (message Found a #+INDEX match...)
(let ((entry (match-string 1)))
 -;;  (message Found a #+INDEX match...)
 -  (replace-match (format \\index{%s} entry) t t)))
 +  (replace-match (format \\index{%s} entry) t t)
 +  ;; now process font directives in the index entry
 +  (re-search-forward ^[ \t]*index{\\([^}]\\)} nil t)
 +  ;; (message (format Trying to fontify string %s (match-string 1)))
 +  (save-restriction
 +   (narrow-to-region (match-beginning 1) (match-end 1))
 +   (org-export-latex-fontify
 
  ;; Convert center
  (goto-char (point-min))
 -- 
 1.7.3.5
 
 
 
 - Carsten
 
 
 
 




Re: [O] LaTeX beamer class text

2011-05-05 Thread Eric S Fraga
John Tait johngt...@gmail.com writes:

 Matt (and Daniel Bausch -- sorry for double post earlier)

 I've found that beamer allowframebreaks doesn't work for Org files that
 have been included with #+INCLUDE: .

[...]

 Is there a way to allowframebreaks work globally or at least in included
 files?

I've gone through the beamer manual but haven't seen any way of doing
so.  However, it was a cursory look so maybe you could check it out more
closely (the manual is 200 pages long...).

I wouldn't recommend allowframebreaks as a global option, in any case.
IMO, that leads to sloppy slide design, but this *is* my opinion only!
There are times where it is needed but it is generally better to be
conscious of needing it.  Just my two ¢...

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.249.gbf7ce.dirty)



Re: [O] org-capture in message-mode buffer

2011-05-05 Thread Ulf Stegemann
Leo sdl@gmail.com wrote:

 On 2011-05-05 15:02 +0800, Ulf Stegemann wrote:
 Hmmm, is it? Suppose that linking to a message yet to be archived
 wouldn't be there, then `org-store-link' will tell you `org-store-link:
 Cannot link to a buffer which is not visiting a file' when called in a
 message buffer (like in any other non-file buffer).

 When I call org-capture in any buffer not visiting any file except in
 message mode, I don't get any error.

I see.  That seems to be the very real problem, no?

 I also dislike the fact that it inserts the Message-Id header.

 As the org link to Gnus messages consists of the group and the message
 id the latter one is need (as is the first one, the Gcc header).  No
 reliable message id, no org link.  One may argue if it's a good idea to
 generate the message id when calling `org-store-link' but I think it's a
 fair tradeoff to accept this in order to get the link to the message yet
 to be archived.

 If that depends on the Gcc header being available, it should check it
 and do nothing when users does not use one.

We are really talking about `org-gnus-store-link' here.  The whole
purpose of that function is to create an org link.  I do not agree that
this function should silently do nothing when there's no Gcc header
present.  If the function fails to do what it is meant to do, it should
throw an error.

Another story is if `org-capture' should fail only because
`org-gnus-store-link' (which it called) fails.  There are pros and cons.
I agree that it may be annoying to not be able to org-capture something
from within a message buffer.  OTOH, there may be scenarios where an
error message is helpful because you otherwise would think you've
created a link with your capture but in fact haven't.

 Also, the stored link may be useless unless it is referenced in the
 template chosen by the user.

 Hmmm, I'm not quite sure what your scenario is here.  If you dislike the
 behaviour of `org-store-link' in message mode and furthermore do not
 want to store a link at all since your template does not use it, why do
 you call `org-capture' from the message mode buffer at all?

 That seems like a very strange question. The only reason to have a
 global keybinding to org-capture is so that one can invoke it anywhere
 anytime. For example, while composing a new mail I might have a great
 idea I want to add to my Notes but I don't care where I invoke
 org-capture as illustrated by the template I use:

  (n Notes entry (file Notes.org) * %?\n  %i :prepend t)

Okay, I see.  This does not address the real problem but as a workaround
you could have something like

--8--cut herestart8---
emacsclient -e '(org-capture nil n)'
--8--cut here-end-8---

and bind it to a window manager shortcut.  This will allow you to take a
note even when you're not in emacs ... and of course also when in
emacs/message mode.

 BTW, the reason I have stopped using Gcc (long ago) is that I have gmail
 to do archiving for me. It is accessible anytime anywhere and not tied
 to a specific machine.

This sounds interesting (at least for those that use gmail).  Is the URL
where the archived message will be available predictable, i.e. is it
possible to know it while still composing the message?  If yes, it would
be great to expand `org-gnus-store-link' to either use a Gnus archive
group (Gcc) or a gmail one.

Leo sdl@gmail.com wrote:

 On 2011-05-05 15:59 +0800, Leo wrote:
 I believe the following patch is due.

 Think about it some more, there is a reason to signal an error when
 calling org-store-link interactively but it should not when invoked by
 org-capture. Otherwise it will get in the way.

I tend to agree but am not completely sure (s.a.).

Ulf




[O] Applying style to a paragraph for HTML export

2011-05-05 Thread Robert Pluim
(I thought this would be a FAQ, but I can't find anything similar)

Hi,

I'm exporting from org to html, which is working well. Since my final
target is MSWord, I'd like to add style information to various
paragraphs, ie bold, underline etc. I can see how to do eg *bold* for
individual words, but how do I apply that kind of formatting to a span
of text?

(I'm CSS-ignorant, so please use small words and talk slowly)

Thanks

Robert




[O] PyOrgMode: Any idea how to get the properties of a node?

2011-05-05 Thread Miguel Ruiz
I am using PyOrgMode to process the nodes of an orgmode file.

I have had no problem with the OrgDataStructure class, but, as you can see

https://github.com/bjonnh/PyOrgMode/blob/master/PyOrgMode.py

the drawer and properties are parsed by another class, OrgDrawer, and I cannot, 
i.e., I am not so fluent in python to view the link between OrgDataStructure 
and OrgDrawer.

Can anyone help me?


My minimal code:

import PyOrgMode
tree = PyOrgMode.OrgDataStructure()
tree.load_from_file('test.org')


for i in tree.root.content:
   print i


And what else to get the properties of, let's say, tree.root.content[0]?

TIA

Re: [O] Export options being ignored

2011-05-05 Thread Eden Cardim
 Carsten == Carsten Dominik carsten.domi...@gmail.com writes:

Carsten This is fixed now, by looking for white space instead of
Carsten beginning-of-word. Thanks for the analysis.

Still needs the following patch for it to work:

--8---cut here---start-8---
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 5bf1d1b..cda1f98 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -864,7 +864,7 @@ security risks.
 options))
  (setq p (plist-put p (car o)
 (car (read-from-string
-  (match-string 1 options))
+  (match-string 2 options))
   p)
 
 (defun org-export-add-subtree-options (p pos)
--8---cut here---end---8---

-- 
Eden Cardim
Software Engineer
edencardim.com
+55 73 9986-3963




Re: [O] LaTeX beamer class text

2011-05-05 Thread John Tait
Thanks for your reply. I think a global option would be useful because I
mightn't know in advance whether I'd need slides for particular headings or
not. I'm thinking of a use case where I have produced a long LaTeX article
and have selected certain tags to do so, and I would build a beamer
presentation to brief it out by adding a :briefing: tag to a subset of the
exported article headings (so the beamer slides are more concise).

John

On Thu, May 5, 2011 at 8:50 AM, Eric S Fraga e.fr...@ucl.ac.uk wrote:

 John Tait johngt...@gmail.com writes:

  Matt (and Daniel Bausch -- sorry for double post earlier)
 
  I've found that beamer allowframebreaks doesn't work for Org files that
  have been included with #+INCLUDE: .

 [...]

  Is there a way to allowframebreaks work globally or at least in
 included
  files?

 I've gone through the beamer manual but haven't seen any way of doing
 so.  However, it was a cursory look so maybe you could check it out more
 closely (the manual is 200 pages long...).

 I wouldn't recommend allowframebreaks as a global option, in any case.
 IMO, that leads to sloppy slide design, but this *is* my opinion only!
 There are times where it is needed but it is generally better to be
 conscious of needing it.  Just my two ¢...

 --
 : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
 : using Org-mode version 7.5 (release_7.5.249.gbf7ce.dirty)



Re: [O] Row formula in orgtbl mode

2011-05-05 Thread Michael Bach
Michael Brand michael.ch.br...@gmail.com writes:

 Your range formula @4$2..@4$5=@-1*@-2 will work if you upgrade at
 least to this commitdiff
 http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=8237c9ae6d587a22646333e0315683675e2db538

I am now running the 7.5 development version checked out today.  I knew
I would have to do this one day...

 |   |a |b |c |d |
 | Specific cost |1 |9 |2 |3 |
 | System size   | 1000 | 1000 | 1000 | 1000 |
 |   | 1000 | 9000 | 2000 | 3000 |
 | ...   |  ... |  ... |  ... |  ... |
 #+TBLFM: @4$2..@4$5=@-1*@-2

 For this application I would suggest
 #+TBLFM: @4$..@4$=@-1*@-2

Thanks for the quick and competent answer Michael, it worked right away.

MB



Re: [O] Applying style to a paragraph for HTML export

2011-05-05 Thread Jambunathan K
Robert Pluim rpl...@gmail.com writes:

 (I thought this would be a FAQ, but I can't find anything similar)

 Hi,

 I'm exporting from org to html, which is working well. Since my final
 target is MSWord, I'd like to add style information to various
 paragraphs, ie bold, underline etc. I can see how to do eg *bold* for
 individual words, but how do I apply that kind of formatting to a span
 of text?

I recommend using the odt exporter and then use LibreOffice to convert
the resulting file to MSWord.

http://orgmode.org/worg/org-faq.html#convert-to-open-office

You can search for org-odt in this mailing list if you need further
info.

Jambunathan K.


 (I'm CSS-ignorant, so please use small words and talk slowly)

 Thanks

 Robert




-- 



Re: [O] Applying style to a paragraph for HTML export

2011-05-05 Thread Robert Pluim
Jambunathan K kjambunat...@gmail.com writes:

 Robert Pluim rpl...@gmail.com writes:

 (I thought this would be a FAQ, but I can't find anything similar)

 Hi,

 I'm exporting from org to html, which is working well. Since my final
 target is MSWord, I'd like to add style information to various
 paragraphs, ie bold, underline etc. I can see how to do eg *bold* for
 individual words, but how do I apply that kind of formatting to a span
 of text?

 I recommend using the odt exporter and then use LibreOffice to convert
 the resulting file to MSWord.

 http://orgmode.org/worg/org-faq.html#convert-to-open-office

Whilst that would work, it's inherently a 2-step process, versus 1 for
the html route, plus it requires installing yet-another-application. In
any case, the example file for the odt-converter has corrected my
misunderstanding: *bold* works even for multiple words (although it
appears the various style markers don't nest: */bold-italic/* give me
the same as *bold*).

Thanks

Robert




Re: [O] Applying style to a paragraph for HTML export

2011-05-05 Thread Jambunathan K
Robert Pluim rpl...@gmail.com writes:

 Jambunathan K kjambunat...@gmail.com writes:

 Robert Pluim rpl...@gmail.com writes:

 (I thought this would be a FAQ, but I can't find anything similar)

 Hi,

 I'm exporting from org to html, which is working well. Since my final
 target is MSWord, I'd like to add style information to various
 paragraphs, ie bold, underline etc. I can see how to do eg *bold* for
 individual words, but how do I apply that kind of formatting to a span
 of text?

 I recommend using the odt exporter and then use LibreOffice to convert
 the resulting file to MSWord.

 http://orgmode.org/worg/org-faq.html#convert-to-open-office

 Whilst that would work, it's inherently a 2-step process, versus 1 for
 the html route, plus it requires installing yet-another-application. 

I thought you said your final target is MSWord and not html.

 In any case, the example file for the odt-converter has corrected my
 misunderstanding: *bold* works even for multiple words (although it
 appears the various style markers don't nest: */bold-italic/* give me
 the same as *bold*).

Spanned text has to be part of the single emacs line and not be broken
across multiple lines.


 Thanks

 Robert




-- 



Re: [O] Applying style to a paragraph for HTML export

2011-05-05 Thread Jambunathan K
Robert Pluim rpl...@gmail.com writes:

 Jambunathan K kjambunat...@gmail.com writes:

 Robert Pluim rpl...@gmail.com writes:

 (I thought this would be a FAQ, but I can't find anything similar)

 Hi,

 I'm exporting from org to html, which is working well. Since my final
 target is MSWord, I'd like to add style information to various
 paragraphs, ie bold, underline etc. I can see how to do eg *bold* for
 individual words, but how do I apply that kind of formatting to a span
 of text?

 I recommend using the odt exporter and then use LibreOffice to convert
 the resulting file to MSWord.

 http://orgmode.org/worg/org-faq.html#convert-to-open-office

 Whilst that would work, it's inherently a 2-step process, versus 1 for
 the html route, plus it requires installing yet-another-application. In
 any case, the example file for the odt-converter has corrected my
 misunderstanding: *bold* works even for multiple words (although it
 appears the various style markers don't nest: */bold-italic/* give me
 the same as *bold*).

If you are using the odt exporter and if you don't use strikethrough
(let's say) you can repurpose OrgStrike style to render bold italic
style using the Stylist.


 Thanks

 Robert




-- 



Re: [O] Applying style to a paragraph for HTML export

2011-05-05 Thread Robert Pluim
Jambunathan K kjambunat...@gmail.com writes:

 Robert Pluim rpl...@gmail.com writes:

 Jambunathan K kjambunat...@gmail.com writes:

 Robert Pluim rpl...@gmail.com writes:

 (I thought this would be a FAQ, but I can't find anything similar)

 Hi,

 I'm exporting from org to html, which is working well. Since my final
 target is MSWord, I'd like to add style information to various
 paragraphs, ie bold, underline etc. I can see how to do eg *bold* for
 individual words, but how do I apply that kind of formatting to a span
 of text?

 I recommend using the odt exporter and then use LibreOffice to convert
 the resulting file to MSWord.

 http://orgmode.org/worg/org-faq.html#convert-to-open-office

 Whilst that would work, it's inherently a 2-step process, versus 1 for
 the html route, plus it requires installing yet-another-application. 

 I thought you said your final target is MSWord and not html.

It is, but MSWord can read html directly, so no extra step is required.

 In any case, the example file for the odt-converter has corrected my
 misunderstanding: *bold* works even for multiple words (although it
 appears the various style markers don't nest: */bold-italic/* give me
 the same as *bold*).

 Spanned text has to be part of the single emacs line and not be broken
 across multiple lines.

Ah, I don't think that's documented anywhere. Looks like I'll have to
turn off auto-fill.

Thanks

Robert




[O] typo

2011-05-05 Thread Cor Ninaber

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

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

Your bug report will be posted to the Org-mode mailing list.


Hi
First of I've got to say I love org-mode. The more I work with it the
more I am amazed by the possibility, haven't encounter anything I miss.

This bug is a very silly little thing but there is missing a letter in the
description of Org Mobile Index File in the settings. Namely inks
should be links (see the copy below).
Sorry for not fixing it myself, but I don't (yet) know how to change it myself.

Regards and keep up the great work,
Cor

Org Mobile Index File: Hide Value index.org
   State: STANDARD.
   The index file with inks to all Org files that should be loaded by 
MobileOrg. Hide Rest   
   Relative to `org-mobile-directory'.  The Address field in the MobileOrg setup
   should point to this file.

Emacs  : GNU Emacs 23.3.1 (i486-pc-linux-gnu, GTK+ Version 2.24.3)
 of 2011-04-10 on raven, modified by Debian
Package: Org-mode version 7.5



Re: [O] Applying style to a paragraph for HTML export

2011-05-05 Thread Nick Dokos
Robert Pluim rpl...@gmail.com wrote:

 (I thought this would be a FAQ, but I can't find anything similar)
 
 Hi,
 
 I'm exporting from org to html, which is working well. Since my final
 target is MSWord, I'd like to add style information to various
 paragraphs, ie bold, underline etc. I can see how to do eg *bold* for
 individual words, but how do I apply that kind of formatting to a span
 of text?
 
 (I'm CSS-ignorant, so please use small words and talk slowly)
 

Reading section 12.5.8, CSS support, and experimenting a bit,
I came up with a short example that I hope will clarify that section
for the CSS-ignorant (which I mostly am):

--8---cut here---start-8---
#+OPTIONS: ^:nil
#+STYLE: style type=text/css .bold {color: red;} /style
#+STYLE: style type=text/css .inner {color: blue;} /style

* Headline
  :PROPERTIES:
  :HTML_CONTAINER_CLASS: bold
  :END:
This is a bold section. This is done by using the HTML_CONTAINER_CLASS
property of the subtree and giving it the value bold, then setting the
style for class _bold_ to accomplish the desired goal.

But you can selectively
#+HTML: span class=inner
change some things like this
#+HTML: /span
if you want.
--8---cut here---end---8---

Here is what I know about CSS (but take it with the appropriate grain
of salt - as I said, I'm mostly CSS-ignorant):

The thing to remember is that you can add span.../span to delimit
HTML inline elements and div.../div for HTML block elements.

Each can be given a class: span class=foo.../span or an id:
span id=bar.../span. Classes are hierarchical, ids are targeted.

In the style definitions, you write

 .foo { style info; ...}

for classes and

 #bar {style info; ...}

for ids.

So you can use #+HTML: ... to add spans or divs at the appropriate
places, giving them a class or id as you see fit, and then add #+STYLE:
definitions at the top to style them.

Be careful when typing: the slightest error will cause the browser to just
ignore whole swaths of styling, which makes debugging ... interesting.
I tend to edit the html file one tiny thing at a time and redisplaying. When
I've figured out what's wrong, I go back to the org file and try the result.

Nick



Re: [O] Collapse LaTeX source before start of main document?

2011-05-05 Thread Chris Malone
Hi Matt and Suvayu,

@Matt: I can get your example to work fine for html export, but not
LaTeX export where the entire contents of the headline are removed as
well.  =org-version=:  7.5 (release_7.5.105.g8d0c) if that makes any
difference.

@Suvayu: Thanks for the suggestion.  That is essentially what I am
doing now with the #+LaTeX_HEADER lines, but the problem is that I
have a bunch of things which must follow the \begin{document} in
LaTeX.  I know I could put this in a separate file and just \input{}
it; I wanted to see if there was a way to keep everything together in
a single file, but also have the ability to fold this preliminary
stuff.

Chris

On Wed, May 4, 2011 at 6:25 PM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote:
 Hi Chris,

 I just finished writing my master's thesis in org-mode.

 On Wed, 4 May 2011 11:36:58 -0400
 Chris Malone chris.m.mal...@gmail.com wrote:

 I'm working on using org mode for my PhD thesis.  I'd like to do this
 in one large file where each headline is a single chapter.  Naturally
 in a thesis there needs to be a lot of front matter: title page,
 abstract, signature page, etc.  Right now, I'm doing this with
 something like:

 For all formatting stuff, I just used

 #+LaTeX_HEADER: \whatever{}
 #+LaTeX_HEADER: \usepackage{universitystyle}

 For my abstract I used

 #+LaTeX_HEADER: \include{abstract}

 where abstract.tex is a simple tex file with something like:

 \abstract{ My abstract }

 If you wish to include this inside the \begin{document}..\end{document}
 block then you can use the same latex snippet but without
 the #+LaTeX_HEADER:.

 I hope this helps and good luck with the thesis. :)

 --
 Suvayu

 Open source is the future. It sets us free.





Re: [O] Applying style to a paragraph for HTML export

2011-05-05 Thread Jambunathan K
Nick Dokos nicholas.do...@hp.com writes:

 Robert Pluim rpl...@gmail.com wrote:

 (I thought this would be a FAQ, but I can't find anything similar)
 
 Hi,
 
 I'm exporting from org to html, which is working well. Since my final
 target is MSWord, I'd like to add style information to various
 paragraphs, ie bold, underline etc. I can see how to do eg *bold* for
 individual words, but how do I apply that kind of formatting to a span
 of text?
 
 (I'm CSS-ignorant, so please use small words and talk slowly)
 

 Reading section 12.5.8, CSS support, and experimenting a bit,
 I came up with a short example that I hope will clarify that section
 for the CSS-ignorant (which I mostly am):

 #+OPTIONS: ^:nil
 #+STYLE: style type=text/css .bold {color: red;} /style
 #+STYLE: style type=text/css .inner {color: blue;} /style

 * Headline
   :PROPERTIES:
   :HTML_CONTAINER_CLASS: bold
   :END:
 This is a bold section. This is done by using the HTML_CONTAINER_CLASS
 property of the subtree and giving it the value bold, then setting the
 style for class _bold_ to accomplish the desired goal.

 But you can selectively
 #+HTML: span class=inner
 change some things like this
 #+HTML: /span
 if you want.

or like this:

--8---cut here---start-8---
@span class=inner change some things like this @/span
--8---cut here---end---8---

Note the ats preceding the html tags.


 Here is what I know about CSS (but take it with the appropriate grain
 of salt - as I said, I'm mostly CSS-ignorant):

 The thing to remember is that you can add span.../span to delimit
 HTML inline elements and div.../div for HTML block elements.

 Each can be given a class: span class=foo.../span or an id:
 span id=bar.../span. Classes are hierarchical, ids are targeted.

 In the style definitions, you write

  .foo { style info; ...}

 for classes and

  #bar {style info; ...}

 for ids.

 So you can use #+HTML: ... to add spans or divs at the appropriate
 places, giving them a class or id as you see fit, and then add #+STYLE:
 definitions at the top to style them.

 Be careful when typing: the slightest error will cause the browser to just
 ignore whole swaths of styling, which makes debugging ... interesting.
 I tend to edit the html file one tiny thing at a time and redisplaying. When
 I've figured out what's wrong, I go back to the org file and try the result.

 Nick



-- 



Re: [O] Collapse LaTeX source before start of main document?

2011-05-05 Thread Suvayu Ali
Hi Chris,

On Thu, 5 May 2011 10:23:50 -0400
Chris Malone chris.m.mal...@gmail.com wrote:

 @Suvayu: Thanks for the suggestion.  That is essentially what I am
 doing now with the #+LaTeX_HEADER lines, but the problem is that I
 have a bunch of things which must follow the \begin{document} in
 LaTeX.  I know I could put this in a separate file and just \input{}
 it; I wanted to see if there was a way to keep everything together in
 a single file, but also have the ability to fold this preliminary
 stuff.
 

In the last few months I realised it is rather difficult with export
of org files if you deviate from the everything is an outline
paradigm. The only effective way around the problem seems to be
including from separate files, either org or tex files (for latex
export).

For example for my appendix and bibliography I use the following:

#+INCLUDE: thesis-appendix.org :minlevel 1

\backmatter
\newpage
\addcontentsline{toc}{chapter}{\bibname}

\bibliographystyle{plain}
\bibliography{master}

where thesis-appendix.org looks something like:

\appendix
\appendixpage
\addappheadtotoc

* First appendix

* Second appendix

I wish there was a cleaner solution too. :-/

 Chris

-- 
Suvayu

Open source is the future. It sets us free.



[O] Clocktable question

2011-05-05 Thread Jason Knight
I'm working on several grant-funded projects which require not only
the amount of time spent on a project but the start and end times for
each task. I've not been able to figure out how to get clocktable to
do this for me.

If what I've got in my .org files is this:

CLOCK: [2011-05-04 Wed 11:19]--[2011-05-04 Wed 13:22] =  2:03

-- I need my end-of-month report to show the total duration, as well
as the start and end time. How do I accomplish this? Is there
something I can do with the :formatter parameter?

Thanks for your input!

Jason Knight



[O] Spurious source-code output?

2011-05-05 Thread Ken.Williams
Hi,

I've got the following source-code section in a sample org-mode document:

#+BEGIN_SRC R :exports output :results graphics :file t.png
plot(1:10, 1:10)
#+END_SRC

My intention is to show just the figure, not the source code, when I export to 
HTML.  But when I do 'C-c C-c' to evaluate the code (which produces a 
#+results: section as expected) and then 'C-c C-e b' to produce the HTML, I'm 
getting both the source code and the plot in the output.

I must be misunderstanding the BEGIN_SRC parameters?  Could anyone correct me?

I'm using Org-mode 7.5 with Aquamacs 2.2 (GNU Emacs 23.3.1).  Thanks.

--
Ken Williams
Senior Research Scientist

Thomson Reuters

http://labs.thomsonreuters.com



Re: [O] Spurious source-code output?

2011-05-05 Thread Nick Dokos
ken.willi...@thomsonreuters.com wrote:

 Hi,
 
 I've got the following source-code section in a sample org-mode document:
 
 #+BEGIN_SRC R :exports output :results graphics :file t.png
 plot(1:10, 1:10)
 #+END_SRC
 
 My intention is to show just the figure, not the source code, when I export=
  to HTML.  But when I do 'C-c C-c' to evaluate the code (which produces a =
 #+results: section as expected) and then 'C-c C-e b' to produce the HTML, =
 I'm getting both the source code and the plot in the output.
 
 I must be misunderstanding the BEGIN_SRC parameters?  Could anyone correct =
 me?
 
 I'm using Org-mode 7.5 with Aquamacs 2.2 (GNU Emacs 23.3.1).  Thanks.
 

Try ``:exports results'' - the Org manual says:

,
| 
| 14.8.2.5 `:exports'
| ...
| 
| The `:exports' header argument specifies what should be included in HTML
| or LaTeX exports of the Org-mode file.
| 
|* `code' The default.  The body of code is included into the
|  exported file.  E.g., `:exports code'.
| 
|* `results' The result of evaluating the code is included in the
|  exported file. E.g., `:exports results'.
| 
|* `both' Both the code and results are included in the exported
|  file. E.g., `:exports both'.
| 
|* `none' Nothing is included in the exported file.  E.g., `:exports
|  none'.
`

Nick



Re: [O] Spurious source-code output?

2011-05-05 Thread Ken.Williams


On 5/5/11 10:37 AM, Nick Dokos nicholas.do...@hp.com wrote:

ken.willi...@thomsonreuters.com wrote:

 Hi,
 
 I've got the following source-code section in a sample org-mode
document:
 
 #+BEGIN_SRC R :exports output :results graphics :file t.png
 plot(1:10, 1:10)
 #+END_SRC
 

Try ``:exports results'' - the Org manual says:
[...]


Ack, I even looked at that very section of the manual just moments before
I posted.  Thanks for the help.


--
Ken Williams
Senior Research Scientist
Thomson Reuters
http://labs.thomsonreuters.com




Re: [O] Clocktable question

2011-05-05 Thread brian powell
* I hope you can learn how to do this using EMACS OrgMode--best thing
for what you seek to do.

** In the meantime, I suggest using timeclock.el

*** Some functions: (believe me, its really easy to use--puts a log
into ~/.timelog or something like that)

Click mouse-2 on a completion to select it.
In this buffer, type RET to select the completion near point.

Possible completions are:
timeclock-changetimeclock-in
timeclock-modeline-display  timeclock-out
timeclock-reread-logtimeclock-status-string
timeclock-when-to-leave-string  timeclock-workday-elapsed-string
timeclock-workday-remaining-string

* I used to use it all the time; its quick and easy, you easily keep
track of each task you are working on--down to the second.

** As you are exiting emacs, it will automagically query you as to
whether or not to clock out, etc.



Re: [O] Clocktable question

2011-05-05 Thread Nick Dokos
Jason Knight jasonekni...@gmail.com wrote:

 I'm working on several grant-funded projects which require not only
 the amount of time spent on a project but the start and end times for
 each task. I've not been able to figure out how to get clocktable to
 do this for me.
 
 If what I've got in my .org files is this:
 
 CLOCK: [2011-05-04 Wed 11:19]--[2011-05-04 Wed 13:22] =  2:03
 
 -- I need my end-of-month report to show the total duration, as well
 as the start and end time. How do I accomplish this? Is there
 something I can do with the :formatter parameter?
 

I don't know anything about clocks, but if I had to start using them,
I'd start with Bernt Hansen's document:

http://doc.norang.ca/org-mode.html

Nick



Re: [O] Spurious source-code output?

2011-05-05 Thread Nick Dokos
ken.willi...@thomsonreuters.com wrote:

 
 
 On 5/5/11 10:37 AM, Nick Dokos nicholas.do...@hp.com wrote:
 
 ken.willi...@thomsonreuters.com wrote:
 
  Hi,
  
  I've got the following source-code section in a sample org-mode
 document:
  
  #+BEGIN_SRC R :exports output :results graphics :file t.png
  plot(1:10, 1:10)
  #+END_SRC
  
 
 Try ``:exports results'' - the Org manual says:
 [...]
 
 
 Ack, I even looked at that very section of the manual just moments before
 I posted.  Thanks for the help.
 

I also note that ``:results graphics'' is not one of the options in
section 14.8.2.2, :results, of the Org manual - but I guess it's not
causing a problem. I'll leave it to a babel expert to chime in here.

Nick



Re: [O] Collapse LaTeX source before start of main document?

2011-05-05 Thread Suvayu Ali
Hello Chris,

Sorry for the delay, had to attend a meeting.

On Thu, 5 May 2011 11:37:41 -0400
Chris Malone chris.m.mal...@gmail.com wrote:

 Hi Suvayu,
 
 Thanks for sharing your use case - I'm interested in a few more
 details:
 
  For example for my appendix and bibliography I use the following:
 
  #+INCLUDE: thesis-appendix.org :minlevel 1

[...]

 
 Would this #+INCLUDE line come within the last chapter headline?  In
 other words did you have something like
 
 #+INCLUDE: frontmatter.org
 * Chapter 1
 
 * Chapter 2
 ...
 * Last Chapter
 
 #+INCLUDE: thesis-appendix.org :minlevel 1
 .
 .
 .
 \bibliography{master}
 
 With this, it seems that all of the appendix/backmatter gets folded
 into the last chapter heading.  That is sort of the way I'm thinking
 of working my thesis, but it seems sub-optimal.


Yes that is correct. It folds into the last chapter, and I too find this
sub-optimal. If there was a way to specify certain headlines were
special and needed to be exported according to the sub-tree
properties, that would be ideal. Although I haven't looked into it, I'm
afraid it would require some lisp intervention.

That said, I just found a possible workaround. If you put the appendix
and bibliography and friends under the Footnotes headline, it somewhat
replicates the behaviour I would like to have. Something like this:

* Footnotes

[fn:1] footnote 1
[fn:2] footnote 2


#+INCLUDE: thesis-appendix.org :minlevel 1

#+LaTeX: \backmatter
#+LaTeX: \newpage
#+LaTeX: \addcontentsline{toc}{chapter}{\bibname}

#+LaTeX: \bibliographystyle{plain}
#+LaTeX: \bibliography{master}


After my thesis defence I might actually get around to attempting to
deal with this in lisp. Would be a good learning excercise. :)

 Chris

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Collapse LaTeX source before start of main document?

2011-05-05 Thread chris . m . malone

Hi Suvayu,

I think Matt's lisp code /should/ work for doing exactly what we are  
talking about, but for some reason I can't get it to work with LaTeX export.


Anyway, good luck on your defense!

Chris

On May 5, 2011 1:37pm, Suvayu Ali fatkasuvayu+li...@gmail.com wrote:

Hello Chris,





Sorry for the delay, had to attend a meeting.





On Thu, 5 May 2011 11:37:41 -0400



Chris Malone chris.m.mal...@gmail.com wrote:





 Hi Suvayu,







 Thanks for sharing your use case - I'm interested in a few more



 details:







  For example for my appendix and bibliography I use the following:



 



  #+INCLUDE: thesis-appendix.org :minlevel 1





[...]









 Would this #+INCLUDE line come within the last chapter headline? In



 other words did you have something like







 #+INCLUDE: frontmatter.org



 * Chapter 1



 



 * Chapter 2



 ...



 * Last Chapter



 



 #+INCLUDE: thesis-appendix.org :minlevel 1



 .



 .



 .



 \bibliography{master}







 With this, it seems that all of the appendix/backmatter gets folded



 into the last chapter heading. That is sort of the way I'm thinking



 of working my thesis, but it seems sub-optimal.









Yes that is correct. It folds into the last chapter, and I too find this



sub-optimal. If there was a way to specify certain headlines were



special and needed to be exported according to the sub-tree



properties, that would be ideal. Although I haven't looked into it, I'm



afraid it would require some lisp intervention.





That said, I just found a possible workaround. If you put the appendix



and bibliography and friends under the Footnotes headline, it somewhat



replicates the behaviour I would like to have. Something like this:





* Footnotes





[fn:1] footnote 1



[fn:2] footnote 2







#+INCLUDE: thesis-appendix.org :minlevel 1





#+LaTeX: \backmatter



#+LaTeX: \newpage



#+LaTeX: \addcontentsline{toc}{chapter}{\bibname}





#+LaTeX: \bibliographystyle{plain}



#+LaTeX: \bibliography{master}







After my thesis defence I might actually get around to attempting to



deal with this in lisp. Would be a good learning excercise. :)





 Chris





--



Suvayu





Open source is the future. It sets us free.






Re: [O] Spurious source-code output?

2011-05-05 Thread Nick Dokos
Thomas S. Dye t...@tsdye.com wrote:

 Hi Nick,
 
 Without claiming to be a babel expert, :results graphics is a language- 
 specific option used for e.g. R code blocks.  You can find it  
 documented in the appropriate language-specific sections.
 

OK - thanks for the clarification! It might be a good idea to note
(perhaps in section 14.8.2, Specific header arguments, or perhaps its
parent?) that individual languages might provide extensions to the
standard header args. Also, the link in the manual (section 14.7, Languages)
to language-specific documentation should probably be changed to

   http://orgmode.org/worg/org-contrib/babel/languages.html

which provides some useful context. The current link just takes you to
the directory listing. Trivial patch for the latter problem is appended.

Thanks,
Nick

diff --git a/doc/org.texi b/doc/org.texi
index a0f6638..8cf5535 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -11639,7 +11639,7 @@ Code blocks in the following languages are supported.
 
 Language-specific documentation is available for some languages.  If
 available, it can be found at
-@uref{http://orgmode.org/worg/org-contrib/babel/languages}.
+@uref{http://orgmode.org/worg/org-contrib/babel/languages.html}.
 
 The @code{org-babel-load-languages} controls which languages are enabled for
 evaluation (by default only @code{emacs-lisp} is enabled).  This variable can



Re: [O] Collapse LaTeX source before start of main document?

2011-05-05 Thread Suvayu Ali
On Thu, 05 May 2011 17:45:13 +
chris.m.mal...@gmail.com wrote:

 Hi Suvayu,
 
 I think Matt's lisp code /should/ work for doing exactly what we are  
 talking about, but for some reason I can't get it to work with LaTeX
 export.
 

I just tried Matt's code, worked very smoothly for me. :)

 Anyway, good luck on your defense!

Thank you.

 
 Chris

-- 
Suvayu

Open source is the future. It sets us free.



[O] [Patch] Documentation, was Re: Spurious source-code output?

2011-05-05 Thread Thomas S. Dye

Hi Nick,

Thanks for fixing the documentation link.

Here is a patch that adds a reference to language-specific header  
arguments.


All the best,
Tom



0001-Refer-to-language-specific-Babel-header-arguments.patch
Description: Binary data




On May 5, 2011, at 7:45 AM, Nick Dokos wrote:


Thomas S. Dye t...@tsdye.com wrote:


Hi Nick,

Without claiming to be a babel expert, :results graphics is a  
language-

specific option used for e.g. R code blocks.  You can find it
documented in the appropriate language-specific sections.



OK - thanks for the clarification! It might be a good idea to note
(perhaps in section 14.8.2, Specific header arguments, or perhaps  
its

parent?) that individual languages might provide extensions to the
standard header args. Also, the link in the manual (section 14.7,  
Languages)

to language-specific documentation should probably be changed to

  http://orgmode.org/worg/org-contrib/babel/languages.html

which provides some useful context. The current link just takes you to
the directory listing. Trivial patch for the latter problem is  
appended.


Thanks,
Nick

diff --git a/doc/org.texi b/doc/org.texi
index a0f6638..8cf5535 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -11639,7 +11639,7 @@ Code blocks in the following languages are  
supported.


Language-specific documentation is available for some languages.  If
available, it can be found at
-@uref{http://orgmode.org/worg/org-contrib/babel/languages}.
+@uref{http://orgmode.org/worg/org-contrib/babel/languages.html}.

The @code{org-babel-load-languages} controls which languages are  
enabled for
evaluation (by default only @code{emacs-lisp} is enabled).  This  
variable can




Re: [O] [Patch] Documentation, was Re: Spurious source-code output?

2011-05-05 Thread Nick Dokos
Thomas S. Dye t...@tsdye.com wrote:

 Hi Nick,
 
 Thanks for fixing the documentation link.
 
 Here is a patch that adds a reference to language-specific header
 arguments.
 

I think it's still the case that attachments of MIME type
application/octet-stream will not be recorded in patchwork.  Please use
one of the types that patchwork will recognize (text/plain is the best -
remember the Orgmode motto!) or just insert it inline.

See http://thread.gmane.org/gmane.emacs.orgmode/25727.

I'll add a note to that effect to org-contribute.html on Worg
unless somebody tells me otherwise.

Nick





Re: [O] [Patch] Documentation, was Re: Spurious source-code output?

2011-05-05 Thread Thomas S. Dye
Ack.  There were problems earlier with my Mac Mail client and line  
breaks, IIRC, but here is the patch in-line.  I'm not sure how to make  
attachments follow specific MIME requirements.


All the best,
Tom

From 825fe69d493dd2e7eef414b85340e8e27400f78d Mon Sep 17 00:00:00 2001
From: Tom Dye t...@tsdye.com
Date: Thu, 5 May 2011 08:24:24 -1000
Subject: [PATCH] Refer to language specific Babel header arguments

---
 doc/org.texi |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 7142ce0..98842ba 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -11885,6 +11885,9 @@ The following header arguments are defined:
 * eval::Limit evaluation of specific code  
blocks

 @end menu

+Additional header arguments are defined on a language-specific basis,  
see

+@ref{Languages}.
+
 @node var, results, Specific header arguments, Specific header  
arguments

 @subsubsection @code{:var}
 The @code{:var} header argument is used to pass arguments to code  
blocks.

--
1.7.1



On May 5, 2011, at 9:09 AM, Nick Dokos wrote:


Thomas S. Dye t...@tsdye.com wrote:


Hi Nick,

Thanks for fixing the documentation link.

Here is a patch that adds a reference to language-specific header
arguments.



I think it's still the case that attachments of MIME type
application/octet-stream will not be recorded in patchwork.  Please  
use
one of the types that patchwork will recognize (text/plain is the  
best -

remember the Orgmode motto!) or just insert it inline.

See http://thread.gmane.org/gmane.emacs.orgmode/25727.

I'll add a note to that effect to org-contribute.html on Worg
unless somebody tells me otherwise.

Nick







Re: [O] [Orgmode] Grouping clock report by tag?

2011-05-05 Thread John Hendy
Following up on this again... It's been almost 2mos. Is there any way
to add a tag grouping to clock reports rather than needing to create
clock reports for every tag?

Many thanks,
John

My initial example:

A rough idea might be like this:

---

#+BEGIN: clocktable :maxlevel 2 :scope agenda
Clock summary at [2011-03-06 Sun 17:59]
| Tag  | Headline |Time |  | File   |
|--+--+-+--+|
|  | ALL *Total time* | *10:00* |  ||
|--+--+-+--+|
| Tag1 | *Tag time*   |  *5:00* |  ||
|  | [2011-02-04 Fri] |3:30 |  | 2011-02Feb.org |
|  | Some task| | 3:30 ||
|  | [2011-01-21 Fri] |0:30 |  | 2011-01Jan.org |
|  | Some task| | 0:30 ||
|  | [2010-12-09 Thu] |1:00 |  | 2010-12Dec.org |
|  | Some task| | 1:00 ||
|--+--+-+--+|
| Tag2 | *Tag time*   |  *5:00* |  ||
|  | [2011-02-04 Fri] |3:30 |  | 2011-02Feb.org |
|  | Some task| | 3:30 ||
|  | [2011-01-21 Fri] |0:30 |  | 2011-01Jan.org |
|  | Some task| | 0:30 ||
|  | [2010-12-09 Thu] |1:00 |  | 2010-12Dec.org |
|  | Some task| | 1:00 ||
|--+--+-+--+|
-

On Fri, Mar 11, 2011 at 4:06 PM, John Hendy jw.he...@gmail.com wrote:
 On Mon, Mar 7, 2011 at 4:11 AM, Giovanni Ridolfi
 giovanni.rido...@yahoo.it wrote:
 John Hendy jw.he...@gmail.com writes:

 Sorry -- forgot the list...

 On Sun, Mar 6, 2011 at 12:06 PM, John Hendy jw.he...@gmail.com wrote:

 On Sun, Mar 6, 2011 at 11:42 AM, Bastien b...@altern.org wrote:

 John Hendy jw.he...@gmail.com writes:

  How about a clock table with a :tag: column and an option to sort by
  common tag?

 The idea has been already suggested, with patches, but I think the patches
 got lost during the FSF copyright assignment


 Somehow I missed this email!

 1. by Adam Elliott, see:

  On Feb 23, 2010, at 8:13 AM, Adam Elliott wrote:
  http://thread.gmane.org/gmane.emacs.orgmode/22526


 That looks like the behavior as-is (i.e. a :tags tagname option)

 Oh, and perhaps the :tags option should be better documented in the
 manual. I tried in vain to combine tags and only just now saw the
 thread that looks like it inspired the :tags option. The mailing list
 posts contains the syntax (tag1-tag2, tag1+tag2) but since there
 is no example clocktable using the :tags option in the manual:
 1) it took me a while even to figure out to put the word in quotations
 2) I had no idea whatsoever if multiple tags were possible

 2. And also by B Grobauer, with a huge patch
   Sun, 20 Jun 2010 12:24:44 +0200
   http://lists.gnu.org/archive/html/emacs-orgmode/2010-06/msg00536.html


 Now *this* looks like just what I was loooking for. Yes -- an option
 to group by tag or even simply include a column which lists the tags.
 I can do several tables, but for me this is more just to show where I
 spend my time, not for billing... so it would be great to analyze the
 ratios between my various buckets (for which I use tags to
 identify).

 If Bastien is going to implement this feature, I ask again[1]:
 -
  Is it possible to check also for properies
  and not only for tag?

  we can add a special PROPERTY: CLOCKTAG

 Rationale:
 In my setup I have a remember template where I write the task I'm doing.
 with some information e.g.:

 ** reading bibliography
   CLOCK: [2010-06-21 lun 09:24]
  :PROPERTIES:
  :ID: lab
  :Type:expected
  :People: Giovanni
  :Location: computer
  :Connection: nil
  :CLOCKTAG:PV Project
  :Comment:
  :END:

 If the function checks also the :PROPERTIES: drawer and the existence of
 the special PROPERTY: CLOCKTAG I can keep my setup and exploit this
 marvellous new feature.

 [1] http://lists.gnu.org/archive/html/emacs-orgmode/2010-06/msg00554.html
 ---

 Another method could be to use the clock report from agenda R
 Date:   Wed, 27 Oct 2010 12:29:25 -0400
 (Sebastien Vauban)
 http://lists.gnu.org/archive/html/emacs-orgmode/2010-10/msg01494.html


 cheers,
 Giovanni





Re: [O] [Patch] Documentation, was Re: Spurious source-code output?

2011-05-05 Thread Nick Dokos
Thomas S. Dye t...@tsdye.com wrote:

 Ack.  There were problems earlier with my Mac Mail client and line
 breaks, IIRC, but here is the patch in-line.  I'm not sure how to make
 attachments follow specific MIME requirements.
 

And as you feared, the line-break ogre struck again. They add all these
shiny knobs on the dashboard and make the wheels square: that's progress...

Nick



[O] orgtbl multicolumn support

2011-05-05 Thread Michael Bach
Dear org-mode Users and Developers,

I just wanted to know whether there are plans to support multicolumns in
default orgtbl-to-latex.  Something along these lines:

#+ORGTBL: SEND multicol orgtbl-to-latex :splice t :skip 0 :hline \\midrule
|   | a | b   | c |
|---+---+-+---|
| 1 |   | mc(2)(c)(3) |   |
|   | 2 | mc(2)(c)(4) |   |

Would produce

% % BEGIN RECEIVE ORGTBL multicol
   a  b  c\NN
\midrule
1 \multicolumn{2}{c}{3}  \NN
   2  \multicolumn{2}{c}{4}  \LL
% END RECEIVE ORGTBL multicol

The reason being that I would like to use \multicolumn often in the
middle of an orgtbl.  My workarounds with manually inserting the LaTeX
macro are clumsy.

I understood that users should write their own conversion functions.  If
I was going to try my fresh elisp fu, I wanted to ask here whether there
exists a generic orgtbl syntax to implement the above intercell
modification.  I read the doc for version 7.5 but maybe there are also
new methods in the dev version which I freshly use.

Kind Regards,
Michael Bach



Re: [O] orgtbl multicolumn support

2011-05-05 Thread Michael Bach
Michael Bach pha...@gmail.com writes:

# edit

 Dear org-mode Users and Developers,

 I just wanted to know whether there are plans to support multicolumns in
 default orgtbl-to-latex.  Something along these lines:

 #+ORGTBL: SEND multicol orgtbl-to-latex :splice t :skip 0 :hline \\midrule
 |   | a | b   | c |
 |---+---+-+---|
 | 1 |   | mc(2)(c)(3) |   |
 |   | 2 | mc(2)(c)(4) |   |

 Would produce

 % % BEGIN RECEIVE ORGTBL multicol
a  b  c\NN
 \midrule
 1 \multicolumn{2}{c}{3}  \NN
2  \multicolumn{2}{c}{4}  \LL
 % END RECEIVE ORGTBL multicol

# This should correctly read:

% % BEGIN RECEIVE ORGTBL multicol
   a  b  c \\
\midrule
1 \multicolumn{2}{c}{3} \\
   2  \multicolumn{2}{c}{4} \\
% END RECEIVE ORGTBL multicol

 The reason being that I would like to use \multicolumn often in the
 middle of an orgtbl.  My workarounds with manually inserting the LaTeX
 macro are clumsy.

 I understood that users should write their own conversion functions.  If
 I was going to try my fresh elisp fu, I wanted to ask here whether there
 exists a generic orgtbl syntax to implement the above intercell
 modification.  I read the doc for version 7.5 but maybe there are also
 new methods in the dev version which I freshly use.

 Kind Regards,
 Michael Bach



Re: [O] Org babel does not work properly with included files

2011-05-05 Thread Eric Schulte
Robert Goldman rpgold...@sift.info writes:

 Looking over this some more, I see that the challenge is to:

 1.  read the file parameters (whatever they are) from the original file
 (hence opening the file from the link) and

 2.  read the header parameters from the export buffer, since the header
 may not actually be contained in the original file.


The above is a good summary.  Babel ensures that code blocks will be
evaluated in the original buffer, so that they can e.g., reference a
code block outside of the exported subtree when only exporting a
subtree.


 This seems like a substantial reorganization from the original, which
 attempts to do both tasks in the original file (and fails for included
 files).


I'm not sure that the current behavior is a bug.  Is it reasonable to
place code block parameters into an included file?  These parameters
would not be successfully found during interactive evaluation, and could
only plausibly be used during export as you anticipated.

Also, this would seem to break Babel's current guarantee that code
blocks will be evaluated in the original Org-mode file.

If this were to be implemented, I think one option would be to perform
the following on export
1. make a copy of the original buffer
2. call `org-export-handle-include-files' in this copy
3. resolve all parameters in this copied buffer

The above shouldn't be difficult to implement, and creating the copy
shouldn't add too much computational time to the export process.

My concern is that expansion of included files may be more likely to
cause confusing behavior (e.g., by change the evaluation environment
between interactive evaluation and export) than it would to be used
constructively.

Maybe I have missed your initial use case.

Thanks -- Eric

p.s. Sorry about the delayed reply I've had very little mailing
 list connectivity lately


 best,
 r



-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] Request for suggestions including source code

2011-05-05 Thread Eric Schulte
Robert Goldman rpgold...@sift.info writes:

 On 5/4/11 May 4 -5:23 PM, Thomas S. Dye wrote:
 
 On May 4, 2011, at 11:59 AM, Robert Goldman wrote:
 
 On 5/4/11 May 4 -4:13 PM, Thomas S. Dye wrote:
 Aloha Robert,

 Have a look at the listings and minted packages.  You can specify font
 size on a per-document or per-language basis.  I believe listings has an
 option to wrap long lines (don't remember this for minted, though).

 The instructions here might be helpful:

 http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12_2

 Hm.  I'm still grappling with this.  I am including many of these
 examples by using a source snippet (in sh) that goes out and pulls the
 example out of a source code file.

 Even after adding

 #+LaTeX_HEADER \usepackage{listings}

 and

 #+src: setup-listings

 
 Sorry for the confusion.  In the example, the line
 
 #+source: setup-listings
 
 names the source code block that follows.   I don't think it will do
 anything by itself in your document.
 
 That code block named setup-listings contains an example of a listings
 setup that maps Org-mode's output for Emacs Lisp code blocks to
 something listings recognizes.  It can be executed in Org-mode, using
 Babel, to setup the listings export.  After this is done, then the
 example should export correctly.
 
 I'm not sure what is going wrong on your end.  Perhaps
 org-export-latex-custom-lang-environments needs to be configured for the
 language you're using?

 Is there any chance that this won't work because I have a source snippet
 in one language (sh) that returns as results a source snippet in a
 /different/ language (a lisp-like domain-specific language)?  I don't
 off-hand see how I can come up with a single label for the source block
 that takes this into account

 This may be a weird enough case that I should be aiming at a solution
 that is much simpler:  e.g., just figuring out how to change all of my
 verbatim environments to use a smaller font or changing the export
 behavior so that /all/ verbatim blocks turn into listings blocks.


You could customize the value of the `org-export-latex-verbatim-wrap'
variable to include a line of latex to shrink the font size.  For
example

#+begin_src emacs-lisp :results silent
  (setq org-export-latex-verbatim-wrap
'({\\scriptsize\n\\begin{verbatim}\n . \\end{verbatim}\n}\n))
#+end_src

Best -- Eric


 Best,
 r



-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] PERL, org-mode and literal document input.

2011-05-05 Thread Eric Schulte
Hi Allen,

Judging from your example org-mode text below I would suggest the
following...

First, the block of yaml is miss-formed, you have a #+source: line, and
a #end_src line, but you are missing a required #+begin_src yaml.

Second, if you will be referencing the contents of a yaml code block you
will need to define an `org-babel-execute:yaml' function.  For the
simple case of returning the contents of the code block the following
will work.

  (defun org-babel-execute:yaml (body params) body)

alternately you could just include your yaml as an example block

#+results: yaml-config
: erpalpha:...

I hope some of the above works for you.  Please let me know if either of
these solutions are appropriate.

Best -- Eric

a...@ufl.edu (Allen S. Rout) writes:

 Greetings. 

 I've got a YAML config file and some processing I'm doing to it.  I'd
 love to have both the bits inside the maintenance document I'm writing
 to manage a service.  This seems a perfect use for code blocks and their
 evaluation.  However, I get behavior out of my attempt to do this which
 I find strange.

 I include a minimal, failing example below.

 The problem appears to be somewhere in the :var reference designed to
 introduce the other code block.  There are two problems, one pretty
 egregious, the other somewhat subtle.

 Egregious first:  

 For some reason, whatever process sucks up config_yml and inserts it
 into '$config' in mogrify_pl just elides the first two lines. 

 Additionally, the contents of the variable are very strangely
 formatted.   The contents of most of the first YAML document (less the
 first two lines) are each on a separate line.  

 However, the last of the first doc and all of the second doc are  in a
 single line.


 Subtle:

 The last few newlines are also elided.  This might not seem to be a big
 deal, but YAML really wants to end with a trailing newline.  I figure I
 should be able to express that in the doc, and not tag one on in my
 code. 

 ... 

 If I add a #+begin_src line to config_yml, and then build a results
 section by hand, and copy the identical document there, then the
 variable is imported more or less as I'd expect: $config is one large
 scalar value, with the contents of config_yml inserted.  The trailing
 newlines are still stripped, but this is better at least.


 I've been searching for something like Echo this to put in my
 begin_src; it would seem a little silly but not awful to define a
 process to just copy the contents of the source block to the result, and
 go from there.   But it's inelegant, to say the least. 

 ... 

 So: Is there a conventional way I should get org to treat the source
 block 'the same way' it treats the results block?  Failing that, is
 there a common idiom to run a source block to get the result Echo me
 verbatim into the results block ? 

 I see profligate use of org-babel-trim in the code.  Does that mean that
 permitting leading or trailing whitespace is a regular source of
 problems?  I didn't want to start dinking with it casually. 

 ... 


 Any pointers would be deeply appreciated. 


 *** YAML transform. 

 #+srcname: config_yml
 ---
 erpalpha:
- alpha-rac-1.erp.ufl.edu
- alpha-rac-2.erp.ufl.edu
 erpbeta:
- beta-rac-1.erp.ufl.edu
- beta-rac-2.erp.ufl.edu
 ---
 erpalpha:
   FS: /export/alpha
   nodes:
 erpalpha: ''
 erpbeta: RO

 erpbeta:
   FS: /export/beta
   nodes:
 erpalpha: RO
 erpbeta: 


 #+end_src


 #+srcname: mogrify_pl
 #+begin_src perl :results output :var config=config_yml()
   use YAML();
   use Data::Dumper;

   # $stream = join(,$foo);

 print ===$config===\n;

 print $#config,\n;
   
 foreach $line (@{$config})
 { print [$line]\n; }

 print Dumper($config);


 # ($nodegroups,$filespaces) = YAML::Load($config);
 #  print YAML::Dump($nodegroups,$filespaces);
   
 #+end_src

 #+results: mogrify_pl
 #+begin_example
 ===ARRAY(0x853b818)===
 -1
 [alpha-rac-1.erp.ufl.edu]
 [alpha-rac-2.erp.ufl.edu
 erpbeta:]
 [beta-rac-1.erp.ufl.edu]
 [beta-rac-2.erp.ufl.edu
 ---
 erpalpha:
   FS: /export/alpha
   nodes:
 erpalpha: ''
 erpbeta: RO

 erpbeta:
   FS: /export/beta
   nodes:
 erpalpha: RO
 erpbeta:]
 $VAR1 = [
   'alpha-rac-1.erp.ufl.edu',
   'alpha-rac-2.erp.ufl.edu
 erpbeta:',
   'beta-rac-1.erp.ufl.edu',
   'beta-rac-2.erp.ufl.edu
 ---
 erpalpha:
   FS: /export/alpha
   nodes:
 erpalpha: \'\'
 erpbeta: RO

 erpbeta:
   FS: /export/beta
   nodes:
 erpalpha: RO
 erpbeta:'
 ];
 #+end_example


 - Allen S. Rout




-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] org-babel ocaml List append problems

2011-05-05 Thread Eric Schulte
Hi James,

I get the following...

#+begin_src ocaml
  [3;2;3] @ [3;2;3;4;5];;
#+end_src

#+results:
| 3 | 2 | 3 | 3 | 2 | 3 | 4 | 5 |

I recently (in the last month) pushed some changes up to the Org-mode
git repository which fix result handling for ocaml.  Please try with the
latest version of Org-mode from git, and if the problem persists send
along a minimal example sufficient to reproduce the problem.

Thanks -- Eric

James Hurford terra...@gmail.com writes:

 I have just discovered org-babel supports ocaml and I've just started to
 learn it.  My problem is when appending two lists together, when run
 through org-babel returns a error message.  I would try and run this
 code

 [3;2;3] @ [3;2;3;4;5];;

 and get a error message saying

 Invalid function: 3

 Is there a solution to this as the code should work?

 James





-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] org-export-latex-verbatim-wrap has no effect on Babel results

2011-05-05 Thread Eric Schulte
Hi Avdi,

I can't reproduce your issue, specifically, when I run the first code
block in the following example to customize the value of
`org-export-latex-verbatim-wrap'

--8---cut here---start-8---
** simple latex verbatim wrap example
#+begin_src emacs-lisp :results silent
  (setq org-export-latex-verbatim-wrap
'({\\scriptsize\n\\begin{verbatim}\n . \\end{verbatim}\n}\n))
#+end_src

#+begin_src sh
  echo eric schulte
  echo another
#+end_src
--8---cut here---end---8---

and then export the example to LaTeX, I get the following in which the
value of `org-export-latex-verbatim-wrap' is applied

--8---cut here---start-8---
\section*{simple latex verbatim wrap example}
\label{sec-1}

{\scriptsize
\begin{verbatim}
(setq org-export-latex-verbatim-wrap
  '({\\scriptsize\n\\begin{verbatim}\n . \\end{verbatim}\n}\n))
\end{verbatim}
}

{\scriptsize
\begin{verbatim}
echo eric schulte
echo another
\end{verbatim}
}
--8---cut here---end---8---

Best -- Eric

Avdi Grimm a...@avdi.org writes:

 I have customized my org-export-latex-verbatim-wrap to create a shaded
 box for verbatim text. However, when I have Babel source code blocks
 which export results, the results are always rendered with plain
 \begin{verbatim}...\end{verbatim}.

 I've been grepping through the code, but I can't figure out where
 #+results: blocks are formatted into LaTeX.

 Help?

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] [Patch] Documentation, was Re: Spurious source-code output?

2011-05-05 Thread Eric Schulte
Applied, Thanks -- Eric

Thomas S. Dye t...@tsdye.com writes:

 Hi Nick,

 Thanks for fixing the documentation link.

 Here is a patch that adds a reference to language-specific header
 arguments.

 All the best,
 Tom





 On May 5, 2011, at 7:45 AM, Nick Dokos wrote:

 Thomas S. Dye t...@tsdye.com wrote:

 Hi Nick,

 Without claiming to be a babel expert, :results graphics is a
 language-
 specific option used for e.g. R code blocks.  You can find it
 documented in the appropriate language-specific sections.


 OK - thanks for the clarification! It might be a good idea to note
 (perhaps in section 14.8.2, Specific header arguments, or perhaps
 its
 parent?) that individual languages might provide extensions to the
 standard header args. Also, the link in the manual (section 14.7,
 Languages)
 to language-specific documentation should probably be changed to

   http://orgmode.org/worg/org-contrib/babel/languages.html

 which provides some useful context. The current link just takes you to
 the directory listing. Trivial patch for the latter problem is
 appended.

 Thanks,
 Nick

 diff --git a/doc/org.texi b/doc/org.texi
 index a0f6638..8cf5535 100644
 --- a/doc/org.texi
 +++ b/doc/org.texi
 @@ -11639,7 +11639,7 @@ Code blocks in the following languages are
 supported.

 Language-specific documentation is available for some languages.  If
 available, it can be found at
 -@uref{http://orgmode.org/worg/org-contrib/babel/languages}.
 +@uref{http://orgmode.org/worg/org-contrib/babel/languages.html}.

 The @code{org-babel-load-languages} controls which languages are
 enabled for
 evaluation (by default only @code{emacs-lisp} is enabled).  This
 variable can


-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] [Patch] Documentation, was Re: Spurious source-code output?

2011-05-05 Thread Nick Dokos
Nick Dokos nicholas.do...@hp.com wrote:

 Thomas S. Dye t...@tsdye.com wrote:
 
  Hi Nick,
  
  Thanks for fixing the documentation link.
  
  Here is a patch that adds a reference to language-specific header
  arguments.
  
 
 I think it's still the case that attachments of MIME type
 application/octet-stream will not be recorded in patchwork.  Please use
 one of the types that patchwork will recognize (text/plain is the best -
 remember the Orgmode motto!) or just insert it inline.
 
 See http://thread.gmane.org/gmane.emacs.orgmode/25727.
 
 I'll add a note to that effect to org-contribute.html on Worg
 unless somebody tells me otherwise.
 

Note added: http://orgmode.org/worg/org-contribute.html#sec-4

Nick




Re: [O] Org babel does not work properly with included files

2011-05-05 Thread Robert Goldman
On 5/5/11 May 5 -11:56 AM, Eric Schulte wrote:
 Robert Goldman rpgold...@sift.info writes:
 
 Looking over this some more, I see that the challenge is to:

 1.  read the file parameters (whatever they are) from the original file
 (hence opening the file from the link) and

 2.  read the header parameters from the export buffer, since the header
 may not actually be contained in the original file.

 
 The above is a good summary.  Babel ensures that code blocks will be
 evaluated in the original buffer, so that they can e.g., reference a
 code block outside of the exported subtree when only exporting a
 subtree.
 

 This seems like a substantial reorganization from the original, which
 attempts to do both tasks in the original file (and fails for included
 files).

 
 I'm not sure that the current behavior is a bug.  Is it reasonable to
 place code block parameters into an included file?  These parameters
 would not be successfully found during interactive evaluation, and could
 only plausibly be used during export as you anticipated.

Aren't the code block parameters supposed to appear /with/ the code
block?  So here's the use case:

I have a file chapter.org.  This contains a full draft of a chapter of
my manual.  I finish it and circulate it for comments, then get it ready
for inclusion.

Now I have manual.org and I want to include the main body of chapter.org
(typically there's some front matter I leave off).

When I put the #include in manual.org, the source code snippets in
chapter.org, which used to work, no longer do.

This doesn't seem like /such/ a crazy use case that it shouldn't work,
does it?

[btw, I am not entirely sure I know what header parameters are --- are
these the parameters that come from the #+begin_src line?  If so,
shouldn't they definitely be read from the #+begin_src line?  They can't
very well be read from manual.org, which doesn't contain the #+begin_src
line.]

Sorry if I wasn't clear in my original message.

Best,
r




Re: [O] Org babel does not work properly with included files

2011-05-05 Thread Eric Schulte
 
 I'm not sure that the current behavior is a bug.  Is it reasonable to
 place code block parameters into an included file?  These parameters
 would not be successfully found during interactive evaluation, and could
 only plausibly be used during export as you anticipated.

 Aren't the code block parameters supposed to appear /with/ the code
 block?  So here's the use case:

 I have a file chapter.org.  This contains a full draft of a chapter of
 my manual.  I finish it and circulate it for comments, then get it ready
 for inclusion.

 Now I have manual.org and I want to include the main body of chapter.org
 (typically there's some front matter I leave off).

 When I put the #include in manual.org, the source code snippets in
 chapter.org, which used to work, no longer do.

 This doesn't seem like /such/ a crazy use case that it shouldn't work,
 does it?


Oh, my apologies, apparently in scanning this email thread I
mis-understood your use case.

I've just tried to re-create the situation you've described above
(including a file which contains code blocks).  I was unable to
reproduce your problem locally (the results of exporting both to html
and tex are included).  Could you modify the attached example
sufficiently to demonstrate the problem you're experiencing?



example.tar.bz2
Description: Binary data


 [btw, I am not entirely sure I know what header parameters are ---

see http://orgmode.org/manual/Header-arguments.html

 
 are these the parameters that come from the #+begin_src line?  If so,
 shouldn't they definitely be read from the #+begin_src line?  They
 can't very well be read from manual.org, which doesn't contain the
 #+begin_src line.]


These could appear with the code block, or as a property in an enclosing
heading.

Another example of a case where the original file is needed rather than
the exported file would be the case of exporting a subtree which
includes a block which references a variable defined elsewhere in the
file.


 Sorry if I wasn't clear in my original message.


No problem, I believe I misread this email thread.

Thanks -- Eric


 Best,
 r


-- 
Eric Schulte
http://cs.unm.edu/~eschulte/


Re: [O] [Patch] Documentation, was Re: Spurious source-code output?

2011-05-05 Thread Nick Dokos
Here is Tom's patch as a text/plain attachment (I can't get to the
patchwork server right now - anybody? - but note that the version on
patchwork is probably line-break damaged).

Nick

From 825fe69d493dd2e7eef414b85340e8e27400f78d Mon Sep 17 00:00:00 2001
From: Tom Dye t...@tsdye.com
Date: Thu, 5 May 2011 08:24:24 -1000
Subject: [PATCH] Refer to language specific Babel header arguments

---
 doc/org.texi |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 7142ce0..98842ba 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -11885,6 +11885,9 @@ The following header arguments are defined:
 * eval::Limit evaluation of specific code blocks
 @end menu
 
+Additional header arguments are defined on a language-specific basis, see
+@ref{Languages}. 
+
 @node var, results, Specific header arguments, Specific header arguments
 @subsubsection @code{:var}
 The @code{:var} header argument is used to pass arguments to code blocks.
-- 
1.7.1



Re: [O] Org babel does not work properly with included files

2011-05-05 Thread Robert Goldman
On 5/5/11 May 5 -4:27 PM, Eric Schulte wrote:

 I'm not sure that the current behavior is a bug.  Is it reasonable to
 place code block parameters into an included file?  These parameters
 would not be successfully found during interactive evaluation, and could
 only plausibly be used during export as you anticipated.

 Aren't the code block parameters supposed to appear /with/ the code
 block?  So here's the use case:

 I have a file chapter.org.  This contains a full draft of a chapter of
 my manual.  I finish it and circulate it for comments, then get it ready
 for inclusion.

 Now I have manual.org and I want to include the main body of chapter.org
 (typically there's some front matter I leave off).

 When I put the #include in manual.org, the source code snippets in
 chapter.org, which used to work, no longer do.

 This doesn't seem like /such/ a crazy use case that it shouldn't work,
 does it?

 
 Oh, my apologies, apparently in scanning this email thread I
 mis-understood your use case.
 
 I've just tried to re-create the situation you've described above
 (including a file which contains code blocks).  I was unable to
 reproduce your problem locally (the results of exporting both to html
 and tex are included).  Could you modify the attached example
 sufficiently to demonstrate the problem you're experiencing?

I will work on it --- I have a somewhat complicated perl script that is
pulling stuff out for me and exporting results as source.  Getting it to
work in a small example is tricky!
 

 [btw, I am not entirely sure I know what header parameters are ---
 
 see http://orgmode.org/manual/Header-arguments.html

That's what I thought --- I was just confused because the comment in the
code flips from using the term argument to parameter, and I
considered the possibility that there were two different mechanisms.

Thanks,
r



[O] [PATCH] Don't prompt for bad links during babel export.

2011-05-05 Thread rpgoldman
From: Robert P. Goldman rpgold...@real-time.com

Previously, when trying to look for the header of a source block during
export, org would prompt the user to add a new heading if it couldn't
find a match.  This prompt is not appropriate for non-interactive use.

Patch to org-babel-exp-in-export-file macro to bind
org-link-search-inhibit-query.
---

Here's a patch I found the need for while I was debugging the org-babel
export on included files.  When org-babel was unable to find a link during
its search for header arguments, it would inappropriately 
prompt me to create that header!

 lisp/ob-exp.el |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index 20a7cda..d700f6d 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -93,7 +93,8 @@ source block function.)
(set-buffer (get-file-buffer org-current-export-file))
(save-restriction
 (condition-case nil
-(org-open-link-from-string link)
+(let ((org-link-search-inhibit-query t))
+  (org-open-link-from-string link))
   (error (when heading
(goto-char (point-min))
(re-search-forward (regexp-quote heading) nil t
-- 
1.7.3.5




[O] Bug in :minlevel for INCLUDE

2011-05-05 Thread Robert Goldman
AFAICT there is an off-by-one-error here.  I.e., if I tell it that the
:minlevel is 2, then my included level one headers get level 3, and if I
tell it that the :minlevel is 1, then they get level 2.

So it seems like :minlevel is actually being interpreted as a level
*increment*, rather than a minimum...

Best,
r



[O] footnotes header not handled properly by INCLUDE files?

2011-05-05 Thread Robert Goldman
I just included a file that had a footnotes header, and the footnotes
header appeared in the main text as a separate region, rather than
correctly being interpreted as footnotes.

I guess I'm not /terribly/ surprised this fails, but it does suggest the
need for some link rewriting on import, or the footnotes are going to
collide, aren't they?



Re: [O] Bug in :minlevel for INCLUDE

2011-05-05 Thread Nick Dokos
Robert Goldman rpgold...@sift.info wrote:

 AFAICT there is an off-by-one-error here.  I.e., if I tell it that the
 :minlevel is 2, then my included level one headers get level 3, and if I
 tell it that the :minlevel is 1, then they get level 2.
 

I think that's the desired behavior.  That allows text before the first
headline in the included file (level 0) to properly take its place in the
result tree.

 So it seems like :minlevel is actually being interpreted as a level
 *increment*, rather than a minimum...
 

I don't really understand your comment: level N in the included file
becomes level :minlevel+N in the result (N = 0, 1, 2, ...). What were you
expecting?

Nick



Re: [O] [Orgmode] Grouping clock report by tag?

2011-05-05 Thread Bernt Hansen
John Hendy jw.he...@gmail.com writes:

 Following up on this again... It's been almost 2mos. Is there any way
 to add a tag grouping to clock reports rather than needing to create
 clock reports for every tag?

 Many thanks,
 John

 My initial example:
 
 A rough idea might be like this:

 ---

 #+BEGIN: clocktable :maxlevel 2 :scope agenda
 Clock summary at [2011-03-06 Sun 17:59]
 | Tag  | Headline |Time |  | File   |
 |--+--+-+--+|
 |  | ALL *Total time* | *10:00* |  ||
 |--+--+-+--+|
 | Tag1 | *Tag time*   |  *5:00* |  ||
 |  | [2011-02-04 Fri] |3:30 |  | 2011-02Feb.org |
 |  | Some task| | 3:30 ||
 |  | [2011-01-21 Fri] |0:30 |  | 2011-01Jan.org |
 |  | Some task| | 0:30 ||
 |  | [2010-12-09 Thu] |1:00 |  | 2010-12Dec.org |
 |  | Some task| | 1:00 ||
 |--+--+-+--+|
 | Tag2 | *Tag time*   |  *5:00* |  ||
 |  | [2011-02-04 Fri] |3:30 |  | 2011-02Feb.org |
 |  | Some task| | 3:30 ||
 |  | [2011-01-21 Fri] |0:30 |  | 2011-01Jan.org |
 |  | Some task| | 0:30 ||
 |  | [2010-12-09 Thu] |1:00 |  | 2010-12Dec.org |
 |  | Some task| | 1:00 ||
 |--+--+-+--+|
 -

Hi John,

Niels Giesen posted some patches for summarizing clock reports by
arbitrary properties.  Maybe this will be useful?

http://thread.gmane.org/gmane.emacs.orgmode/40160

I'm not aware of any functionality that does what you describe above.

Regards,
Bernt



Re: [O] org-babel ocaml List append problems

2011-05-05 Thread James Hurford
I ran the same code with C-c C-c and the result was the same

#+begin_src ocaml
[3;2;3] @ [3;2;3;4;5];;
#+end_src

#+results:
| 3 | 2 | 3 | 3 | 2 | 3 | 4 | 5 |


Thank you

James

On 6 May 2011 08:45, Eric Schulte schulte.e...@gmail.com wrote:
 Hi James,

 I get the following...

 #+begin_src ocaml
  [3;2;3] @ [3;2;3;4;5];;
 #+end_src

 #+results:
 | 3 | 2 | 3 | 3 | 2 | 3 | 4 | 5 |

 I recently (in the last month) pushed some changes up to the Org-mode
 git repository which fix result handling for ocaml.  Please try with the
 latest version of Org-mode from git, and if the problem persists send
 along a minimal example sufficient to reproduce the problem.

 Thanks -- Eric

 James Hurford terra...@gmail.com writes:

 I have just discovered org-babel supports ocaml and I've just started to
 learn it.  My problem is when appending two lists together, when run
 through org-babel returns a error message.  I would try and run this
 code

 [3;2;3] @ [3;2;3;4;5];;

 and get a error message saying

 Invalid function: 3

 Is there a solution to this as the code should work?

 James





 --
 Eric Schulte
 http://cs.unm.edu/~eschulte/




-- 
James Hurford
terra...@gmail.com

There are two ways of constructing a software design: one way is to
make it so simple that there are obviously no deficiencies; the other is
to make it so complicated that there are no obvious deficiencies.
                                                       -- C.A.R. Hoare



Re: [O] Bug in :minlevel for INCLUDE

2011-05-05 Thread Robert Goldman
On 5/5/11 May 5 -6:03 PM, Nick Dokos wrote:
 Robert Goldman rpgold...@sift.info wrote:
 
 AFAICT there is an off-by-one-error here.  I.e., if I tell it that the
 :minlevel is 2, then my included level one headers get level 3, and if I
 tell it that the :minlevel is 1, then they get level 2.

 
 I think that's the desired behavior.  That allows text before the first
 headline in the included file (level 0) to properly take its place in the
 result tree.
 
 So it seems like :minlevel is actually being interpreted as a level
 *increment*, rather than a minimum...

 
 I don't really understand your comment: level N in the included file
 becomes level :minlevel+N in the result (N = 0, 1, 2, ...). What were you
 expecting?

I was expecting the standard English usage (always dangerous in a
technical context!).

The minimum of 1,2,3 is 1.

But here the thing we are calling minimum for 1,2,3 would be zero.

Suggestion:  the term :levelinc[rement] would be more indicative of the
meaning.  I think if you read your explanation, you will see that the
thing referred to as a minimum is really an increment...

It may be too late to make that change without disruption, so the
alternative would be to modify the manual to make the meaning clearer.

Best,
r



Re: [O] Bug: No property change from ‘org-clock-sum’

2011-05-05 Thread Ben Finney
Ben Finney ben+em...@benfinney.id.au writes:

 When I use ‘org-clock-sum’ in Org-mode version 7.4, nothing appears to
 happen: the items in the subtree are not updated and no ‘CLOCKSUM’
 property appears.

 Org-mode version 7.4
 GNU Emacs 23.2.1 (powerpc-unknown-linux-gnu, GTK+ Version 2.20.1) of
 2010-12-12 on porpora, modified by Debian

This is still the case after an upgrade:

Org-mode version 7.5
GNU Emacs 23.3.1 (powerpc-unknown-linux-gnu, GTK+ Version 2.24.4) of
2011-04-11 on praetorius, modified by Debian

 Why wouldn't the ‘org-clock-sum’ function do what its doc string says?
 How should I be updating the ‘CLOCKSUM’ property?

Can anyone shed light on this? I'd like to use the function as
specified.

-- 
 \   “To have the choice between proprietary software packages, is |
  `\  being able to choose your master. Freedom means not having a |
_o__)master.” —Richard M. Stallman, 2007-05-16 |
Ben Finney




Re: [O] Bug: No property change from ‘org-clock-sum’

2011-05-05 Thread Bernt Hansen
Ben Finney ben+em...@benfinney.id.au writes:

 Ben Finney ben+em...@benfinney.id.au writes:

 When I use ‘org-clock-sum’ in Org-mode version 7.4, nothing appears to
 happen: the items in the subtree are not updated and no ‘CLOCKSUM’
 property appears.

 Org-mode version 7.4
 GNU Emacs 23.2.1 (powerpc-unknown-linux-gnu, GTK+ Version 2.20.1) of
 2010-12-12 on porpora, modified by Debian

 This is still the case after an upgrade:

 Org-mode version 7.5
 GNU Emacs 23.3.1 (powerpc-unknown-linux-gnu, GTK+ Version 2.24.4) of
 2011-04-11 on praetorius, modified by Debian

 Why wouldn't the ‘org-clock-sum’ function do what its doc string says?
 How should I be updating the ‘CLOCKSUM’ property?

 Can anyone shed light on this? I'd like to use the function as
 specified.

Hi Ben,

I don't think the org-clock-sum function does what you think/want it to
do.  The docstring says it sets text properties on the headline - so I
don't think it is intended to update a CLOCKSUM property in the
headings.

These text properties are temporary (ie. not saved in the org file) and
I think these are used by the column view overlays for display-only.

The org-invoice.el contributed file created by Peter Jones uses a
CLOCKSUM property but I'm not sure if this is intended to be updated
manually or automatically from the clocking lines in org.  I've CC-ed
Peter in case he can shed any light on this.

Regards,
Bernt



Re: [O] [PATCH] Don't prompt for bad links during babel export.

2011-05-05 Thread Eric Schulte
Applied.  Thanks for the patch -- Eric

rpgold...@sift.info writes:

 From: Robert P. Goldman rpgold...@real-time.com

 Previously, when trying to look for the header of a source block during
 export, org would prompt the user to add a new heading if it couldn't
 find a match.  This prompt is not appropriate for non-interactive use.

 Patch to org-babel-exp-in-export-file macro to bind
 org-link-search-inhibit-query.
 ---

 Here's a patch I found the need for while I was debugging the org-babel
 export on included files.  When org-babel was unable to find a link during
 its search for header arguments, it would inappropriately 
 prompt me to create that header!

  lisp/ob-exp.el |3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

 diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
 index 20a7cda..d700f6d 100644
 --- a/lisp/ob-exp.el
 +++ b/lisp/ob-exp.el
 @@ -93,7 +93,8 @@ source block function.)
 (set-buffer (get-file-buffer org-current-export-file))
 (save-restriction
(condition-case nil
 -  (org-open-link-from-string link)
 +  (let ((org-link-search-inhibit-query t))
 +(org-open-link-from-string link))
  (error (when heading
   (goto-char (point-min))
   (re-search-forward (regexp-quote heading) nil t

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



[O] [semi-OT] issue trackers?

2011-05-05 Thread Matt Price
Hi everyone,

I'm collaborating on a project where I'm starting to feel the need for a
shared issue tracker.  Anyone have any suggestions? I have my own server
(running ubuntu maverick, so pretty up-to-date), and can install pretty well
whatever I want there.  I'd love something that integrates with org-mode
somehow, but my collaborators are definitively NOT emacs users.  I just
started a project on google code, but that doesn't seem quite right -- for
one thing, we're not _really_ doing much coding, and for another ,some of
the issues should contain private notes -- e.g. phone numbers and emails of
people we need to ask for help or information.  It wasn't immediately
apparent to me that privacy fetures like that exist on google code.

Anyway, thanks!
Matt


[O] emacs-orgmode export problem solved

2011-05-05 Thread Jude DaShiell
the emacs-w3m.SlackBuild script had a defect in it on line 59. Once I 
fixed that defect emacs-w3m works correctly and that makes org-mode work 
correctly too.  This was smoke from a distant fire on which org-mode 
depended.





[O] outline formatting in html

2011-05-05 Thread Skip Collins
I thought this would be easy. But I cannot find a way to get html
formatted the way I want. I would like to view org content in
traditional outline format, with indentation, Roman numerals for
the top level heading, etc:

 I. This is a top level heading
II. Here is another level-1 heading
A. Here is a level 2 heading
1. This is a level-3 heading
2. Another level-3
a. Level-4
b. Another level-4
(1) Level-5
(a) Level-6
B. Another level 2

When I customize org-export-section-number-format, I do not get
exactly what I want in html output. All heading numbers include
higher level numbers, e.g. II.A.2.b. I am looking for a less cluttered
output in which a heading only includes the single counter for its level.



Re: [O] [semi-OT] issue trackers?

2011-05-05 Thread Ben Finney
Matt Price mopto...@gmail.com writes:

 I'm collaborating on a project where I'm starting to feel the need for a
 shared issue tracker.  Anyone have any suggestions?

Roundup URL:http://www.roundup-tracker.org/ is a self-contained issue
tracker that communicates via web and email interfaces, and is quite
extensively customisable.

 I'd love something that integrates with org-mode somehow, but my
 collaborators are definitively NOT emacs users.

I don't know of any issue trackers that integrate with Org mode in any
way. You could start with having Emacs send automatically-composed email
messages to Roundup in response to your actions in Org mode, and perhaps
later look at more customised integration.

-- 
 \ “Buy not what you want, but what you need; what you do not need |
  `\ is expensive at a penny.” —Cato, 234–149 BCE, Relique |
_o__)  |
Ben Finney




Re: [O] [semi-OT] issue trackers?

2011-05-05 Thread Michael Markert
Hi Matt,

On 6 May 2011, Matt Price wrote:
 I'm collaborating on a project where I'm starting to feel the need for a
 shared issue tracker.  Anyone have any suggestions? I have my own server
 (running ubuntu maverick, so pretty up-to-date), and can install pretty well
 whatever I want there.  I'd love something that integrates with org-mode
 somehow, but my collaborators are definitively NOT emacs users.

Here[1] is a blog post that outlines how to use Emacs to show issues from a
Roundup Bugtracker in Orgmode.

I have not tried it yet but it looks awesome. Reading the comments could
lead to an easier solution, too.

Michael

Footnotes:

[1] 
http://labs.creativecommons.org/2010/11/10/bridging-public-bugtrackers-and-local-tasklists/


pgpp410xOsIhD.pgp
Description: PGP signature