Re: [O] Export to multiple HTML files?

2012-03-03 Thread Christian Moe

On 3/3/12 9:28 PM, Nicolas Goaziou wrote:
(...)

Christian Moe  writes:

On Mon, Feb 27, 2012 at 5:19 PM, Avdi Grimm   wrote:

Is there a way to export a single Org file to a bunch of HTML files,
one for each heading of a given level?

(...)

I don't think there's been any way to do this directly. Would be
a neat option to have, though.


You can probably achieve this by setting an appropriate publishing
function.


But is there such a function ready to use? I don't think so. I've 
skimmed the manual and the Worg tutorial on publishing, and I've 
googled for this once or twice in the past.


Yours,
Christian



Re: [O] Japanese strings for Org-mode export

2012-03-03 Thread Hideki Saito
The attached is alternative of the patch using utf-8 encoding.

Hideki Saito 



On Sat, Mar 3, 2012 at 10:26 PM, Hideki Saito  wrote:
> Hello Ishikiawa-san
> It is OSX at work, and it's still on Snow Leopard -- I haven't updated
> the console version of it, so I will have to check to see which
> version was it. It is now sound like to me that the way I've done on
> the patch is platform dependent at best -- which is strange as this
> notation was used in other languages in same entry, but not as
> extensive as in case for Japanese...
>
> Hideki Saito 
>
>
>
>
> 2012/3/3 Takaaki ISHIKAWA :
>> Dear Saito-san,
>>
>> Thank you for comment.
>> You mean OSX+emacs23 users cannot compile using the patch, right?
>> (Or something wrong with me...)
>> And I can compile it in SuSE Linux :-)
>>
>> Best regards,
>> Takaaki Ishikawa
>>
>> On 2012/03/04, at 14:37, Hideki Saito wrote:
>>
>>> Ishikawa-san,
>>> I've had that problem when I tried to do "make' on Mac OS X, which I
>>> realized it was compiling in obsolete version of emacs. (like emacs
>>> 22) I believe it was happening when (require 'org-exp.el)
>>>
>>> In fact, I did see this would work if UTF-8ed in your example even in
>>> the above environment, but I thought it was inappropriate as coding
>>> wasn't encoded in UTF-8. If UTF-8 strings are acceptable in org-mode
>>> source tree, I guess doing it so will make it most compatible.
>>>
>>> I verified the patch worked under Emacs 24 and in fact, I am right now
>>> using the code on my Mac and on Windows.
>>>
>>> Hideki Saito 
>>>
>>> 2012/3/3 Takaaki ISHIKAWA :
 Dear Saito-san,

 I've tried to compile your patch with the latest org-mode.
 I got an error message:
 Error: Invalid character: 33879, #o102127, #x8457

 I can apply the following line directly under UTF-8 env.:
 ("ja" "著者" "日付" "目次" "脚注")
 
 Emacs 23.4 (nextstep)
 Org-version 7.8.03
 

 Could you give me your environment around Emacs?

 Best regards,
 Takaaki Ishikawa


 On 2012/03/03, at 16:06, Hideki Saito wrote:

> I think Gmail did bad to the patch snippet. Obviously, I haven't done
> much of patch contributions :-)
>
> I've attached one, or you can refer to:
> https://gist.github.com/1964802
>
> Thank you.
>
> Hideki Saito 
>
>
> On Fri, Mar 2, 2012 at 5:55 PM, Hideki Saito  wrote:
>> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
>> index 174619a..43c54b5 100644
>> --- a/lisp/org-exp.el
>> +++ b/lisp/org-exp.el
>> @@ -194,6 +194,7 @@ This option can also be set with the +OPTIONS
>> line, e.g. \"-:nil\"."
>>     ("hu" "Szerzõ" "Dátum" "Tartalomjegyzék"
>> "Lábjegyzet")
>>     ("is" "Höfundur" "Dagsetning" "Efnisyfirlit"
>> "Aftanmálsgreinar")
>>     ("it" "Autore"     "Data"  "Indice" "Note a piè di pagina")
>> +    ("ja" "\x8457\x8005" "\x65e5\x4ed8" "\x76ee\x6b21" "\x811a\x6ce8")
>>     ("nl" "Auteur"     "Datum" "Inhoudsopgave" "Voetnoten")
>>     ("no" "Forfatter"  "Dato"  "Innhold" "Fotnoter")
>>     ("nb" "Forfatter"  "Dato"  "Innhold" "Fotnoter")  ;; nb = Norsk 
>> (bokm.l)
> 

>>


orgmode-japanese-export-utf8.patch
Description: Binary data


Re: [O] Agenda TODO sorting by date

2012-03-03 Thread James Harkins
At Sat, 03 Mar 2012 23:31:47 -0500,
Bernt Hansen wrote:
> >> (defun bh/agenda-sort-by-heading-date (a b)
> >>   "Sorting strategy for agenda items.
> >> Late deadlines first, then scheduled, then non-late deadlines"
> 
> Oops... this description is all wrong - since I gutted my existing
> sorting function to try this...  I'll let you fix that :)

:)  I wondered about that.

There are non-timestamped TODO items in my org files, so I needed to hack a 
little further. The version below is working beautifully.

Thanks for all the help! I doubt I would have figured this out very quickly.

James


(defun bh/agenda-sort-by-heading-date (a b)
  "Sorting strategy for agenda items.
Timestamped entries first (ascending order), then non-timestamped"
  ;(message "Heading a: <%s>" a)
  ;(message "Heading b: <%s>" b)
  (let* ((date-regexp "\\(\\<[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\\) ")
date-a date-b)
(if
(string-match date-regexp a)
(setq date-a (match-string 1 a))
(setq date-a "ZZ")  ; clunko workaround to push dateless entries 
last
)
(if
(string-match date-regexp b)
(setq date-b (match-string 1 b))
(setq date-b "ZZ")
)
(cond ((string< date-a date-b) -1)
  ((string< date-b date-a) +1)
  ;((t nil))
)))


--
James Harkins /// dewdrop world
jamshar...@dewdrop-world.net
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks



Re: [O] Japanese strings for Org-mode export

2012-03-03 Thread Hideki Saito
Hello Ishikiawa-san
It is OSX at work, and it's still on Snow Leopard -- I haven't updated
the console version of it, so I will have to check to see which
version was it. It is now sound like to me that the way I've done on
the patch is platform dependent at best -- which is strange as this
notation was used in other languages in same entry, but not as
extensive as in case for Japanese...

Hideki Saito 




2012/3/3 Takaaki ISHIKAWA :
> Dear Saito-san,
>
> Thank you for comment.
> You mean OSX+emacs23 users cannot compile using the patch, right?
> (Or something wrong with me...)
> And I can compile it in SuSE Linux :-)
>
> Best regards,
> Takaaki Ishikawa
>
> On 2012/03/04, at 14:37, Hideki Saito wrote:
>
>> Ishikawa-san,
>> I've had that problem when I tried to do "make' on Mac OS X, which I
>> realized it was compiling in obsolete version of emacs. (like emacs
>> 22) I believe it was happening when (require 'org-exp.el)
>>
>> In fact, I did see this would work if UTF-8ed in your example even in
>> the above environment, but I thought it was inappropriate as coding
>> wasn't encoded in UTF-8. If UTF-8 strings are acceptable in org-mode
>> source tree, I guess doing it so will make it most compatible.
>>
>> I verified the patch worked under Emacs 24 and in fact, I am right now
>> using the code on my Mac and on Windows.
>>
>> Hideki Saito 
>>
>> 2012/3/3 Takaaki ISHIKAWA :
>>> Dear Saito-san,
>>>
>>> I've tried to compile your patch with the latest org-mode.
>>> I got an error message:
>>> Error: Invalid character: 33879, #o102127, #x8457
>>>
>>> I can apply the following line directly under UTF-8 env.:
>>> ("ja" "著者" "日付" "目次" "脚注")
>>> 
>>> Emacs 23.4 (nextstep)
>>> Org-version 7.8.03
>>> 
>>>
>>> Could you give me your environment around Emacs?
>>>
>>> Best regards,
>>> Takaaki Ishikawa
>>>
>>>
>>> On 2012/03/03, at 16:06, Hideki Saito wrote:
>>>
 I think Gmail did bad to the patch snippet. Obviously, I haven't done
 much of patch contributions :-)

 I've attached one, or you can refer to:
 https://gist.github.com/1964802

 Thank you.

 Hideki Saito 


 On Fri, Mar 2, 2012 at 5:55 PM, Hideki Saito  wrote:
> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
> index 174619a..43c54b5 100644
> --- a/lisp/org-exp.el
> +++ b/lisp/org-exp.el
> @@ -194,6 +194,7 @@ This option can also be set with the +OPTIONS
> line, e.g. \"-:nil\"."
>     ("hu" "Szerzõ" "Dátum" "Tartalomjegyzék"
> "Lábjegyzet")
>     ("is" "Höfundur" "Dagsetning" "Efnisyfirlit"
> "Aftanmálsgreinar")
>     ("it" "Autore"     "Data"  "Indice" "Note a piè di pagina")
> +    ("ja" "\x8457\x8005" "\x65e5\x4ed8" "\x76ee\x6b21" "\x811a\x6ce8")
>     ("nl" "Auteur"     "Datum" "Inhoudsopgave" "Voetnoten")
>     ("no" "Forfatter"  "Dato"  "Innhold" "Fotnoter")
>     ("nb" "Forfatter"  "Dato"  "Innhold" "Fotnoter")  ;; nb = Norsk 
> (bokm.l)
 
>>>
>



Re: [O] Japanese strings for Org-mode export

2012-03-03 Thread Takaaki ISHIKAWA
Dear Saito-san,

Thank you for comment.
You mean OSX+emacs23 users cannot compile using the patch, right?
(Or something wrong with me...)
And I can compile it in SuSE Linux :-)

Best regards,
Takaaki Ishikawa

