[Orgmode] Emacs hangs forever when running in batch mode and calling a export org function

2010-09-18 Thread Marcelo de Moraes Serpa
Hello all,

So, I was trying to create a simple bash script to export my org items
as iCal, upload it somewhere and subscribe to it from iCal / Google
Calendar. Here's what I came with:

emacs --batch --eval \
 "(progn \
  (add-to-list 'load-path \"~/.emacs.d/vendor/org/lisp\") \
  (load-file \"~/.emacs.d/vendor/org/lisp/org.el\")
  (load-file \"~/.emacs.d/vendor/org/lisp/org-icalendar.el\") \
 (setq org-combined-agenda-icalendar-file \"~/org/org.ics\") \
 (setq org-agenda-files (quote (\"~/org/gtd/gtd.org\")))
 )" \
 -f org-export-icalendar-combine-agenda-files

If I run the exact same code on a vanilla emacs, it works. If I try to
run this command in the shell, I get the following output:

sh org-ical-export.sh
Loading /Users/fullofcaffeine/.emacs.d/vendor/org/lisp/org.el (source)...
Loading subst-ksc...
Loading subst-gb2312...
Loading subst-big5...
Loading subst-jis...
Loading /Users/fullofcaffeine/.emacs.d/vendor/org/lisp/org-icalendar.el
(source)...

And it hangs forever. No error message nothing.

I've checked the Activity Monitor, and this specific instance of emacs
quickly starts using ~100% of the CPU. However, I can't really debug
what's wrong.

I am on OSX Snow Leopard, GNU Emacs 23.2.1 (x86_64-apple-darwin, NS
apple-appkit-1038.29) of 2010-05-08, org release_7.01h-524-gcf5f.

Any ideas?

Thanks,

Marcelo.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] SQLite in 7.01h?

2010-09-18 Thread Bill Harris
Bill Harris  writes:

> I've gotten v 7.01h to work on Debian Stable and XP for R, elisp, and
> sh, but I can't figure out how to make it work for SQLite.  I did enable
> SQLite as one of the languages, but, when I execute the following
> section, I get "No org-babel-execute function for Sqlite!":
>
> #+BEGIN_SRC Sqlite 
>   sqlite3 sqlite/db.sqlite
>   select * from table;
> #+END_SRC

I found a workaround

#+begin_src sh :results replace
  sqlite3 sqlite/db.sqlite 'select * from table;'
#+end_src

but it would surely be nice to be able to use the SQLite connection
directly.

Bill
-- 
Bill Harris  http://makingsense.facilitatedsystems.com/
Facilitated Systems  Everett, WA 98208 USA
http://www.facilitatedsystems.com/   phone: +1 425 374-1845

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] How can I get document metadata?

2010-09-18 Thread Aidan Gauland
Is there an org function to get the title, author, etc. of an org document?

--Aidan


signature.asc
Description: Digital signature
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] org-babel - utility to ease chopping src chunks into smaller org entries

2010-09-18 Thread Richard Riley

I often find myself chopping a large source code block into smaller
entities with their own notes, tags and comments etc. This small utility
facilitates that by wrapping the current region with org entry markers
and src code delimiters. It assumes you are in a currently src block.

http://splash-of-open-sauce.blogspot.com/2010/09/mark-region-as-src-code-if-prefix-used.html

Its currently hardcoded for emacs-lisp but it might be useful nonetheless.

(Anyone know how to make blogspot line wrap?)


r.


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Remove all items tagged with (or that has a specific word)

2010-09-18 Thread Marcelo de Moraes Serpa
Already found out by myself. C-a s, then put a minus sign to the word
you want to negate. Nice!

Thanks,

Marcelo.

On Sat, Sep 18, 2010 at 7:35 PM, Marcelo de Moraes Serpa
 wrote:
> Hi list,
>
> Is there a way to use the agenda to show only items that don't match a
> specific tag or word?
>
> Thanks,
>
> Marcelo.
>

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Remove all items tagged with (or that has a specific word)

2010-09-18 Thread Marcelo de Moraes Serpa
Hi list,

Is there a way to use the agenda to show only items that don't match a
specific tag or word?

Thanks,

