[O] Checkbox Statistics - Report Progress

2011-06-17 Thread neil whitley
Hi

I want to include the checkbox statistics in my custom agenda which I
use to report my past weekly work to my boss.

I would like to have something like:

Monday

Project A [30%] Complete Today
Project B [85%] Complete Today 
Project C [50%] Complete Today 

Tuesday

Project A [40%] Complete Today 
Project B [90%] Complete Today 
Project C [45%] Complete Today 

...etcetc

Friday

Project A [100%] Complete Today 
Project B [97%] Complete  Today
Project C [50%] Complete  Today

The way the statistics work as far as I can see is that they give an
instant 'snapshot'. BUT is there a way to generate an agenda report that
shows how the projects have progressed to [100%] ? 

Maybe have checkbox statistics logged as they change with a timestamp
for example?

Thanks :-)

Neil




Re: [O] Literate Programming - Continue a Source Block?

2011-06-17 Thread Sebastien Vauban
Hi Eric and Neeum,

Eric Schulte wrote:
 Overwriting is still not supported, but I don't know if that's all that
 important (I don't have an immediate need for it). And noweb by default
 did not have it either, so perhaps it's not needed for most tasks

 This was my thinking.

 (OTOH, you may want to think about what the best solution is if later
 on you decide to add overwriting capability).

 If someone finds a real need for overwriting code blocks, hopefully the
 specifics of their need will point towards an implementation.

The only case that pops up to my mind now, of such a use case where
overwriting could be needed (well, let's say useful) is for some pedagogical
document that one would write, where code is constructed from a simplistic
(and buggy) approach to a correct one.

One could say: the code to do that is this one, and show the block contents.

Then, discover problems to it, explain them in the document, and make a new
version of the block with the same name (for tangling reasons).

Then, highlight some limitations of the new code, fix them in a new block with
the same name, etc.

Does that mean it needs to be implemented?  Up to you...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] latex checkboxes

2011-06-17 Thread Nick Dokos
Nicolas Goaziou n.goaz...@gmail.com wrote:

 Hello,
 
 Nick Dokos nicholas.do...@hp.com writes:
 
  Yes, you can indeed - except for the [-] which is hardcoded. Try the
  following:
 
  #LATEX_HEADER: \setbox0=\hbox{\large$\square$}
 
  #+BIND: org-export-latex-list-parameters (:cbon 
  [{\\parbox[][][c]{\\wd0}{\\large$\\boxtimes$}}] :cboff 
  [{\\parbox[][][c]{\\wd0}{\\large$\\square$}}])
 
  * DONE Organize party [3/4]
 - [ ] call people
 - [X] order food
 - [-] think about what music to play
 - [X] talk to the neighbors
 
  So the question is: why is the [-] hardcoded?
 
 Historical reasons, I guess.
 
 I've now pushed a patch introducing the new property `:cbtrans' for
 those check-boxes.

As expected :-) Thanks.

 Sadly, it will only work with exporters making use of
 list parsing, that is only the LaTeX exporter so far.
 
 Btw, is there any consensus on better default values for :cbon, :cboff
 and :cbtrans? Configurability isn't an excuse for ugly standards.
 

I don't think so - not yet in any case. I didn't even know about the
box stuff until Skip brought it up. I would have thought that the
default ones should be the simplest thing possible: [ ], [X] and [-]
in a monospaced font, something that does not need any help from
additional LaTeX packages, the kind of thing that org-list-to-latex
does.

Nick




Re: [O] latex checkboxes

2011-06-17 Thread Nicolas Goaziou
Hello,

Nick Dokos nicholas.do...@hp.com writes:

 Yes, you can indeed - except for the [-] which is hardcoded. Try the
 following:

 #LATEX_HEADER: \setbox0=\hbox{\large$\square$}

 #+BIND: org-export-latex-list-parameters (:cbon 
 [{\\parbox[][][c]{\\wd0}{\\large$\\boxtimes$}}] :cboff 
 [{\\parbox[][][c]{\\wd0}{\\large$\\square$}}])

 * DONE Organize party [3/4]
- [ ] call people
- [X] order food
- [-] think about what music to play
- [X] talk to the neighbors

 So the question is: why is the [-] hardcoded?

Historical reasons, I guess.

I've now pushed a patch introducing the new property `:cbtrans' for
those check-boxes. Sadly, it will only work with exporters making use of
list parsing, that is only the LaTeX exporter so far.

Btw, is there any consensus on better default values for :cbon, :cboff
and :cbtrans? Configurability isn't an excuse for ugly standards.

Regards,

-- 
Nicolas Goaziou



Re: [O] odd behaviour in a function - looking for advice

2011-06-17 Thread Rustom Mody
[OT for this discussion but just wondering if Jambunathan's suggestions may
work here]

There has been this question asked both on the emacs and on the python list

Just excerpting from
http://groups.google.com/group/comp.lang.python/browse_thread/thread/acb0f2a01fe50151#

I am using python-mode to write python code in Emacs, and when I use the
useful C-c C-c key combination to interpret the buffer, Emacs always
opens another window inside the window I am using.

I prefer using Emacs split in two windows (one on each physical screen)
where I program in one of them and use the Python interpreter in the
other.  Is there a way I can tell Emacs to use the *Python* buffer in
the Window that is already open instead of creating a new one?


Re: [O] odd behaviour in a function - looking for advice

2011-06-17 Thread Rustom Mody
[OT for this discussion but just wondering if Jambunathan's
suggestions may work here]

There has been this question asked both on the emacs and on the python list

Just excerpting from
http://groups.google.com/group/comp.lang.python/browse_thread/thread/acb0f2a01fe50151#

I am using python-mode to write python code in Emacs, and when I use the
useful C-c C-c key combination to interpret the buffer, Emacs always
opens another window inside the window I am using.

I prefer using Emacs split in two windows (one on each physical screen)
where I program in one of them and use the Python interpreter in the
other.  Is there a way I can tell Emacs to use the *Python* buffer in
the Window that is already open instead of creating a new one?



Re: [O] latex checkboxes

2011-06-17 Thread Nicolas Goaziou
Nick Dokos nicholas.do...@hp.com writes:

 Btw, is there any consensus on better default values for :cbon, :cboff
 and :cbtrans? Configurability isn't an excuse for ugly standards.
 

 I don't think so - not yet in any case. I didn't even know about the
 box stuff until Skip brought it up. I would have thought that the
 default ones should be the simplest thing possible: [ ], [X] and [-]
 in a monospaced font, something that does not need any help from
 additional LaTeX packages, the kind of thing that org-list-to-latex
 does.

Then, what about setting :cbtrans to \\texttt{[-]} and
`org-export-latex-list-parameters' to nil, instead of $\\boxminus$ and
'(:cbon $\\boxtimes$ :cboff $\\Box$), respectively?

Regards,

-- 
Nicolas Goaziou



Re: [O] latex checkboxes

2011-06-17 Thread Nick Dokos
Nicolas Goaziou n.goaz...@gmail.com wrote:

 Nick Dokos nicholas.do...@hp.com writes:
 
  Btw, is there any consensus on better default values for :cbon, :cboff
  and :cbtrans? Configurability isn't an excuse for ugly standards.
  
 
  I don't think so - not yet in any case. I didn't even know about the
  box stuff until Skip brought it up. I would have thought that the
  default ones should be the simplest thing possible: [ ], [X] and [-]
  in a monospaced font, something that does not need any help from
  additional LaTeX packages, the kind of thing that org-list-to-latex
  does.
 
 Then, what about setting :cbtrans to \\texttt{[-]} and
 `org-export-latex-list-parameters' to nil, instead of $\\boxminus$ and
 '(:cbon $\\boxtimes$ :cboff $\\Box$), respectively?
 

I'm fine with that - Skip? Tom? Others? If this does end up being the case,
then Skip's \parbox method can be integrated into Tom's LaTeX tutorial
or as a separate hack on Worg.

Nick





Re: [O] latex checkboxes

2011-06-17 Thread Skip Collins
 Then, what about setting :cbtrans to \\texttt{[-]} and
 `org-export-latex-list-parameters' to nil, instead of $\\boxminus$ and
 '(:cbon $\\boxtimes$ :cboff $\\Box$), respectively?


 I'm fine with that - Skip? Tom? Others? If this does end up being the case,
 then Skip's \parbox method can be integrated into Tom's LaTeX tutorial
 or as a separate hack on Worg.

Adding configurability for cbon, cboff, and cbtrans is the most important thing.

Philosophically, the whole point of exporting to LaTeX or HTML is to
take a plain text representation of lists, checkboxes, etc., and turn
it into a nice presentation format. So I don't quite agree that the
LaTeX output should mirror the appearance of the org file with a
monospaced font. If so, then logically list bullets should be exported
as hyphens. My preference would be that the default LaTeX (and html)
outputs should use the features of those formats to make the output
look nice. Within reason, of course.



Re: [O] latex checkboxes

2011-06-17 Thread Thomas S. Dye
Nick Dokos nicholas.do...@hp.com writes:

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

 Nick Dokos nicholas.do...@hp.com writes:
 
  Btw, is there any consensus on better default values for :cbon, :cboff
  and :cbtrans? Configurability isn't an excuse for ugly standards.
  
 
  I don't think so - not yet in any case. I didn't even know about the
  box stuff until Skip brought it up. I would have thought that the
  default ones should be the simplest thing possible: [ ], [X] and [-]
  in a monospaced font, something that does not need any help from
  additional LaTeX packages, the kind of thing that org-list-to-latex
  does.
 
 Then, what about setting :cbtrans to \\texttt{[-]} and
 `org-export-latex-list-parameters' to nil, instead of $\\boxminus$ and
 '(:cbon $\\boxtimes$ :cboff $\\Box$), respectively?
 

 I'm fine with that - Skip? Tom? Others? If this does end up being the case,
 then Skip's \parbox method can be integrated into Tom's LaTeX tutorial
 or as a separate hack on Worg.

 Nick




Yes, that seems like a good solution to me.  When the dust has settled
I'll work this into the LaTeX tutorial, either directly or linked to a
separate hack on Worg (written by someone else).

Tom

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



Re: [O] latex checkboxes

2011-06-17 Thread Nick Dokos
Skip Collins skip.coll...@gmail.com wrote:

  Then, what about setting :cbtrans to \\texttt{[-]} and
  `org-export-latex-list-parameters' to nil, instead of $\\boxminus$ and
  '(:cbon $\\boxtimes$ :cboff $\\Box$), respectively?
 
 
  I'm fine with that - Skip? Tom? Others? If this does end up being the case,
  then Skip's \parbox method can be integrated into Tom's LaTeX tutorial
  or as a separate hack on Worg.
 
 Adding configurability for cbon, cboff, and cbtrans is the most important 
 thing.
 
 Philosophically, the whole point of exporting to LaTeX or HTML is to
 take a plain text representation of lists, checkboxes, etc., and turn
 it into a nice presentation format. So I don't quite agree that the
 LaTeX output should mirror the appearance of the org file with a
 monospaced font. If so, then logically list bullets should be exported
 as hyphens. My preference would be that the default LaTeX (and html)
 outputs should use the features of those formats to make the output
 look nice. Within reason, of course.
 

I agree of course, particularly with the last sentence. The question is:
is there some other reasonable default that will satisfy most people's
needs without requiring them to customize? I'm not too worried about the
perfection hounds: they will customize mercilessly and they will
complain if they cannot customize - and I think they (you!) will be
happy with the current solutions.  If people vote for \parbox as the
default, I'm perfectly happy with that.  The current default however is
indeed ugly and needs to be changed: I think we all agree with you on
that.

I'll try to run the same org file through the two different defaults
and put up some PDFs so people can look at them, but I won't get to it
till late tomorrow.

Nick



Re: [O] HTML5 presentations

2011-06-17 Thread Eric S Fraga
Achim Gratz strom...@nexgo.de writes:

 Eric S Fraga e.fr...@ucl.ac.uk writes:
 What browser(s) are people using for this?  Conkeror doesn't work well
 at all and iceweasel (aka firefox) 3.5.19 sort of works.

 Although I haven't tried it recently, conkeror just uses the XULrunner
 engine that Firefox is based on.  So if you switch to a reasonably
 recent version of XULrunner, it should work.  Current version from

Thanks.  I'll look into it.
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.402.gdb1c.dirty)



[O] Batch mode evaluation of source code?

2011-06-17 Thread Herbert Sitz
The Org manual gives an example of a batch mode --eval that runs code to tangle
code from Org files.  I assume there's also a way to simply run a source code
block and get its output in the terminal but I can't see how to do it.

To give a concrete example, the Org manual uses this Python source block as
example illustrating the difference between :session and non-session results
output.  How would I evaluate it from the command line and get the results
output back in the terminal?:

-
#+begin_src python  :results output
print hello
2
print bye
#+end_src


-- Herb





Re: [O] Batch mode evaluation of source code?

2011-06-17 Thread Eric Schulte
Hi Herb,

The following org-mode file and minimal elisp file can be used to print
the results of evaluating a code block from a batch Emacs session (note
this is using Emacs24, so Org-mode/Babel do not need to be explicitly
loaded).

I used the following command line
: emacs --batch -l run-code.el 2 /dev/null

And the following two files.


run-code.el
Description: application/emacs-lisp
#+Title: short code buffer

#+begin_src python :results output
  print hello
  2
  print bye
#+end_src

#+results:
: hello
: bye


Cheers -- Eric

Herbert Sitz hs...@nwlink.com writes:

 The Org manual gives an example of a batch mode --eval that runs code to 
 tangle
 code from Org files.  I assume there's also a way to simply run a source code
 block and get its output in the terminal but I can't see how to do it.

 To give a concrete example, the Org manual uses this Python source block as
 example illustrating the difference between :session and non-session results
 output.  How would I evaluate it from the command line and get the results
 output back in the terminal?:

 -
 #+begin_src python  :results output
 print hello
 2
 print bye
 #+end_src
 

 -- Herb




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


Re: [O] Batch mode evaluation of source code?

2011-06-17 Thread Herbert Sitz
Eric Schulte schulte.eric at gmail.com writes:

  
 The following org-mode file and minimal elisp file can be used 
 to print
 the results of evaluating a code block from a batch Emacs 
 session 
 (note
 this is using Emacs24, so Org-mode/Babel do not need to be 
 explicitly
 loaded).
 
 I used the following command line
 : emacs --batch -l run-code.el 2 /dev/null
 

Eric -- Thanks, very cool.  I'm toying around with this approach to do dynamic
code-block evaluation in the Org-mode clone I'm making in Vim. No problem with
on-export-evaluation, since the vim-org-clone just saves the file and issues a
batch mode org-export or org-publish command to emacs, which takes over from
there.

I think this dynamic evaluation could be useful, but it also seems like a new
server is getting called for each emacs --batch mode call.  That's cumbersome
for this dynamic-evaluation stuff because of start-up overhead for emacs on 
each call.  Is that the way its supposed to work?  

I'm working on Windows7 and have an Emacs client running when I issue the 
batch command, which I assumed also means there is a running emacs server.  
Is the
call getting made to the running emacs server?  If so, is there some way to
avoid the startup overhead (which seems to come from 'Adding c:/program files
(x86)/emacs/EmacsW32/lisp/ to load path.').  Or, if my batch call is _not_
making use of the running Emacs server is there some way to get it to use that
server?

Thanks again,

Herb





Re: [O] Batch mode evaluation of source code?

2011-06-17 Thread Herbert Sitz
Herbert Sitz hsitz at nwlink.com writes:

 I'm working on Windows7 and have an Emacs client running when I issue the 
 batch command, which I assumed also means there is a running emacs server.  
 Is the
 call getting made to the running emacs server?  If so, is there some way to
 avoid the startup overhead (which seems to come from 'Adding c:/program files
 (x86)/emacs/EmacsW32/lisp/ to load path.').  Or, if my batch call is _not_
 making use of the running Emacs server is there some way to get it to use that
 server?
 
 Herb
 

I can confirm that a new emacs process is getting created to run each batch mode
command.  I don't really understand the emacs-client/emacs-server setup is
supposed to work.  So I guess my question is whether my batch-mode command can
be made as a client of the existing emacs-server.  I'm guessing the answer is
'No', but if so maybe there's some other way to speed up creation of the new
emacs process when it's used solely to process an Org source-code-block?  

-- Herb






Re: [O] Batch mode evaluation of source code?

2011-06-17 Thread Eric Schulte
Herbert Sitz hs...@nwlink.com writes:

 Eric Schulte schulte.eric at gmail.com writes:

  
 The following org-mode file and minimal elisp file can be used 
 to print
 the results of evaluating a code block from a batch Emacs 
 session 
 (note
 this is using Emacs24, so Org-mode/Babel do not need to be 
 explicitly
 loaded).
 
 I used the following command line
 : emacs --batch -l run-code.el 2 /dev/null
 

 Eric -- Thanks, very cool.  I'm toying around with this approach to do dynamic
 code-block evaluation in the Org-mode clone I'm making in Vim. No problem with
 on-export-evaluation, since the vim-org-clone just saves the file and issues a
 batch mode org-export or org-publish command to emacs, which takes over from
 there.

 I think this dynamic evaluation could be useful, but it also seems like a new
 server is getting called for each emacs --batch mode call.  That's cumbersome
 for this dynamic-evaluation stuff because of start-up overhead for emacs on 
 each call.  Is that the way its supposed to work?  

 I'm working on Windows7 and have an Emacs client running when I issue
 the batch command, which I assumed also means there is a running emacs
 server.  Is the call getting made to the running emacs server?  If so,
 is there some way to avoid the startup overhead (which seems to come
 from 'Adding c:/program files (x86)/emacs/EmacsW32/lisp/ to load
 path.').  Or, if my batch call is _not_ making use of the running
 Emacs server is there some way to get it to use that server?

 Thanks again,


The example I attached using --batch *does* startup a new Emacs
instance on every execution.  You should be able to replace the emacs
command with emacsclient (or some windows equivalent) command to
connect to a running server, rather than having to create a new
connection on every evaluation.

By connecting to a persistent Emacs instance much of the .el script I
attached could be removed assuming Babel has already been configured in
the running Emacs server.

Hope this helps -- Eric


 Herb




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



Re: [O] Batch mode evaluation of source code?

2011-06-17 Thread Herbert Sitz
Nick Dokos nicholas.dokos at hp.com writes:

  
 You do M-x server-start on the running emacs to start the server
 part. Then you invoke emacsclient from the command line to connect to
 it - check the manpage of emacsclient for details: you might be able to
 arrange something with the --eval argument.
 
 Nick
 
 

Nick -- Thanks, also found a previous newsgroup post on same subject here:

http://www.mail-archive.com/emacs-orgmode@gnu.org/msg19489.html

I'll toy around and see what I can get working.  Seems like if I can
get the quoting in Windows shell for the eval segment then I should
be able to get result I want. . . 

-- Herb






Re: [O] Batch mode evaluation of source code?

2011-06-17 Thread Herbert Sitz
Eric Schulte schulte.eric at gmail.com writes:
 
 By connecting to a persistent Emacs instance much of the .el script I
 attached could be removed assuming Babel has already been configured in
 the running Emacs server.
 
 Hope this helps -- Eric
 

Eric, Nick:

Thanks, yes it does.  Using also Nick's tip about using --eval (batch doesn't
seem to work when calling a client process) I've got things working at least
part of the way.

I can do the following command in the terminal:

  c:\program files (x86)\emacs\emacs\bin\emacsclientw.exe --eval ^(progn 
 (let
((org-confirm-babel-evaluate nil)) (find-file \^short-code.org\^)
(org-babel-next-src-block) (print (org-babel-execute-src-block

This gets processed properly by the running client, but print command output
goes into the *message* buffer rather than to the terminal used to enter the
command.

Any tips on how to redirect the output to my terminal?  If not, saving to a file
is a decent alternative (though I don't know how to do that either, lol).

-- Herb






Re: [O] org-capture does not fully clean up after C-c C-k

2011-06-17 Thread Leo
On 2011-06-16 15:51 +0800, Carsten Dominik wrote:
 Hi Leo,

 I am unable to reproduce this.  I do get an empty line the first time,
 but when the empty line is already there, then there is no problem.

 Do you find the insertion of this one empty line a problem?

 - Carsten

I am running org-mode from git 2011-05-20 and I can still reproduce the
problem. I suspect this might be related to other things in my setup. I
will track it down later on.

Leo



[O] org and microsoft exchange

2011-06-17 Thread Skip Collins
I was thinking of trying to get org and microsoft exchange talking to
each other via soap-client.el and exchange web services (ews).
Ultimately it would be nice to have a route into the corporate world
of exchange, outlook, entourage, and blackberry where so many of us
are forced to live.

My first goal is to link org TODOs to exchange tasks in some
simplistic way that allows two-way syncing.

If that proves feasible, perhaps calendar items could be next.

Does this sound useful? If anyone with elisp or web services
programming experience is interested in lending a hand, I am sure to
need some help.