On 2012/03/04, at 14:37, Hideki Saito wrote:

> Ishikawa-san,
> I've had that problem when I tried to do "make' on Mac OS X, which I
> realized it was compiling in obsolete version of emacs. (like emacs
> 22) I believe it was happening when (require 'org-exp.el)
> 
> In fact, I did see this would work if UTF-8ed in your example even in
> the above environment, but I thought it was inappropriate as coding
> wasn't encoded in UTF-8. If UTF-8 strings are acceptable in org-mode
> source tree, I guess doing it so will make it most compatible.
> 
> I verified the patch worked under Emacs 24 and in fact, I am right now
> using the code on my Mac and on Windows.
> 
> Hideki Saito 
> 
> 2012/3/3 Takaaki ISHIKAWA :
>> Dear Saito-san,
>> 
>> I've tried to compile your patch with the latest org-mode.
>> I got an error message:
>> Error: Invalid character: 33879, #o102127, #x8457
>> 
>> I can apply the following line directly under UTF-8 env.:
>> ("ja" "著者" "日付" "目次" "脚注")
>> 
>> Emacs 23.4 (nextstep)
>> Org-version 7.8.03
>> 
>> 
>> Could you give me your environment around Emacs?
>> 
>> Best regards,
>> Takaaki Ishikawa
>> 
>> 
>> On 2012/03/03, at 16:06, Hideki Saito wrote:
>> 
>>> I think Gmail did bad to the patch snippet. Obviously, I haven't done
>>> much of patch contributions :-)
>>> 
>>> I've attached one, or you can refer to:
>>> https://gist.github.com/1964802
>>> 
>>> Thank you.
>>> 
>>> Hideki Saito 
>>> 
>>> 
>>> On Fri, Mar 2, 2012 at 5:55 PM, Hideki Saito  wrote:
 diff --git a/lisp/org-exp.el b/lisp/org-exp.el
 index 174619a..43c54b5 100644
 --- a/lisp/org-exp.el
 +++ b/lisp/org-exp.el
 @@ -194,6 +194,7 @@ This option can also be set with the +OPTIONS
 line, e.g. \"-:nil\"."
 ("hu" "Szerzõ" "Dátum" "Tartalomjegyzék"
 "Lábjegyzet")
 ("is" "Höfundur" "Dagsetning" "Efnisyfirlit"
 "Aftanmálsgreinar")
 ("it" "Autore" "Data"  "Indice" "Note a piè di pagina")
 +("ja" "\x8457\x8005" "\x65e5\x4ed8" "\x76ee\x6b21" "\x811a\x6ce8")
 ("nl" "Auteur" "Datum" "Inhoudsopgave" "Voetnoten")
 ("no" "Forfatter"  "Dato"  "Innhold" "Fotnoter")
 ("nb" "Forfatter"  "Dato"  "Innhold" "Fotnoter")  ;; nb = Norsk 
 (bokm.l)
>>> 
>> 




Re: [O] Japanese strings for Org-mode export

2012-03-03 Thread Hideki Saito
Ishikawa-san,
I've had that problem when I tried to do "make' on Mac OS X, which I
realized it was compiling in obsolete version of emacs. (like emacs
22) I believe it was happening when (require 'org-exp.el)

In fact, I did see this would work if UTF-8ed in your example even in
the above environment, but I thought it was inappropriate as coding
wasn't encoded in UTF-8. If UTF-8 strings are acceptable in org-mode
source tree, I guess doing it so will make it most compatible.

I verified the patch worked under Emacs 24 and in fact, I am right now
using the code on my Mac and on Windows.

Hideki Saito 

2012/3/3 Takaaki ISHIKAWA :
> Dear Saito-san,
>
> I've tried to compile your patch with the latest org-mode.
> I got an error message:
> Error: Invalid character: 33879, #o102127, #x8457
>
> I can apply the following line directly under UTF-8 env.:
> ("ja" "著者" "日付" "目次" "脚注")
> 
> Emacs 23.4 (nextstep)
> Org-version 7.8.03
> 
>
> Could you give me your environment around Emacs?
>
> Best regards,
> Takaaki Ishikawa
>
>
> On 2012/03/03, at 16:06, Hideki Saito wrote:
>
>> I think Gmail did bad to the patch snippet. Obviously, I haven't done
>> much of patch contributions :-)
>>
>> I've attached one, or you can refer to:
>> https://gist.github.com/1964802
>>
>> Thank you.
>>
>> Hideki Saito 
>>
>>
>> On Fri, Mar 2, 2012 at 5:55 PM, Hideki Saito  wrote:
>>> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
>>> index 174619a..43c54b5 100644
>>> --- a/lisp/org-exp.el
>>> +++ b/lisp/org-exp.el
>>> @@ -194,6 +194,7 @@ This option can also be set with the +OPTIONS
>>> line, e.g. \"-:nil\"."
>>>     ("hu" "Szerzõ" "Dátum" "Tartalomjegyzék"
>>> "Lábjegyzet")
>>>     ("is" "Höfundur" "Dagsetning" "Efnisyfirlit"
>>> "Aftanmálsgreinar")
>>>     ("it" "Autore"     "Data"  "Indice" "Note a piè di pagina")
>>> +    ("ja" "\x8457\x8005" "\x65e5\x4ed8" "\x76ee\x6b21" "\x811a\x6ce8")
>>>     ("nl" "Auteur"     "Datum" "Inhoudsopgave" "Voetnoten")
>>>     ("no" "Forfatter"  "Dato"  "Innhold" "Fotnoter")
>>>     ("nb" "Forfatter"  "Dato"  "Innhold" "Fotnoter")  ;; nb = Norsk (bokm.l)
>> 
>
>
> Takaaki ISHIKAWA,
> GITI, Waseda University
>    tak...@ieee.org
>    https://takaxp.com/tak...@ieee.org.pub (gpg public key)
>    http://takaxp.com/
>    tel: 090-1837-8497
> --- ( ' -')b
> 石川孝明
> 早稲田大学国際情報通信研究センター
>
>
>
>
>



Re: [O] Japanese strings for Org-mode export

2012-03-03 Thread Takaaki ISHIKAWA
Dear Saito-san,

I've tried to compile your patch with the latest org-mode.
I got an error message:
Error: Invalid character: 33879, #o102127, #x8457

I can apply the following line directly under UTF-8 env.:
("ja" "著者" "日付" "目次" "脚注")

Emacs 23.4 (nextstep)
Org-version 7.8.03


Could you give me your environment around Emacs?

Best regards,
Takaaki Ishikawa


On 2012/03/03, at 16:06, Hideki Saito wrote:

> I think Gmail did bad to the patch snippet. Obviously, I haven't done
> much of patch contributions :-)
> 
> I've attached one, or you can refer to:
> https://gist.github.com/1964802
> 
> Thank you.
> 
> Hideki Saito 
> 
> 
> On Fri, Mar 2, 2012 at 5:55 PM, Hideki Saito  wrote:
>> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
>> index 174619a..43c54b5 100644
>> --- a/lisp/org-exp.el
>> +++ b/lisp/org-exp.el
>> @@ -194,6 +194,7 @@ This option can also be set with the +OPTIONS
>> line, e.g. \"-:nil\"."
>> ("hu" "Szerzõ" "Dátum" "Tartalomjegyzék"
>> "Lábjegyzet")
>> ("is" "Höfundur" "Dagsetning" "Efnisyfirlit"
>> "Aftanmálsgreinar")
>> ("it" "Autore" "Data"  "Indice" "Note a piè di pagina")
>> +("ja" "\x8457\x8005" "\x65e5\x4ed8" "\x76ee\x6b21" "\x811a\x6ce8")
>> ("nl" "Auteur" "Datum" "Inhoudsopgave" "Voetnoten")
>> ("no" "Forfatter"  "Dato"  "Innhold" "Fotnoter")
>> ("nb" "Forfatter"  "Dato"  "Innhold" "Fotnoter")  ;; nb = Norsk (bokm.l)
> 


Takaaki ISHIKAWA,
GITI, Waseda University
tak...@ieee.org
https://takaxp.com/tak...@ieee.org.pub (gpg public key)
http://takaxp.com/
tel: 090-1837-8497
--- ( ' -')b
石川孝明
早稲田大学国際情報通信研究センター








[O] C-c a t doesn't give yield list of all TODO items

2012-03-03 Thread Christopher W. Ryan

I'm running GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2011-03-04 on palmer, modified by Debian, on Ubuntu 10.04 LTS. 
Org-mode version 7.6.


The online Org-mode manual reads:

"10.3.2 The global TODO list

"The global TODO list contains all unfinished TODO items formatted and 
collected into a single place.


"C-c a t (org-todo-list)
"Show the global TODO list. "

But when I try to type C-c a

I only get that far, and emacs tells me, "C-c a is undefined"

There is a drop-down menu item under the Org item, called "Agenda 
Command..." which offers me lettered choices, and t will list all TODO 
entries. But what is the keyboard shortcut, if not C-a a t ?


Thanks.

--Chris Ryan

PS: in case it is relevant, my .emacs file, rather a short one, looks 
like this:


;;(load-file "~/.emacs.d/color-theme/themes/color-theme-subdued.el")
;;(color-theme-subdued)

(require 'color-theme)
(color-theme-parus)
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(org-agenda-files (quote ("~/DATA/BookIdeas.org" "~/orgjunk.org"
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )

;; don't make back-up files
(setq make-backup-files nil)

;; single space between sentences
(setq sentence-end-double-space nil)

;; active Babel languages
(org-babel-do-load-languages
 'org-babel-load-languages
 '((R . t)
   ))




Re: [O] Agenda TODO sorting by date

2012-03-03 Thread Bernt Hansen
James Harkins  writes:

> At Sat, 03 Mar 2012 14:03:05 -0500,
> Bernt Hansen wrote:
>> I think this works
>> 
>> --8<---cut here---start->8---
>> 
>> (defun bh/agenda-sort-by-heading-date (a b)
>>   "Sorting strategy for agenda items.
>> Late deadlines first, then scheduled, then non-late deadlines"

Oops... this description is all wrong - since I gutted my existing
sorting function to try this...  I'll let you fix that :)

Regards,
Bernt


>
>> .
>
> Oops :)  that's what I get for answering e-mail before updating from IMAP.
>
> Thanks for this, will try later. "string-match" -- amazing that none
> of the pages I found by searching for things like "lisp regular
> expression" mentioned this function *at all* ?? I guess a lot of
> programming language or software documentation is like this -- it's
> easy to find what something is called when you already know what it's
> called. Heh. Anyway, learned something, that's good.
>
> Thanks again!!
>
> James



Re: [O] Agenda TODO sorting by date

2012-03-03 Thread James Harkins
At Sat, 03 Mar 2012 14:03:05 -0500,
Bernt Hansen wrote:
> I think this works
> 
> --8<---cut here---start->8---
> 
> (defun bh/agenda-sort-by-heading-date (a b)
>   "Sorting strategy for agenda items.
> Late deadlines first, then scheduled, then non-late deadlines"

> .

Oops :)  that's what I get for answering e-mail before updating from IMAP.

Thanks for this, will try later. "string-match" -- amazing that none of the 
pages I found by searching for things like "lisp regular expression" mentioned 
this function *at all* ?? I guess a lot of programming language or software 
documentation is like this -- it's easy to find what something is called when 
you already know what it's called. Heh. Anyway, learned something, that's good.

Thanks again!!

James


--
James Harkins /// dewdrop world
jamshar...@dewdrop-world.net
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks



Re: [O] ConTeXt export

2012-03-03 Thread suvayu ali
On Sat, Mar 3, 2012 at 17:07, David Rogers  wrote:
> Nick Dokos  writes:
>
>> Can ConTeXt handle a LaTeX program?
>
>
> No it can't, not that I'm aware of anyway. While both LaTeX and ConTeXt
> inherit from plain TeX, and therefore look somewhat similar cosmetically,
> they don't work the same. (e.g. ConTeXt does not use LaTeX packages, the
> .tex files differ in essentials and not just in details, etc.)

However with the latest experimental org-export library by Nicolas, it
should be possible to write an exporter without much trouble. :)

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Agenda TODO sorting by date

2012-03-03 Thread James Harkins
At Sat, 3 Mar 2012 08:38:32 -0800,
Alan E. Davis wrote:
> I am definitely not a programmer, and for sure not the one who could guide 
> you on writing a sort
> function.  HOWEVER, emacs has a really nice facility for doing so, if you 
> decide you want to try
> that. 
> 
> I had to write a program to alphabetize a lexical list in Chuukese, in an 
> arbitrary order other
> than standard english alphabetical order.  I had to have guidance, but it was 
> certainly possible,
> even for me.
> 
> Just some encouragement, but it's been many years, and i am unable to offer 
> more than that.
>  
> http://www.gnu.org/software/emacs/manual/html_node/elisp/Sorting.html

Hm, these would sort lines of the buffer after the agenda is created (is there 
a hook in org to do so?), but the idea is to tell org how to sort before 
putting the stuff in the agenda buffer.

I'm looking for a function that will do this -- given:

** DONE PUSH onFailure arg for waitForBoot <2012-01-31 Tue>

and the regexp "<[^>]+>" -- return <2012-01-31 Tue>.

I can find emacs lisp functions for regexp search within a buffer (nope), but 
the point is not to look in a buffer. It's to pass in the source string.

Did several google searches, and couldn't find the magic words (search terms).

Thanks,
James


--
James Harkins /// dewdrop world
jamshar...@dewdrop-world.net
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks



Re: [O] Participating in Google Summer of Code 2012

2012-03-03 Thread Rasmus

Here are some ideas, which are maybe more from a user point of view.

* Tables (babel)

I would love to see work on making table work easy for non-programers;
that is perhaps making babel 'easier' to use for common task.

For text table I often have tasks that should be applied to say
every other row.  Recently, for example I needed to apply
\multiolumn{1}{l}{\1} to every cell of every other row.

The latex function of Hmisc and xtable does a nice job of making
'programable' changes tables easy.

* Knitr-like (babel + org)

There is a new package Knitr, a Sweave replacement.  It does a nice work
of working perfectly out of the box.  For example inline-number
expressions are formatted to a limited number of sign, it is very easy
to use tikz-device (for R), which ensures consistent fonts.  Code-blocks
are automatically nicely formatted etc.

I would be interesting if Org could be made more dwim in this manner
(for many languages).

* Better item handling

At the moment it is hard to change lists.  Often I need inline items
and interrupted  list.  This is hard to do with Org at the moment.

–Rasmus

-- 
Enought with the bla bla!




Re: [O] Selectively export RESULTS

2012-03-03 Thread Sebastien Vauban
Hi Achim,

Achim Gratz wrote:
> "Sebastien Vauban" writes:
>>> You can also press C-c C-c on the #+Property line to apply it's effects.
>>
>> Everybody seems to get bitten by this at least once. Would there be a
>> possibility to avoid this extra step for the user, and have such parameters
>> automagically taken into account, without user involvement?
>
> I really wouldn't want that, but maybe PROPERTY lines that are out of
> sync with the effective properties could be highlighted?

Not sure to understand why you would prefer to have something that you just
wrote not taken into account, unlike one would expect?

Anyway, be it set or just shown, that means that a check would have to be done
at each babel evaluation of the buffer.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [Bug] Tests for experimental org-features should expect to fail if not activated by the user

2012-03-03 Thread Sebastien Vauban
Hello Achim,

Achim Gratz wrote:
> Two test failures in current HEAD:
>
> Test test-org-footnote/normalize-outside-org backtrace:
>   org-footnote-in-valid-context-p()
>   [...]
>   normal-top-level()
> Test test-org-footnote/normalize-outside-org condition:
> (void-variable message-cite-prefix-regexp)
>FAILED  166/192  test-org-footnote/normalize-outside-org
>
> Test test-org-export/export-scope backtrace:
>   signal(ert-test-failed (((should (equal (org-export-as (quote test))
>   [...]
>   normal-top-level()
> Test test-org-export/export-scope condition:
> (ert-test-failed
>  ((should
>(equal
> (org-export-as ...)
> "text\n"))
>   :form
>   (equal "* Head1\n** Head2\ntext\n*** Head3\n" "text\n")
>   :value nil :explanation
>   (arrays-of-different-length 32 5 "* Head1\n** Head2\ntext\n*** Head3\n" 
> "text\n" first-mismatch-at 0)))
>FAILED   95/130  test-org-export/export-scope

I don't understand why once there are 192 tests, once 130. I thought that the
second figure was the total number of tests, hence should be stable over the
test runs?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [Bug] Tests for experimental org-features should expect to fail if not activated by the user

2012-03-03 Thread Nicolas Goaziou
Hello,

Achim Gratz  writes:

> Two test failures in current HEAD:

I cannot reproduce any of them, interactively or in batch mode[1].

I'm not sure where they could come from.


Regards,

[1] Though, I have 8 unexpected failures there, but not related to
those described here.

-- 
Nicolas Goaziou



Re: [O] Bug: Org-mode don't export to html footnotes references inside footnotes as such. [7.8.03]

2012-03-03 Thread Nicolas Goaziou
Hello,

Jambunathan K  writes:

> Nicolas Goaziou  writes:
>
>> Hello,
>>
>> oitofe...@gmail.com (Bruno Félix Rezende Ribeiro) writes:
>>
>>> Consider the following org code:
>>>
>>> --
>>> This is only a text.[1]
>>>
>>> [1] This is a text body's footnote.[2]
>>> [2] This is a footnote's footnote.
>>> --
>>>
>>> When org-mode exports this code to html, despite the fact that
>>> footnote 2 is present in the final document, it don't exports
>>> footnote 2 reference as a link to footnote 2; it's exported just
>>> like plain text.
>>
>> There's no official support for nested footnotes in current exporter.
>> Implementing it would be non trivial (it may be for the HTML back-end,
>> but clearly not for the LaTeX one).  Since we're working on a new export
>> engine, I don't think it's worth the effort.
>>
>> Though, your report made me implement it in the experimental exporter.
>
> From OpenDocument-1.2 spec has the following note
>
> ,
> | 6.3.4
> | 
> | The  element contains the content of a note. It does not
> | have any attributes.
> | 
> | Note: The schema allows for the inclusion of notes into the note
> | body. While this may be reasonable for note types, it is not reasonable
> | for footnotes and endnotes. Conforming consumers need not support notes
> | inside notes.
> `
>
> LibreOffice doesn't support notes inside notes.  So for all practical
> purposes, nested footnotes cannot be supported with ODT export (in both
> the legacy and in-the-works experimental version).
>
> If one intends to export his Org file to ODT, then nested footnote
> construction should be avoided like plague.

It isn't really supported in LaTeX too, but there are workarounds.

If such thing isn't possible, ODT back-end will ignore any footnote
contained in another footnote (i.e. whose genealogy contains an element
with an `footnote-reference' or `footnote-definition' type) and send
a message to the user.


Regards,

-- 
Nicolas Goaziou



Re: [O] Export to multiple HTML files?

2012-03-03 Thread Nicolas Goaziou
Hello,

Christian Moe  writes:

>> On Mon, Feb 27, 2012 at 5:19 PM, Avdi Grimm  wrote:
>>> Is there a way to export a single Org file to a bunch of HTML files,
>>> one for each heading of a given level? E.g. the way the Org manual is
>>> presented at http://orgmode.org/manual ? (yes, I realize that's Info
>>> not org-mode)I thought I remembered that being possible, but now I
>>> can't find it.
>
> I don't think there's been any way to do this directly.   Would be
> a neat option to have, though.

You can probably achieve this by setting an appropriate publishing
function.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-mode as an accountability system?

2012-03-03 Thread John Hendy
On Sat, Mar 3, 2012 at 1:18 PM, Peter Salazar  wrote:
> Hi Thorsten,
>
> Thanks for the thoughts.
>
> Clarification: I send my accountability partner a summary of MY committed
> actions for the day for him to review. We dont' collaborate, and he does not
> touch or change my tasks. (Although he does send me a list of his own tasks,
> and how well he did each day.)
>

He doesn't have to change them, just be able to view the up to date
state of your todos. I think that was the point. =git pull= is not
significantly more work than opening an email.

> It's important to send the tasks by e-mail so I know he'll see them right
> away (and that will keep me accountable). If I send him a link, I know he
> may or may not view the file if and when he has time.
>

Whether he opens his browser/email client and reads the email or opens
a terminal and does =git pull=, again, does not seem horridly
different. Then again, for a non git user, you are correct that one
more step might make the difference between reading and not.

> As for using Agenda and hitting > to move a task to the next day, there are
> two problems with this:
>
> 1. this does not change the state of a @didnotdo task to @todo

Have a look at: http://orgmode.org/manual/Agenda-commands.html

I, too, am not a power user, however it seems like you could do the following:
-- `C-a t` (show all todos)
-- `m` on each one you did not complete
-- `B` (shift+b, conduct bulk action on all marked entries)
-- `t` to change todo state for each marked item
-- Type in 'didnotdo' to change the state
-- `C-a T` (agenda search based on todo state)
-- Type in 'didnotdo' (gives you all the items you just marked since
you didn't do them)
-- Copy the current agenda view into an email and send it
 Alternative do `C-x C-w` and write it to a file you can push to a git repo
-- `m` on all the shown entries (all are state `didnotdo` at this point)
-- `B` (conduct a bulk action)
-- `s` (schedule new date for all actions)
-- Use the minibuffer calendar to schedule them to a new day

Looks like a lot, but this should go pretty fast once you get the hang of it.

Also, Bernt Hanson has a diddy on his website for creating a timestamp
for every new headline. Perhaps you could use it to create a timestamp
with today's date for every new todo headline? See his elisp code
here:
-- http://doc.norang.ca/org-mode.html#sec-15-21

> 2. for habits (using the format SCHEDULED: <2012-03-03 Sat  +1d>), if I miss
> a day and then try to mark a habit DONE today, it stamps the habit done for
> the day I missed, rather than stamping it done today and recording that I
> did not do it on the day I was supposed to do it.
>

I don't use habit, but I know there's a graph that's supposed to show
color coded bars based on whether you did or did not do the task
according to how you scheduled the habit.
-- http://orgmode.org/manual/Tracking-your-habits.html

Hope this gives you some ideas or even helps you directly!


John

>
> On Sat, Mar 3, 2012 at 1:56 PM, Thorsten  wrote:
>>
>> Peter Salazar  writes:
>>
>> Hi Peter,
>> without claiming being an expert org-mode user, I had the following
>> thoughts when reading your post:
>>
>> > I have an accountability partner with whom I exchange daily "committed
>> > actions." Every morning, I e-mail him a list of the tasks I commit to
>> > completing that day.
>>
>> Why sending per email? Why not getting a free private(!) git repo (1GB)
>> at assembla.com and cooperatively work on one or several org file(s) in
>> that repo?
>>
>> > When I complete a task, I mark it DONE. If I don't complete a task
>> > that day, I mark it @didnotdo and manually cut and paste it to the
>> > next day.
>> >
>> > Every night, I send him a report of which actions I did and which ones
>> > I did not do. (I find I get so much more done since I started making
>> > daily commitments to someone other than myself.)
>>
>> If you both work on the same file using git, the current state of
>> affairs will always be clear, as well as who did what at what time (and
>> pushed it to the repo).
>>
>> > 1. Given that I'm creating my daily task list manually, is there an
>> > easy way, when I mark a task @didnotdo, to automatically move it to
>> > the next day's list and change its state to @todo?
>>
>> When I have a TODO task in the agenda that I did not complete today, I
>> just change the date to tomorrow in the agenda using '>'.
>> If you don't do that, it will appear anyway in the agenda as overdue
>> task.
>>
>>
>> --
>> cheers,
>> Thorsten
>>
>>
>



Re: [O] Bug: Org-mode don't export to html footnotes references inside footnotes as such. [7.8.03]

2012-03-03 Thread Jambunathan K
Nicolas Goaziou  writes:

> Hello,
>
> oitofe...@gmail.com (Bruno Félix Rezende Ribeiro) writes:
>
>> Consider the following org code:
>>
>> --
>> This is only a text.[1]
>>
>> [1] This is a text body's footnote.[2]
>> [2] This is a footnote's footnote.
>> --
>>
>> When org-mode exports this code to html, despite the fact that
>> footnote 2 is present in the final document, it don't exports
>> footnote 2 reference as a link to footnote 2; it's exported just
>> like plain text.
>
> There's no official support for nested footnotes in current exporter.
> Implementing it would be non trivial (it may be for the HTML back-end,
> but clearly not for the LaTeX one).  Since we're working on a new export
> engine, I don't think it's worth the effort.
>
> Though, your report made me implement it in the experimental exporter.

>From OpenDocument-1.2 spec has the following note

,
| 6.3.4
| 
| The  element contains the content of a note. It does not
| have any attributes.
| 
| Note: The schema allows for the inclusion of notes into the note
| body. While this may be reasonable for note types, it is not reasonable
| for footnotes and endnotes. Conforming consumers need not support notes
| inside notes.
`

LibreOffice doesn't support notes inside notes.  So for all practical
purposes, nested footnotes cannot be supported with ODT export (in both
the legacy and in-the-works experimental version).

If one intends to export his Org file to ODT, then nested footnote
construction should be avoided like plague.

> Thank you.
>
>
> Regards,

-- 



Re: [O] Export to multiple HTML files?

2012-03-03 Thread Christian Moe



On Mon, Feb 27, 2012 at 5:19 PM, Avdi Grimm  wrote:

Is there a way to export a single Org file to a bunch of HTML files,
one for each heading of a given level? E.g. the way the Org manual is
presented at http://orgmode.org/manual ? (yes, I realize that's Info
not org-mode)I thought I remembered that being possible, but now I
can't find it.


I don't think there's been any way to do this directly.	Would be a 
neat option to have, though.


One roundabout way of doing it might be to export to Docbook, then 
export from Docbook to 'chunked' html.


http://www.sagehill.net/docbookxsl/Chunking.html

I haven't tried.

Yours,
Christian



Re: [O] org-mode as an accountability system?

2012-03-03 Thread Peter Salazar
Hi Thorsten,

Thanks for the thoughts.

Clarification: I send my accountability partner a summary of MY committed
actions for the day for him to review. We dont' collaborate, and he does
not touch or change my tasks. (Although he does send me a list of his own
tasks, and how well he did each day.)

It's important to send the tasks by e-mail so I know he'll see them right
away (and that will keep me accountable). If I send him a link, I know he
may or may not view the file if and when he has time.

As for using Agenda and hitting > to move a task to the next day, there are
two problems with this:

1. this does not change the state of a @didnotdo task to @todo
2. for habits (using the format SCHEDULED: <2012-03-03 Sat  +1d>), if I
miss a day and then try to mark a habit DONE today, it stamps the habit
done for the day I missed, rather than stamping it done today and recording
that I did not do it on the day I was supposed to do it.


On Sat, Mar 3, 2012 at 1:56 PM, Thorsten  wrote:

> Peter Salazar  writes:
>
> Hi Peter,
> without claiming being an expert org-mode user, I had the following
> thoughts when reading your post:
>
> > I have an accountability partner with whom I exchange daily "committed
> > actions." Every morning, I e-mail him a list of the tasks I commit to
> > completing that day.
>
> Why sending per email? Why not getting a free private(!) git repo (1GB)
> at assembla.com and cooperatively work on one or several org file(s) in
> that repo?
>
> > When I complete a task, I mark it DONE. If I don't complete a task
> > that day, I mark it @didnotdo and manually cut and paste it to the
> > next day.
> >
> > Every night, I send him a report of which actions I did and which ones
> > I did not do. (I find I get so much more done since I started making
> > daily commitments to someone other than myself.)
>
> If you both work on the same file using git, the current state of
> affairs will always be clear, as well as who did what at what time (and
> pushed it to the repo).
>
> > 1. Given that I'm creating my daily task list manually, is there an
> > easy way, when I mark a task @didnotdo, to automatically move it to
> > the next day's list and change its state to @todo?
>
> When I have a TODO task in the agenda that I did not complete today, I
> just change the date to tomorrow in the agenda using '>'.
> If you don't do that, it will appear anyway in the agenda as overdue
> task.
>
>
> --
> cheers,
> Thorsten
>
>
>


Re: [O] Agenda TODO sorting by date

2012-03-03 Thread Bernt Hansen
James Harkins  writes:

> At Fri, 02 Mar 2012 21:48:42 -0500,
> Bernt Hansen wrote:
>> You could write a custom sorting function that parses out the date from
>> the heading and compares them.  There may be a better way to do this
>> that I'm not aware of for this.
>> 
>> Set this function up in org-agenda-cmp-user-defined and
>> org-agenda-sorting-strategy to get the results you want.
>
> OK, thanks. I was starting to think it would come to that. Kind of
> surprising this isn't offered out of the box.
>
> I think I need a bit more guidance, from you or someone else.
>
>> parses out the date from the heading
>
> Is there already an org function to do this? C-h a searches on the
> following yielded nothing that seemed interesting.
>
> org.*date.*
> org.*timestamp.*
>
>> compares them
>
> I was about to make that more complicated, but actually string
> comparison should be fine for this. No worries there.
>
> I have done rather little with emacs-lisp so... this is uphill for me. Thanks.

I think this works

--8<---cut here---start->8---

(defun bh/agenda-sort-by-heading-date (a b)
  "Sorting strategy for agenda items.
Late deadlines first, then scheduled, then non-late deadlines"
  (message "Heading a: <%s>" a)
  (message "Heading b: <%s>" b)
  (let* ((date-regexp "\\(\\<[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\\) ")
date-a date-b)
(string-match date-regexp a)
(setq date-a (match-string 1 a))
(string-match date-regexp b)
(setq date-b (match-string 1 b))
(cond ((string< date-a date-b) -1)
  ((string< date-b date-a) +1)
  ((t nil)
  nil)

;;
;; Agenda sorting functions
;;
(setq org-agenda-cmp-user-defined 'bh/agenda-sort-by-heading-date)


(setq org-agenda-custom-commands
  (quote (("x" "Tasks" tags-todo ""
   ((org-agenda-overriding-header "Tasks sorted by date")
(org-agenda-sorting-strategy
 '(user-defined-up)))
--8<---cut here---end--->8---

Then C-c a < x Tag RET 
gives

,
| Tasks sorted by date
|   scratch:TODO Third todo in file <2012-03-28 Wed> 
:Tag:
|   scratch:TODO Second todo in file <2012-03-29 Thu>
:Tag:
|   scratch:TODO First todo in file <2012-03-30 Fri> 
:Tag:
|   scratch:TODO Fourth todo in file <2012-03-31 Sat>
:Tag:
`

HTH,
Bernt



Re: [O] org-mode as an accountability system?

2012-03-03 Thread Thorsten
Peter Salazar  writes:

Hi Peter, 
without claiming being an expert org-mode user, I had the following
thoughts when reading your post: 

> I have an accountability partner with whom I exchange daily "committed
> actions." Every morning, I e-mail him a list of the tasks I commit to
> completing that day. 

Why sending per email? Why not getting a free private(!) git repo (1GB)
at assembla.com and cooperatively work on one or several org file(s) in
that repo?

> When I complete a task, I mark it DONE. If I don't complete a task
> that day, I mark it @didnotdo and manually cut and paste it to the
> next day. 
>  
> Every night, I send him a report of which actions I did and which ones
> I did not do. (I find I get so much more done since I started making
> daily commitments to someone other than myself.)
 
If you both work on the same file using git, the current state of
affairs will always be clear, as well as who did what at what time (and
pushed it to the repo). 

> 1. Given that I'm creating my daily task list manually, is there an
> easy way, when I mark a task @didnotdo, to automatically move it to
> the next day's list and change its state to @todo? 

When I have a TODO task in the agenda that I did not complete today, I
just change the date to tomorrow in the agenda using '>'. 
If you don't do that, it will appear anyway in the agenda as overdue
task. 


-- 
cheers,
Thorsten




[O] org-mode as an accountability system?

2012-03-03 Thread Peter Salazar
I have an accountability partner with whom I exchange daily "committed
actions." Every morning, I e-mail him a list of the tasks I commit to
completing that day.

When I complete a task, I mark it DONE. If I don't complete a task that
day, I mark it @didnotdo and manually cut and paste it to the next day.

Every night, I send him a report of which actions I did and which ones I
did not do. (I find I get so much more done since I started making daily
commitments to someone other than myself.)

My committed actions for a day consist of:

a) TODOs for the projects I'm working on
b) random errands that need to be done that day
c) daily habits (e.g. meditating, exercising)

I don't believe org-agenda can support me in doing this, because I require:

a) a way to quickly enter the random tasks for that day (without having to
"schedule" each one for today)
b) more importantly: a way to record, store, and e-mail my list of which
tasks I've done and not done at the end of the night

So instead I've been creating a list of TODOs for each day manually.

My questions:

1. Given that I'm creating my daily task list manually, is there an easy
way, when I mark a task @didnotdo, to automatically move it to the next
day's list and change its state to @todo?
2. I'd still like to be able to create outlines for my documents and add
TODO items inline as I think of them. Is there a way to get org to gather
these scattered TODOs and place them in my manually-created daily TODO
list, rather than in the agenda?

Macro question: Is there a better way to manage my accountability system,
rather than doing it manually? Again, I don't see a way to do it using
agenda.

Thanks for any help.

Peter


P.S. If it's helpful, here's a typical list I might send my accountability
partner in the morning:

<2012-02-16 Thu>

* habits
** @todo - morning practice [0/3]
- [ ] e-mail committed actions
- [ ] stretch for 10 minutes
- [ ] meditate
** @todo - evening practice [0/2]
- [ ] sit-ups
- [ ] e-mail report assessing day's committed actions
* committed actions
** teaching
*** current semester
 @todo - e-mail students [0/2]
* @todo - e-mail Liz
* @todo - e-mail Jean
 @todo - appointment with Claire 4pm
*** next semester
 finish proposal
* @todo - send proposal to editor
* @todo - write syllabus
** random tasks
*** @todo - renew prescriptions
*** @todo - clean room
*** @todo - go over Nicole notes
*** @todo - call Andy
*** @todo - jog with Heidi 3pm

A typical report at the end of the night might look like this:

<2012-02-16 Thu>

* habits
** DONE - morning practice [3/3]
- [X] e-mail committed actions
- [X] stretch for 10 minutes
- [X] meditate
** @todo - evening practice [1/2]
- [ ] sit-ups
- [X] e-mail report assessing day's committed actions
* committed actions
** teaching
*** current semester
 @todo - e-mail students [2/2]
* DONE - e-mail Liz
* DONE - e-mail Jean
 @todo - appointment with Claire 4pm
*** next semester
 finish proposal
* @didnotdo - send proposal to editor
* DONE - write syllabus
** random tasks
*** DONE - renew prescriptions
*** @didnotdo - clean room
*** @didnotdo - go over Nicole notes
*** @postponed - call Andy
*** DONE - jog with Heidi 3pm


Re: [O] Archiving only with confirmation

2012-03-03 Thread Marc-Oliver Ihm

Am 03.03.2012 16:54, schrieb Markus Grebenstein:

Dear List,

from time to time I involuntarily archive parts of my thesis when I want to 
save (it happens
when I mess up the saving keys). Since I recognized this a couple of days or 
even weeks later
this makes recovering complicated.

Therefore I would love to have the possibility to be asked whether I really 
want to do that. I
used org-archive-subtree-default-with-confirmation but I did not get what the 
meaning of that
one is. When I use that command I am sure that I want to archive and as far as 
I see it does not
change the default behavior.

Does anybody have an idea how to achieve what I want?
Thanks in advance,

Markus





Hi Markus,

Maybe

M-x disable-command

could help.

It will ask you for the command you would like to disable (in your case probably 
"org-archive-subtree")

and modify your .emacs accordingly.

You could reach the same effect by putting:

(put 'org-archive-subtree 'disabled t)

in your initialization-file (if it is not .emacs).

I think I will try this too, because I remember some occasions,
that I have used it accidentially like you ...

with kind regards, Marc






Re: [O] Japanese strings for Org-mode export

2012-03-03 Thread Hideki Saito
I think Gmail did bad to the patch snippet. Obviously, I haven't done
much of patch contributions :-)

I've attached one, or you can refer to:
https://gist.github.com/1964802

Thank you.

Hideki Saito 


On Fri, Mar 2, 2012 at 5:55 PM, Hideki Saito  wrote:
> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
> index 174619a..43c54b5 100644
> --- a/lisp/org-exp.el
> +++ b/lisp/org-exp.el
> @@ -194,6 +194,7 @@ This option can also be set with the +OPTIONS
> line, e.g. \"-:nil\"."
>     ("hu" "Szerzõ" "Dátum" "Tartalomjegyzék"
> "Lábjegyzet")
>     ("is" "Höfundur" "Dagsetning" "Efnisyfirlit"
> "Aftanmálsgreinar")
>     ("it" "Autore"     "Data"  "Indice" "Note a piè di pagina")
> +    ("ja" "\x8457\x8005" "\x65e5\x4ed8" "\x76ee\x6b21" "\x811a\x6ce8")
>     ("nl" "Auteur"     "Datum" "Inhoudsopgave" "Voetnoten")
>     ("no" "Forfatter"  "Dato"  "Innhold" "Fotnoter")
>     ("nb" "Forfatter"  "Dato"  "Innhold" "Fotnoter")  ;; nb = Norsk (bokm.l)


org-japanese-export.patch
Description: Binary data


[O] Japanese strings for Org-mode export

2012-03-03 Thread Hideki Saito
Hello,
I would like to submit a patch adding Japanese text string for export.
The following adds Japanese strings for "Author" "Date" "Table of
Contents" and "Footnotes"

Thank you.

Hideki Saito 


diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 174619a..43c54b5 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -194,6 +194,7 @@ This option can also be set with the +OPTIONS
line, e.g. \"-:nil\"."
 ("hu" "Szerzõ" "Dátum" "Tartalomjegyzék"
"Lábjegyzet")
 ("is" "Höfundur" "Dagsetning" "Efnisyfirlit"
"Aftanmálsgreinar")
 ("it" "Autore" "Data"  "Indice" "Note a piè di pagina")
+("ja" "\x8457\x8005" "\x65e5\x4ed8" "\x76ee\x6b21" "\x811a\x6ce8")
 ("nl" "Auteur" "Datum" "Inhoudsopgave" "Voetnoten")
 ("no" "Forfatter"  "Dato"  "Innhold" "Fotnoter")
 ("nb" "Forfatter"  "Dato"  "Innhold" "Fotnoter")  ;; nb = Norsk (bokm.l)



Re: [O] Archiving only with confirmation

2012-03-03 Thread cberry
Markus Grebenstein  writes:

> Dear List,
>
> from time to time I involuntarily archive parts of my thesis when I
> want to save (it happens when I mess up the saving keys). Since I
> recognized this a couple of days or even weeks later this makes
> recovering complicated.
>
> Therefore I would love to have the possibility to be asked whether I
> really want to do that.