Marcelo.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Latex export of subtree not working for me

2010-09-18 Thread Torsten Anders
Dear all,

sorry for bothering you again with my question from a couple of days ago (see 
below).

I would appreciate with someone could briefly confirm whether 
exporting/publishing a subtree works for you (so I know whether the reported 
problem is related to org mode or to my own Emacs configuration).

Thank you very much! 

Best,
Torsten

--
On Wed, 15 Sep 2010, Torsten Anders wrote 

Dear all,

I would like to export only a subtree of an org file to PDF via Latex 
(ultimately using the package beamer).

When doing export/publish (C-c C-e) I am given a menu with options, including 
the options "only export current subtree" and "publish enclosing subtree". If I 
choose any of these and then select a publishing command (e.g., export to 
Latex), then I get the following error.

  org-export: Symbol's function definition is void: activate-mark

What am I missing? 

BTW: I am using the latest org mode version (just did git pull) with Aquamacs 
1.9 on MacOS 10.5. 

Thank you very much! 

Best
Torsten Anders


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [Bug] Level 2 text not exported in LaTeX (well in HTML) + some comments

2010-09-18 Thread Eric S Fraga
On Sat, 18 Sep 2010 20:02:24 +0200, Nicolas Goaziou  wrote:
> 
> Hello,
> 
> > Eric S Fraga writes:
> 
> > However, more strange behaviour appears as soon as you have multiple
> > nested lists.
> 
> Just to avoid any misconception: if I get it correctly, what you do
> call "multiple nested lists" cannot exist.
> 
> You can have nested lists, but no more than one sub-list at each
> level. As soon as a line is less indented than the preceding item of
> the list, *all* sub-lists end at that line.
> 
> Regards,
> 
> -- Nicolas

So you are saying, if I understand you correctly, that you cannot have
something like this:

--8<---cut here---start->8---
1. some text

   - a nested list
   - with two items

   some more text for the first numbered item

   - another nested list
   - with two items

2. the second outer list item
--8<---cut here---end--->8---

If so, why not?  This would seem to be quite a likely and useful
scenario.  

I do this all the time in latex and I was sure that I had done this
before in org.  Is my recollection wrong?  Was this not possible
before?
-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Relative dates with sexep

