Re: [O] [babel] escaping of links when result from source code block?

2011-07-22 Thread Rainer M Krug
On Thu, Jul 21, 2011 at 7:28 PM, Eric Schulte schulte.e...@gmail.comwrote:

 Hi Rainer,


Hi Eric,


 The leading [ makes the string result look like a list to Babel, so it
 is passed to the `read' function which then escapes the periods in the
 file name.  You can inhibit this interpretation of the string by
 explicitly informing the code block that you will be returning a string
 with the :results scalar header argument.  You may also want to look
 at the :results file header argument.


That explains. I an using it to return links to several graphs created in R,
so I think the scalar option would be a good solution.

Thanks a lot,

Rainer




 Best -- Eric

 Rainer M Krug r.m.k...@gmail.com writes:

  Hi
 
  when evaluating the code blocks below, I would expect  [[file:./cv.cls]]
 ,
  but I get  [[file:./cv\.cls]], i.e. the . is escaped and does not work.
 
  When not using [[]], the . is not escaped - is this a bug, or how can I
  circumvent the esaping?
 
  Cheers,
 
  Rainer
 
  #+begin_src R :results org
paste([[file:./cv.cls]])
  #+end_src
 
  #+results:
  #+BEGIN_ORG
  [[file:\./cv\.cls]]
  #+END_ORG
 
  #+begin_src sh :results org
 echo [[file:./cv.cls]]
  #+end_src
 
  #+results:
  #+BEGIN_ORG
  [[file:\./cv\.cls]]
  #+END_ORG
 
  #+begin_src R :results org
paste(file:./cv.cls)
  #+end_src
 
  #+results:
  #+BEGIN_ORG
  file:./cv.cls
  #+END_ORG

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




-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax (F):   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug


Re: [O] org-timestamp-up/down broken in tip

2011-07-22 Thread Sebastien Vauban
Hi Max,

Max Mikhanosha wrote:
 With latest git I can only press S-up or S-down on the time part of
 the timestamp once, after changing the time it moves point to the
 closing bracket, and doing another S-up or S-down changes the date
 part instead of time.

 Example: with point on the 05 at the timestamp [2011-07-21 Thu
 19:05] doing Shift-Up results in time correctly changed to 19:10, but
 point moves to the closing bracket. Next time you press S-Up it
 changes date, not time.

 Reverting following commit fixes the problem for me:

 commit fd0f8e10d1d3a339da9460d6c71283e85897c455
 Author: Nicolas Goaziou n.goaz...@gmail.com
 Date:   Thu Jul 21 11:48:35 2011 +0200

 Fix bug with TODO states changes modifying scheduling of next headline
 
 * lisp/org.el (org-timestamp-change): some locales don't use the same
   length for date abbreviations. Set a marker at origin in case length
   of new timestamp is different.

I don't know which commit broke it, but I confirm the symptom you've spotted.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [calfw] Better use of space

2011-07-22 Thread SAKURAI Masashi
Hi Rasmus,

At Thu, 21 Jul 2011 10:57:45 +0200,
Rasmus wrote:
 :
 I have a feature request for Calfw.
 
 Masashi, would you prefer these to be posted here or on your github
 page?

I like here because I can get more comments than do in other channels.
I'm sorry that other members does not feel noisy.

I can catch both track and I will manage incoming issues and my
progress. Then, I will announce calfw updates here.


 Anyhow, the month view is just superb!
 
 However, when using especially the two week view (and this is probably
 also true for the week view) I would like calfw to utilize vertical
 space better. By 'better' I basically mean that I would like calfw to be
 greedy.
 
 Refer to the following screenshot:
 
http://ompldr.org/vOWtjdA
 
 Compare (the second week) to Google Cal: 
 
http://ompldr.org/vOWtjdg
 
 Seeing there is a lot of space left in each of Calfw's day-column it
 would be nice if it could be used to enhance the overview. This could
 for example be archived mapping events against time on the vertical axis
 as the Google calendar does (and also Mozilla Lightning but it no longer
 work on my system). This might also allow for printing more text from
 the even entry (using multiple lines).

Thanks for your request and good images.
I think this request involves 3 functions.

* Time table layout

I think this function is very difficult, because it needs many study
for me to implement, including following functions.
Of course, I consider the time table view is one of the goal of calfw.

* Display multiple-lines items (the source splits an item multiple lines.)

This is not so difficult. In this mechanism, the source objects can
propose some formats, for example, 15:00 appointment and (15:00-15:30 
appointment). Then, calfw chooses the suitable format and displays 
in the current layout algorithm.

I will design the interface between cfw:source and calfw, and
implement it.

* Word-wrapping and folding lines (calfw splits lines within a column.)

This is little difficult. I think word-wrapping, folding lines and
truncating strings can not be achieved in the narrow columns
straightforwardly. I need a time to study this issue.

 On the other hand we probably also want to make sure that it is still
 works on a 800x600 display. Thus, it might be best to introduce a
 governing variable.

Yes. It is good idea.

Regards,
--
SAKURAI, Masashi (family, given)
m.saku...@kiwanami.net



Re: [O] org-timestamp-up/down broken in tip

2011-07-22 Thread Bastien
Sebastien Vauban wxhgmqzgw...@spammotel.com writes:

 I don't know which commit broke it, but I confirm the symptom you've
 spotted.

I do as well -- I'm on it. :)

-- 
 Bastien



[O] Need control over insertion point of variables in code blocks

2011-07-22 Thread Dirk Scharff
Hi

i just noticed that variables are assigned in the top of the exported code. 
That can be problematic in some situations:

#+source: the_test
#+begin_src python :var x=3 :tangle test.py :results output
from __future__ import division
print x
#+end_src


tangling results in:

x=3
from __future__ import division
print x

The problem with the result is simple: 
SyntaxError: from __future__ imports must occur at the beginning of the file

To export this correctly I'd need the possibility to tell org-mode where the 
variables are supposed to be inserted. Is there a way to do this? I didn't find 
a keyword for this in the documentation. 

A second problem I have at the moment lies with the execution of source-blocks 
in tables. What I'd like to do:

| argument | result |
|1 | #ERROR |
|  ||
#+TBLFM: $2=call_the_test(x=$)

I guess I'm just doing something wrong here. Executing the #+Tblfm results in 
the error: reference $ not found in buffer. How do I do the reference 
correctly in this case? 

You can test both cases in the attached org-file. 


testing.org
Description: Binary data





Re: [O] [BUG] Changing TODO states sometimes modifies the schedulingof the next heading

2011-07-22 Thread Bastien
Hi Tom,

Tom adatgyu...@gmail.com writes:

 I'm a bit suprised it took so long until someone fixed the problem
 though it was a major bug (changing scheduling of items unintentionally),
 the problem was well analyzed and the solution was simple.

Apparently not.  

And the problem only hit people using locales other than english, 
maybe that explains why there was not that many complaints.

Anyway, we will provide a solution for this.

Thanks for your patience,

-- 
 Bastien



Re: [O] org-timestamp-up/down broken in tip

2011-07-22 Thread Bastien
Hi Max,

thanks a lot for reporting this annoying problem and for finding 
the bad commit.

Max Mikhanosha m...@openchat.com writes:

 Reverting following commit fixes the problem for me:

 commit fd0f8e10d1d3a339da9460d6c71283e85897c455
 Author: Nicolas Goaziou n.goaz...@gmail.com
 Date:   Thu Jul 21 11:48:35 2011 +0200

 Fix bug with TODO states changes modifying scheduling of next
 headline

I reverted this commit.

We need a better solution for the problem this commit was trying to
solve.  

Thanks,

-- 
 Bastien



Re: [O] Need control over insertion point of variables in code blocks

2011-07-22 Thread Rainer M Krug
On Fri, Jul 22, 2011 at 9:22 AM, Dirk Scharff
dirk.scha...@googlemail.comwrote:

 Hi

 i just noticed that variables are assigned in the top of the exported code.
 That can be problematic in some situations:

 #+source: the_test
 #+begin_src python :var x=3 :tangle test.py :results output
 from __future__ import division
 print x
 #+end_src


 tangling results in:

 x=3
 from __future__ import division
 print x

 The problem with the result is simple:
 SyntaxError: from __future__ imports must occur at the beginning of the
 file

 To export this correctly I'd need the possibility to tell org-mode where
 the variables are supposed to be inserted. Is there a way to do this? I
 didn't find a keyword for this in the documentation.


For tangling: you could put   from __future__ imports into the :shebang and
use padline :padline no, i.e.:

#+source: the_test
#+begin_src python :var x=3 :tangle test.py :results output :shebang from
__future__ imports :padline no
print x
#+end_src

which results in

from __future__ imports
print x

Keep in mind, that I have NEVER used python (although I should...).

Cheers,

Rainer



A second problem I have at the moment lies with the execution of
 source-blocks in tables. What I'd like to do:

 | argument | result |
 |1 | #ERROR |
 |  ||
 #+TBLFM: $2=call_the_test(x=$)

 I guess I'm just doing something wrong here. Executing the #+Tblfm results
 in the error: reference $ not found in buffer. How do I do the reference
 correctly in this case?

 You can test both cases in the attached org-file.








-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax (F):   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug


Re: [O] org-timestamp-up/down broken in tip

2011-07-22 Thread Bastien
Bastien b...@altern.org writes:

 I reverted this commit.

 We need a better solution for the problem this commit was trying to
 solve.  

I should add that I tested Nicolas' patch and it worked okay for me,
but I should have tested it better.  So, my bad on this one.

-- 
 Bastien



Re: [O] Need control over insertion point of variables in code blocks

2011-07-22 Thread Dirk Scharff
Hi

Am 22.07.2011 um 09:34 schrieb Rainer M Krug:

 For tangling: you could put   from __future__ imports into the :shebang and 
 use padline :padline no, i.e.:
 
 #+source: the_test
 #+begin_src python :var x=3 :tangle test.py :results output :shebang from 
 __future__ imports :padline no
 print x
 #+end_src
 
 which results in
 
 from __future__ imports
 print x
 
 Keep in mind, that I have NEVER used python (although I should…).

While I'd not call that a clean solution to the problem it will keep me going 
for now. 

Thank you very much for pointing that possibility out, I haven't thought about 
trying to move the import statement. 

As for python: its a nice language worth trying in my opinion ;)  


With this i could do the table calculation manually by inserting 100-1000 call 
statements (in the real use case I need for my masters-thesis) but it would be 
really nice if i could use a table cell as argument for code-blocks. 

 A second problem I have at the moment lies with the execution of 
 source-blocks in tables. What I'd like to do:
 
 | argument | result |
 |1 | #ERROR |
 |  ||
 #+TBLFM: $2=call_the_test(x=$)
 
 I guess I'm just doing something wrong here. Executing the #+Tblfm results in 
 the error: reference $ not found in buffer. How do I do the reference 
 correctly in this case?
 
 You can test both cases in the attached org-file.


best regards,
Dirk

Re: [O] Need control over insertion point of variables in code blocks

2011-07-22 Thread Rainer M Krug
On Fri, Jul 22, 2011 at 9:55 AM, Dirk Scharff
dirk.scha...@googlemail.comwrote:

 Hi

 Am 22.07.2011 um 09:34 schrieb Rainer M Krug:

 For tangling: you could put   from __future__ imports into the :shebang and
 use padline :padline no, i.e.:

 #+source: the_test
 #+begin_src python :var x=3 :tangle test.py :results output :shebang from
 __future__ imports :padline no
 print x
 #+end_src

 which results in

 from __future__ imports
 print x

 Keep in mind, that I have NEVER used python (although I should…).


 While I'd not call that a clean solution to the problem it will keep me
 going for now.


Agreed - but it works. Good.



 Thank you very much for pointing that possibility out, I haven't thought
 about trying to move the import statement.

 As for python: its a nice language worth trying in my opinion ;)


Sounds like it - I just need time.

Cheers and good luck with your thesis,

Rainer




 With this i could do the table calculation manually by inserting 100-1000
 call statements (in the real use case I need for my masters-thesis) but it
 would be really nice if i could use a table cell as argument for
 code-blocks.

 A second problem I have at the moment lies with the execution of
 source-blocks in tables. What I'd like to do:

 | argument | result |
 |1 | #ERROR |
 |  ||
 #+TBLFM: $2=call_the_test(x=$)

 I guess I'm just doing something wrong here. Executing the #+Tblfm results
 in the error: reference $ not found in buffer. How do I do the reference
 correctly in this case?

 You can test both cases in the attached org-file.



 best regards,
 Dirk




-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax (F):   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug


Re: [O] org-timestamp-up/down broken in tip

2011-07-22 Thread Nicolas Goaziou
Hello,

Bastien b...@altern.org writes:

 Bastien b...@altern.org writes:

 I reverted this commit.

 We need a better solution for the problem this commit was trying to
 solve.  

 I should add that I tested Nicolas' patch and it worked okay for me,
 but I should have tested it better.  So, my bad on this one.

In fact, the problem is that when a time-stamp is changed, the old one
is completely deleted (which is logical). A marker is useless when text
is removed under it.

So, saving point, saving marker, or even saving a line-column
combination can't help here.

Now, the good news are that we can tell exactly in which part of the
time-stamp the point was before. A general solution would be to keep
point before the new time-stamp, look at it, and move to the right part.

A refinement could be to try to keep the same position within the
part. If point was at year, month, day (number), the column will be the
same because they all have fixed size. But if it was past there, we have
to check how far it was from the beginning of the part, and put it
there, unless this happens to be after the end of that part, in which
case, it will simply be put at the last position in it.

I can't work on it before a dozen of hours, though. I will do it then
unless someone wants to take care of it before.

Regards,

-- 
Nicolas Goaziou



[O] calculating column averages

2011-07-22 Thread Jude DaShiell
In this case I don't want to tell org-mode how many rows to calculate, and 
I put a table together with an averages line in its own footer section.  I 
prefer when doing these things to output final averages and totals just 
under table headers then go down into detail records after that.  Could 
someone take a look at the following table and tell me how to get an 
average on column 2 of this table?
Cut here.

| Date Stamp | Systalic | Diastalic | Pulse |   |   |   |   
|   |   |   |
|+--+---+---+---+---+---+---+---+---+---|
| [2011-07-19 Tue 02:26] |  138 |92 |74 |   |   |   |   
|   |   |   |
| [2011-07-21 Thu 03:50] |  128 |79 |76 |   |   |   |   
|   |   |   |
| [2011-07-20 Wed 04:03] |  130 |85 |74 |   |   |   |   
|   |   |   |
| [2011-07-22 Fri 02:33] |  121 |80 |79 |   |   |   |   
|   |   |   |
||  |   |   |   |   |   |   
|   |   |   |
|+--+---+---+---+---+---+---+---+---+---|
| Averages   | $2=vmean(@..@) |   |   |   |   |   |   
|   |   |   |
||  | - |   |   |   |   |   
|   |   |   |
||  |   |   |   |   |   |   
|   |   |   |
  
# Local Variables:
# kept-new-versions: 100
# version-control: t
# End:

-





Re: [O] [calfw] Better use of space

2011-07-22 Thread Rasmus
Hi Masashi,

 I like here
We're trilled that you're here! 

 Thanks for your request and good images.
 I think this request involves 3 functions.

You are probably right. 

 * Time table layout

 I think this function is very difficult, because it needs many study
 for me to implement, including following functions.
 Of course, I consider the time table view is one of the goal of calfw.

Oh, right; it could be done as a seperate view or layout. 

 * Display multiple-lines items (the source splits an item multiple lines.)

 This is not so difficult. In this mechanism, the source objects can
 propose some formats, for example, 15:00 appointment and (15:00-15:30 
 appointment). Then, calfw chooses the suitable format and displays 
 in the current layout algorithm.

It could be a string similar to how BBDB, Gnus and other Emacs mode does
it. See for example (describe-variable 'gnus-summary-line-format).

User could specify calfw:timeview-format %Starttime-%Endtime: %Event
or whatever. 

 * Word-wrapping and folding lines (calfw splits lines within a column.)

 This is little difficult. I think word-wrapping, folding lines and
 truncating strings can not be achieved in the narrow columns
 straightforwardly. I need a time to study this issue.

Hmm, 
I guess the width of column is calculated when generating the view. 
I'll use pseudo-code as my Emacs Lisp isn't great.  
#+begin_src emacs-lisp
  (if ( (calfw:timeview-entry-length) (calfw:column-length))
   (#split-entry after column-length, preferbly after word
# and retur
   )
#+end_src
I hope it makes sense. . . 

–Rasmus

-- 
Sent from my Emacs




Re: [O] calculating column averages

2011-07-22 Thread Rasmus
Jude DaShiell jdash...@shellworld.net writes:

 In this case I don't want to tell org-mode how many rows to calculate, and 
 I put a table together with an averages line in its own footer section.  I 
 prefer when doing these things to output final averages and totals just 
 under table headers then go down into detail records after that.  Could 
 someone take a look at the following table and tell me how to get an 
 average on column 2 of this table?

I am not sure I quite follow but this might be what you're after: 


| Date Stamp | Systalic | Diastalic | Pulse |
|+--+---+---|
| [2011-07-19 Tue 02:26] |  138 |92 |74 |
| [2011-07-21 Thu 03:50] |  128 |79 |76 |
| [2011-07-20 Wed 04:03] |  130 |85 |74 |
| [2011-07-22 Fri 02:33] |  121 |80 |79 |
||  |   |   |
|+--+---+---|
| Averages   |   129.25 |   |   |
#+TBLFM: @7$2=vmean(@2..@-1)


The field @7$2 calculates the average (vmean) from line 2 (@2) to the
line just above itself (@-1).

–Rasmus

-- 
Sent from my Emacs




Re: [O] Remove current heading from refile targets?

2011-07-22 Thread Bastien
Jason Dunsmore emacs-orgm...@dunsmor.com writes:

 Please test this second patch over the previous one.

 That seems to work perfectly.  Thanks again Bastien.

Thanks for confirming.  I've now applied the patch.

-- 
 Bastien



Re: [O] [BABEL, PATCH] ob-maxima.el add variables and graphical output

2011-07-22 Thread Bastien
Hi Eric,

Eric Schulte schulte.e...@gmail.com writes:

 Thanks for this patch, it looks like a definite improvement to Babel's
 maxima support.  Given the size of the patch (well over 10 lines), I
 will hold this until the FSF process completes, at which point I will
 happily apply this to the code base.

Thanks for taking care of this.

I've changed the status of this patch to under review by you in the
patchwork. 

-- 
 Bastien



Re: [O] calculating column averages follow up

2011-07-22 Thread Jude DaShiell
I removed a separator line above averages and removed a row with blank 
fields and ran the calculation on this table and it does have a defective 
formula but I don't know where the defect is now.

| Date Stamp | Systalic | Diastalic | Pulse |   |   |   |   |   |   
|   |
|+--+---+---+---+---+---+---+---+---+---|
| [2011-07-19 Tue 02:26] |  138 |92 |74 |   |   |   |   |   |   
|   |
| [2011-07-21 Thu 03:50] |  128 |79 |76 |   |   |   |   |   |   
|   |
| [2011-07-20 Wed 04:03] |  130 |85 |74 |   |   |   |   |   |   
|   |
| [2011-07-22 Fri 02:33] |  121 |80 |79 |   |   |   |   |   |   
|   |
| Averages   |   #ERROR |   |   |   |   |   |   |   |   
|   |
||  | - |   |   |   |   |   |   |   
|   |
||  |   |   |   |   |   |   |   |   
|   |
#+TBLFM: $2=vmean(@..@)

# Local Variables:
# kept-new-versions: 100
# version-control: t
# End:

-





Re: [O] Need control over insertion point of variables in code blocks

2011-07-22 Thread Dirk Scharff
Hi Bastien,

thanks for pointing that out to me, I'm still new here and to org-mode in 
general (and I really  like it!) ;)  

I'll do that in the future. While a better solution to this would be nice, I'll 
not append this to this subject this time because I don't want to mess up the 
topic structure. I guess Eric will read this, because he didn't miss my mails 
from the other day either.  

Besides I think the remaining question is more a table issue, than a babel one. 
(Well in fact its tables calling babel…) Perhaps I should repost the remaining 
question under a new subject? I'm still not used to this ;) 

Best, 
Dirk


Am 22.07.2011 um 11:23 schrieb Bastien:

 Hi Dirk,
 
 just a small reminder: please add [babel] in the subject line when 
 the question is about Babel -- it makes sure Eric S. won't miss your
 email :)
 
 Best,
 
 -- 
 Bastien




Re: [O] Suggestion: Stackoverflow for Orgmode

2011-07-22 Thread Bastien
Hi all,

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

 Why don't we use the org-mode tag on stackoverflow.com:
 http://stackoverflow.com/questions/tagged/org-mode

 This looks like the perfect solution without all the headaches. :)

Indeed!  Thanks Jason for setting http://ask.orgmode.org up. 

I updated the FAQ section in http://orgmode.org and advertized
the http://ask.orgmode.org link.

-- 
 Bastien



[O] Problems getting dropbox support on MobileOrg

2011-07-22 Thread Stephen Eglen
I have an android phone, and have installed MobileOrg; I'd like to use
the dropbox support.  I seem to have logged in okay via MobileOrg, as I
see Dropbox authentication.  Should the MobileOrg folder 
have been created for me on my Dropbox site?  (It looks like it is
automatically created on the iphone app).  Nothing was created, either
before or after attempting to sync.  So, I then manually created
MobileOrg folder, and tried to Sync again, but no joy.

I have also installed the Dropbox app, and can confirm that my phone can
browse my Dropbox folder using that app.

Any hints for how to debug?  thanks.

Stephen



Re: [O] Problems getting dropbox support on MobileOrg

2011-07-22 Thread Max Mikhanosha
 see Dropbox authentication.  Should the MobileOrg folder 
 have been created for me on my Dropbox site?  (It looks like it is
 automatically created on the iphone app).  Nothing was created, either
 before or after attempting to sync.  So, I then manually created
 MobileOrg folder, and tried to Sync again, but no joy.

No you need to create the folder from the Emacs side.

Example setup;

1. Install dropbox on your linux/windows box
2. Make sure its started (setsid ~/.dropbox-dist/dropboxd)
3. mkdir ~/Dropbox/syncdir
4. From emacs 
   (setq org-mobile-directory ~/Dropbox/syncdir)
   M-x org-mobile-push
5. From Android, Settings - Configure Synchronizer - Path
  /syncdir/index.org

6. From Android: Sync  Enjoy

I recently submitted a few patches for org-mobile android developer,
that fix a few annoying problems (ie back button resetting the view to
1st element), there should be a new version released soon with these fixes.





Re: [O] calculating column averages follow up

2011-07-22 Thread Nick Dokos
Jude DaShiell jdash...@shellworld.net wrote:

 I removed a separator line above averages and removed a row with blank 
 fields and ran the calculation on this table and it does have a defective 
 formula but I don't know where the defect is now.
 
 | Date Stamp | Systalic | Diastalic | Pulse |   |   |   |   |   | 
   |   |
 |+--+---+---+---+---+---+---+---+---+---|
 | [2011-07-19 Tue 02:26] |  138 |92 |74 |   |   |   |   |   | 
   |   |
 | [2011-07-21 Thu 03:50] |  128 |79 |76 |   |   |   |   |   | 
   |   |
 | [2011-07-20 Wed 04:03] |  130 |85 |74 |   |   |   |   |   | 
   |   |
 | [2011-07-22 Fri 02:33] |  121 |80 |79 |   |   |   |   |   | 
   |   |
 | Averages   |   #ERROR |   |   |   |   |   |   |   | 
   |   |
 ||  | - |   |   |   |   |   |   | 
   |   |
 ||  |   |   |   |   |   |   |   | 
   |   |
 #+TBLFM: $2=vmean(@..@)
 

Two problems: 1) you want to set a single cell but the way the formula is 
written
makes it a column formula  and 2) the rows as written include the header line 
and go
all the way to the bottom - assuming you want the two rows after the Averages 
row,
you can say

#+TBLFM: @$2=vmean(@..@)

That says the third row from the bottom in column two is the mean of the rows 
in the
same column, ranging from second from the top to fourth from the bottom.

I thought I could use references relative to @ (e.g. @-3) but apparently 
that's
not the case:

#+TBLFM: @$2=vmean(@..@-3)

does not work for me.

Nick




[O] Ruby on Aquamacs

2011-07-22 Thread Juri Artamonov
Hello,

I'm using Aquamacs 2.2 for Mac OS X as text editor and would like to develop
some code on ruby and then ruby on rails. How I can have syntax highlighting
on Aquamacs? If I wrote some code already and put it to the file then how I
can run it from Aquamacs?

Thank you,

   Juri.


Re: [O] Ruby on Aquamacs

2011-07-22 Thread Dirk Scharff
Hi Juri

I guess you are kind of wrong here, because this list deals with org-mode for 
emacs, not with ruby or emacs in general. But to give you a starting point I'd 
suggest you read this 
http://stackoverflow.com/questions/2429373/tips-and-tricks-for-using-emacs-to-develop-a-ruby-on-rails-app
 . Most of the time the emacs and the Aquamacs configuration will be the same 
as far as I know. 

Regards,
Dirk.
 
Am 22.07.2011 um 13:16 schrieb Juri Artamonov:

 Hello,
 
 I'm using Aquamacs 2.2 for Mac OS X as text editor and would like to develop 
 some code on ruby and then ruby on rails. How I can have syntax highlighting 
 on Aquamacs? If I wrote some code already and put it to the file then how I 
 can run it from Aquamacs?
 
 Thank you,
 
Juri.
 



[O] Exporting org-babel to HTML fails (uses copy-seq instead of copy-sequence in ob.el)

2011-07-22 Thread Sébastien Delafond
Hello,

From Debian bug #634695[0]:

  the babel part of org-mode uses copy-seq on line 758, where in fact, I
  think, it should be using copy-sequence. Or is there a valid reason for
  this? At least, it makes exporting org-mode documents to HTML impossible
  if they use babel features. That bug seems to be also present upstream
  (I checked commit ce2a33104b0e724b5227445cf5d5ceb240783870).

The following patch, contributed by the bug submitter, seems to fix it.

Cheers,

--Seb

--- org-mode-7.6.orig/lisp/ob.el
+++ org-mode-7.6/lisp/ob.el
@@ -755,7 +755,7 @@ the current subtree.
 lst)
 (norm (arg)
   (let ((v (if (listp (cdr arg))
-   (copy-seq (cdr arg))
+   (copy-sequence (cdr arg))
  (cdr arg
 (when (and v (not (and (sequencep v)
(not (consp v))




Re: [O] Suggestion: Stackoverflow for Orgmode

2011-07-22 Thread Bastien
Hi all,

Bastien b...@gnu.org writes:

 I updated the FAQ section in http://orgmode.org and advertized
 the http://ask.orgmode.org link.

I've also added a section to the Org FAQ listing the last five 
questions from StackOverflow:

  http://orgmode.org/worg/org-faq.html#sec-1

I think this might be a good way to encourage people to contribute 
to answers on StackOverflow and to keep both area quite in sync.

Let me know if you think it's relevant.

Thanks,

-- 
 Bastien



Re: [O] Suggestion: Stackoverflow for Orgmode

2011-07-22 Thread Rainer M Krug
On Fri, Jul 22, 2011 at 2:23 PM, Bastien b...@altern.org wrote:

 Hi all,

 Bastien b...@gnu.org writes:

  I updated the FAQ section in http://orgmode.org and advertized
  the http://ask.orgmode.org link.

 I've also added a section to the Org FAQ listing the last five
 questions from StackOverflow:

  http://orgmode.org/worg/org-faq.html#sec-1

 I think this might be a good way to encourage people to contribute
 to answers on StackOverflow and to keep both area quite in sync.

 Let me know if you think it's relevant.


Absolutely. But what about sending once a week an automated email to the
mailing list with the last not answered questions? That would keep the two
even more in sync.

I do not think that one can submit questions to stackoverflow via email?

Rainer



 Thanks,

 --
  Bastien




-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax (F):   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug


Re: [O] Python script to download Google Calendar events

2011-07-22 Thread Rasmus

Hi Felix, 

Felix Geller fgel...@gmail.com writes:

 I wrote a Python script that [1] uses the GData API to download events
 for your Google Calendar and prints them to a given org-file. It is a
 very tiny script, but perhaps it is of use to other people as well.

Now I've had some time to play around with your script and it is very
nice and fast. I tingled a bit with it.

I (think) I have added support for other calendars using the
https://.*/private/full urls. I've also added a category.

Thus, one can specify gcal2org.py n...@gpost.com file uri 

and if uri is left out it will work as your script. 

I have hosted the alternative script here:

  http://andromeda.kiwilight.com/~pank/gcal2org.txt (no .py allowed)
  http://andromeda.kiwilight.com/~pank/gcal2org.diff

The thing is, I don't know where you find these private/full urls in the
web-interface. I found them via Gdata. Optimally, it should just use
one of the urls from the web-interface.

Cheers,
Rasmus

-- 
Sent from my Emacs




Re: [O] Python script to download Google Calendar events

2011-07-22 Thread Rasmus

Hi Felix, 

Felix Geller fgel...@gmail.com writes:

 I wrote a Python script that [1] uses the GData API to download events
 for your Google Calendar and prints them to a given org-file. It is a
 very tiny script, but perhaps it is of use to other people as well.

Now I've had some time to play around with your script and it is very
nice and fast. I tingled a bit with it.

I (think) I have added support for other calendars using the
https://.*/private/full urls. I've also added a category.

Thus, one can specify gcal2org.py n...@gpost.com file uri 

and if uri is left out it will work as your script. 

I have hosted the alternative script here:

  http://andromeda.kiwilight.com/~pank/gcal2org.txt (no .py allowed)
  http://andromeda.kiwilight.com/~pank/gcal2org.diff

The thing is, I don't know where you find these private/full urls in the
web-interface. I found them via Gdata. Optimally, it should just use
one of the urls from the web-interface.

Cheers,
Rasmus

-- 
Sent from my Emacs




Re: [O] Ruby on Aquamacs

2011-07-22 Thread Juri Artamonov
Dirk,

Thank you very much. Looks like I posted to different mailing list. Thank
you for link.

Juri.

On Fri, Jul 22, 2011 at 12:22 PM, Dirk Scharff
dirk.scha...@googlemail.comwrote:

 Hi Juri

 I guess you are kind of wrong here, because this list deals with org-mode
 for emacs, not with ruby or emacs in general. But to give you a starting
 point I'd suggest you read this
 http://stackoverflow.com/questions/2429373/tips-and-tricks-for-using-emacs-to-develop-a-ruby-on-rails-app.
  Most of the time the emacs and the Aquamacs configuration will be the same
 as far as I know.

 Regards,
 Dirk.

 Am 22.07.2011 um 13:16 schrieb Juri Artamonov:

 Hello,

 I'm using Aquamacs 2.2 for Mac OS X as text editor and would like to
 develop some code on ruby and then ruby on rails. How I can have syntax
 highlighting on Aquamacs? If I wrote some code already and put it to the
 file then how I can run it from Aquamacs?

 Thank you,

Juri.





Re: [O] Suggestion: Stackoverflow for Orgmode

2011-07-22 Thread Bastien
Hi Rainer,

Rainer M Krug r.m.k...@gmail.com writes:

 Absolutely. But what about sending once a week an automated email to
 the mailing list with the last not answered questions? 

I'm not sure about this: in this case, will people answer on the 
mailing list or on SO?   I'd rather have people answer on the ml,
and point to those answers (or to Worg's  sections) on SO.

I see SO as a place for newcomers -- the more newcomers joining
reading information on the mailing list / Worg, the better.

 That would keep the two even more in sync.

I doubt this is realistic.  

Paying attention to questions on SO is fine, but IMHO keeping 
things as centralized as possible is a higher priority, let's try 
to avoid duplicate work!

Is there someone here regularily trying to answer questions on
SO?  If so, that'd ideal: this person could make sure interesting
questions/answers reach the right place any time.

 I do not think that one can submit questions to stackoverflow via
 email?

I don't know...  would be cool.

Best,

-- 
 Bastien



Re: [O] Exporting org-babel to HTML fails (uses copy-seq instead of copy-sequence in ob.el)

2011-07-22 Thread Bastien
Hi Sébastien,

Sébastien Delafond sdelaf...@gmail.com writes:

From Debian bug #634695[0]:

   the babel part of org-mode uses copy-seq on line 758, where in fact, I
   think, it should be using copy-sequence. Or is there a valid reason for
   this? At least, it makes exporting org-mode documents to HTML impossible
   if they use babel features. That bug seems to be also present upstream
   (I checked commit ce2a33104b0e724b5227445cf5d5ceb240783870).

 The following patch, contributed by the bug submitter, seems to fix
 it.

Eric already fixed this (although differently) in this commit:
  
http://orgmode.org/w/?p=org-mode.git;a=commit;h=4b6bfab81741552697c4666488bcad00e33bc881

Thanks,

-- 
 Bastien



Re: [O] Need control over insertion point of variables in code blocks

2011-07-22 Thread Bastien
Hi Dirk,

Dirk Scharff dirk.scha...@googlemail.com writes:

 Perhaps I should repost the remaining question under a new subject?
 I'm still not used to this ;)

The list is quite informal, but we try to stick to a
one-problem/one-thread policy -- it makes things easier.

Thanks!

-- 
 Bastien



Re: [O] [PATCH 1/2] Fix error with %e agenda prefix format when there is no effort set

2011-07-22 Thread Bastien
Hi Max,

thanks for the patch.

Max Mikhanosha m...@openchat.com writes:

 `org-agenda-prefix-format' has un undocumented format %e for Effort, which
 is broken. it throws error on entries without effort property.

Yep, right.

 Following patch fixes that problem. TODO: make agenda redraw current line
 when `org-agenda-set-effort' sets a new effort

 From c06b376737142eff5cdec71e8fc8129552aba673 Mon Sep 17 00:00:00 2001
 From: Max Mikhanosha m...@openchat.com
 Date: Wed, 6 Jul 2011 20:05:06 -0400
 Subject: [PATCH 1/2] Fix error with %e agenda prefix format when there is no 
 effort set

 ---
  lisp/org-agenda.el |5 -
  1 files changed, 4 insertions(+), 1 deletions(-)

 diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
 index cd09a74..f34ffae 100644
 --- a/lisp/org-agenda.el
 +++ b/lisp/org-agenda.el
 @@ -5511,7 +5511,9 @@ Any match of REMOVE-RE will be removed from TXT.
   (error nil)))
   (when effort
 (setq neffort (org-duration-string-to-minutes effort)
 - effort (setq effort (concat [ effort ] )
 + effort (setq effort (concat [ effort ])
 +  ;; prevent erroring out with %e format when there is no effort
 +  (or effort (setq effort ))
  
(when remove-re
   (while (string-match remove-re txt)
 @@ -5549,6 +5551,7 @@ Any match of REMOVE-RE will be removed from TXT.
(= (length category) org-prefix-category-max-length))
   (setq category (substring category 0 (1- 
 org-prefix-category-max-length)
;; Evaluate the compiled format
 +  (assert effort)

Why is this needed?  

(setq rtn (concat (eval org-prefix-format-compiled) txt))
  
;; And finally add the text properties

Thanks,

-- 
 Bastien



Re: [O] Commenting a diary sexp line??

2011-07-22 Thread Bastien
Hi Suvayu,

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

 So my question is, should org be ignoring the COMMENT keyword on
 headlines when a sexp is present. I would be inclined to call this a
 bug as a scheduled headline would be ignored in the presence of
 COMMENT.

Mh..  COMMENT originally means do not export.  But I understand your
proposal.  I'm reluctant to implement this as I think you can already
set up your custom agenda views to ignore COMMENT headlines.

But I'm open to suggestions.

Thanks,

-- 
 Bastien



[O] [DEV]

2011-07-22 Thread Matthew Sauer
Hello all,

I have decided to work on a startup dot el package geared around
orgmode.  I want to get it up to a basic functionality before I allow
it to be distributed and I know I still have some work to do to get it
to that point.

My first goal is have a file open on either the left or the right and
a somewhat customizable agenda buffer on the other side.  What I am
trying to accomplish is the providing of a easy to use interface for
beginners in org-mode to get started and use it for task/project
management.

The agenda view will be a user definable number of days calendar with
a user defined number of days in the future view of upcoming deadlines
or just unscheduled deadlines (a choice between the two may have to be
implemented in the future as my skills grow and more contribute?) and
at the bottom we would find TODO keywords (maybe I need to change this
to != all not done keywords in the future) that are not scheduled and
do not have a deadline on them (kind of a someday/sometime todos).

What I am needing to know is about adding an agenda view via a .el
file to the custom agenda views.  Could I do that, something like
this:
-Cut here---start code---cut here---start code-
(add-to-list
 '(org-agenda-custom-commands
   (quote
(
 (s Startup View
--Cut Here---end codecut hereend code
When I get my basic idea for the package outlined a little more I will
ask for some help with testing on it at the github I have setup.

Thank you in advance for your suggestions/support and feedback.

--

Matthew



Re: [O] Can't follow links with id property

2011-07-22 Thread Bastien
Hi Suvayu,

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

 I can't follow links with an ID property. I have attached a minimal
 example org file. Org complains it cannot find a match and prompts to
 create a new headline. Answering yes to the prompt creates a new
 headline like this:

 * id:9dfdc23e-f9ce-413b-b950-fc20fd152e42

I cannot reproduce this with Emacs 23.3 and 24.0.50.

Do you have any setup wrt ids?  (C-h v org-id-*)

Or maybe your method for generating ids changes between the 
moment your created this one and the moment your tried to
open it?  

Thanks for further information,

-- 
 Bastien



Re: [O] DONE all subtasks recursively

2011-07-22 Thread Bastien
Hi Bernt,

Bernt Hansen be...@norang.ca writes:

 (defun bh/mark-subtree-done ()
   (interactive)
   (org-mark-subtree)
   (let ((limit (point)))
 (save-excursion
   (exchange-point-and-mark)
   (while ( (point) limit)
   (org-todo DONE)
   (outline-previous-visible-heading 1))
   (org-todo DONE

 Then M-x bh/mark-subtree-done.

Thanks for this -- I added an entry in Worg/org-hacks.html

Best,

-- 
 Bastien



Re: [O] Can't follow links with id property

2011-07-22 Thread suvayu ali
Hi Bastien,

On Fri, Jul 22, 2011 at 3:48 PM, Bastien b...@altern.org wrote:
 Hi Suvayu,

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

 I can't follow links with an ID property. I have attached a minimal
 example org file. Org complains it cannot find a match and prompts to
 create a new headline. Answering yes to the prompt creates a new
 headline like this:

 * id:9dfdc23e-f9ce-413b-b950-fc20fd152e42

 I cannot reproduce this with Emacs 23.3 and 24.0.50.

 Do you have any setup wrt ids?  (C-h v org-id-*)


I don't have any org-id related customisations. This is the first time
I am trying them out. :-p

 Or maybe your method for generating ids changes between the
 moment your created this one and the moment your tried to
 open it?


When I tried to replicate this, I got the same behaviour as before. Then
I tried creating the ids again (with org-id-get-create) and tried
following the links and it worked!

So far this is what I have figured out. If you
1. create the ids
2. link to it
3. try to follow the link (all in the same session)
everything works. But now if you save the file and reopen it in a new
session and try to follow those same links, it fails with the error I
reported earlier. Now if you call org-id-get-create on the linked
headline and go back to the link and try to follow it again, it works as
expected! I think org-id-get-create does something that resolves the
problem. So maybe the issue is with `org-open-at-point'.

 --
  Bastien


Hopefully this is more consistently reproducible.

PS: I tested starting with emacs -Q -l ~/.emacs.d/minimal-org.el

-- 
Suvayu

Open source is the future. It sets us free.



[O] [PATCH 1/2] org-odt: Improve customization of org-export-odt-styles-file

2011-07-22 Thread Jambunathan K

 I am seeing that customization interface for org-export-odt-styles-file
 variable is only partially done. If the customization interface doesn't
 do the right thing for you, you can use the setq form temporarily.

The attached patch takes care of the above issue.

From fe6cc741850cdfca4bd9577430f744208957e3eb Mon Sep 17 00:00:00 2001
From: Jambunathan K kjambunat...@gmail.com
Date: Fri, 22 Jul 2011 16:37:33 +0530
Subject: [PATCH 1/2] org-odt: Improve customization of 
org-export-odt-styles-file

* contrib/lisp/org-odt.el (org-odt-data-dir)
(org-export-odt-automatic-styles-file): Update docstring.
(org-export-odt-use-bookmarks-for-internal-links): Update
docstring. Improve customization interface.
---
 contrib/lisp/org-odt.el |   60 --
 1 files changed, 47 insertions(+), 13 deletions(-)

diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el
index ea4e32b..c1c5b7f 100644
--- a/contrib/lisp/org-odt.el
+++ b/contrib/lisp/org-odt.el
@@ -73,7 +73,16 @@
 (cond
  ((file-directory-p dir1) dir1)
  ((file-directory-p dir2) dir2)
- (t (error Cannot find factory styles file. Check package dir layout)
+ (t (error Cannot find factory styles file. Check package dir layout
+  Directory that holds auxiliary files used by the ODT exporter.
+
+The 'styles' subdir contains the following xml files -
+ 'OrgOdtStyles.xml' and 'OrgOdtAutomaticStyles.xml' - which are
+ used as factory settings of `org-export-odt-styles-file' and
+ `org-export-odt-automatic-styles-file'.
+
+The 'etc/schema' subdir contains rnc files for validating of
+OpenDocument xml files.)
 
 (defvar org-odt-file-extensions
   '((odt . OpenDocument Text)
@@ -135,22 +144,47 @@
 (org-lparse-register-backend 'odt)
 
 (defcustom org-export-odt-automatic-styles-file nil
-  Default style file for use with ODT exporter.
+  Automatic styles for use with ODT exporter.
+If unspecified, the file under `org-odt-data-dir' is used.
   :type 'file
   :group 'org-export-odt)
 
-;; TODO: Make configuration user-friendly.
 (defcustom org-export-odt-styles-file nil
-  Default style file for use with ODT exporter.
-Valid values are path to an styles.xml file or a path to a valid
-*.odt or a *.ott file or a list of the form (FILE (MEMBER1
-MEMBER2 ...)). In the last case, the specified FILE is unzipped
-and MEMBER1, MEMBER2 etc are copied in to the generated odt
-file. The last form is particularly useful if the styles.xml has
-reference to additional files like header and footer images.
-
-  :type 'file
-  :group 'org-export-odt)
+  Default styles file for use with ODT export.
+Valid values are one of:
+1. nil
+2. path to a styles.xml file
+3. path to a *.odt or a *.ott file
+4. list of the form (ODT-OR-OTT-FILE (FILE-MEMBER-1 FILE-MEMBER-2
+...))
+
+In case of option 1, an in-built styles.xml is used. See
+`org-odt-data-dir' for more information.
+
+In case of option 3, the specified file is unzipped and the
+styles.xml embedded therein is used.
+
+In case of option 4, the specified ODT-OR-OTT-FILE is unzipped
+and FILE-MEMBER-1, FILE-MEMBER-2 etc are copied in to the
+generated odt file.  Use relative path for specifying the
+FILE-MEMBERS.  styles.xml must be specified as one of the
+FILE-MEMBERS.
+
+Use options 1, 2 or 3 only if styles.xml alone suffices for
+achieving the desired formatting.  Use option 4, if the styles.xml
+references additional files like header and footer images for
+achieving the desired formattting.
+  :group 'org-export-odt
+  :type
+  '(choice
+(const :tag Factory settings nil)
+(file :must-match t :tag styles.xml)
+(file :must-match t :tag ODT or OTT file)
+(list :tag ODT or OTT file + Members
+ (file :must-match t :tag ODF Text or Text Template file)
+ (cons :tag Members
+   (file :tag Member styles.xml)
+   (repeat (file :tag Member))
 
 (defconst org-export-odt-tmpdir-prefix odt-)
 (defconst org-export-odt-bookmark-prefix OrgXref.)
-- 
1.7.2.3



[O] [PATCH 2/2] org-odt: Check for zip early during export (was Re: org-odt on Windows 7)

2011-07-22 Thread Jambunathan K
sebastian.t...@unina.it writes:

 Hello,

 I tried the new org-odt exporter in org-mode 7.6 running emacs 23.3
 on Windows 7 with (org-export-as-odt). It stops before generating an
 output with the error message: Searching for program: no such file or
 directory, zip. I guess it is caused by not having a command line
 version of zip in Windows.

The simple patch below tries to check for availability of zip very early
in the export.

From 043a85d0826eb9a6a1e28792b8a701c74ff18623 Mon Sep 17 00:00:00 2001
From: Jambunathan K kjambunat...@gmail.com
Date: Fri, 22 Jul 2011 16:54:40 +0530
Subject: [PATCH 2/2] org-odt: Check for zip early during export

* contrib/lisp/org-odt.el (org-odt-init-outfile): Abort export
if zip utility is not available.
---
 contrib/lisp/org-odt.el |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el
index c1c5b7f..b7e5a70 100644
--- a/contrib/lisp/org-odt.el
+++ b/contrib/lisp/org-odt.el
@@ -1226,6 +1226,10 @@ MAY-INLINE-P allows inlining it as an image.
 (apply 'org-lparse-format-tags tag text prefix suffix args)))
 
 (defun org-odt-init-outfile (filename)
+  (unless (executable-find zip)
+;; Not at all OSes ship with zip by default
+(error Executable \zip\ needed for creating OpenDocument files. 
Aborting.))
+
   (let* ((outdir (make-temp-file org-export-odt-tmpdir-prefix t))
 (mimetype-file (expand-file-name mimetype outdir))
 (content-file (expand-file-name content.xml outdir))
-- 
1.7.2.3





 Is there a way to use org-odt under windows?

 Best,

 Sebastian




-- 


Re: [O] Exporting org-babel to HTML fails (uses copy-seq instead of copy-sequence in ob.el)

2011-07-22 Thread Sébastien Delafond
On 2011-07-22, Bastien b...@altern.org wrote:
 Eric already fixed this (although differently) in this commit:
   
 http://orgmode.org/w/?p=org-mode.git;a=commit;h=4b6bfab81741552697c4666488bcad00e33bc881

Ah sorry, I missed that ; thanks for following up :)

Cheers,

--Seb




Re: [O] [PATCH 1/2] org-odt: Improve customization of org-export-odt-styles-file

2011-07-22 Thread Bastien
Jambunathan K kjambunat...@gmail.com writes:

 I am seeing that customization interface for org-export-odt-styles-file
 variable is only partially done. If the customization interface doesn't
 do the right thing for you, you can use the setq form temporarily.

 The attached patch takes care of the above issue.

Applied, thanks!

-- 
 Bastien



Re: [O] [PATCH 2/2] org-odt: Check for zip early during export (was Re: org-odt on Windows 7)

2011-07-22 Thread Bastien
Jambunathan K kjambunat...@gmail.com writes:

 I tried the new org-odt exporter in org-mode 7.6 running emacs 23.3
 on Windows 7 with (org-export-as-odt). It stops before generating an
 output with the error message: Searching for program: no such file or
 directory, zip. I guess it is caused by not having a command line
 version of zip in Windows.

 The simple patch below tries to check for availability of zip very early
 in the export.

Applied, thanks!

-- 
 Bastien



Re: [O] [PATCH 1/2] Fix error with %e agenda prefix format when there is no effort set

2011-07-22 Thread Max Mikhanosha

  (setq category (substring category 0 (1- 
  org-prefix-category-max-length)
 ;; Evaluate the compiled format
  +  (assert effort)
 
 Why is this needed?  

Oops left that in accidentally. If you hold on for a few days, I'll
send a more complete patch implementing:

1. Refresh the %e effort displayed on agenda line after it changed by 
(org-agenda-set-effort)

2. Two new commands, org-agenda-effort-up, org-agenda-effort-down,
that would shift the effort up/down to the next value, with suggested
bindings of M-Left and M-Right, which will allow effortless editing of
efforts in Agenda







Re: [O] Commenting a diary sexp line??

2011-07-22 Thread suvayu ali
Hi Bastien,

On Fri, Jul 22, 2011 at 3:42 PM, Bastien b...@altern.org wrote:
 I think you can already
 set up your custom agenda views to ignore COMMENT headlines.

Could you point me to it? I did an apropos search for org agenda
ignore but all I could find was ignoring based on timestamps.

Thanks,

-- 
Suvayu

Open source is the future. It sets us free.



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

2011-07-22 Thread Jason Dunsmore
Carsten Dominik carsten.domi...@gmail.com writes:

 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?
 
 It's a significant problem for me.  I still use org-remember because 1)
 org-capture inserts an extra blank line

 Do you also mean at the beginning of the file, or elsewhere?

 and 2) canceling a capture
 doesn't work for some reason - I get the following message:
 
 org-capture-finalize: Capture process aborted, but target buffer could not 
 be cleaned up correctly

 can you make a minimal example to demonstrate this issue?
 I would like to fix it.

While attempting to make a minimal example of this, I narrowed down the
problem to using :unnarrowed t in my org-capture-templates.  Since I
removed it, there is no extra line and the buffer gets cleaned up when I
type C-c C-k.  I've finally made the switch to org-capture.  Thanks!



Re: [O] convert html file into orgmode .org file?

2011-07-22 Thread brian powell
* This worked for me:
** apt-get install pandoc
* Booted up an EMACS that has the menus enabled.
** Install pandoc-mode.el (see
http://wwwuser.gwdg.de/~jkremer/pandoc-mode.html )
** Goto buffer with .html doc in it.
*** Get OrgMode and PanDocMode running simultaneously in the same buffer.
** Click on the PanDoc menus in EMACS:
*** Chose PanDoc-Files-OutputFile-SetOutputFile (and I typed /tmp/test.org)
*** Chose PanDoc-OutputFormat-OrgMode
*** Chose PanDoc-RunPanDoc
* /tmp/test.org was created--looked pretty good; but, your mileage
may vary--depends on the structure of the HTML file.
** PanDoc has a lot of filetype conversions!
** I often use html2csv --by Author: Sébastien SAUVAGE sebsauvage
at sebsauvage dot net http://sebsauvage.net
*** And/or use PERL or EMACS to go the rest of the way.

Thanks Puneeth for the link to PanDoc (and the sublink to PanDocMode for EMACS)!

* PanDoc also has interesting file inclusion and elisp “double-at
directives”: See
http://wwwuser.gwdg.de/~jkremer/pandoc-mode-manual.pdf
** Someone sought to include the markdown in their doc I believe.
** Can do things like this (when using PanDoc/PanDoc-mode.el

@@include{blah.txt}

@@lisp{(format-time-string %d %b %Y)}


On Thu, Jul 21, 2011 at 3:34 PM, Charles Philip Chan cpc...@bell.net wrote:
 #secure method=pgpmime mode=sign
 Puneeth Chaganti puncha...@gmail.com writes:

 Org-mode cannot import html files.  But, you could try using Pandoc[1]
 for this.

 [1] - http://johnmacfarlane.net/pandoc/

 There is also an Emacs mode for pandoc:

 http://user.uni-frankfurt.de/~kremers/pandoc-mode.html

 Charles

 --
 Why use Windows, since there is a door?
 (By fac...@galileo.rhein-neckar.de, Andre Fachat)





Re: [O] [PATCH] Fix %e agenda format and refresh of agenda items in general

2011-07-22 Thread Max Mikhanosha
Here is an updated patch, its split into 3 very small part, belowe is
an explanaton of each:

1. First patch is my original patch to fix error with %e agenda format.

2. Second patch fixes what I beleive to be a logic bug. Most agenda
related commands have the following format:

  (defun org-agenda-do-STUFF ()

   (org-with-remote-undo buffer
  (with-current-buffer buffer

;; change the item
(call-interactively 'org-do-STUFF)
(setq newhead (org-get-heading)))

 ;; refresh agenda lines that have same marker
 (org-agenda-change-all-lines newhead hdmarker))) 

The problem is with (org-agenda-change-all-lines). It calls
(org-format-agenda-item) on each item, but with the current buffer
being the agenda buffer and not the original item's buffer.

Also (org-format-agenda-item) expects the agenda item format to be in
the variable org-prefix-format-compiled. But when called by
(org-agenda-change-all-lines), that variable is not restored, and
instead has stale value from the last block of the agenda.

This causes the items to be randomly reformatted with last block's
agenda format, when they are changed.

My second patch fixes above problem, by making
(org-agenda-change-all-lines) call (org-format-agenda-item) in the
same way as when item was originally generated including changing
to the item's buffer, and restoring the correct compiled format variable.

3. Third patch changes (org-agenda-set-effort) to refresh the item. It requires
the 2nd patch to work.




0003-Fix-error-with-e-agenda-prefix-format-when-there-is-.patch
Description: Binary data


0007-org-agenda-change-all-lines-Change-to-item-s-buffer-.patch
Description: Binary data


0008-org-agenda-set-effort-Refresh-changed-lines.patch
Description: Binary data


[O] New version which is compatible with emacs 24: New function to view your notes in chronological order

2011-07-22 Thread Marc-Oliver Ihm
Hello !

Unfortunately, org-find-timestamps as posted before was not compatible with 
emacs 24.
(More precise, it hat problems with the read-only property, that emacs 24 
applies to text within the occur-buffer)

The version below is now compatible with both emacs 23 and 24.


Have fun !

with kind regards, Marc-Oliver Ihm



(defun org-find-timestamps ()
  Find inactive timestamps within a date-range and maybe sort them.

This function can help to bring the notes, that you take within
org-mode, into a chronological order, even if they are scattered
among many different nodes. The result is somewhat like a diary,
listing your notes for each successive day. Please be aware
however: This intended usage requires, that you routinely
insert inactive timestamps into the notes that you write.

org-find-timstamps works by creating a regular expression to
match a given range of dates, doing a search for it and
displaying the results either as a sparse tree or with the help
of occur. The original buffer is not modified.

  (interactive)
  (let ((occur-buffer-name *Occur*)
(occur-header-regex ^[0-9]+ match\\(es\\)?) ;; regexp to match for 
header-lines in *Occur* buffer
first-date 
last-date 
pretty-dates
swap-dates
(days 0) 
date-regex
position-before-year
collect-method
buff
org-buffers)
(save-window-excursion
  ;; temporary buffer for date-manipulations
  (with-temp-buffer
;; ask user for date-range
(setq last-date (org-read-date nil nil nil End date (or start):  nil 
nil))
(setq first-date (org-read-date nil nil nil Start date (or end):  nil 
nil))
;; swap dates, if required
(when (string last-date first-date)
  (setq swap-dates last-date)
  (setq last-date first-date)
  (setq first-date swap-dates))
(setq pretty-dates (concat from  first-date  to  last-date))
;; construct list of dates in working buffer
;; loop as long we did not reach end-date
(while (not (looking-at-p last-date))
  (end-of-buffer)
  ;; only look for inactive timestamps
  (insert [)
  (setq position-before-year (point))
  ;; Monday is probably wrong, will be corrected below
  (insert first-date  Mo]\n) 
  (goto-char position-before-year)
  ;; advance number of days and correct day of week
  (org-timestamp-change days 'day) 
  (setq days (1+ days))
  )
(end-of-buffer)
;; transform constructed list of dates into a single, optimized regex
(setq date-regex (regexp-opt (split-string (buffer-string) \n t)))
)
  )
;; ask user, which buffers to search and how to present results
(setq collect-method 
  (car (split-string (org-icompleting-read Please choose, which 
buffers to search and how to present the matches:  '(multi-occur -- all 
org-buffers, list org-occur -- this-buffer, sparse tree) nil t nil nil 
occur -- this buffer, list)))
  )
;; Perform the actual search
(save-window-excursion
  (cond ((string= collect-method occur)
 (occur date-regex)
 )
((string= collect-method org-occur)
 (if (string= major-mode org-mode)
 (org-occur date-regex)
   (error Buffer not in org-mode))
 )
((string= collect-method multi-occur)
 ;; construct list of all org-buffers
 (dolist (buff (buffer-list))
   (set-buffer buff)
   (if (string= major-mode org-mode)
   (setq org-buffers (cons buff org-buffers
 (multi-occur org-buffers date-regex)))
  )
;; Postprocessing: Optionally sort buffer with results
;; org-occur operates on the current buffer, so we cannot modify its 
results afterwards
(if (string= collect-method org-occur)
(message (concat Sparse tree with matches  pretty-dates))
  ;; switch to occur-buffer and modify it
  (if (not (get-buffer occur-buffer-name))
  (message (concat Did not find any matches  pretty-dates))
(let ((original-inhibit-read-only inhibit-read-only))
  (unwind-protect 
  (progn
;; next line might be risky, so we unwind-protect it
(setq inhibit-read-only t)
(set-buffer occur-buffer-name)
(goto-char (point-min))
;; beautify the occur-buffer by replacing the potentially long 
original regexp
(while (search-forward (concat  for \ date-regex \) nil t)
  (replace-match  nil t))
(goto-char (point-min))
;; Sort results by matching date ?
(when (y-or-n-p Sort results by date ? )
  (when (string= collect-method multi-occur)
;; bring all header lines ('xx matches for 

[O] Crashing bug in spreadsheet

2011-07-22 Thread Ken.Williams
Hi,  I had the following text in a table, and hit tab in the
bottom-right cell:

| Who | Amt |
|-+-|
| A   |   36.70 |
| A   |  679.96 |
| B   |  192.31 |
| B   | 2500.03 |
| B   |   74.47 |
| C   |   26.64 |
| D   |   82.00 |
|-+-|
| | :=vsum(@II..@III)   |



This caused CPU usage to peg to 100%, and Emacs to hang until killed.
Probably because of the invalid reference, I guess.

I'm using a fairly recent snapshot of org-mode 7.6, and Aquamacs 2.2 on OS
X Snow Leopard.


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




Re: [O] org-timestamp-up/down broken in tip

2011-07-22 Thread Nicolas Goaziou
Here is the second attempt to fix both that problem and the original
one.

Regards,

-- 
Nicolas Goaziou
From f3af2f87996312a0975a5395bdbbc8feaab59641 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou n.goaz...@gmail.com
Date: Fri, 22 Jul 2011 22:05:44 +0200
Subject: [PATCH] Keep point in the same category when updating a time-stamp

* lisp/org.el (org-timestamp-change): keep point in the same category
  when updating a time-stamp. This requires to be careful, as,
  depending on the locale, name of day might change of length during
  the process.
---
 lisp/org.el |   33 -
 1 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 54f931a..815f016 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15582,7 +15582,7 @@ With prefix ARG, change that many days.
 The date will be changed by N times WHAT.  WHAT can be `day', `month',
 `year', `minute', `second'.  If WHAT is not given, the cursor position
 in the timestamp determines what will be changed.
-  (let ((pos (point))
+  (let ((origin (point)) origin-cat
 	with-hm inactive
 	(dm (max (nth 1 org-time-stamp-rounding-minutes) 1))
 	org-ts-what
@@ -15592,6 +15592,10 @@ in the timestamp determines what will be changed.
 	(error Not at a timestamp))
 (if (and (not what) (eq org-ts-what 'bracket))
 	(org-toggle-timestamp-type)
+  ;; Point isn't on brackets.  Remember the part of the time-stamp
+  ;; the point was in.  Indeed, size of time-stamps may change,
+  ;; but point must be kept in the same category nonetheless.
+  (setq origin-cat org-ts-what)
   (if (and (not what) (not (eq org-ts-what 'day))
 	   org-display-custom-times
 	   (get-text-property (point) 'display)
@@ -15642,11 +15646,30 @@ in the timestamp determines what will be changed.
 	(setcar (nthcdr 1 time0) (or (nth 1 time0) 0))
 	(setcar (nthcdr 2 time0) (or (nth 2 time0) 0))
 	(setq time (apply 'encode-time time0
-  (setq org-last-changed-timestamp
-	(org-insert-time-stamp time with-hm inactive nil nil extra))
+  ;; Insert the new time-stamp, and ensure point stays in the same
+  ;; category as before (i.e. not after the last position in that
+  ;; category).
+  (let ((pos (point)))
+	;; Stay before inserted string. `save-excursion' is of no use.
+	(setq org-last-changed-timestamp
+	  (org-insert-time-stamp time with-hm inactive nil nil extra))
+	(goto-char pos))
+  (save-match-data
+	(looking-at org-ts-regexp3)
+	(goto-char (cond
+		;; `day' category ends before `hour' if any, or at
+		;; the end of the day name.
+		((eq origin-cat 'day)
+		 (min (or (match-beginning 7) (1- (match-end 5))) origin))
+		((eq origin-cat 'hour) (min (1- (match-end 7)) origin))
+		((eq origin-cat 'minute) (min (1- (match-end 8)) origin))
+		((integerp origin-cat) (min (1- (match-end 0)) origin))
+		;; `year' and `month' have both fixed size: point
+		;; couldn't have moved into another part.
+		(t origin
+  ;; Update clock if on a CLOCK line.
   (org-clock-update-time-maybe)
-  (goto-char pos)
-  ;; Try to recenter the calendar window, if any
+  ;; Try to recenter the calendar window, if any.
   (if (and org-calendar-follow-timestamp-change
 	   (get-buffer-window *Calendar* t)
 	   (memq org-ts-what '(day month year)))
-- 
1.7.6



[O] Copy/Search Outline

2011-07-22 Thread Florian Beck
Hi all,

when working with outlines (tabbing until CONTENTS), there are two
things I cannot figure out:

Firstly, I want to copy the *visible* text (minus the …, but never mind
that); secondly, I want to be able to search only the visible text.

More generally (and less org specific), how do I restrict commands to
the visible parts of the buffer?

TIA

-- 
Florian Beck




Re: [O] Input on organization of files for multiple projects?

2011-07-22 Thread John Hendy
On Thu, Jul 21, 2011 at 10:15 PM, Bernt Hansen be...@norang.ca wrote:
 John Hendy jw.he...@gmail.com writes:

 In any case, this works pretty well, but I think I'm becoming more and
 more sensitive to the fact that I'm not as interested in just tracking
 journal type entries. I now have bigger projects that are more
 coherent and on-going vs. just supporting other people's projects and
 noting what I contributed and test results. I find more often that I
 used C-a s to search for something and end up in a file a couple
 months back with some open todo items that I need to take care of.

 But then I run across and update or new data... and I find myself
 debating about whether to add it to 2011-05May.org or create a new
 timestamp for it in 2011-07Jul.org.

 So, I'm in the mood for input and suggestions. I've read a lot of the
 org tutorials (norang in particular), but not a lot quite put the
 whole picture out there -- how many files, how are they organized,
 etc. A lot of people describe having files per activity (writing,
 chores, research), but I'm in the same job, but contributing to
 perhaps 5 or so main projects as well as my ideas/brainstorming stuff
 (I work in RD engineering/product development).

 I'm hoping to hear some input about big picture structuring, keeping
 track of year+ long projects, todo flows, if files have ever gotten
 too big (a fear of mine), if and how you archive, etc.

 I've thought of going to a structure with proj1.org, proj2.org, etc.
 and then archiving into an archive_.org with main headings for
 each project as I finish todos or as things get old. Or maybe I won't
 need to. Maybe an org file can survive an entire project and just get
 archived for reference when I'm done working on it. I'll probably
 still need some kind of odds and ends file for things that don't
 belong to a specific project.

 Hi John,

 I've been using org-mode for 5+ years now and I'm still using the same
 structuring for tasks and notes that I originally set up.


Wow, seems like it's really working well, then!

 I have a miscellaneous todo.org that I dump miscellaneous non-project
 tasks into.

Out of curiosity, are these just loose todos (no headlines or
anything)? Maybe I'm a digitial neat freak, but having long lists like
that without organization just bugs me. Or do you access almost all
todos via agenda and so it doesn't really matter?

 Diary stuff goes in diary.org (i d in the agenda) and
 anything that should be grouped together (for some definition of a
 group) lives in a separate org file.  I archive old entries from X.org
 to X.org_archive monthly.

Good to know.


 I now dump org files into directories and the directories contribute to
 org-agenda-files (so new files just show up as the are created), and I
 can add/drop entire directories of org files from my agenda easily.

I must have missed that directories work. Very cool and saves me
having to add them manually all the time! This is great.


 This has the advantage that I'm free to split or consolidate org files
 anytime I want - the agenda will still find the entries as long as they
 are in directories that contribute to the agenda.

 If you have 5 main projects that are unrelated I'd probably have one org
 file for each project and group stuff in there in whatever order makes
 sense to you.  I tend to keep project notes in project files.  When
 notes for a project are generally useful I'll split that into a
 notes-only org-file by itself and publish the results to HTML.

I re-read your setup page on norang.ca, and it looks like it's
actually a bit updated since I saw it last. I think I'll move in the
project file direction and try to implement capture as well (haven't
been using that at all). I'm still a little hazy on how this will all
pan out, as I have really liked my journal method of documenting
what I work on in terms of it making sense (just write what I did
under a headline timestamped with today's date -- simple).

The on-going projects thing was the main irk I've had. It just
*doesn't* make sense to update data or info on a headline from 2
months ago when new information comes up. But I don't want to split
the data, either. I've done that before and linked between different
file headlines for ongoing data collection and it's a hassle to follow
all those links around to compare data that should be in one place.

In your block agenda view, how do you get the  line separating
sections? Mine just pile on top of each other.


Thanks for the input!
John


 HTH,
 --
 Bernt




Re: [O] Input on organization of files for multiple projects?

2011-07-22 Thread John Hendy

 In your block agenda view, how do you get the  line separating
 sections? Mine just pile on top of each other.


Doh. I copied the template I started with from somewhere and just now
saw the option org-agenda-compact-blocks was set. Fixed.


John


 Thanks for the input!
 John


 HTH,
 --
 Bernt





Re: [O] Crashing bug in spreadsheet

2011-07-22 Thread Juan Pechiar
Hi,

'@II..@III' means all rows between the second and third h-lines. In
your case, this is the same vsum(), so you get a circular reference.

Try @I..@II instead

Regards,
.j.

On Fri, Jul 22, 2011 at 06:48:36PM +, ken.willi...@thomsonreuters.com wrote:
 Hi,  I had the following text in a table, and hit tab in the
 bottom-right cell:

 | Who | Amt |
 |-+-|
 | A   |   36.70 |
 | A   |  679.96 |
 | B   |  192.31 |
 | B   | 2500.03 |
 | B   |   74.47 |
 | C   |   26.64 |
 | D   |   82.00 |
 |-+-|
 | | :=vsum(@II..@III)   |

 This caused CPU usage to peg to 100%, and Emacs to hang until killed.
 Probably because of the invalid reference, I guess.



Re: [O] Crashing bug in spreadsheet

2011-07-22 Thread Ken.Williams


On 7/22/11 4:35 PM, Juan Pechiar j...@pechiar.com wrote:

Hi,

'@II..@III' means all rows between the second and third h-lines. In
your case, this is the same vsum(), so you get a circular reference.

Try @I..@II instead


Yeah, I get that, but I was hoping a circular reference (or alternatively
a seemingly invalid reference, since I have no third h-line) would cause
an error rather than force me to kill Emacs.

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





Re: [O] calculating column averages

2011-07-22 Thread Ken Williams
Jude DaShiell jdashiel at shellworld.net writes:

 
 In this case I don't want to tell org-mode how many rows to calculate, and 
 I put a table together with an averages line in its own footer section.  

Since you have a header  footer, one solution is to use a formula like this:

   :=vmean(@I..@II)

 -Ken




Re: [O] Commenting a diary sexp line??

2011-07-22 Thread Memnon Anon
suvayu ali fatkasuvayu+li...@gmail.com writes:

 On Fri, Jul 22, 2011 at 3:42 PM, Bastien b...@altern.org wrote:
 I think you can already
 set up your custom agenda views to ignore COMMENT headlines.

 Could you point me to it? I did an apropos search for org agenda
 ignore but all I could find was ignoring based on timestamps.

,
| org-agenda-skip-comment-trees is a variable defined in `org-agenda.el'.
| Its value is t
| 
| Documentation:
| Non-nil means skip trees that start with the COMMENT keyword.
| When nil, these trees are also scanned by agenda commands.
`

?

Memnon




Re: [O] New backend for org-agenda: (Was Calendar-like view of the org-agenda)

2011-07-22 Thread SAKURAI Masashi
Hi Bastien,

At Thu, 21 Jul 2011 11:52:44 +0200,
Bastien wrote:
 :
  I'm also think about cache in the calfw side, such as an alist:
  (date . [a list of contents]). Then, uses can refresh the cache
  explicitly. It is easy to implement.
 
  Is the plan(1) the same idea?
 
 Yes, It's the same idea, but on Org's side.

I see. It sounds great.


 I'm focusing on bugfixes for the next release and cannot work 
 through the details of the implementation, but I keep thinking
 about it.

Ok. I also need a time to do other things.
Indeed, I have to write the document of calfw.

Regards,
--
SAKURAI, Masashi (family, given)
m.saku...@kiwanami.net