Is this what you want:

,
| (emacs)Top > Customization > Key Bindings > Disabling 
  
| 
| 57.4.11 Disabling Commands
| --
| 
| Disabling a command means that invoking it interactively asks for
| confirmation from the user.  The purpose of disabling a command is to
| prevent users from executing it by accident; [...]
`

For example, I have this in my macbook ~/.emacs


,
| ;; get rid of pesky aquamacs-save-buffers-kill-emacs binding
| 
| (put 'aquamacs-save-buffers-kill-emacs  'disabled 
|  "Use C-x C-c to quit\n")
| 
| (put 'aquamacs-print 'disabled "Why print?\n")
`

To protect against the commands bound to clover-p and clover-q being
inadvertently run when what I really wanted was M-p or M-q. (The clover
key sits next to the 'M-' on my keyboard.)



HTH,

Chuck

 I used
> org-archive-subtree-default-with-confirmation but I did not get what
> the meaning of that one is. When I use that command I am sure that I
> want to archive and as far as I see it does not change the default
> behavior.
>
> Does anybody have an idea how to achieve what I want?
> Thanks in advance,
>
> Markus
>
>
>

-- 
Charles C. BerryDept of Family/Preventive Medicine
cberry at ucsd edu  UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901




Re: [O] [Bug] Tests for experimental org-features should expect to fail if not activated by the user

2012-03-03 Thread Achim Gratz
Two test failures in current HEAD:

--8<---cut here---start->8---
Test test-org-footnote/normalize-outside-org backtrace:
  org-footnote-in-valid-context-p()
  org-footnote-at-reference-p()
  byte-code(\20\304\202 \305\n\306#\204\307\310\311\"\21\20
  org-footnote-get-next-reference()
  org-footnote-normalize()
  (let ((major-mode (quote message-mode))) (org-footnote-normalize))
  (progn (insert "Body[fn::def]\n-- \nFake signature\n-- \nSignature")
  (unwind-protect (progn (insert "Body[fn::def]\n-- \nFake signature\n
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
  (with-current-buffer temp-buffer (unwind-protect (progn (insert "Bod
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (with-current-b
  (with-temp-buffer (insert "Body[fn::def]\n-- \nFake signature\n-- \n
  (let ((org-footnote-tag-for-non-org-mode-files nil) (message-signatu
  (lambda nil (let ((org-footnote-tag-for-non-org-mode-files nil)) (wi
  byte-code("\306\307!▒q\210\310\216\311 \312\216\313\314\315\316\3
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  byte-code("\306\307!\211▒r\310\311!q\210\312 d\313\223)L\210\314\216
  ert-run-test([cl-struct-ert-test test-org-footnote/normalize-outside
  ert-run-or-rerun-test([cl-struct-ert--stats "\\(org\\|ob\\)" [[cl-st
  ert-run-tests("\\(org\\|ob\\)" #[(event-type &rest event-args) \30
  ert-run-tests-batch("\\(org\\|ob\\)")
  ert-run-tests-batch-and-exit("\\(org\\|ob\\)")
  (let ((org-id-track-globally t) (org-id-locations-file (convert-stan
  org-test-run-batch-tests()
  call-interactively(org-test-run-batch-tests nil nil)
  command-execute(org-test-run-batch-tests)
  command-line-1(("-L" "lisp/" "-L" "testing/" "--eval" "(defconst org
  command-line()
  normal-top-level()
Test test-org-footnote/normalize-outside-org condition:
(void-variable message-cite-prefix-regexp)
   FAILED  166/192  test-org-footnote/normalize-outside-org
--8<---cut here---end--->8---

--8<---cut here---start->8---
Test test-org-export/export-scope backtrace:
  signal(ert-test-failed (((should (equal (org-export-as (quote test))
  ert-fail(((should (equal (org-export-as (quote test)) "text\n")) :fo
  (if (unwind-protect (setq value-2005 (apply fn-2003 args-2004)) (set
  (unless (unwind-protect (setq value-2005 (apply fn-2003 args-2004)) 
  (let (form-description-2007) (unless (unwind-protect (setq value-200
  (let ((value-2005 (quote ert-form-evaluation-aborted-2006))) (let (f
  (let ((fn-2003 (function equal)) (args-2004 (list (org-export-as (qu
  (should (equal (org-export-as (quote test)) "text\n"))
  (progn (fset (quote org-test-center-block) (function* (lambda (obj c
  (unwind-protect (progn (fset (quote org-test-center-block) (function
  (let* ((--cl-letf-bound-- (fboundp (quote org-test-center-block))) (
  (letf (((symbol-function (quote org-test-center-block)) (function* (
  (progn (fset (quote org-test-comment) (function* (lambda (obj conten
  (unwind-protect (progn (fset (quote org-test-comment) (function* (la
  (let* ((--cl-letf-bound-- (fboundp (quote org-test-comment))) (--cl-
  (letf (((symbol-function (quote org-test-comment)) (function* (lambd
  (progn (fset (quote org-test-comment-block) (function* (lambda (obj 
  (unwind-protect (progn (fset (quote org-test-comment-block) (functio
  (let* ((--cl-letf-bound-- (fboundp (quote org-test-comment-block))) 
  (letf (((symbol-function (quote org-test-comment-block)) (function* 
  (progn (fset (quote org-test-drawer) (function* (lambda (obj content
  (unwind-protect (progn (fset (quote org-test-drawer) (function* (lam
  (let* ((--cl-letf-bound-- (fboundp (quote org-test-drawer))) (--cl-l
  (letf (((symbol-function (quote org-test-drawer)) (function* (lambda
  (progn (fset (quote org-test-dynamic-block) (function* (lambda (obj 
  (unwind-protect (progn (fset (quote org-test-dynamic-block) (functio
  (let* ((--cl-letf-bound-- (fboundp (quote org-test-dynamic-block))) 
  (letf (((symbol-function (quote org-test-dynamic-block)) (function* 
  (progn (fset (quote org-test-example-block) (function* (lambda (obj 
  (unwind-protect (progn (fset (quote org-test-example-block) (functio
  (let* ((--cl-letf-bound-- (fboundp (quote org-test-example-block))) 
  (letf (((symbol-function (quote org-test-example-block)) (function* 
  (progn (fset (quote org-test-export-block) (function* (lambda (obj c
  (unwind-protect (progn (fset (quote org-test-export-block) (function
  (let* ((--cl-letf-bound-- (fboundp (quote org-test-export-block))) (
  (letf (((symbol-function (quote org-test-export-block)) (function* (
  (progn (fset (quote org-test-fixed-width) (function* (lambda (obj co
  (unwind-protect (progn (fset (quote org-test-fixed-width) (function*
  (let* ((--cl-letf-bound-- (fboundp (quote org-test-fixed-width))) (-
  (letf (((symbol-function (quote org-test-fixed-width)) (function* (l
  (progn (fset (quote or

Re: [O] Export to multiple HTML files?

2012-03-03 Thread Sean O'Halpin
On Mon, Feb 27, 2012 at 5:19 PM, Avdi Grimm  wrote:
> Is there a way to export a single Org file to a bunch of HTML files,
> one for each heading of a given level? E.g. the way the Org manual is
> presented at http://orgmode.org/manual ? (yes, I realize that's Info
> not org-mode)I thought I remembered that being possible, but now I
> can't find it.
>
> Thanks!
>
> --
> Avdi Grimm
> http://avdi.org
>

I don't recall an export to multiple HTML files. Are you thinking of
the INFOJS[1] Javascript enhanced export option?

[1]: http://orgmode.org/manual/JavaScript-support.html



Re: [O] [Bug] Tests for experimental org-features should expect to fail if not activated by the user

2012-03-03 Thread Achim Gratz
Achim Gratz  writes:
>  It all works now when adding "testing/" to the load path.  I'll add
> this to the default configuration in my Makefile fork.

I've improved the test invocation in my Makefile fork.  It now starts
from a clean Emacs invocation withoutsite startup and loads the
configured Babel languages and possibly extra packages before running
the tests.  All Babel languages are activated by default except R, since
R seems to depend on ess (i.e. even if you add it to the list, the tests
still fail due to that missing dependency).  Extra packages, for
instance from contrib, can be required by adding their names to
BTEST_EXTRA in local.mk and possibly prepending or appending load-path
elements or other command line options via BTEST_PRE and BTEST_POST.


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

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




Re: [O] Is it possible to run shell script src blocks as root or to export individual blocks?

2012-03-03 Thread Andreas Leha
Eric Schulte  writes:

> Leo Alekseyev  writes:
>
>> I was wondering if there was an easy way to execute some shell
>> commands contained in a src block as root.  Alternatively, is there a
>> quick way to export _just_ that one source block to a temp file so
>> that I could run it as root manually?
>>
>
> Just call org-babel-tangle with a prefix argument and it only tangles
> the current block
>
>>

Hi,

I did not know this either.  Thanks for the hint!

Shouldn't this be mentioned in the manual (14.4)?

I have two questions/issues about this:
(1) Can I get noweb-references to be expanded by this?  Or how would I
tangle one block with noweb references expanded?
(2) I am asked for a filename.  But the header argument :tangle somefile
is overruling my input, which is un-expected.

Regards,
Andreas




Re: [O] Agenda TODO sorting by date

2012-03-03 Thread Alan E. Davis
I am definitely not a programmer, and for sure not the one who could guide
you on writing a sort function.  HOWEVER, emacs has a really nice facility
for doing so, if you decide you want to try that.

I had to write a program to alphabetize a lexical list in Chuukese, in an
arbitrary order other than standard english alphabetical order.  I had to
have guidance, but it was certainly possible, even for me.

Just some encouragement, but it's been many years, and i am unable to offer
more than that.

http://www.gnu.org/software/emacs/manual/html_node/elisp/Sorting.html

Alan

On Sat, Mar 3, 2012 at 8:23 AM, James Harkins  wrote:

> At Fri, 02 Mar 2012 21:48:42 -0500,
> Bernt Hansen wrote:
> > You could write a custom sorting function that parses out the date from
> > the heading and compares them.  There may be a better way to do this
> > that I'm not aware of for this.
> >
> > Set this function up in org-agenda-cmp-user-defined and
> > org-agenda-sorting-strategy to get the results you want.
>
> OK, thanks. I was starting to think it would come to that. Kind of
> surprising this isn't offered out of the box.
>
> I think I need a bit more guidance, from you or someone else.
>
> > parses out the date from the heading
>
> Is there already an org function to do this? C-h a searches on the
> following yielded nothing that seemed interesting.
>
> org.*date.*
> org.*timestamp.*
>
> > compares them
>
> I was about to make that more complicated, but actually string comparison
> should be fine for this. No worries there.
>
> I have done rather little with emacs-lisp so... this is uphill for me.
> Thanks.
>
> James
>
>
> --
> James Harkins /// dewdrop world
> jamshar...@dewdrop-world.net
> http://www.dewdrop-world.net
>
> "Come said the Muse,
> Sing me a song no poet has yet chanted,
> Sing me the universal."  -- Whitman
>
> blog: http://www.dewdrop-world.net/words
> audio clips: http://www.dewdrop-world.net/audio
> more audio: http://soundcloud.com/dewdrop_world/tracks
>
>


Re: [O] Agenda TODO sorting by date

2012-03-03 Thread James Harkins
At Fri, 02 Mar 2012 21:48:42 -0500,
Bernt Hansen wrote:
> You could write a custom sorting function that parses out the date from
> the heading and compares them.  There may be a better way to do this
> that I'm not aware of for this.
> 
> Set this function up in org-agenda-cmp-user-defined and
> org-agenda-sorting-strategy to get the results you want.

OK, thanks. I was starting to think it would come to that. Kind of surprising 
this isn't offered out of the box.

I think I need a bit more guidance, from you or someone else.

> parses out the date from the heading

Is there already an org function to do this? C-h a searches on the following 
yielded nothing that seemed interesting.

org.*date.*
org.*timestamp.*

> compares them

I was about to make that more complicated, but actually string comparison 
should be fine for this. No worries there.

I have done rather little with emacs-lisp so... this is uphill for me. Thanks.

James


--
James Harkins /// dewdrop world
jamshar...@dewdrop-world.net
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks



Re: [O] ConTeXt export

2012-03-03 Thread David Rogers

Nick Dokos  writes:


Can ConTeXt handle a LaTeX program?


No it can't, not that I'm aware of anyway. While 
both LaTeX and ConTeXt inherit from plain TeX, 
and therefore look somewhat similar cosmetically, 
they don't work the same. (e.g. ConTeXt does not 
use LaTeX packages, the .tex files differ in 
essentials and not just in details, etc.)


--
David



[O] Archiving only with confirmation

2012-03-03 Thread Markus Grebenstein

Dear List,

from time to time I involuntarily archive parts of my thesis when I want 
to save (it happens when I mess up the saving keys). Since I recognized 
this a couple of days or even weeks later this makes recovering complicated.


Therefore I would love to have the possibility to be asked whether I 
really want to do that. I used 
org-archive-subtree-default-with-confirmation but I did not get what the 
meaning of that one is. When I use that command I am sure that I want to 
archive and as far as I see it does not change the default behavior.


Does anybody have an idea how to achieve what I want?
Thanks in advance,

Markus




Re: [O] [BABEL] Redirect stderr to stdout?

2012-03-03 Thread Viktor Rosenfeld
Hi Eric,

Eric Schulte wrote:

> Viktor Rosenfeld  writes:
> 
> > Hi Eric,
> >
> > Eric Schulte wrote:
> >
> >> Currently the only action Babel takes with STDERR is to display it in a
> >> pop-up buffer when code block evaluation fails.  
> >
> > On my system (OS X) the buffer does not popup. I just tried
> >
> > #+BEGIN_SRC sh
> > echo foo 1>&2
> > #+END_SRC
> >
> 
> That is because the evaluation did not fail, try
> 
> #+BEGIN_SRC sh
> echo foo 1>&2
> exit 1
> #+END_SRC

Thanks, that did the trick. It also explains why some error output from
psql and the like does not make it into the buffer.

> [Snip]
> 
> As always demand outstrips development resources.

And still, org-mode is great product!

Cheers,
Viktor



Re: [O] org-babel-execute-src-block deletes its src block.

2012-03-03 Thread Daimrod
Eric Schulte  writes:

> Nick Dokos  writes:
>
>> Daimrod  wrote:
>>
>>> 
>>> Hi, I've recently switched from Org 7.4 to the master branch on the git
>>> repository, and I've encountered this weird situation.
>>> 
>>>   #+name: foo
>>>   #+begin_src emacs-lisp 
>>> (defun foo ()
>>>   42)
>>> (foo)
>>>   #+end_src emacs-lisp
>>> 
>>> If I evaluate this block I get:
>>> 
>>>   #+name: foo
>>> =42
>>> =emacs-lisp
>>> 
>>> Though it works as expected if I remove the name:
>>> 
>>>   #+begin_src emacs-lisp 
>>> (defun foo ()
>>>   42)
>>> (foo)
>>>   #+end_src emacs-lisp
>>> =>
>>>   #+begin_src emacs-lisp 
>>> (defun foo ()
>>>   42)
>>> (foo)
>>>   #+end_src emacs-lisp
>>> 
>>>   #+RESULTS:
>>>   : 42
>>> 
>>> I've tried to figure out what was the problem and it lies in the regexp
>>> org-babel-src-name-w-name-regexp.
>>> 
>>> So far I've found those workarounds:
>>> 
>>> No spaces after the ':'
>>> 
>>>   #+name:foo
>>>   #+begin_src emacs-lisp 
>>> (defun foo ()
>>>   42)
>>> (foo)
>>>   #+end_src emacs-lisp
>>> =>
>>>   #+name:foo
>>>   #+begin_src emacs-lisp 
>>> (defun foo ()
>>>   42)
>>> (foo)
>>>   #+end_src emacs-lisp
>>>   #+RESULTS: foo
>>>   : 42
>>> 
>>> Add parentheses after the name.
>>> 
>>>   #+name: foo()
>>>   #+begin_src emacs-lisp 
>>> (defun foo ()
>>>   42)
>>> (foo)
>>>   #+end_src emacs-lisp
>>> =>
>>>   #+name: foo()
>>>   #+begin_src emacs-lisp 
>>> (defun foo ()
>>>   42)
>>> (foo)
>>>   #+end_src emacs-lisp
>>> 
>>>   #+RESULTS: foo
>>>   : 42
>>> 
>>> No spaces before the src block
>>> 
>>>   #+name: foo
>>> #+begin_src emacs-lisp 
>>> (defun foo ()
>>>   42)
>>> (foo)
>>>   #+end_src emacs-lisp
>>> =>
>>>   #+name: foo
>>> #+begin_src emacs-lisp 
>>> (defun foo ()
>>>   42)
>>> (foo)
>>>   #+end_src emacs-lisp
>>> 
>>> #+RESULTS: foo
>>> : 42
>>
>> Bug confirmed (but I didn't try all your workarounds, just the no spaces
>> before the #+begin_src and no space after the colon in the #+name).
>>
>
> This was caused by a commit of mine yesterday, I've just pushed up a fix
> and a protecting test case.
>
> Thanks for catching,

Works nicely.

By the way, org-babel is awesome, thanks for your efforts!




Re: [O] Selectively export RESULTS

2012-03-03 Thread Achim Gratz
"Sebastien Vauban" writes:
>> You can also press C-c C-c on the #+Property line to apply it's effects.
>
> Everybody seems to get bitten by this at least once. Would there be a
> possibility to avoid this extra step for the user, and have such parameters
> automagically taken into account, without user involvement?

I really wouldn't want that, but maybe PROPERTY lines that are out of
sync with the effective properties could be highlighted?


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

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




Re: [O] org-babel-execute-src-block deletes its src block.

2012-03-03 Thread Eric Schulte
Nick Dokos  writes:

> Daimrod  wrote:
>
>> 
>> Hi, I've recently switched from Org 7.4 to the master branch on the git
>> repository, and I've encountered this weird situation.
>> 
>>   #+name: foo
>>   #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> 
>> If I evaluate this block I get:
>> 
>>   #+name: foo
>> =42
>> =emacs-lisp
>> 
>> Though it works as expected if I remove the name:
>> 
>>   #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> =>
>>   #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> 
>>   #+RESULTS:
>>   : 42
>> 
>> I've tried to figure out what was the problem and it lies in the regexp
>> org-babel-src-name-w-name-regexp.
>> 
>> So far I've found those workarounds:
>> 
>> No spaces after the ':'
>> 
>>   #+name:foo
>>   #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> =>
>>   #+name:foo
>>   #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>>   #+RESULTS: foo
>>   : 42
>> 
>> Add parentheses after the name.
>> 
>>   #+name: foo()
>>   #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> =>
>>   #+name: foo()
>>   #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> 
>>   #+RESULTS: foo
>>   : 42
>> 
>> No spaces before the src block
>> 
>>   #+name: foo
>> #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> =>
>>   #+name: foo
>> #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> 
>> #+RESULTS: foo
>> : 42
>
> Bug confirmed (but I didn't try all your workarounds, just the no spaces
> before the #+begin_src and no space after the colon in the #+name).
>

This was caused by a commit of mine yesterday, I've just pushed up a fix
and a protecting test case.

Thanks for catching,

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



Re: [O] Is it possible to run shell script src blocks as root or to export individual blocks?

2012-03-03 Thread Eric Schulte
Leo Alekseyev  writes:

> I was wondering if there was an easy way to execute some shell
> commands contained in a src block as root.  Alternatively, is there a
> quick way to export _just_ that one source block to a temp file so
> that I could run it as root manually?
>

Just call org-babel-tangle with a prefix argument and it only tangles
the current block

>

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



[O] How to fontify text within a table with elisp ?

2012-03-03 Thread Marc-Oliver Ihm

Hello,

I would like to insert some fontified text into an org-buffer; this works, as 
long as I am not within a table.

If you run this example within an org-mode buffer:

(insert (org-add-props "\n\nOutside table\n\n|Inside table|\n" '(font-lock-face 
highlight)))

the first line ("Outside table") is fontified correctly, whereas the second line 
("Inside table"),
which is a simple table, is not.

Probably this is due to the fact, that org has its own opinion, on how the 
table should be fontified.

Is there any way to circumvent this behaviour ?


with kind regards, Marc-Oliver Ihm




Re: [O] Selectively export RESULTS

2012-03-03 Thread Sebastien Vauban
Hi Eric,

Eric Schulte wrote:
>> especially once I realized that the Property has to be set when the
>> buffer is loaded.
>
> You can also press C-c C-c on the #+Property line to apply it's effects.

Everybody seems to get bitten by this at least once. Would there be a
possibility to avoid this extra step for the user, and have such parameters
automagically taken into account, without user involvement?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-babel-execute-src-block deletes its src block.

2012-03-03 Thread Daimrod
Nick Dokos  writes:

> Daimrod  wrote:
>
>> 
>> Hi, I've recently switched from Org 7.4 to the master branch on the git
>> repository, and I've encountered this weird situation.
>> 
>>   #+name: foo
>>   #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> 
>> If I evaluate this block I get:
>> 
>>   #+name: foo
>> =42
>> =emacs-lisp
>> 
>> Though it works as expected if I remove the name:
>> 
>>   #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> =>
>>   #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> 
>>   #+RESULTS:
>>   : 42
>> 
>> I've tried to figure out what was the problem and it lies in the regexp
>> org-babel-src-name-w-name-regexp.
>> 
>> So far I've found those workarounds:
>> 
>> No spaces after the ':'
>> 
>>   #+name:foo
>>   #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> =>
>>   #+name:foo
>>   #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>>   #+RESULTS: foo
>>   : 42
>> 
>> Add parentheses after the name.
>> 
>>   #+name: foo()
>>   #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> =>
>>   #+name: foo()
>>   #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> 
>>   #+RESULTS: foo
>>   : 42
>> 
>> No spaces before the src block
>> 
>>   #+name: foo
>> #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> =>
>>   #+name: foo
>> #+begin_src emacs-lisp 
>> (defun foo ()
>>   42)
>> (foo)
>>   #+end_src emacs-lisp
>> 
>> #+RESULTS: foo
>> : 42
>
> Bug confirmed (but I didn't try all your workarounds, just the no spaces
> before the #+begin_src and no space after the colon in the #+name).
>
> I take it it was working on 7.4?
>

Yes.

> Nick
>
> PS. One side note: the syntax of code blocks is
>
>  #+NAME: 
>  #+BEGIN_SRC   
>
>  #+END_SRC
>
> so no emacs-lisp on the #+end_src line.

Indeed, I don't know why I've pasted it like this, normally I don't do
it.




Re: [O] org-babel-execute-src-block deletes its src block.

2012-03-03 Thread Nick Dokos
Daimrod  wrote:

> 
> Hi, I've recently switched from Org 7.4 to the master branch on the git
> repository, and I've encountered this weird situation.
> 
>   #+name: foo
>   #+begin_src emacs-lisp 
> (defun foo ()
>   42)
> (foo)
>   #+end_src emacs-lisp
> 
> If I evaluate this block I get:
> 
>   #+name: foo
> =42
> =emacs-lisp
> 
> Though it works as expected if I remove the name:
> 
>   #+begin_src emacs-lisp 
> (defun foo ()
>   42)
> (foo)
>   #+end_src emacs-lisp
> =>
>   #+begin_src emacs-lisp 
> (defun foo ()
>   42)
> (foo)
>   #+end_src emacs-lisp
> 
>   #+RESULTS:
>   : 42
> 
> I've tried to figure out what was the problem and it lies in the regexp
> org-babel-src-name-w-name-regexp.
> 
> So far I've found those workarounds:
> 
> No spaces after the ':'
> 
>   #+name:foo
>   #+begin_src emacs-lisp 
> (defun foo ()
>   42)
> (foo)
>   #+end_src emacs-lisp
> =>
>   #+name:foo
>   #+begin_src emacs-lisp 
> (defun foo ()
>   42)
> (foo)
>   #+end_src emacs-lisp
>   #+RESULTS: foo
>   : 42
> 
> Add parentheses after the name.
> 
>   #+name: foo()
>   #+begin_src emacs-lisp 
> (defun foo ()
>   42)
> (foo)
>   #+end_src emacs-lisp
> =>
>   #+name: foo()
>   #+begin_src emacs-lisp 
> (defun foo ()
>   42)
> (foo)
>   #+end_src emacs-lisp
> 
>   #+RESULTS: foo
>   : 42
> 
> No spaces before the src block
> 
>   #+name: foo
> #+begin_src emacs-lisp 
> (defun foo ()
>   42)
> (foo)
>   #+end_src emacs-lisp
> =>
>   #+name: foo
> #+begin_src emacs-lisp 
> (defun foo ()
>   42)
> (foo)
>   #+end_src emacs-lisp
> 
> #+RESULTS: foo
> : 42

Bug confirmed (but I didn't try all your workarounds, just the no spaces
before the #+begin_src and no space after the colon in the #+name).

I take it it was working on 7.4?

Nick

PS. One side note: the syntax of code blocks is

 #+NAME: 
 #+BEGIN_SRC   
   
 #+END_SRC

so no emacs-lisp on the #+end_src line.



[O] org-babel-execute-src-block deletes its src block.

2012-03-03 Thread Daimrod

Hi, I've recently switched from Org 7.4 to the master branch on the git
repository, and I've encountered this weird situation.

  #+name: foo
  #+begin_src emacs-lisp 
(defun foo ()
  42)
(foo)
  #+end_src emacs-lisp

If I evaluate this block I get:

  #+name: foo
=42
=emacs-lisp

Though it works as expected if I remove the name:

  #+begin_src emacs-lisp 
(defun foo ()
  42)
(foo)
  #+end_src emacs-lisp
=>
  #+begin_src emacs-lisp 
(defun foo ()
  42)
(foo)
  #+end_src emacs-lisp

  #+RESULTS:
  : 42

I've tried to figure out what was the problem and it lies in the regexp
org-babel-src-name-w-name-regexp.

So far I've found those workarounds:

No spaces after the ':'

  #+name:foo
  #+begin_src emacs-lisp 
(defun foo ()
  42)
(foo)
  #+end_src emacs-lisp
=>
  #+name:foo
  #+begin_src emacs-lisp 
(defun foo ()
  42)
(foo)
  #+end_src emacs-lisp

  #+RESULTS: foo
  : 42

Add parentheses after the name.

  #+name: foo()
  #+begin_src emacs-lisp 
(defun foo ()
  42)
(foo)
  #+end_src emacs-lisp
=>
  #+name: foo()
  #+begin_src emacs-lisp 
(defun foo ()
  42)
(foo)
  #+end_src emacs-lisp

  #+RESULTS: foo
  : 42

No spaces before the src block

  #+name: foo
#+begin_src emacs-lisp 
(defun foo ()
  42)
(foo)
  #+end_src emacs-lisp
=>
  #+name: foo
#+begin_src emacs-lisp 
(defun foo ()
  42)
(foo)
  #+end_src emacs-lisp

#+RESULTS: foo
: 42





Re: [O] Is it possible to run shell script src blocks as root or to export individual blocks?

2012-03-03 Thread Nick Dokos
Leo Alekseyev  wrote:

> I was wondering if there was an easy way to execute some shell
> commands contained in a src block as root.  Alternatively, is there a
> quick way to export _just_ that one source block to a temp file so
> that I could run it as root manually?
> 

You could set up sudo so that it does not require a password and prefix each
command that needs to be run as root with "sudo":

--8<---cut here---start->8---

* foo

#+BEGIN_SRC sh
sudo id

#+END_SRC

#+RESULTS:
: uid=0(root) gid=0(root) groups=0(root)
--8<---cut here---end--->8---

Not sure how sudo would interact with babel if you had to type in a password.

Nick



Re: [O] ConTeXt export

2012-03-03 Thread Nick Dokos
Sebastien Vauban  wrote:

> Hi Markus,
> 
> Markus Grebenstein wrote:
> > Since the name of ConTeXt makes it almost impossible to search for that 
> > topic
> > I'd like to ask you:
> >
> > Is there an ConTeXt exporter (planned??). I am getting more and more fed up
> > with all the package trouble...
> 
> I guess it's just a question of modifying some variables, such as:
> 
> - org-latex-to-pdf-process
> - org-export-latex-classes
> 
> Search for `xelatex' for examples of customization... and share your own
> afterward...
> 

Can ConTeXt handle a LaTeX program? I thought it's a completely different
kettle of fish (at least, the samples that I've looked at look completely
different). If so, then it's unlikely that the latex exporter can produce
anything useful for it. It would need a separate exporter (but there isn't
one and afaik nobody is working on one).

Nick



Re: [O] ConTeXt export

2012-03-03 Thread Sebastien Vauban
Hi Markus,

Markus Grebenstein wrote:
> Since the name of ConTeXt makes it almost impossible to search for that topic
> I'd like to ask you:
>
> Is there an ConTeXt exporter (planned??). I am getting more and more fed up
> with all the package trouble...

I guess it's just a question of modifying some variables, such as:

- org-latex-to-pdf-process
- org-export-latex-classes

Search for `xelatex' for examples of customization... and share your own
afterward...

Best regards,
  Seb

-- 
Sebastien Vauban