2010-09-18 Thread Eric S Fraga
On Fri, 17 Sep 2010 16:41:55 +0200, julien cubizolles  
wrote:
> 
> Le vendredi 17 septembre 2010 à 09:01 +0100, Eric S Fraga a écrit :
> > On Thu, 16 Sep 2010 18:27:18 +0200, julien cubizolles 
> >  wrote:
> > > 
> > > I'm trying to specify a date relative to another date in an org file.
> > > I've tried to adapt one of the examples from worg, with :
> > > 
> > >  <%%(= 7 (- (calendar-absolute-from-gregorian date)
> > > (calendar-absolute-from-gregorian (02 02 2010>
> > > 
> > > to get the date one week after the 2nd of february 2010. Bad sexp...
> > 
> > Quote the date: ... '(02 02 2010)
> > as it is trying to evaluate the function "02" otherwise.
> 
> I'm trying to make it reusable by defining a function in my .emacs :
> 
> (defun diary-relative (n day)
>   "Diary entry that will always appear N days from day"
>   (=
>(calendar-absolute-from-gregorian date)
>(+ n (calendar-absolute-from-gregorian day
> 
> I try to use it with a sexp like :
> <%%(diary-relative (7 '(09 15 2010)))>
> 
> which doesn't work. I really need to seriously read about lisp
> programming...

Possibly! ;-)

Try <%%(diary-relative 7 '(09 15 2010))>
as the arguments to a function should not be in ()s.
-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Worg updating?

2010-09-18 Thread Tom Dye


On Sep 18, 2010, at 7:53 AM, Bastien wrote:


Hi all,

I cleaned up the Worg publishing mechanism:

- The cron'ed publishing mechanism does not allow babel code execution
 on the server anymore (for obvious security reasons).  If your Worg
 file needs code execution, send me an email and I will try to publish
 it manually.

- Worg export used to rely on the very latest Org version from the git
 repo, which is not a good idea.  From now on, Worg will use released
 versions¹.

- I created a FIXME directory in the root directory of Worg: this is  
the

 place for problematic files (there are two right now.)

- I create a page to describe Worg setup on the serveur and available
 software for babel code evaluation:

 http://orgmode.org/worg/worg-setup.php

Please double-check links are not broken and pages export correctly,
and come back to me (on the list) if there is any problem.

Thanks !

¹ We still want http://orgmode.org/ to reflect the content of the
 org-mode/ORGWEBPAGE/ dir in the latest Org -- so I created two repos,
 one for exporting those pages, another one for elisp code that is  
used

 when exporting Worg.

--
Bastien


Hi Bastien,

Most of the links to examples in http://orgmode.org/worg/org-contrib/babel/uses.php 
 appear to be broken.  I checked a few of these in the org-mode  
source on Worg and they work there, so it looks like there is a glitch  
in the publishing process.


All the best,
Tom___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] SQLite in 7.01h?

2010-09-18 Thread Bill Harris
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm probably just missing it, but I didn't see anything in the manual,
the FAQ, the mailing list, or from a Google search.

I rediscovered org-mode this week; I had used much earlier versions some
years ago, but org-babel really attracted my attention.  

I've gotten v 7.01h to work on Debian Stable and XP for R, elisp, and
sh, but I can't figure out how to make it work for SQLite.  I did enable
SQLite as one of the languages, but, when I execute the following
section, I get "No org-babel-execute function for Sqlite!":

#+BEGIN_SRC Sqlite 
  sqlite3 sqlite/db.sqlite
  select * from table;
#+END_SRC

(The org-mode file is in a directory with a subdirectory called sqlite,
and the database is there.)

I did a similar thing for R, and it works:

#+BEGIN_SRC R
  3 + 4
#+END_SRC

#+results:
: 7

I'm running this test with GNU Emacs 22.2.1 on Debian Stable; I'm
running sqlite3 version 3.5.9.

What am I missing?  Can you give me an example SQLite source code block
that works?

Thanks,

Bill
- -- 
Bill Harris  http://makingsense.facilitatedsystems.com/
Facilitated Systems  Everett, WA 98208 USA
http://www.facilitatedsystems.com/   phone: +1 425 374-1845
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkyVBacACgkQ3J3HaQTDvd8avQCfVQ4gMOXMjEHRqrETLJG+pmrt
OW4AnR1Kbh7wHEV+qZuSJOfeKGUCSMv+
=DPVV
-END PGP SIGNATURE-

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] The \only<> overlay in beamer

2010-09-18 Thread Rafael Calsaverini
Hi there.

I'm trying to use the \only<> command to produce a beamer presentation but
it seems that org-beamer filters out this. I've tried it in many different
ways, and didn't get the desired effect.

Particularly, I've tried the obviously wrong thing:
#+STARTUP:  beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [smaller, presentation]

* Foo
** Slide 1
\only<1> {
***  Block1 :B_block:
 :PROPERTIES:
 :BEAMER_env: block
 :END:
 - bla11
 - bla12
 - bla13
}
\only<2>{
***  Block2 :B_block:
 :PROPERTIES:
 :BEAMER_env: block
 :END:
 - bla21
 - bla22
 - bla23
}

Which obviously break-up. And I also tried what I believe would be a nice
syntax for this:

* Foo
** Slide 1
***  Block1:B_block:
 :PROPERTIES:
 :BEAMER_envargs: \only<1>
 :BEAMER_env: block
 :END:
 - bla11
 - bla12
 - bla13

***  Block2 :B_block:
 :PROPERTIES:
 :BEAMER_envargs: \only<2>
 :BEAMER_env: block
 :END:
 - bla21
 - bla22
 - bla23

Apparently the parser just removes the "\only" and interprets this as <1>
and <2>. The resulting latex is exactly the same as if the "\only" wasn't
there.

Is there a way to use the "\only<>" overlay in a clean way?

Thank you very much.

---
Rafael Calsaverini
Dep. de Física Geral, Sala 336
Instituto de Física - Universidade de São Paulo

rafael.calsaver...@gmail.com
http://stoa.usp.br/calsaverini/weblog
CEL: (11) 7525-6222
USP: (11) 3091-6803
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Worg updating?

2010-09-18 Thread Bastien
Bastien  writes:

> - publish the .emacs.el we use on the server;

This is here: http://orgmode.org/worg/sources/emacs.el

I added this link to worg-setup.org

HTH

-- 
 Bastien

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [Bug] Level 2 text not exported in LaTeX (well in HTML) + some comments

2010-09-18 Thread Nicolas Goaziou
Hello,

> Eric S Fraga writes:

> However, more strange behaviour appears as soon as you have multiple
> nested lists.

Just to avoid any misconception: if I get it correctly, what you do
call "multiple nested lists" cannot exist.

You can have nested lists, but no more than one sub-list at each
level. As soon as a line is less indented than the preceding item of
the list, *all* sub-lists end at that line.

Regards,

-- Nicolas

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [Bug] Level 2 text not exported in LaTeX (well in HTML) + some comments

2010-09-18 Thread Nicolas Goaziou
Hello,

> Sébastien Vauban writes:

> 1) Ask for it.

> 2) Make it, answering the following questions:

>- Got the docs?
>- Signed them?
>- Checked it?

>THIS LINE DOES NOT SHOW UP in LaTeX!!!

The whole list should indeed end at this line. I sent a patch
correcting this.

> * Other remarks

> - Before, if I remember good, the sequence of list levels was: =-=,
>   =+=, =*=, =1.= and =1)=. Now, the last two have been inverted:
>   first, =1)=, then =1.=. Just a tiny detail (was used to it).

I hadn't noticed that before and the doc-string of
`org-cycle-list-bullet' says you are right. Fixed.

> - When =S-right arrowing= this line twice, I *sometimes* get my list
>   items transformed into headlines... Though, I cannot repeat with as
>   many times as I want... Conditions still strange to me.

I cannot reproduce it at the moment. Please tell me if you have more
data about it.

Regards,

-- Nicolas

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Worg updating?

2010-09-18 Thread Bastien
Hi all,

I cleaned up the Worg publishing mechanism:

- The cron'ed publishing mechanism does not allow babel code execution
  on the server anymore (for obvious security reasons).  If your Worg
  file needs code execution, send me an email and I will try to publish
  it manually.

- Worg export used to rely on the very latest Org version from the git
  repo, which is not a good idea.  From now on, Worg will use released
  versions¹.

- I created a FIXME directory in the root directory of Worg: this is the
  place for problematic files (there are two right now.)

- I create a page to describe Worg setup on the serveur and available
  software for babel code evaluation:

  http://orgmode.org/worg/worg-setup.php

Please double-check links are not broken and pages export correctly, 
and come back to me (on the list) if there is any problem.

Thanks !

¹ We still want http://orgmode.org/ to reflect the content of the
  org-mode/ORGWEBPAGE/ dir in the latest Org -- so I created two repos,
  one for exporting those pages, another one for elisp code that is used
  when exporting Worg.

-- 
 Bastien

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] org-babel caching question

2010-09-18 Thread Ista Zahn
Hi all,
I am just starting to get org-babel figured out, but I've run into an
issue that I could use help with. Basically, with :cache yes turned
on, subsequent code blocks to not pick up changes in earlier code
blocks. I would like to know if there is a way to make org babel pick
up these changes. An example follows.

---8<--begin example--8<---
Test org-babel caching mechanism

* Instructions
1. Assign the value 1 to variable a in source block1.
2. Run org-babel-execute-buffer.
3. Change variable a by assigning it the value 2 in source block1.
4. Run org-babel-execute-buffer, and notice that a is still equal to
1, 2 in source block2, when it "should" be 2, 2.

* Create R object "a"
#+srcname block1
#+begin_src R :session R1 :cache yes
a <- 1
#+end_src

* Change the value of "a"
#+srcname block2
#+begin_src R :session R1 :cache yes
a <- c(a, 2)
#+end_src

* Commentary
It appears that the org-babel caching mechanism does not notice that
input values have changed. This is inconvenient, because if I make a
mistake in an earlier code block I have to turn caching off in order
to get the values to be updated in subsequent code blocks. Is there
any way to make babel check to see if the input values have changed?

---8<--end example--8<---


-- 
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] FLOSS Weekly show about Org-mode

2010-09-18 Thread Ian Barton

> 
> If you have suggestions on something specific I should try to cover,
> let me know.
> 


So what are you going to say when Randall asks you if you are a Vi or
Emacs user:)

For those that haven't listened to FOSS weekly before, Randall asks
everyone this question.

Ian.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Bug: org-auto-repeat-maybe only updates first timestamp [7.01trans]

2010-09-18 Thread Andrew J. Korty

Matt Lundin  wrote:


(setq org-agenda-custom-commands
  '(("d" "Todos (incl. deadlines)" todo ""
 ((org-deadline-warning-days 100) ;; change this as you wish
  (org-agenda-todo-ignore-deadlines 'far


Ah, brilliant.  Thanks!  Essentially this configuration causes the 
lead time indicator to mean different things in the agenda versus 
tags-todo lists, which is just what I wanted.


I still need to decide if I prefer using lead times to scheduling the 
entry (which, for non-repeating entries is slightly easier with the 
C-c C-s keybinding).  So I may submit a patch for updating all ++ 
repeaters when I get around to it.  Or maybe all I need is a function 
to prompt for a lead time and add it to the deadline (from the agenda 
or the org file).


ajk

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Proposed New Syntax For Calling Code Blocks was: Problem with Babel and sessions

2010-09-18 Thread Eric Schulte
Hi Chris,

Christopher Witte  writes:

> Thanks for reply Eric.
>
> Thanks for the reply.  The reason why I wanted this was because I have
> multiple sets of data and I would like to be able to apply the same code
> block to the different sets of data and have the results in different pdfs.
> Is there anyway to do this with the current version of org?
>

Under the current setup, the only way you would be able to supply
different file argument to each call of the block, would be to pass the
file name in as a variable, something like

#+source: the-function
#+begin_src R :var data=whatever :var file=file-name
  R code...
#+end_src

and then call the function with the file name passed in as a variable
assignment

#+call: the-function(data=whatever, file=fig-one.pdf)

Best -- Eric

>
> Cheers,
> Chris
>
> On 10 September 2010 20:06, Eric Schulte  wrote:
>
>> Hi Christopher,
>>
>> Thanks for the well documented example.
>>
>> The header arguments on the call line, are actually being used by the
>> call line itself, not by the R block which is called.  To unpack that,
>> on evaluation the call line expands to a trivial emacs-lisp code block
>> which is equivalent to
>>
>> #+begin_src emacs-lisp :var results=chartPolAngle(pol=tableTestBabel) 
>> :session testBabel:file
>>  results
>> #+end_src
>>
>> So the :session header argument is used by the emacs-lisp code block in
>> the call line, and never propagates to the R code block which is
>> evaluated.  Notice that header arguments like :results silent, will have
>> the expected results.
>>
>> So for now you will have to place the header argument on the actual R
>> code block.
>>
>> That said, I think that we should provide a mechanism for passing header
>> arguments through to called code blocks making the original
>> functionality you described possible.  I'm not sure how best to do that,
>> but currently I think we should expand the syntax used to call code
>> blocks to be more similar to inline code blocks, s.t. header arguments
>> can be placed inside of an optional square bracket section between the
>> name of the code block and the arguments.  Using this new proposed
>> syntax your example below would be written as
>>
>> #+call: chartPolAngle[:session testBabel :file 
>> testBabel.pdf](pol=tableTestBabel)
>>
>> I'd be interested to hear what the community thinks of this new syntax.
>>
>> As an unrelated note, we also need to think of a natural way to allow
>> the header argument portion of a code block to span multiple lines.
>>
>> Best -- Eric
>>
>> Christopher Witte  writes:
>>
>> > I'm having a bit of trouble with org bable and R. When I try to
>> > execute the code below (C-c C-c on the call line), as you can see,
>> > I get the results :nil
>> >
>> > ---
>> > #+tblname: tableTestBabel
>> > |   0 | 4.40 |
>> > |  30 | 4.54 |
>> > |  60 | 7.09 |
>> > |  90 | 9.40 |
>> > | 120 | 9.22 |
>> > | 150 | 6.65 |
>> > | 180 | 4.22 |
>> >
>> > #+srcname: chartPolAngle(pol)
>> > #+begin_src R
>> >   angle <- pol[,1]
>> >   energy <- pol[,2]
>> >   plot(angle,energy)
>> >   energy.model <-  nls (energy ~ a1 + a2 * (sin(pi / a3 *(angle-a4)))^2,
>> > start=list(a1=3.0, a2=7.0, a3=180, a4=0.0))
>> >   lines(spline(angle, fitted.values(energy.model)), lwd=2)
>> >   summary(energy.model)
>> > #+end_src
>> >
>> > #+call: chartPolAngle(pol=tableTestBabel) :session testBabel :file
>> testBabel.pdf
>> >
>> > #+results: chartPolAngle(pol=tableTestBabel)
>> > : nil
>> > 
>> >
>> > but If I move the header arguments to the source block, as in the code
>> > below, everything works fine. I also get asked "ESS [S(R): R] starting
>> data
>> > directory? ~/doc/org/" which I don't get with the code above.
>> >
>> > ---
>> > #+tblname: tableTestBabel
>> > |   0 | 4.40 |
>> > |  30 | 4.54 |
>> > |  60 | 7.09 |
>> > |  90 | 9.40 |
>> > | 120 | 9.22 |
>> > | 150 | 6.65 |
>> > | 180 | 4.22 |
>> >
>> > #+call: chartPolAngle(pol=tableTestBabel)
>> >
>> > #+results: chartPolAngle(pol=tableTestBabel)
>> > : testBabel.pdf
>> >
>> >
>> > #+srcname: chartPolAngle(pol)
>> > #+begin_src R :session testBabel :file testBabel.pdf
>> >   angle <- pol[,1]
>> >   energy <- pol[,2]
>> >   plot(angle,energy)
>> >   energy.model <-  nls (energy ~ a1 + a2 * (sin(pi / a3 *(angle-a4)))^2,
>> > start=list(a1=3.0, a2=7.0, a3=180, a4=0.0))
>> >   lines(spline(angle, fitted.values(energy.model)), lwd=2)
>> >   summary(energy.model)
>> > #+end_src
>> > ---
>> >
>> > Org doesn't appear to respect the head arguments on the call. I pulled
>> from
>> > git a couple days ago. Any ideas why?
>> >
>> > Cheers
>> > Chris Witte
>> > ___
>> > Emacs-orgmode mailing list
>> > Please use `Reply All' to send replies to the list.
>> > Emacs-orgmode@gnu.org
>> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>

_

[Orgmode] calendar and agenda entries

2010-09-18 Thread henry atting
When printing or exporting the emacs calendar it is possible to include
diary entries or holidays. Is there a way to include org-agenda entries
as well?

cheers,
henry

-- 
http://literaturlatenight.de


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: C-a T DONE behavior

2010-09-18 Thread julien cubizolles
Le vendredi 17 septembre 2010 à 16:32 -0400, Matt Lundin a écrit :
> julien cubizolles  writes:
> 
> > I've noticed that C-a T DONE doesn't display DONE entries if they have a
> > DEADLINE set, whether it's in the past or in the future. Is it the
> > intended behavior ? I'm trying to use it to purge DONE tasks but it's
> > useless at the moment.
> 
> On your machine, what is the value of org-agenda-todo-ignore-deadlines
> and/or org-agenda-todo-ignore-with-date?

That's it, org-agenda-todo-ignore-with-date was true. Thanks for
pointing it out.

Julien.


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [PATCH] Alphabetical ordered lists

2010-09-18 Thread Nathaniel Flath
Hey,
I gave another shot at this, now that my computer is no longer dead.
I believe it fixes the issues described earlier - let me know of any
feedback.
(Also - I don't know how to get GMail to attach this as anything other
than application/octet-stream, so the text is in the message as well.
Nathaniel Flath


Attachment:

diff --git a/lisp/org-list.el b/lisp/org-list.el
index d9fc24e..88d5a9b 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -287,14 +287,14 @@ It depends on `org-empty-line-terminates-plain-lists'."
   "Return the correct regular expression for plain lists.
 If GENERAL is non-nil, return the general regexp independent of the value
 of `org-plain-list-ordered-item-terminator'."
-  (cond
-   ((or general (eq org-plain-list-ordered-item-terminator t))
-"\\([ \t]*\\([-+]\\|\\([0-9]+[.)]\\)\\)\\|[ \t]+\\*\\)\\([ \t]+\\|$\\)")
-   ((= org-plain-list-ordered-item-terminator ?.)
-"\\([ \t]*\\([-+]\\|\\([0-9]+\\.\\)\\)\\|[ \t]+\\*\\)\\([ \t]+\\|$\\)")
+(cond
+ ((or general (eq org-plain-list-ordered-item-terminator t))
+  "\\([ \t]*\\([-+]\\|\\([0-9A-Za-z]+[.)]\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)")
+  ((= org-plain-list-ordered-item-terminator ?.)
+   "\\([ \t]*\\([-+]\\|\\([0-9A-Za-z]+\\.\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)")
((= org-plain-list-ordered-item-terminator ?\))
-"\\([ \t]*\\([-+]\\|\\([0-9]+)\\)\\)\\|[ \t]+\\*\\)\\([ \t]+\\|$\\)")
-   (t (error "Invalid value of `org-plain-list-ordered-item-terminator'"
+"\\([ \t]*\\([-+]\\|\\([0-9A-Za-z]+)\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)")
+(t (error "Invalid value of `org-plain-list-ordered-item-terminator'"

 (defconst org-item-beginning-re (concat "^" (org-item-re))
   "Regexp matching the beginning of a plain list item.")
@@ -530,7 +530,7 @@ List ending is determined by the indentation of text. See
(save-excursion
 (goto-char (match-end 0))
  ;; Ignore counter if any
- (when (looking-at "\\(?:\...@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?")
+ (when (looking-at "\\(?:\...@\\(?:start:\\)?[0-9A-Za-z]+\\][ 
\t]*\\)?")
(goto-char (match-end 0)))
 (looking-at regexp

@@ -1135,11 +1135,11 @@ bullet string and bullet counter, if any."
 (list (point-at-bol)
   (org-get-indentation)
   (progn
-(looking-at "^[ \t]*\\([-+*0-9.)]+[ \t]+\\)")
+(looking-at "^[ \t]*\\([-+*0-9A-Za-z.)]+[ \t]+\\)")
 (match-string 1))
   (progn
 (goto-char (match-end 0))
-(and (looking-at "\...@\\(?:start:\\)?\\([0-9]+\\)\\]")
+(and (looking-at "\...@\\(?:start:\\)?\\([0-9A-Za-z]+\\)\\]")
  (match-string 1))

 (defun org-list-struct (begin end top bottom &optional outdent)
@@ -1259,8 +1259,10 @@ This function modifies STRUCT."
 (let ((counter (nth 3 item))
   (bullet (org-list-bullet-string (nth 2 item
   (cond
-   ((and (string-match "[0-9]+" bullet) counter)
+   ((and (string-match "[0-9A-Za-z]+" bullet) counter)
 (replace-match counter nil nil bullet))
+   ((string-match "[A-Za-z]+" bullet)
+(replace-match "a" nil nil bullet))
((string-match "[0-9]+" bullet)
 (replace-match "1" nil nil bullet))
(t bullet)
@@ -1268,7 +1270,7 @@ This function modifies STRUCT."
(setcdr item (list (nth 1 item) bullet (nth 3 item)
 (get-bul (lambda (item bullet)
(let* ((counter (nth 3 item)))
- (if (and counter (string-match "[0-9]+" bullet))
+ (if (and counter (string-match "[0-9A-Za-z]+" bullet))
  (replace-match counter nil nil bullet)
bullet
 (fix-bul
@@ -1582,13 +1584,50 @@ It determines the number of whitespaces to
append by looking at
   " ")))
  nil nil bullet 1)))

+(defun org-increment-string (str cap)
+  "Increments str (a->a, b->b, z->aa, aa->ab etc).  If cap is non-nil, then
+   the letters are capitalized."
+  (let ((res (org-convert-num-to-alpha-str
+ (1+ (org-convert-alpha-str-to-num str 1 (length str) cap)) cap))
+   (z (if cap ?Z ?z))
+   (b (if cap ?B ?b))
+   (a (if cap ?A ?a)))
+(if (and(= (string-to-char str) z)
+(= (string-to-char res) b))
+(concat (if cap "A" "a")  (substring res 1))
+  (concat (make-string (- (length str) (length res)) a)  res
+
+(defun org-convert-alpha-str-to-num (str n pos cap)
+  "Converts the substring consisting of locations pos to pos-n to a
+   numeric representation."
+  (let ((a (if cap ?A ?a)))
+(if (= pos 1) (* (- (string-to-char str) a) n)
+  (+ (* (- (nth (1- pos) (string-to-list str)) a) n)
+(org-convert-alpha-str-to-num str (* 26 n) (1- pos) cap)
+
+(defun or

[Orgmode] Re: Color of exported R code results using LaTeX listings

2010-09-18 Thread Sébastien Vauban
Hi Steven,

Steven Delean wrote:
> Thanks again for all your assistance. I was not able to achieve the results
> I was after exactly using any proposed solutions, but have found a way
> forward and outline my solution below in case it benefits others.
>
> The following allows fontification and syntax highlighting for source code
> and a single color for exported output, and works both for latex documents
> and beamer slides.
> NB: A single color for source code in exported documents can be acheived by
> adding e.g. \color{blue} to basicstyle.
>
> 1. The following must appear in your .emacs
> (require 'org-latex)
> (setq org-export-latex-listings t)
> (add-to-list 'org-export-latex-packages-alist '("" "listings"))
> (add-to-list 'org-export-latex-packages-alist '("" "color"))
>
> 2. Add the following to your .org document header to allow colors and
> 'nice' font
> #+LATEX_HEADER: \lstset{
> #+LATEX_HEADER: keywordstyle=\color{blue},
> #+LATEX_HEADER: commentstyle=\color{red},
> #+LATEX_HEADER: stringstyle=\color{green},
> #+LATEX_HEADER: basicstyle=\ttfamily\small,
> #+LATEX_HEADER: columns=fullflexible,
> #+LATEX_HEADER: basewidth={0.5em,0.4em}
> #+LATEX_HEADER: }
>
> 3. Also add the following to your .org document header to allow the
> output results of evaluating R (or other language) code to be in color
> #+LATEX_HEADER: \RequirePackage{fancyvrb}
> #+LATEX_HEADER: \DefineVerbatimEnvironment{verbatim}{Verbatim}{fontsize=
> \small,formatcom = {\color[rgb]{0.5,0,0}}}

What about if your results block is an Org table, instead of verbatim?

Best regards,
  Seb

-- 
Sébastien Vauban


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Org, org-plot, and babel+gnuplot on Windows

2010-09-18 Thread Sébastien Vauban
HI Eric,

"Eric Schulte" wrote:
> Sébastien Vauban  writes:
>>> 1) Babel relies on gnuplot-mode for session based evaluation
>>> 2) gnuplot-mode does not work on windows
>>>
>>> Which results in the need to add a ":session none" header argument on
>>> windows to avoid session based evaluation.
>>
>> I thought that =:session none= was the default. See
>> http://orgmode.org/manual/session.html#session.
>>
>> So, writing nothing is OK, or do you really need to *explicitly* dismiss
>> the session?
>
> You are correct that =:session none= is the global default, however header
> arguments can be specified on the global, language, file, headline, and code
> block scale,

Not using such global params *yet*, I had only the small picture in mind.
Thanks for refreshing my memory...


> and it so happens that =:session= is specified in
> `org-babel-default-header-args:gnuplot' on the language level for gnuplot.
> This could undone with something like the following.
>
> (setq org-babel-default-header-args:gnuplot
>   '((:results . "file")
> (:exports . "results")))

I did not know such things... Great to learn... A proof I had reason to ask, I
would have missed this forever ;-)

Thanks a lot,
  Seb

-- 
Sébastien Vauban


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode