[O] [OT] Another way org-mode is different

2011-03-23 Thread Jeff Horn
See http://cl.ly/5TwV.

The relevant quote:
"There’s no perceived value in open source for mentoring,
facilitation, disciplining of unruly users, training of newcomers or
non-technical users, etc., which are needed to support both designers
of any gender and women in any role."

This is definitely not true of org-mode. I have had more extensive
interactions with the Erics, Carsten, and Bastien, but *everyone* on
this list has been helpful in learning not just org-mode, but emacs,
literate programming and research, figuring out git, and becoming a
contributor as well as a user.

Thanks. You're all my mentors.

-- 
Jeffrey Horn
http://www.failuretorefrain.com/jeff/



Re: [O] Specifying \institute[short]{long] in Beamer presentations

2011-03-23 Thread Suvayu Ali
On Wed, 23 Mar 2011 19:18:45 -0400
Bernd Weiss  wrote:

> I assume that my first email[1], which I sent yesterday, was not
> clear enough to draw any/enough attention.
> 

Since orgmode is a volunteer effort and the list is a relatively low
traffic list, often posts are answered after a few weeks. :)

> I am currently preparing a Beamer presentation and I would like to 
> include \institute[short]{long} into my org-file; it is important
> that I am able to define a short and a long entry for institute. How
> can I do this?

Let me reword your issue, but my understanding of LaTeX is limited so
please correct me if I am wrong.

You want to specify your affiliation with the institute command. AFAIU
the \institute command is declared in the header of a tex file. So I am
a little confused by your use of properties in org. Shouldn't something
like this after the "#+NAME:" and "#+AUTHOR:" directives work fine?

#+LaTeX_HEADER: \institute[short name]{My awesome institute}

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] org table calc and lisp for hh:mm timetable

2011-03-23 Thread Eric Schulte
Christian Moe  writes:

> Hi,
>
> If we're not just looking for a neat workaround for some special cases 
> anymore, but looking at making org-tables aware of time-like strings 
> by default, a better strategy than to convert them into integers might 
> be to translate them into Calc time format and back again.
>
> After all, Calc and hence the Org spreadsheet already handles time 
> arithmetic perfectly well, it's just that it would be nice to have 
> this functionality with the extra option to enter and display times as 
> =12:45= rather than =12@ 45'= or =12h 45m=.
>

I did not realize that calc (and hence Org) already supported operating
on time values.  The =7@ 30'= format does indeed work well for time
table formulas (although the =12h 5m= format does not), e.g.,

| 1@ 20' | 2 | 0@ 40' 0."  |
| 2@ 5'  | 3 | 0@ 41' 40." |
#+TBLFM: $3=$1/$2

Maybe all that is needed is explicit mention of this syntax somewhere in
the table section of the Org-mode manual.

The only remaining reason to support a %d:%d time format is that it is
what I (and I expect most users) would first think of to represent time,
and supporting such a format would allow time calculation in a table to
"just work" -- meaning users could likely manipulate time without having
to first look in the manual for the appropriate Calc format.

However as Carsten mentioned such an automatic translation of e.g.,
=7:20= to =7@ 20'= would be a bit bold, and (as mentioned elsewhere) it
would result in having to make some denomination decisions, namely does
=7:20= convert to =7@ 20'= or =7' 20"=.

For now I've posted my `with-time' macro up to Worg.

Cheers -- Eric



[O] Re: s-tab not working as intended in kde's konsole

2011-03-23 Thread Izzie
Achim Gratz  nexgo.de> writes:

> 
> Izzie  antichef.net> writes:
> 
> > Hi, I'm a newcomer to orgmode and a basic emacs user who has trouble with 
some 
> > shortcuts not doing what they should. I don't know how to fix it.
> >
> > This problem occurs on an aptosid (debian sid 64-bits) laptop with kde when 
> > running emacs in konsole with the -nw parameter. 
> >
> > Instead of folding/unfolding S-TAB seems to take focus away as the cursor 
goes 
> > from full to empty but nothing. 
> 
> This doesn't appear to have anything to do with orgmode, but... KDE
> defines a lot of global shortcuts in addition to each application being
> able to define their own shortcuts on top of that.  If you want to check
> if that's the problem, the window menu (right click on title bar or
> frame) should offer "Extended->Special settings" or whatever
> localization calls these.  Temporarily disable all global shortcuts and
> see if it works better (don't forget that none of the shortcuts will
> work while the window has focus).  If you can input S-Tab now, you can
> then decide if it's better to remove the shortcut or to redefine the key
> sequence in Emacs.  If it still doesn't work, maybe your keyboard isn't
> set up correctly or the character encoding inside the shell is
> inconsistent with the settings in the terminal emulation.
> 
> Achim.

Wow! You just opened me to a whole new world of possibilities in advanced 
window management I didn't suspect existed. No luck though as disabling kde 
shortcuts didn't change a thing. With both konsole shortcuts and kde shortcuts 
out of the way the problem is still here.

I don't really what to do to check is the keyboard,a fr_CH qwertz btw, is 
correctly set up. I looked up konsole settings and found a section about 
keybindings set on default (xfree4), I tried the other option "linux console" 
but it didn't fix my problem, and I found encoding is set to utf-8.





[O] Re: s-tab not working as intended in kde's konsole

2011-03-23 Thread Izzie
Eric S Fraga  ucl.ac.uk> writes:

> > Izzie  antichef.net> writes:
> > This problem occurs on an aptosid (debian sid 64-bits) laptop with kde when 
> > running emacs in konsole with the -nw parameter. 
> 
> My experience with console use of emacs is that many key sequences are
> not possible.  Some are trapped by whatever terminal emulator is being
> used and others are simply not understood.

I had this problem with gnome-terminal and using zsh but switching to kde fixed 
it as it seems konsole does a good job at not getting in the way by dealing 
smartly with shortkeys collision, somehow telling when the shortkey should go 
to 
the shell and when it should go to konsole. At least until now, maybe I hadn't 
hit the specific key combination that does not work inside konsole yet.
 
> The trick is to identify which ones are not and provide
> alternative bindings for those commands if you really need them.  You
> can, of course, always execute any given command using =M-x command RET=
> (where M-x may have to be invoked by =ESC x=).
> 
> However, one must ask: why use emacs in console mode if you are running
> kde?  This does limit what emacs can do.

Remote editing of files through ssh often (but not always) inside screen is the 
reason. I know about tramp but haven't had time to look into it yet. I have not 
found an equivalent to screen though.







[O] Specifying \institute[short]{long] in Beamer presentations

2011-03-23 Thread Bernd Weiss

Dear all,

I assume that my first email[1], which I sent yesterday, was not clear 
enough to draw any/enough attention.


I am currently preparing a Beamer presentation and I would like to 
include \institute[short]{long} into my org-file; it is important that I 
am able to define a short and a long entry for institute. How can I do 
this?


NB: Modifying "(add-to-list 'org-export-latex-classes '("beamer" ..." 
(see [1]), causes org-mode to ignore any


:PROPERTIES:
:BEAMER_env: frame
:BEAMER_envargs: [...]
:END:

statements.

Thanks,

Bernd

[1] "Customizing LaTeX-export, Beamer, \institute, and BEAMER_envargs" 
http://www.mail-archive.com/emacs-orgmode@gnu.org/msg39705.html




Re: [O] [babel] Trouble with :cache yes

2011-03-23 Thread Ken.Williams




On 3/23/11 5:00 PM, "Erik Iverson"  wrote:
>
>Try :eval never
>
>http://orgmode.org/org.html#eval
>
>Don't know if that will work, but it sounds promising.

Perfect!  Thanks everyone for the help.


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




[O] Re: Capture Template problem

2011-03-23 Thread Bernt Hansen
Chao LU  writes:

> Dear All,
>
> I found a little problem when configuring Org-Capture.
>
> The target file is iPrv.org, whose structure is like this:
> ===
> * INBOX
> *** A
> *** B
> *** C
> ===
> So I defined a template like :
>  ("i" "INBOX" entry (file+olp (concat org-private-dir "/iPrv.org") "INBOX")
> "*** %?" :prepend t)
>
> But the Results turned out to be:
> ===
> * INBOX
> ** D   >  What I want is *** D (Level 3, not 2)
> *** A
> *** B
> *** C
> ===
>
> So I changed my configuration a little like:
>  ("i" "INBOX" entry (file+olp (concat org-private-dir "/iPrv.org") "INBOX" *
> "INBOX"*) "*** %?" :prepend t)
>
> And accordingly the iPrv.org file.
> ===
> * INBOX
> *** INBOX*
> *** A
> *** B
> *** C
> ===
>
> But still error: Heading not found on level 2: INBOX.
>
> I'm using org 7.5 on Emacs OSX 23.3
>
> Thanks,
>
> Chao

Do you have org-odd-levels-only set?  If not then skipping level 2 is
invalid.

Regards,
-- 
Bernt



Re: [O] [babel] Trouble with :cache yes

2011-03-23 Thread Ken.Williams


On 3/23/11 1:16 PM, "Eric Schulte"  wrote:

> writes:
>>Or perhaps, is there some command to evaluate all blocks in a document
>> that need to be re-evaluated, and save the results back to the buffer?
>>I
>> could do that every time before exporting, maybe.
>>
>
>Fortunately there is such a function, org-babel-execute-buffer, bound to
>C-c C-v b, try C-c C-v h in an Org-mode buffer to see all code block
>specific key bindings.


So I tried doing that, and unfortunately it looks like I'm going to have
to restructure my document a bit if I want to use it.  I'd been using
"#+begin_src" blocks in two different ways - some blocks are just "code
listings" that I don't really intend to run, whereas some blocks are "live
code" that I want to execute when exporting the document - these latter
have Babel-style arguments like ":exports both" or ":results output" and
the like.

Of course, "C-c C-v b" will treat *all* of the blocks like "live code"
blocks, so I'm looking for some way to shut off Babel processing of many
of the blocks and just treat them as styled code listings.  Is there some
flag to do that, or should I switch from "#+BEGIN_SRC sh" to
"#+BEGIN_EXAMPLE sh" or something?  Does BEGIN_EXAMPLE know about
different languages of code?



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




Re: [O] [babel] Trouble with :cache yes

2011-03-23 Thread Erik Iverson



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


On 3/23/11 1:16 PM, "Eric Schulte"  wrote:


 writes:

Or perhaps, is there some command to evaluate all blocks in a document
that need to be re-evaluated, and save the results back to the buffer?
I
could do that every time before exporting, maybe.


Fortunately there is such a function, org-babel-execute-buffer, bound to
C-c C-v b, try C-c C-v h in an Org-mode buffer to see all code block
specific key bindings.



So I tried doing that, and unfortunately it looks like I'm going to have
to restructure my document a bit if I want to use it.  I'd been using
"#+begin_src" blocks in two different ways - some blocks are just "code
listings" that I don't really intend to run, whereas some blocks are "live
code" that I want to execute when exporting the document - these latter
have Babel-style arguments like ":exports both" or ":results output" and
the like.

Of course, "C-c C-v b" will treat *all* of the blocks like "live code"
blocks, so I'm looking for some way to shut off Babel processing of many
of the blocks and just treat them as styled code listings.  Is there some
flag to do that, or should I switch from "#+BEGIN_SRC sh" to
"#+BEGIN_EXAMPLE sh" or something?  Does BEGIN_EXAMPLE know about
different languages of code?


Try :eval never

http://orgmode.org/org.html#eval

Don't know if that will work, but it sounds promising.

--Erik



[O] Re: unnumbered subsections in latex export

2011-03-23 Thread Jambunathan K

> OTOH, it is important to document such limitations, so that innocent
> users don't end up spending hours trying to do something that cannot
> be done. 

Point taken.

>
> Nick
>
>

-- 



[O] Re: org-odt (Applying custom templates)

2011-03-23 Thread Jambunathan K
Vinh

>> In addition, is there a way to set up a header, or some text, before
>> the title, similar to the attached file (including the image)?  I
>> don't mind if the solution is pasting some raw xml code in the
>> org-mode file, as this part will remain constant.
>
> What is required is that you extract styles.xml and any images files
>  that it referenced from your odt/ott file and instruct org-odt.el to
>  package these files in the resulting directory. You can do these
>  manually.
>
> I also have a prototype code (that is not committed yet) that achieves
> the above functionality. 

I pushed a fix to my staging branch.

If you set the variable as below

(setq org-export-odt-styles-file
  '("~/tmp-orgmode/Thu Thong Bao - Trai Ve Nguon XV (2011).odt"
("styles.xml" "Pictures/1274034B83A526F3.png")))

the styles.xml and header images would get copied on to the generated
odt file. 

If the desired styles.xml makes no references to other files (as in the
example above) then the above variable could be set to 

(setq org-export-odt-styles-file
  "~/tmp-orgmode/Thu Thong Bao - Trai Ve Nguon XV (2011).odt")

or 

(setq org-export-odt-styles-file "~/elisp/styles.xml")

In both the case org-odt's native styles file will be replaced by the
one that is specified (implicity or explicitly)

>
> See the attached output file and you could see that the headers are
> getting repeated on all pages.
>
> On customization side of things, I am little bit uncertain what would be
> the best way to apply custom styles while also having the user feel
> happy about the document that comes out as a result. (When I apply your
> styles.xml to override my Org's very own styles file, the resulting
> output file is not pleasing to the eye (for example, Headings are
> unstylized) This is because your styles.xml doesn't specify styles for
> 'Heading 2' while for some strange reason - partly because of it's
> ancestry org-odt.el - is emitting Headings from level 2 onwards)
>
> I am open to hearing what orgers think on this front. I would go very
> slow on the customization side of things unless some consensus or clariy
> emerges.

Jambunathan K.



[O] Re: s-tab not working as intended in kde's konsole

2011-03-23 Thread Achim Gratz
Izzie  writes:

> Hi, I'm a newcomer to orgmode and a basic emacs user who has trouble with 
> some 
> shortcuts not doing what they should. I don't know how to fix it.
>
> This problem occurs on an aptosid (debian sid 64-bits) laptop with kde when 
> running emacs in konsole with the -nw parameter. 
>
> Instead of folding/unfolding S-TAB seems to take focus away as the cursor 
> goes 
> from full to empty but nothing. 

This doesn't appear to have anything to do with orgmode, but... KDE
defines a lot of global shortcuts in addition to each application being
able to define their own shortcuts on top of that.  If you want to check
if that's the problem, the window menu (right click on title bar or
frame) should offer "Extended->Special settings" or whatever
localization calls these.  Temporarily disable all global shortcuts and
see if it works better (don't forget that none of the shortcuts will
work while the window has focus).  If you can input S-Tab now, you can
then decide if it's better to remove the shortcut or to redefine the key
sequence in Emacs.  If it still doesn't work, maybe your keyboard isn't
set up correctly or the character encoding inside the shell is
inconsistent with the settings in the terminal emulation.


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

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




Re: [O] Re: unnumbered subsections in latex export

2011-03-23 Thread Nick Dokos
Jambunathan K  wrote:

> 
> >> For example, I don't know if the docbook backend explicitly
> >> writes section numbers in, or if the sectioning is left to the
> >> stylesheet.  If the latter, can I mark sections as ones that
> >> should be numbered and ones that shouldn't?
> >> 
> >
> > And I'm sure Jambunathan will take care of the odt exporter.
> 
> I think from odt side of things users are very likely to turn off
> numbering and toc altogether and be more than happy to give finishing
> touches with automatic outline numbering facility and automatic toc
> generation facility offered by the viewers.
> 
> Currently the TOC and section-numbering generated by the odt exporter is
> artificial. i.e., It looks like section numbers and TOC but the
> underlying xml elements are not spitted out by the odt exporter.
> 
> Considering that the odt exporter is new I believe there is some
> flexibility on my side to reject certain features as too niche for a
> first level release :-).
> 

Of course: if somebody needs the functionality, they implement it and
submit it - that's open source in a nutshell.

OTOH, it is important to document such limitations, so that innocent
users don't end up spending hours trying to do something that cannot
be done. 

Nick



Re: [O] Bug: Recurring items NEVER show up in timeline unaccompanied

2011-03-23 Thread Nick Dokos
Mark S  wrote:

> 
> Lisp tends to bring out my inner dyslexic,  but is it possible to use
> a "while" or other construct instead of "mapcar" and then make the
> "if" construction inside of the lambda check for the :omitted symbol
> and return it as nil? And it would need to break out of the loop as
> soon as it encountered a date equal or greater to the present.
> 
> Philosophically, the way I think the calendar should work for
> recurring events is that they only occur until the last event in the
> calendar UNLESS an argument has been given to specify how far out the
> calendar is to be drawn OR there is a global end-date / end-range
> variable.
> 
 
The bug is indeed easy to fix. What's harder is to figure out how things
*should* work as you point out:

o where should it start? should the timeline include past dates by
  default? when the user says so? should it *ever* include past dates?

o where should it stop? The last explicit entry is one possibility,
  user-input is another (but this would require changes to the user
  interface), a time limit specified by the user in some configuration
  variable is a third.

The more one looks at these things, the more one marvels at the choices
that Carsten and Bastien and Nicolas and the Babel developers (and on and
on) have made: getting things so that they work *just* right most of the
time and providing enough flexibility to cover most of the remaining
cases is hard work.

Nick










Re: [O] Re: Making GTD more mangeable with org

2011-03-23 Thread Marcelo de Moraes Serpa
Ah! Heck, I forgot about org's metadata.. Thanks!

Marcelo.

On Wed, Mar 23, 2011 at 12:21 PM, Matthew Sauer
 wrote:
> In terms of the unfolded startup try:
>
> #+STARTUP: nofold
>
> Matthew
>
> On Wed, Mar 23, 2011 at 12:40 PM, Marcelo de Moraes Serpa
>  wrote:
>> Hi Thomas,
>>
>> Glad you liked it. The code is really simple:
>>
>> (global-set-key (kbd "")  (lambda()  (interactive) (find-file
>> "~/org/index.org")))
>>
>> (defun set-index-read-only () ""
>>  (if (equal (buffer-name) "index.org")
>>      (toggle-read-only)
>>
>>    )
>>  )
>>
>> I've changed the index.org to look like this:
>>
>> * tags 
>> :PERSPECTIVE:GTD:PRODUCTS:4HOURWORKWEEK:IDEAS:PRODUCTIDEAS:WORKFLOW:CHECKLIST
>>
>>
>> * Daily General GTD Checklist
>>  * What do want do do today? What to do now? Where am I in my life
>> regarding the goals and wishes I chose?
>>
>> 1) Check if in.org is full -- too much items? Delay until next friday,
>> otherwise process them.
>> 2) Check agenda for today. What is there needs to be done.
>> 3) Get perspective: Review
>> [[file:gtd/horizons_of_focus.org::*Horizons%20Of%20Focus%20/%20GTD%20Overview][Horizons
>> Of Focus]]
>>   Horizons of focus list the main levels of my life. I can navigate
>> from there if I want and get
>>   the so needed perspective.
>> 3) Get perspective and setup the ground for the day: Check list of
>> @work projects - mark them for today as needed.
>>   I can also mark next actions (TODOs)
>> 4) Get perspective and setup teh ground for the day: Check list of
>> @personal projects - mark them for today as needed.
>>   I can also mark next actions (TODOs)
>>
>>
>> By the way, does anyone know how I could get the org file opened
>> unfolded? I've tried adding (show-all) and, when this hasn't worked
>> (org-cycle '(16)) just after (toggle-read-only) in the body of the def
>> but it did not work.
>>
>> The point is to have quick access to a main checklist (I'd say this is
>> a GTD review checklist) so I can regain perspective fast (I loose
>> perspective too often). It's also good when you are braindead and want
>> to go ahead and don't know where to start, and although I have
>> internalized the GTD workflow, having a reference like this helps. I'm
>> planning to add a list of other ("domain"-specific) checklist in this
>> file as well.
>>
>> Cheers,
>>
>> Marcelo.
>>
>> On Wed, Mar 23, 2011 at 8:21 AM, Thomas Renkert  
>> wrote:
>>>

 However, I started noticing I was getting lost in my own system. This
 is partly because I still don't have the habit of reviewing it all
 very often, but I also found out that my main gtd.org file (the one
 that has projects and next actions/tasks) was getting really long. I
 know I could just use use the visibility functions to make it more
 mangeable, but somehow I was still getting confused about what to do
 at certain points in the day.

 Then I had the idea of creating a braindead index. Something that I
 could access quickly and that would give me *perspective* and help me
 decide what path to take. Here's how it looks like:

 http://img703.imageshack.us/img703/2199/screenshot20110318at120.png

 It can be thought of as a:
  * A dashboard
  * Overview of my system - a way to glue the most important parts
  * A way to trigger my mind and help me stay on track (avoid 
 procrastination)
  * A "cache" area where I can list the projects or files that matter
 the most *now*
  * A checklist / workflow
  * A quick way to regain perspective and help you go back to the "zone"
>>>

 Anyway, I know it might sound like a stupid small thing, but I found
 that this entry-point to my system actually helps me stay focused.

 What do you think ? Share your thoughts ;)

 Marcelo.


>>>
>>>
>>> Hi Marcelo,
>>>
>>> this looks really great! Do you think you could share your code here?
>>>
>>> My ideas would be to start with one "Most important task" at the top of the
>>> list, to include recent emails that need action (links from wanderlust) and 
>>> so
>>> on. Maybe one could also include things like 5-Minute/10-minute tasks for 
>>> small
>>> breaks and so on.
>>>
>>> Your code would be a great starting point for a more capable dashboard/home
>>> screen. (I have some more ideas on this topic but would rather try your code
>>> first - but maybe this would be a great addition to orgmode, especially for 
>>> new
>>> users?)
>>>
>>> Thomas
>>>
>>>
>>>
>>
>>
>



Re: [O] Re: Making GTD more mangeable with org

2011-03-23 Thread Matthew Sauer
In terms of the unfolded startup try:

#+STARTUP: nofold

Matthew

On Wed, Mar 23, 2011 at 12:40 PM, Marcelo de Moraes Serpa
 wrote:
> Hi Thomas,
>
> Glad you liked it. The code is really simple:
>
> (global-set-key (kbd "")  (lambda()  (interactive) (find-file
> "~/org/index.org")))
>
> (defun set-index-read-only () ""
>  (if (equal (buffer-name) "index.org")
>      (toggle-read-only)
>
>    )
>  )
>
> I've changed the index.org to look like this:
>
> * tags 
> :PERSPECTIVE:GTD:PRODUCTS:4HOURWORKWEEK:IDEAS:PRODUCTIDEAS:WORKFLOW:CHECKLIST
>
>
> * Daily General GTD Checklist
>  * What do want do do today? What to do now? Where am I in my life
> regarding the goals and wishes I chose?
>
> 1) Check if in.org is full -- too much items? Delay until next friday,
> otherwise process them.
> 2) Check agenda for today. What is there needs to be done.
> 3) Get perspective: Review
> [[file:gtd/horizons_of_focus.org::*Horizons%20Of%20Focus%20/%20GTD%20Overview][Horizons
> Of Focus]]
>   Horizons of focus list the main levels of my life. I can navigate
> from there if I want and get
>   the so needed perspective.
> 3) Get perspective and setup the ground for the day: Check list of
> @work projects - mark them for today as needed.
>   I can also mark next actions (TODOs)
> 4) Get perspective and setup teh ground for the day: Check list of
> @personal projects - mark them for today as needed.
>   I can also mark next actions (TODOs)
>
>
> By the way, does anyone know how I could get the org file opened
> unfolded? I've tried adding (show-all) and, when this hasn't worked
> (org-cycle '(16)) just after (toggle-read-only) in the body of the def
> but it did not work.
>
> The point is to have quick access to a main checklist (I'd say this is
> a GTD review checklist) so I can regain perspective fast (I loose
> perspective too often). It's also good when you are braindead and want
> to go ahead and don't know where to start, and although I have
> internalized the GTD workflow, having a reference like this helps. I'm
> planning to add a list of other ("domain"-specific) checklist in this
> file as well.
>
> Cheers,
>
> Marcelo.
>
> On Wed, Mar 23, 2011 at 8:21 AM, Thomas Renkert  wrote:
>>
>>>
>>> However, I started noticing I was getting lost in my own system. This
>>> is partly because I still don't have the habit of reviewing it all
>>> very often, but I also found out that my main gtd.org file (the one
>>> that has projects and next actions/tasks) was getting really long. I
>>> know I could just use use the visibility functions to make it more
>>> mangeable, but somehow I was still getting confused about what to do
>>> at certain points in the day.
>>>
>>> Then I had the idea of creating a braindead index. Something that I
>>> could access quickly and that would give me *perspective* and help me
>>> decide what path to take. Here's how it looks like:
>>>
>>> http://img703.imageshack.us/img703/2199/screenshot20110318at120.png
>>>
>>> It can be thought of as a:
>>>  * A dashboard
>>>  * Overview of my system - a way to glue the most important parts
>>>  * A way to trigger my mind and help me stay on track (avoid 
>>> procrastination)
>>>  * A "cache" area where I can list the projects or files that matter
>>> the most *now*
>>>  * A checklist / workflow
>>>  * A quick way to regain perspective and help you go back to the "zone"
>>
>>>
>>> Anyway, I know it might sound like a stupid small thing, but I found
>>> that this entry-point to my system actually helps me stay focused.
>>>
>>> What do you think ? Share your thoughts ;)
>>>
>>> Marcelo.
>>>
>>>
>>
>>
>> Hi Marcelo,
>>
>> this looks really great! Do you think you could share your code here?
>>
>> My ideas would be to start with one "Most important task" at the top of the
>> list, to include recent emails that need action (links from wanderlust) and 
>> so
>> on. Maybe one could also include things like 5-Minute/10-minute tasks for 
>> small
>> breaks and so on.
>>
>> Your code would be a great starting point for a more capable dashboard/home
>> screen. (I have some more ideas on this topic but would rather try your code
>> first - but maybe this would be a great addition to orgmode, especially for 
>> new
>> users?)
>>
>> Thomas
>>
>>
>>
>
>



[O] Re: unnumbered subsections in latex export

2011-03-23 Thread Jambunathan K

>> For example, I don't know if the docbook backend explicitly
>> writes section numbers in, or if the sectioning is left to the
>> stylesheet.  If the latter, can I mark sections as ones that
>> should be numbered and ones that shouldn't?
>> 
>
> And I'm sure Jambunathan will take care of the odt exporter.

I think from odt side of things users are very likely to turn off
numbering and toc altogether and be more than happy to give finishing
touches with automatic outline numbering facility and automatic toc
generation facility offered by the viewers.

Currently the TOC and section-numbering generated by the odt exporter is
artificial. i.e., It looks like section numbers and TOC but the
underlying xml elements are not spitted out by the odt exporter.

Considering that the odt exporter is new I believe there is some
flexibility on my side to reject certain features as too niche for a
first level release :-).

Jambunathan K.





Re: [O] [babel] Trouble with :cache yes

2011-03-23 Thread Eric Schulte
 writes:

> On 3/23/11 12:54 PM, "Williams, Ken (TR Corp Tech)"
>  wrote:
>
>>
>>On 3/23/11 12:28 PM, "Eric Schulte"  wrote:
>>
>>>Thanks for pointing this out, your example doesn't work for me either.
>>>I tracked this down to a problem of not finding the cached results of
>>>named code blocks.  I've just pushed up a simple fix for this issue, so
>>>caching should now work as expected.
>>
>>Thanks Eric.  In my case I'm seeing the [mis]behavior even when the code
>>block has no name - will your fix cover that case too?
>
> Actually, I just realized I'm mistaken.  If I manually evaluate a
> (non-named) block, *then* export the entire document, I indeed get the
> cached results in the export, as expected.
>
> However, if I change the code of a :cached block somewhere in my document
> (or its MD5 is otherwise invalidated) and re-export the document without
> first doing C-c C-c, the export will neither use the cache (which is good)
> nor save the results back to the cache (which is bad), so the export is
> now out of sync with the original.  It would be great if the results in
> exports could be cached in the same way they would be cached when manually
> evaluating blocks.
>

One of the features of Org-mode export is that the document is not
changed by the act of exporting, so unfortunately you will have to
manually evaluate all code blocks, and save their results before
exporting.

>
> Or perhaps, is there some command to evaluate all blocks in a document
> that need to be re-evaluated, and save the results back to the buffer?  I
> could do that every time before exporting, maybe.
>

Fortunately there is such a function, org-babel-execute-buffer, bound to
C-c C-v b, try C-c C-v h in an Org-mode buffer to see all code block
specific key bindings.

Best -- Eric

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



Re: [O] [babel] Trouble with :cache yes

2011-03-23 Thread Ken.Williams

On 3/23/11 12:54 PM, "Williams, Ken (TR Corp Tech)"
 wrote:

>
>On 3/23/11 12:28 PM, "Eric Schulte"  wrote:
>
>>Thanks for pointing this out, your example doesn't work for me either.
>>I tracked this down to a problem of not finding the cached results of
>>named code blocks.  I've just pushed up a simple fix for this issue, so
>>caching should now work as expected.
>
>Thanks Eric.  In my case I'm seeing the [mis]behavior even when the code
>block has no name - will your fix cover that case too?

Actually, I just realized I'm mistaken.  If I manually evaluate a
(non-named) block, *then* export the entire document, I indeed get the
cached results in the export, as expected.

However, if I change the code of a :cached block somewhere in my document
(or its MD5 is otherwise invalidated) and re-export the document without
first doing C-c C-c, the export will neither use the cache (which is good)
nor save the results back to the cache (which is bad), so the export is
now out of sync with the original.  It would be great if the results in
exports could be cached in the same way they would be cached when manually
evaluating blocks.

Or perhaps, is there some command to evaluate all blocks in a document
that need to be re-evaluated, and save the results back to the buffer?  I
could do that every time before exporting, maybe.


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




Re: [O] [babel] Trouble with :cache yes

2011-03-23 Thread Eric Schulte
 writes:

> On 3/23/11 12:28 PM, "Eric Schulte"  wrote:
>
>>Thanks for pointing this out, your example doesn't work for me either.
>>I tracked this down to a problem of not finding the cached results of
>>named code blocks.  I've just pushed up a simple fix for this issue, so
>>caching should now work as expected.
>
> Thanks Eric.  In my case I'm seeing the [mis]behavior even when the code
> block has no name - will your fix cover that case too?
>
>  -Ken

Hi Ken,

Could you send me a minimal example the demonstrates the misbehavior?

Thanks -- Eric



Re: [O] Re: Making GTD more mangeable with org

2011-03-23 Thread Marcelo de Moraes Serpa
Hi Thomas,

Glad you liked it. The code is really simple:

(global-set-key (kbd "")  (lambda()  (interactive) (find-file
"~/org/index.org")))

(defun set-index-read-only () ""
  (if (equal (buffer-name) "index.org")
  (toggle-read-only)

)
  )

I've changed the index.org to look like this:

* tags 
:PERSPECTIVE:GTD:PRODUCTS:4HOURWORKWEEK:IDEAS:PRODUCTIDEAS:WORKFLOW:CHECKLIST


* Daily General GTD Checklist
  * What do want do do today? What to do now? Where am I in my life
regarding the goals and wishes I chose?

1) Check if in.org is full -- too much items? Delay until next friday,
otherwise process them.
2) Check agenda for today. What is there needs to be done.
3) Get perspective: Review
[[file:gtd/horizons_of_focus.org::*Horizons%20Of%20Focus%20/%20GTD%20Overview][Horizons
Of Focus]]
   Horizons of focus list the main levels of my life. I can navigate
from there if I want and get
   the so needed perspective.
3) Get perspective and setup the ground for the day: Check list of
@work projects - mark them for today as needed.
   I can also mark next actions (TODOs)
4) Get perspective and setup teh ground for the day: Check list of
@personal projects - mark them for today as needed.
   I can also mark next actions (TODOs)


By the way, does anyone know how I could get the org file opened
unfolded? I've tried adding (show-all) and, when this hasn't worked
(org-cycle '(16)) just after (toggle-read-only) in the body of the def
but it did not work.

The point is to have quick access to a main checklist (I'd say this is
a GTD review checklist) so I can regain perspective fast (I loose
perspective too often). It's also good when you are braindead and want
to go ahead and don't know where to start, and although I have
internalized the GTD workflow, having a reference like this helps. I'm
planning to add a list of other ("domain"-specific) checklist in this
file as well.

Cheers,

Marcelo.

On Wed, Mar 23, 2011 at 8:21 AM, Thomas Renkert  wrote:
>
>>
>> However, I started noticing I was getting lost in my own system. This
>> is partly because I still don't have the habit of reviewing it all
>> very often, but I also found out that my main gtd.org file (the one
>> that has projects and next actions/tasks) was getting really long. I
>> know I could just use use the visibility functions to make it more
>> mangeable, but somehow I was still getting confused about what to do
>> at certain points in the day.
>>
>> Then I had the idea of creating a braindead index. Something that I
>> could access quickly and that would give me *perspective* and help me
>> decide what path to take. Here's how it looks like:
>>
>> http://img703.imageshack.us/img703/2199/screenshot20110318at120.png
>>
>> It can be thought of as a:
>>  * A dashboard
>>  * Overview of my system - a way to glue the most important parts
>>  * A way to trigger my mind and help me stay on track (avoid procrastination)
>>  * A "cache" area where I can list the projects or files that matter
>> the most *now*
>>  * A checklist / workflow
>>  * A quick way to regain perspective and help you go back to the "zone"
>
>>
>> Anyway, I know it might sound like a stupid small thing, but I found
>> that this entry-point to my system actually helps me stay focused.
>>
>> What do you think ? Share your thoughts ;)
>>
>> Marcelo.
>>
>>
>
>
> Hi Marcelo,
>
> this looks really great! Do you think you could share your code here?
>
> My ideas would be to start with one "Most important task" at the top of the
> list, to include recent emails that need action (links from wanderlust) and so
> on. Maybe one could also include things like 5-Minute/10-minute tasks for 
> small
> breaks and so on.
>
> Your code would be a great starting point for a more capable dashboard/home
> screen. (I have some more ideas on this topic but would rather try your code
> first - but maybe this would be a great addition to orgmode, especially for 
> new
> users?)
>
> Thomas
>
>
>



Re: [O] [babel] Trouble with :cache yes

2011-03-23 Thread Ken.Williams

On 3/23/11 12:28 PM, "Eric Schulte"  wrote:

>Thanks for pointing this out, your example doesn't work for me either.
>I tracked this down to a problem of not finding the cached results of
>named code blocks.  I've just pushed up a simple fix for this issue, so
>caching should now work as expected.

Thanks Eric.  In my case I'm seeing the [mis]behavior even when the code
block has no name - will your fix cover that case too?

 -Ken




Re: [O] [babel] Trouble with :cache yes

2011-03-23 Thread Eric Schulte
 writes:

> On 3/23/11 1:46 AM, "Rainer M Krug"  wrote:
>
>>
>>When exporting to a pdf, I get the following matrix in the pdf:
>>
>>  [,1][,2] [,3]  [,4]
>>[1,] 0.5626863 0.8397120 0.9886886 0.2233873
>>[2,] 0.8697064 0.1101432 0.1372992 0.4114674
>>[3,] 0.3548678 0.5658843 0.1608864 0.5809167
>>
>>And it is different after each export. So it seems that the code block
>>*is* actually evaluated, despite of the cached info.
>>
>>Rainer
>
>
> Yes, that's exactly the behavior I'm seeing too.  Caching seems to have no
> effect on HTML export, no matter whether the block already has a
> "#+results" section or not.
>

Please try once more after updating Org-mode, I just pushed up a fix
which should resolve this problem.

Thanks -- Eric

>
>  -Ken



Re: [O] [babel] Trouble with :cache yes

2011-03-23 Thread Eric Schulte
Rainer M Krug  writes:

> On Wed, Mar 23, 2011 at 3:50 AM, Eric Schulte  wrote:
>> Hi Ken,
>>
>> In order for caching to work, the results of the code block must exist
>> in the org-mode file.  For example, the following code block will be
>> evaluated when triggered either interactively or during export
>>
>> #+begin_src emacs-lisp :cache yes
>>  (+ 2 2)
>> #+end_src
>>
>> alternately, this block will not be evaluated when triggered either
>> interactively or on export, because the cached results are present
>>
>> #+begin_src emacs-lisp :cache yes
>>  (+ 2 2)
>> #+end_src
>>
>> #+results[9b77429d6cea71daf37e21ee09170810b9905066]:
>> : 4
>>
>> In your example, for the code block to not be evaluated as part of the
>> export process, you must first evaluate it manually within the Org-mode
>> file, leaving the results (with the hash tag) saved in the Org-mode
>> file.
>
> I will chime in here, because I had a similar problem.  This does not
> work for me. When I evaluate manually (C-c c) I get the following:
>

Thanks for pointing this out, your example doesn't work for me either.
I tracked this down to a problem of not finding the cached results of
named code blocks.  I've just pushed up a simple fix for this issue, so
caching should now work as expected.

Best -- Eric

>
> * test
> #+source: testcache
> #+begin_src R :cache yes :exports both :results output
>   dat <-  matrix(runif(12), 3, 4)
>   print(dat)
> #+end_src
>
> #+results[cad298135e53df633545d6a32a8b2aab5201721c]: testcache
> :   [,1]  [,2]  [,3]  [,4]
> : [1,] 0.4470891 0.2016197 0.1383083 0.6214485
> : [2,] 0.1598936 0.3819967 0.3527698 0.5124687
> : [3,] 0.3040325 0.5906898 0.1611272 0.1702849
>
> Which I saved (just to be save).
>
> When exporting to a pdf, I get the following matrix in the pdf:
>
>   [,1][,2] [,3]  [,4]
> [1,] 0.5626863 0.8397120 0.9886886 0.2233873
> [2,] 0.8697064 0.1101432 0.1372992 0.4114674
> [3,] 0.3548678 0.5658843 0.1608864 0.5809167
>
> And it is different after each export. So it seems that the code block
> *is* actually evaluated, despite of the cached info.
>
> Rainer
>
>
>>
>> Best -- Eric
>>
>>  writes:
>>
>>> Hi,
>>>
>>> I'm having some trouble getting ":cache yes" to behave the way I think
>>> it's supposed to.  As a test, I have a simple example containing just a
>>> title and one source block:
>>>
>>> #+source: testcache
>>> #+begin_src R :cache yes :exports both :results output
>>> dat <-  matrix(runif(12), 3, 4)
>>> print(dat)
>>> #+end_src
>>>
>>>
>>> If I export this document to HTML (C-c C-e b), Emacs asks me "Evaluate
>>> this R code block (testcache) on your system?"  If I say 'y' it
>>> re-evaluates, if I say 'n' it doesn't, so it doesn't seem like there's any
>>> role that caching gets to play here.
>>>
>>> In addition, when I export the document as above, the results are not
>>> saved in the original org-mode buffer, so whatever "#+results" block is
>>> there (or not there) from doing C-c C-c is neither used nor overwritten -
>>> and therefore the exported document contains different results than the
>>> source document.
>>>
>>> The behavior I expected (please let me know if my expectation is
>>> incorrect) was for the result of the computation to be cached in the Emacs
>>> buffer when I do the first export, and for that saved result to be
>>> included in the exported content for subsequent exports, until either the
>>> code/inputs change or I delete the results block.
>>>
>>> My configuration is:
>>>
>>> Emacs  : GNU Emacs 23.2.50.1 (i386-apple-darwin9.8.0, NS
>>> apple-appkit-949.54)
>>>  of 2010-08-18 on braeburn.aquamacs.org - Aquamacs Distribution 2.1
>>> Package: Org-mode version 7.5
>>>
>>> Thanks!
>>>
>>>
>>> --
>>> Ken Williams
>>> Senior Research Scientist
>>> Thomson Reuters
>>> http://labs.thomsonreuters.com
>>
>>



Re: [O] [babel] Variable support for ob-maxima

2011-03-23 Thread Eric Schulte
Thomas Holst  writes:

> Hello,
>
> recent org-mode versions have support for maxima via org-babel. But
> there is no support vor variables. I implemented basic support for
> variables. A header =var: eq="x^2"= is translated to:
>
> #+begin_src maxima
>   eq : x^2;
> #+end_src
>
> I attached a patch to this eMail.
>

Great, thanks for sharing this patch, I'd very much like to apply this.
Have you seen the instructions for contributing to Org-mode [1]?  Any
patch over 10 lines long requires signed FSF copyright attribution
papers.  Please let me know if you are able to complete the copyright
assignment, once that is done I will apply this patch.

>
> Now I can use the output from one maxima block and make a LaTeX equation
> out of it with one maxima code block and reuse the output and make further
> maipulations with it. I find it dificult to explain what I want to do,
> so here is an example:
>

The example below like a nice application, you may also want to use
"begin_src latex" blocks to display equations resulting from maxima code
blocks.

Cheers -- Eric

>
> * Reuse Output of maxima code blocks
>
>   #+source: eq1()
>   #+begin_src maxima :exports none :results output verbatim
> display2d:false;
> eq1: x**2;
> print(eq1);
>   #+end_src
>   #+results: eq1
>   : x^2 
>
>   Pretty print equation with LaTeX:
>
>   #+source: eq1-latex
>   #+begin_src maxima :exports results :results output latex :var eq=eq1()
> print("\\begin{equation}");
> print(tex1(eq));
> print("\\end{equation}");
>   #+end_src
>
>   #+results: eq1-latex
>   #+BEGIN_LaTeX
>   \begin{equation} 
>   x^2 
>   \end{equation} 
>   #+END_LaTeX
>
>   Do some further calculation / maipulation to equation
>
>   #+source: eq2()
>   #+begin_src maxima :exports none :results output verbatim :var eq=eq1()
> display2d:false;
> eq2 : eq + sin(x);
> print(eq2);
>   #+end_src
>   #+results: eq5
>   : sin(x)+x^2 
>
>   Pretty print second equation:
>
>   #+source: eq2-latex
>   #+begin_src maxima :exports results :results output latex :var eq=eq2()
> print("\\begin{equation}");
> print(tex1(eq));
> print("\\end{equation}");
>   #+end_src
>
>   #+results:
>   #+BEGIN_LaTeX
>   \begin{equation} 
>   \sin x+x^2 
>   \end{equation} 
>   #+END_LaTeX
>
> With this workflow I have all org features for docmentation of math or
> engineering works.
>
> I am a lisp beginner so my lisp code may not be the best. If there are
> better ways to accomplish variable support please let me know.

Footnotes: 
[1]  http://orgmode.org/worg/org-contribute.php



[O] Re: unnumbered subsections in latex export

2011-03-23 Thread Jambunathan K
Nick Dokos  writes:

> Suvayu Ali  wrote:
>
>> This works too, but Lawrence's patch makes it much easier and
>> probably works for other export formats too. Thanks a lot. :)
>> 
>
> No doubt Lawrence's patch can be extended to work for other exports, but
> it's not there yet: each exporter would need a change similar to the one
> that he made to the LaTeX exporter.

Nick is arguing for consistency and completeness. Others are arguing for
convenience. Bastien is siding with hope :-).

I am with Nick on this debate. Nick has made his position stronger by
offering suitable alternatives.

Considering the patch has aleready been accepted I would recommend that
this feature (a quirk?) be not documented at all.

I wish we could emulate the example of Nicolas Goaziou here. Every time
he makes changes to docbook or html or latex exporters due to some
changes in the lists, I cannot stop admiring him ...

Jambunathan K.



[O] Re: [BUG] Unmatched #+end-src

2011-03-23 Thread Nicolas
Hello,

Martyn Jago  writes:

> Hi
>
> * Unmatched #+end-src bug
>
> #+end_src
>
> With the above simple org file, placing the cursor at the end of
> #+end_src and hitting return causes emacs to hang.

I've pushed a fix that should solve the problem. Please tell if it
doesn't.

Thank you for your report.

Regards,

-- 
Nicolas



Re: [O] Re: Completing with anything

2011-03-23 Thread Eric S Fraga
Julien Danjou  writes:

> On Wed, Mar 23 2011, Eric S Fraga wrote:
>
>> Will you provide a means to capturing email addresses from emails
>> directly into an org-contacts db, as bbdb does with ":" and ";" (the
>> latter for annotation of the entry)?  That would be necessary for any
>> move away from bbdb, IMO.
>
> This is already provided.

Oh, right!  Need to check it out more closely obviously.  Thanks.

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



[O] Re: advice: how to export a list without exporting all entries

2011-03-23 Thread Nicolas
Hello,

Eric S Fraga  writes:

> I would like to move to a system in which all the actions are numbered
> sequentially.  At present, they are numbered sequentially within a list
> for each meeting.  I would like to have a single list which grows over
> time. However, when I distribute the minutes of the latest meeting, I
> would like to only have those actions which are not yet complete listed
> in the document I circulate.  The complication is that I want those
> actions that have actually been done still in the list but not exported.
>
> Is there any way to /comment/ out individual list items (whether bullet
> or enumerated) on export?  I export typically to latex but this need not
> be a constraint.  Simply putting [ ] versus [X] boxes on the items is not
> satisfactory as the list would be very long if all items were included in
> the export.
>
> Is there some hook that I can intercept that would enable this?  Can I
> encapsulate individual list items into latex macros with the status of
> the [ ] or [X] boxes?  I am more than happy to write latex code as
> required!  Or even, at a push, elisp code...

I'm not sure to fully understand what you want, but couldn't you
delete-matching-lines toggled check-boxes in a copy of the original
buffer, and export that?

Regards,

-- 
Nicolas



Re: [O] Bug: Recurring items NEVER show up in timeline unaccompanied

2011-03-23 Thread Mark S

Hi Nick,

Lisp tends to bring out my inner dyslexic,  but is it possible to use a  
"while" or other construct instead of "mapcar" and then make the "if"  
construction inside of the lambda check for the :omitted symbol and return  
it as nil? And it would need to break out of the loop as soon as it  
encountered a date equal or greater to the present.


Philosophically, the way I think the calendar should work for recurring  
events is that they only occur until the last event in the calendar UNLESS  
an argument has been given to specify how far out the calendar is to be  
drawn OR there is a global end-date / end-range variable.


Mark


--- On Tue, 3/22/11, Nick Dokos  wrote:


From: Nick Dokos 
Subject: Re: [O] Bug: Recurring items NEVER show up in timeline  
unaccompanied

To: throa...@yahoo.com
Cc: nicholas.do...@hp.com, emacs-orgmode@gnu.org
Date: Tuesday, March 22, 2011, 1:10 PM
Some more comments and another bug in
org-timeline:
o a repeater always gets reported on its initial date - it
only gets reported
  on subsequent instances iff it coincides with some
other entry that will be
  reported on that date.
o the initial comment of org-timeline says "Only entries
with a time
  stamp of today or later will be listed." However, in
the let*, we have
(let* ((dopast t)
   ...
  so by default we get past dates as well.
o [the additional bug] if dopast is set to nil in the let*,
then we run the
  following code to get rid of past dates:
   (if (not dopast)
;; Remove past dates from the list of
dates.
(setq day-numbers (delq nil (mapcar
(lambda(x)
  (if (>= x today) x nil))
day-numbers
 But day-numbers isn't just numbers: it's a list of
day numbers
  interspersed with gap information:
  (733451 (:omitted . 28) 733479 (:omitted
. 5) 733484 (:omitted . 21) 733505 (:omitted . 15) 733520
...)
  and the mapcar function chokes when it has to deal
with a gap argument.
Since there is no way to set dopast from the outside,
perhaps the thing
to do is to remove both it and the above code (as well as
one additional
instance of the variable) and declare that org-timeline
will always do
both past and future. Or, given some global option
variable, it can be
set to that value, in which case the code above needs to be
fixed to
deal with the gaps.
Also, some stopping point will need to be provided. Right
now, that is
the last explicit date in the file, but in the presence of
repeaters
(and assuming that org-timeline gets modified to deal with
them), that
natural stopping point gets pushed all the way to infinity,
so some
other way will need to be provided to stop the
enumeration.
Comments?
Nick





Re: [O] Re: unnumbered subsections in latex export

2011-03-23 Thread Nick Dokos
Lawrence Mitchell  wrote:

> > patches makes the behavior of different exporters potentially
> > inconsistent with each other.
> 
> You can drop the potentially here!
> 

Well, some people might not use the feature...

> > IMO, it would be better to accumulate the patches and once all of the
> > exporters (or perhaps a critical mass: ascii, odt, docbook are the ones
> > I would like to see get patches, but opinions will vary) have patches,
> > then apply the whole thing in one commit (together with a documentation
> > patch). In the meantime, if anybody needs one of them (hi, Suvayu :-)),
> > they could carry it in their local branch.
> 
> > Of course, there is no perfect consistency in any case between the 
> > exporters,
> > but I think at least making the effort to keep them consistent is better
> > than letting them diverge and possibly never converge again.
> 
> I would agree whole-heartedly with these thoughts.  I hadn't
> necessarily expected my patches to go in straight away, but
> offered them for perusal.  However, this requirement may make it
> difficult to get new changes into the export system.  For
> example, I'm uninterested in export to backends other than latex
> and html, so I'm only likely to implement a change for those
> targets.  If no-one else is sufficiently interested in the change
> to pick up the ball for other backends, it may never get in.
> This is possibly a good thing (divergence of export functionality
> and all), but may slow the acceptance of new (useful?) features.
> 

Yes, the equivalent of a DoS attack on org's progress: nobody wants
that. One thing that might work for things like this is a git feature
branch that contains the patches for the feature. That would allow
people to pull from it and try it out. Once the feature is "complete" in
some sense, the branch could be merged to the release branch. I'm not
sure how much more work that would be for Bastien, but it seems to be a
fairly widespread workflow in git circles (see e.g.

   http://nvie.com/posts/a-successful-git-branching-model/

for a pretty nice description.)

> For example, I don't know if the docbook backend explicitly
> writes section numbers in, or if the sectioning is left to the
> stylesheet.  If the latter, can I mark sections as ones that
> should be numbered and ones that shouldn't?
> 

I don't know either - but I'll take a look at ascii and docbook at some
point (although I hope somebody will beat me to it :-) ) And I'm sure
Jambunathan will take care of the odt exporter.

> 
> On a somewhat tangential note, while grovelling around in the
> latex and html backends, it seems to me that the export backends
> in general could do with some loving.  It seems authors of the
> backends are unclear when to use option variables, when to get
> the data from the buffer-local options plist and so.  This data
> is therefore treated inconsistently across backends, sometimes
> (plist-get opt-plist :option) is used, sometimes the default
> variable org-export-with-option is, sometimes neither are
> consulted. 

+10 on that.

> I'm not sufficiently excited by the grunt work to do
> anything about it, but maybe I should!
> 

You would have the undying gratitude of all of us.  Isn't that
motivation enough? :-)

Thanks,
Nick



[O] Re: org-toggle-checkbox does not work on entry with logbook entries

2011-03-23 Thread Nicolas
Hello,

Matt Lundin  writes:

> When I call org-toggle-checkbox on the following headline:
>
> * An entry with logbook entries
>   SCHEDULED: <2011-03-19 Sat 08:00 .+1d>
>   :LOGBOOK:
>   CLOCK: [2011-03-23 Wed 08:07]
>   - State "DONE"   from "NOW"[2011-03-18 Fri 13:44]
>   CLOCK: [2011-03-18 Fri 13:11]--[2011-03-18 Fri 13:44] =>  0:33
>   - State "DONE"   from "NOW"[2011-03-01 Tue 08:51]
>   :END:
>
>  - [ ] Item one
>  - [ ] Item two
>  - [ ] Item three
>
> All the items are checked correctly.
>
>  - [X] Item one - [X] Item two - [X] Item three
>
> But when I call org-toggle-checkbox on the entry again, the items are
> not unchecked.
>
> If I remove the LOGBOOK drawer, everything works as expected.

This should be now fixed on master. Thank you for reporting this.

Regards,

-- 
Nicolas



Re: [O] Re: unnumbered subsections in latex export

2011-03-23 Thread Thomas S. Dye


On Mar 23, 2011, at 5:02 AM, Nick Dokos wrote:


Bastien  wrote:


Hi Nick,

Nick Dokos  writes:


Suvayu Ali  wrote:


This works too, but Lawrence's patch makes it much easier and
probably works for other export formats too. Thanks a lot. :)


No doubt Lawrence's patch can be extended to work for other  
exports, but
it's not there yet: each exporter would need a change similar to  
the one

that he made to the LaTeX exporter.


Let's handle this change exporter by exporter.  The longest trip  
starts

with the first step :)



Sorry, I sent my previous comment without reading ahead for this. I  
still

would like to see some discussion on this, though.

Thanks,
Nick



Aloha Nick,

A non-programmer user's perspective.

I'm pleased that the goal of having one source file export well to  
various formats is widely held.  I'm also pleased that "exports well"  
is frequently redefined to a higher standard.  It is impressive to  
watch something as complex as Org-mode created in this way.


I agree with you that it would be more convenient for users if  
features were introduced fully formed.  I guess users get something  
like that by sticking to releases, rather than following along on  
git.  It used to perturb me that Org-mode files that I had worked hard  
to create would suddenly break, especially when these were intended to  
replace LaTeX files, which are rarely if ever broken in that stable  
environment.  I weighed that inconvenience against the good things  
that Org-mode has brought me and decided to live with the occasional  
inconvenience/catastrophe.


All the best,
Tom






[O] Re: unnumbered subsections in latex export

2011-03-23 Thread Lawrence Mitchell
Nick Dokos wrote:
> Bastien  wrote:

>> Hi Nick,

>> Nick Dokos  writes:

>>> Suvayu Ali  wrote:

 This works too, but Lawrence's patch makes it much easier and
 probably works for other export formats too. Thanks a lot. :)

>>> No doubt Lawrence's patch can be extended to work for other exports, but
>>> it's not there yet: each exporter would need a change similar to the one
>>> that he made to the LaTeX exporter.

>> Let's handle this change exporter by exporter.  The longest trip starts
>> with the first step :)

> Sorry, I sent my previous comment without reading ahead for this. I still
> would like to see some discussion on this, though.

Here it is again:

> This is probably obvious but I thought I'd make it explicit, both for
> future wanderers and for further discussion: application of these
> patches makes the behavior of different exporters potentially
> inconsistent with each other.

You can drop the potentially here!

> IMO, it would be better to accumulate the patches and once all of the
> exporters (or perhaps a critical mass: ascii, odt, docbook are the ones
> I would like to see get patches, but opinions will vary) have patches,
> then apply the whole thing in one commit (together with a documentation
> patch). In the meantime, if anybody needs one of them (hi, Suvayu :-)),
> they could carry it in their local branch.

> Of course, there is no perfect consistency in any case between the exporters,
> but I think at least making the effort to keep them consistent is better
> than letting them diverge and possibly never converge again.

I would agree whole-heartedly with these thoughts.  I hadn't
necessarily expected my patches to go in straight away, but
offered them for perusal.  However, this requirement may make it
difficult to get new changes into the export system.  For
example, I'm uninterested in export to backends other than latex
and html, so I'm only likely to implement a change for those
targets.  If no-one else is sufficiently interested in the change
to pick up the ball for other backends, it may never get in.
This is possibly a good thing (divergence of export functionality
and all), but may slow the acceptance of new (useful?) features.

For example, I don't know if the docbook backend explicitly
writes section numbers in, or if the sectioning is left to the
stylesheet.  If the latter, can I mark sections as ones that
should be numbered and ones that shouldn't?


On a somewhat tangential note, while grovelling around in the
latex and html backends, it seems to me that the export backends
in general could do with some loving.  It seems authors of the
backends are unclear when to use option variables, when to get
the data from the buffer-local options plist and so.  This data
is therefore treated inconsistently across backends, sometimes
(plist-get opt-plist :option) is used, sometimes the default
variable org-export-with-option is, sometimes neither are
consulted.  I'm not sufficiently excited by the grunt work to do
anything about it, but maybe I should!

Lawrence
-- 
Lawrence Mitchell 




[O] Capture Template problem

2011-03-23 Thread Chao LU
Dear All,

I found a little problem when configuring Org-Capture.

The target file is iPrv.org, whose structure is like this:
===
* INBOX
*** A
*** B
*** C
===
So I defined a template like :
 ("i" "INBOX" entry (file+olp (concat org-private-dir "/iPrv.org") "INBOX")
"*** %?" :prepend t)

But the Results turned out to be:
===
* INBOX
** D   >  What I want is *** D (Level 3, not 2)
*** A
*** B
*** C
===

So I changed my configuration a little like:
 ("i" "INBOX" entry (file+olp (concat org-private-dir "/iPrv.org") "INBOX" *
"INBOX"*) "*** %?" :prepend t)

And accordingly the iPrv.org file.
===
* INBOX
*** INBOX*
*** A
*** B
*** C
===

But still error: Heading not found on level 2: INBOX.

I'm using org 7.5 on Emacs OSX 23.3

Thanks,

Chao


[O] Re: [Patch] For the Manual: using org-crypt

2011-03-23 Thread Jambunathan K

Thanks Christian. Some minor improvements. The intention is not to
nitpick but to build on top of what you have provided and help the
reviewer.

> +org-crypt will encrypt the text of an entry, but not the headline, or
> +properties. Org-crypt uses the Emacs EasyPG library to encrypt and decrypt
> +files. 

--8<---cut here---start->8---
> EasyPG is part of recent Emacs releases (at least Emacs 23). It is
> +available as a separate package for earlier versions of Emacs. If your
> +version of Emacs already has EasyPG do not install the package manager's
> +version. Doing so will lead to unpredictable results.
--8<---cut here---end--->8---

This information could be captured elsewhere and be left out of the
manual. (This parts reads like a tutorial entry)

> +
> +To use org-crypt you will need to have something like the following in your
> +@file{.emacs}:

`Recommendation', `suggestion' would be a better word. Word `something'
is ambiguous.

--8<---cut here---start->8---
> +If you want to use Public Key Encryption, you will need to generate a
> +suitable pubic/private key pair using @command{gnupg}.
--8<---cut here---end--->8---

This portion better be left out of the Org manual.

--8<---cut here---start->8---
> +Now any text below a headline that has a @samp{:crypt:} tag will be
> +automatically be encrypted when the file is saved. 
--8<---cut here---end--->8---

Above portion qualifies to be part of introductory text.


--8<---cut here---start->8---
> +Preventing tag inheritance stops you having encrypted text inside encrypted
> +text.
--8<---cut here---end--->8---

Above segment seems a bit out of context ... May be some supplementary
information has to go with it or is it just an implementation artefact
that the user need not bother about. Or is this part of the user
configuration?

> +To decrypt the text just call @kbd{M-x org-decrypt-entry} and the encrypted
> +text where the point is will be replaced with the plain text. 

The first part is complete in itself. The latter can be removed.

--8<---cut here---start->8---
> If you use this +feature a lot, you will probably want to bind
> @kbd{M-x org-decrypt-entry} to +a key.
--8<---cut here---end--->8---

Shouldn't part of the manual?

Jambunathan K.


-- 



Re: [O] [babel] Trouble with :cache yes

2011-03-23 Thread Ken.Williams




On 3/23/11 1:46 AM, "Rainer M Krug"  wrote:

>
>When exporting to a pdf, I get the following matrix in the pdf:
>
>  [,1][,2] [,3]  [,4]
>[1,] 0.5626863 0.8397120 0.9886886 0.2233873
>[2,] 0.8697064 0.1101432 0.1372992 0.4114674
>[3,] 0.3548678 0.5658843 0.1608864 0.5809167
>
>And it is different after each export. So it seems that the code block
>*is* actually evaluated, despite of the cached info.
>
>Rainer


Yes, that's exactly the behavior I'm seeing too.  Caching seems to have no
effect on HTML export, no matter whether the block already has a
"#+results" section or not.

 -Ken




Re: [Accepted] [O] Allow mixed export of numbered and unnumbered sections in HTML

2011-03-23 Thread Suvayu Ali
On Wed, 23 Mar 2011 10:57:03 -0400
Nick Dokos  wrote:

> IMO, it would be better to accumulate the patches and once all of the
> exporters (or perhaps a critical mass: ascii, odt, docbook are the
> ones I would like to see get patches, but opinions will vary) have
> patches, then apply the whole thing in one commit (together with a
> documentation patch). In the meantime, if anybody needs one of them
> (hi, Suvayu :-)), they could carry it in their local branch.

Yes, I understand and agree to your argument. I am already using the
patch on my local branch. :)

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Using Variable in Org-capture configuration

2011-03-23 Thread Chao LU
Yes, the latest version of org 7.5 works!

Thanks~

Chao

On Tue, Mar 22, 2011 at 12:56 PM, Carsten Dominik  wrote:

>
> On 22.3.2011, at 15:25, Chao LU wrote:
>
> > Dear all,
> >
> > Just writing to see if it is possible to use variable in org-capture
> configuration, like this
> >
> >  (setq org-capture-templates
> >'(("t" "Todo" entry (file "~/org/refile.org") "* TODO %?\n
>  %i\n  %a" :prepend t)))
> >   
> >\---How could I
> use-> (concat My-Dropbox-Path "refile.org")
> >
> > Since I put all my files in Dropbox, and the My-Dropbox-Path has
> different values under MAC and M$Windows.
>
> Using backquote as the others in this thread say is one possibility.
> However, you can also get the latest version of Org - it does
> allow a lisp form for the file name:
>
> http://article.gmane.org/gmane.emacs.orgmode/38067/match=form
>
> - Carsten
>
> >
> > Thanks,
> >
> > Chao
>
>


[O] Re: [Patch] For the Manual: using org-crypt

2011-03-23 Thread Christian Egli
Julien Danjou  writes:

> On Fri, Mar 18 2011, Ian Barton wrote:
>
>> Apologies in advance this isn't a "real" patch:) This is the entry for the
>> manual describing org-crypt.el. I was going to put it in
>> http://orgmode.org/manual/Miscellaneous.html#Miscellaneous However, since I
>> am not a Tex user, I rapidly came to the conclusion that if I tried to patch
>> org.texi, I would probably do more harm than good.
>>
>> I have also pushed a short Tutorial to Worg about using encryption with org
>> files.
>
> It seems nobody answered you: I think that if you do not try to provide
> this in form of a patch it will be forgotten.
> Or could somebody help integrating this into a patch to org.texi maybe?

The attached patch should get you started. It is just a simple org ->
texi translation, I don't know if the text conforms to the guidelines
put forth in the Documentation_Standards[1]. Please make sure it
conforms to these and then resubmit the patch. If you need any more help
please let me know.

Thanks
Christian

Footnotes: 
[1]  
http://orgmode.org/w/?p=org-mode.git;a=blob;f=doc/Documentation_Standards.org;hb=HEAD

diff --git a/doc/org.texi b/doc/org.texi
index 6fc848b..fa0676f 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -675,8 +675,6 @@ Specific header arguments
 files during tangling
 * comments::Toggle insertion of comments in tangled
 code files
-* padline:: Control insertion of padding lines in tangled
-code files
 * no-expand::   Turn off variable assignment and noweb
 expansion during tangling
 * session:: Preserve the state of code evaluation
@@ -701,6 +699,7 @@ Miscellaneous
 * Clean view::  Getting rid of leading stars in the outline
 * TTY keys::Using Org on a tty
 * Interaction:: Other Emacs packages
+* org-crypt.el::
 
 Interaction with other packages
 
@@ -11823,8 +11822,6 @@ The following header arguments are defined:
 files during tangling
 * comments::Toggle insertion of comments in tangled
 code files
-* padline:: Control insertion of padding lines in tangled
-code files
 * no-expand::   Turn off variable assignment and noweb
 expansion during tangling
 * session:: Preserve the state of code evaluation
@@ -12284,7 +12281,7 @@ The @code{:mkdirp} header argument can be used to 
create parent directories
 of tangled files when missing.  This can be set to @code{yes} to enable
 directory creation or to @code{no} to inhibit directory creation.
 
-@node comments, padline, mkdirp, Specific header arguments
+@node comments, no-expand, mkdirp, Specific header arguments
 @subsubsection @code{:comments}
 By default code blocks are tangled to source-code files without any insertion
 of comments beyond those which may already exist in the body of the code
@@ -12324,7 +12321,7 @@ Insert newlines before and after each code block body 
in tangled code files.
 Do not insert any newline padding in tangled output.
 @end itemize
 
-@node no-expand, session, padline, Specific header arguments
+@node no-expand, session, comments, Specific header arguments
 @subsubsection @code{:no-expand}
 
 By default, code blocks are expanded with @code{org-babel-expand-src-block}
@@ -12830,6 +12827,7 @@ emacs -Q --batch -l $ORGINSTALL \
 * Clean view::  Getting rid of leading stars in the outline
 * TTY keys::Using Org on a tty
 * Interaction:: Other Emacs packages
+* org-crypt.el::
 @end menu
 
 
@@ -13506,7 +13504,7 @@ tty you would rather use @kbd{C-c .} to re-insert the 
timestamp.
 @end multitable
 
 
-@node Interaction,  , TTY keys, Miscellaneous
+@node Interaction, org-crypt.el, TTY keys, Miscellaneous
 @section Interaction with other packages
 @cindex packages, interaction with other
 Org lives in the world of GNU Emacs and interacts in various ways
@@ -13715,6 +13713,46 @@ another key for this command, or override the key in
 
 @end table
 
+@node org-crypt.el,  , Interaction, Miscellaneous
+@section org-crypt.el
+@cindex @file{org-crypt.el}
+@cindex @code{org-decrypt-entry}
+@cindex Encryption
+@cindex EasyPG
+
+org-crypt will encrypt the text of an entry, but not the headline, or
+properties. Org-crypt uses the Emacs EasyPG library to encrypt and decrypt
+files. EasyPG is part of recent Emacs releases (at least Emacs 23). It is
+available as a separate package for earlier versions of Emacs. If your
+version of Emacs already has EasyPG do not install the package manager's
+version. Doing so will lead to unpredictable results.
+
+To use org-crypt you will need to have something l

Re: [O] org-toggle-checkbox does not work on entry with logbook entries

2011-03-23 Thread Sylvain Rousseau
Hi,

It seems that org-toggle-checkbox doesn't skip the drawer because of
the SCHEDULED line. So the reference item is the first one inside the
drawer. A non-destructive workaround would be to move the SCHEDULED
line after the drawer!

Hope this helps!

Sylvain.


Re: [O] Re: Completing with anything

2011-03-23 Thread Julien Danjou
On Wed, Mar 23 2011, Eric S Fraga wrote:

> Will you provide a means to capturing email addresses from emails
> directly into an org-contacts db, as bbdb does with ":" and ";" (the
> latter for annotation of the entry)?  That would be necessary for any
> move away from bbdb, IMO.

This is already provided.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpHtGiC0glqQ.pgp
Description: PGP signature


[O] [babel] Variable support for ob-maxima

2011-03-23 Thread Thomas Holst
Hello,

recent org-mode versions have support for maxima via org-babel. But
there is no support vor variables. I implemented basic support for
variables. A header =var: eq="x^2"= is translated to:

#+begin_src maxima
  eq : x^2;
#+end_src

I attached a patch to this eMail.

Now I can use the output from one maxima block and make a LaTeX equation
out of it with one maxima code block and reuse the output and make further
maipulations with it. I find it dificult to explain what I want to do,
so here is an example:

* Reuse Output of maxima code blocks

  #+source: eq1()
  #+begin_src maxima :exports none :results output verbatim
display2d:false;
eq1: x**2;
print(eq1);
  #+end_src
  #+results: eq1
  : x^2 

  Pretty print equation with LaTeX:

  #+source: eq1-latex
  #+begin_src maxima :exports results :results output latex :var eq=eq1()
print("\\begin{equation}");
print(tex1(eq));
print("\\end{equation}");
  #+end_src

  #+results: eq1-latex
  #+BEGIN_LaTeX
  \begin{equation} 
  x^2 
  \end{equation} 
  #+END_LaTeX

  Do some further calculation / maipulation to equation

  #+source: eq2()
  #+begin_src maxima :exports none :results output verbatim :var eq=eq1()
display2d:false;
eq2 : eq + sin(x);
print(eq2);
  #+end_src
  #+results: eq5
  : sin(x)+x^2 

  Pretty print second equation:

  #+source: eq2-latex
  #+begin_src maxima :exports results :results output latex :var eq=eq2()
print("\\begin{equation}");
print(tex1(eq));
print("\\end{equation}");
  #+end_src

  #+results:
  #+BEGIN_LaTeX
  \begin{equation} 
  \sin x+x^2 
  \end{equation} 
  #+END_LaTeX

With this workflow I have all org features for docmentation of math or
engineering works.

I am a lisp beginner so my lisp code may not be the best. If there are
better ways to accomplish variable support please let me know.

-- 
Best regards
  Thomas
--- a/ob-maxima.el	2011-03-17 08:37:24.977544600 +0100
+++ b/ob-maxima.el	2011-03-23 14:13:26.780223600 +0100
@@ -47,29 +47,48 @@
   "Expand a block of Maxima code according to its header arguments."
   body)
 
+;; This function expands the body of a source code block by doing
+;; things like prepending argument definitions to the body, it should
+;; be called by the `org-babel-execute:maxima' function below.
+(defun org-babel-expand-body:maxima (body params &optional processed-params)
+  "Expand BODY according to PARAMS, return the expanded body."
+  (concat
+   (mapconcat ;; define any variables
+(lambda (pair)
+  (format "%s : %s;"
+  (car pair) (org-babel-maxima-var-to-maxima (cdr pair
+(mapcar #'cdr (org-babel-get-header params :var)) "\n") "\n" body "\n"))
+
 (defun org-babel-execute:maxima (body params)
   "Execute a block of Maxima entries with org-babel.  This function is
 called by `org-babel-execute-src-block'."
   (message "executing Maxima source code block")
   (let* ((result-params (split-string (or (cdr (assoc :results params)) "")))
-	 (cmdline (cdr (assoc :cmdline params)))
-	 (in-file (org-babel-temp-file "maxima-"))
-	 (cmd (format "maxima --very-quiet -r 'batchload(%S)$' %s"
-		  in-file cmdline)))
-(with-temp-file in-file (insert body))
+ (cmdline (cdr (assoc :cmdline params)))
+ (in-file (org-babel-temp-file "maxima-"))
+ (cmd (format "maxima --very-quiet -r 'batchload(%S)$' %s"
+  in-file cmdline)))
+(with-temp-file in-file
+  (insert (org-babel-expand-body:maxima body params)))
 (message cmd)
 ((lambda (raw) ;; " | grep -v batch | grep -v 'replaced' | sed '/^$/d' "
(mapconcat
-	#'identity
-	(delq nil
-	  (mapcar (lambda (line)
-			(unless (or (string-match "batch" line)
-(string-match "^rat: replaced .*$" line)
-(= 0 (length line)))
-			  line))
-		  (split-string raw "[\r\n]"))) "\n"))
+#'identity
+(delq nil
+  (mapcar (lambda (line)
+(unless (or (string-match "batch" line)
+(string-match "^rat: replaced .*$" line)
+(= 0 (length line)))
+  line))
+  (split-string raw "[\r\n]"))) "\n"))
  (org-babel-eval cmd ""
 
+
+(defun org-babel-maxima-var-to-maxima (var)
+  "Convert an elisp var into a string of template source code
+specifying a var of the same value."
+  (format "%s" var))
+
 (defun org-babel-prep-session:maxima (session params)
   (error "Maxima does not support sessions"))
 


Re: [O] Re: unnumbered subsections in latex export

2011-03-23 Thread Nick Dokos
Bastien  wrote:

> Hi Nick,
> 
> Nick Dokos  writes:
> 
> > Suvayu Ali  wrote:
> >
> >> This works too, but Lawrence's patch makes it much easier and
> >> probably works for other export formats too. Thanks a lot. :)
> >
> > No doubt Lawrence's patch can be extended to work for other exports, but
> > it's not there yet: each exporter would need a change similar to the one
> > that he made to the LaTeX exporter.
> 
> Let's handle this change exporter by exporter.  The longest trip starts
> with the first step :)
> 

Sorry, I sent my previous comment without reading ahead for this. I still
would like to see some discussion on this, though.

Thanks,
Nick



Re: [O] org-clock-report to insert a :scope sutree report when called from within a subtree?

2011-03-23 Thread Bastien
Bastien  writes:

> The default when creating a clock report is to use :scope file.  I find
> it not practical for big files, where the report can take long to build.
>
> I'm thinking of applying this change: when called from within a subtree,
> `C-c C-x C-r' will insert a clock report with ":scope subtree", and use
> ":scope subtree" elsewhere.
>
> Please let me know if you think that's a bad idea.

I have now applied this: now `C-c C-x C-r' will change the scope
depending on where the point is: if it's within a subtree, the scope
will be "subtree" -- otherwise it will be file.

-- 
 Bastien



Re: [Accepted] [O] Allow mixed export of numbered and unnumbered sections in HTML

2011-03-23 Thread Nick Dokos
Bastien Guerry  wrote:

> Patch 711 (http://patchwork.newartisans.com/patch/711/) is now "Accepted".
> 
> Maintainer comment: none
> 

This is probably obvious but I thought I'd make it explicit, both for
future wanderers and for further discussion: application of these
patches makes the behavior of different exporters potentially
inconsistent with each other.

IMO, it would be better to accumulate the patches and once all of the
exporters (or perhaps a critical mass: ascii, odt, docbook are the ones
I would like to see get patches, but opinions will vary) have patches,
then apply the whole thing in one commit (together with a documentation
patch). In the meantime, if anybody needs one of them (hi, Suvayu :-)),
they could carry it in their local branch.

Of course, there is no perfect consistency in any case between the exporters,
but I think at least making the effort to keep them consistent is better
than letting them diverge and possibly never converge again.

Comments?

Nick






Re: [Accepted] [O] Fix html export of footnotes with lists, tables, quotes, etc.

2011-03-23 Thread Bastien
Hi Puneeth,

Puneeth Chaganti  writes:

> But, it looks like the commit message doesn't get into patchwork or is
> it that Bastien changed my bad commit message?  My commit message also
> mentioned that src code blocks don't work, and it possibly because of
> new lines being inserted.  

Your commit message went to the patchwork and I cleaned it up, yes.

> Bastien, did you remove it because it was irrelevant?

I probably should have kept this information, sorry.  I prefered to 
have a commit message saying what the commit does and not what it does
not -- thinking another commit will come soon and complete it.

> If the commit message was changed because, Bastien didn't notice it,
> can someone tell me the right way to send patches?  

I noticed it, don't worry :)

> I just want to reduce Bastien's trouble and this is leading to
> duplication of work, as well.

Thanks a lot for that -- the best way to send patches/commits to the
list is by using the command "git send-email".  Otherwise, the message
of the email is taken as the commit message by patchwork, and that I
need to reedit a bit.  But any other way is okay too, as long as I have
the information.

Best,

-- 
 Bastien



Re: [O] [PATCH] Protect starred commands in LaTeX export correctly

2011-03-23 Thread Bastien
Hi Lawrence,

Lawrence Mitchell  writes:

> * lisp/org-latex.el (org-export-latex-preprocess): Correctly
> match starred command names.

Great -- thanks for this simple and clear patch!  I've now applied it.

-- 
 Bastien



[O] Re: Making GTD more mangeable with org

2011-03-23 Thread Thomas Renkert

> 
> However, I started noticing I was getting lost in my own system. This
> is partly because I still don't have the habit of reviewing it all
> very often, but I also found out that my main gtd.org file (the one
> that has projects and next actions/tasks) was getting really long. I
> know I could just use use the visibility functions to make it more
> mangeable, but somehow I was still getting confused about what to do
> at certain points in the day.
> 
> Then I had the idea of creating a braindead index. Something that I
> could access quickly and that would give me *perspective* and help me
> decide what path to take. Here's how it looks like:
> 
> http://img703.imageshack.us/img703/2199/screenshot20110318at120.png
> 
> It can be thought of as a:
>  * A dashboard
>  * Overview of my system - a way to glue the most important parts
>  * A way to trigger my mind and help me stay on track (avoid procrastination)
>  * A "cache" area where I can list the projects or files that matter
> the most *now*
>  * A checklist / workflow
>  * A quick way to regain perspective and help you go back to the "zone"

> 
> Anyway, I know it might sound like a stupid small thing, but I found
> that this entry-point to my system actually helps me stay focused.
> 
> What do you think ? Share your thoughts ;)
> 
> Marcelo.
> 
> 


Hi Marcelo,

this looks really great! Do you think you could share your code here? 

My ideas would be to start with one "Most important task" at the top of the
list, to include recent emails that need action (links from wanderlust) and so
on. Maybe one could also include things like 5-Minute/10-minute tasks for small
breaks and so on.

Your code would be a great starting point for a more capable dashboard/home
screen. (I have some more ideas on this topic but would rather try your code
first - but maybe this would be a great addition to orgmode, especially for new
users?)

Thomas




Re: [Accepted] [O] Fix html export of footnotes with lists, tables, quotes, etc.

2011-03-23 Thread Puneeth Chaganti
Hi Bastien,

On Wed, Mar 23, 2011 at 8:00 PM, Bastien  wrote:
> Hi Puneeth,
>
> Puneeth Chaganti  writes:
>
>> But, it looks like the commit message doesn't get into patchwork or is
>> it that Bastien changed my bad commit message?  My commit message also
>> mentioned that src code blocks don't work, and it possibly because of
>> new lines being inserted.
>
> Your commit message went to the patchwork and I cleaned it up, yes.

Okay.

>> Bastien, did you remove it because it was irrelevant?
>
> I probably should have kept this information, sorry.  I prefered to
> have a commit message saying what the commit does and not what it does
> not -- thinking another commit will come soon and complete it.

It's alright. I didn't have the time to look into it. But now I'm
motivated to look into it. ;)

>> If the commit message was changed because, Bastien didn't notice it,
>> can someone tell me the right way to send patches?
>
> I noticed it, don't worry :)

Okay. :)

>> I just want to reduce Bastien's trouble and this is leading to
>> duplication of work, as well.
>
> Thanks a lot for that -- the best way to send patches/commits to the
> list is by using the command "git send-email".  Otherwise, the message
> of the email is taken as the commit message by patchwork, and that I
> need to reedit a bit.  But any other way is okay too, as long as I have
> the information.

Ok. I am behind a proxy and not very sure how to get this working.
Will look into this again, hopefully, this time with some success.

Thanks,
Puneeth



Re: [O] Re: unnumbered subsections in latex export

2011-03-23 Thread Bastien
Hi Nick,

Nick Dokos  writes:

> Suvayu Ali  wrote:
>
>> This works too, but Lawrence's patch makes it much easier and
>> probably works for other export formats too. Thanks a lot. :)
>
> No doubt Lawrence's patch can be extended to work for other exports, but
> it's not there yet: each exporter would need a change similar to the one
> that he made to the LaTeX exporter.

Let's handle this change exporter by exporter.  The longest trip starts
with the first step :)

-- 
 Bastien



Re: [O] Re: Completing with anything

2011-03-23 Thread Eric S Fraga
Julien Danjou  writes:

> On Tue, Mar 22 2011, Eric S Fraga wrote:
>
>> How do you invoke it?  I am currently struggling with the interactions
>> between .mailrc (emacs mail aliases, expanding as abbrevs) and bbdb
>> (expanding with TAB).  This is partly why I haven't even considered
>> using org-contacts yet...
>
> I promise you'll soon have both features in org-contacts. ;)

excellent!  I'm definitely willing to be pulled further into the
all-encompassing org world... ;-)

Will you provide a means to capturing email addresses from emails
directly into an org-contacts db, as bbdb does with ":" and ";" (the
latter for annotation of the entry)?  That would be necessary for any
move away from bbdb, IMO.

Thanks,
eric

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



Re: [Accepted] [O] Fix html export of footnotes with lists, tables, quotes, etc.

2011-03-23 Thread Puneeth Chaganti
On Wed, Mar 23, 2011 at 7:38 PM, Bastien Guerry  wrote:
> Patch 700 (http://patchwork.newartisans.com/patch/700/) is now "Accepted".

Thanks.

But, it looks like the commit message doesn't get into patchwork or is
it that Bastien changed my bad commit message?  My commit message also
mentioned that src code blocks don't work, and it possibly because of
new lines being inserted.  Bastien, did you remove it because it was
irrelevant?

If the commit message was changed because, Bastien didn't notice it,
can someone tell me the right way to send patches?  I just want to
reduce Bastien's trouble and this is leading to duplication of work,
as well.

Thanks,
Puneeth



[Accepted] [O] org-clock-report to insert a :scope sutree report when called from within a subtree?

2011-03-23 Thread Bastien Guerry
Patch 696 (http://patchwork.newartisans.com/patch/696/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C874o72koig.fsf%40altern.org%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] org-clock-report to insert a :scope sutree report when called
>   from within a subtree?
> Date: Thu, 17 Mar 2011 15:52:23 -
> From: Bastien Guerry 
> X-Patchwork-Id: 696
> Message-Id: <874o72koig@altern.org>
> To: emacs-orgmode@gnu.org
> 
> Hi all,
> 
> The default when creating a clock report is to use :scope file.  I find
> it not practical for big files, where the report can take long to build.
> 
> I'm thinking of applying this change: when called from within a subtree,
> `C-c C-x C-r' will insert a clock report with ":scope subtree", and use
> ":scope subtree" elsewhere.
> 
> Please let me know if you think that's a bad idea.
> 
> 
> diff --git a/lisp/org-clock.el b/lisp/org-clock.el
> index c567a26..87b175c 100644
> --- a/lisp/org-clock.el
> +++ b/lisp/org-clock.el
> @@ -1652,7 +1652,10 @@ fontified, and then returned."
>  (defun org-clock-report (&optional arg)
>"Create a table containing a report about clocked time.
>  If the cursor is inside an existing clocktable block, then the table
> -will be updated.  If not, a new clocktable will be inserted.
> +will be updated.  If not, a new clocktable will be inserted.  The scope
> +of the new clock will be subtree when called from within a subtree, and 
> +file elsewhere.
> +
>  When called with a prefix argument, move to the first clock table in the
>  buffer and update it."
>(interactive "P")
> @@ -1662,8 +1665,12 @@ buffer and update it."
>  (org-show-entry))
>(if (org-in-clocktable-p)
>(goto-char (org-in-clocktable-p))
> -(org-create-dblock (append (list :name "clocktable")
> -org-clock-clocktable-default-properties)))
> +(let ((props (if (ignore-errors 
> +(save-excursion (org-back-to-heading)))
> +  (list :name "clocktable" :scope 'subtree)
> +(list :name "clocktable"
> +  (org-create-dblock 
> +   (org-combine-plists org-clock-clocktable-default-properties props
>(org-update-dblock))
>  
>  (defun org-in-clocktable-p ()
> 



Re: [O] [PATCH] Protect starred commands in LaTeX export correctly

2011-03-23 Thread Eric S Fraga
Lawrence Mitchell  writes:

> * lisp/org-latex.el (org-export-latex-preprocess): Correctly
> match starred command names.

Brilliant!  Thanks.
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.99.gac6e4.dirty)



Re: [O] [PATCH] Allow mixed export of numbered and unnumbered sections in LaTeX

2011-03-23 Thread Bastien
Lawrence Mitchell  writes:

> * lisp/org-latex.el (org-export-latex-subcontent): Deal specially with
> the case that NUM is an integer.

... and thanks for this one too!  Applied.

-- 
 Bastien



[Accepted] [O] Fix html export of footnotes with lists, tables, quotes, etc.

2011-03-23 Thread Bastien Guerry
Patch 700 (http://patchwork.newartisans.com/patch/700/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3CAANLkTi%3DbFiJvyJZy4vsEvP%2BbMDastWXSB6u72LDPLVqs%40mail.gmail.com%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] Fix html export of footnotes with lists, tables, quotes, etc.
> Date: Fri, 18 Mar 2011 16:52:05 -
> From: Puneeth Chaganti 
> X-Patchwork-Id: 700
> Message-Id: 
> To: emacs-orgmode 
> 
> Hi,
> 
> Attached is a patch that allows having lists, tables, blockquotes and
> other org blocks in footnotes.  Source code blocks still don't work.
> 
> 
> diff --git a/lisp/org-html.el b/lisp/org-html.el
> index c6f26b5..11ef9ef 100644
> --- a/lisp/org-html.el
> +++ b/lisp/org-html.el
> @@ -1690,9 +1690,12 @@ lang=\"%s\" xml:lang=\"%s\">
>  
>(save-excursion
>   (goto-char (point-min))
> - (while (re-search-forward " class=\"footnote\">[^\000]*?\\(\\|\\'\\)" nil t)
> -   (push (match-string 0) footnotes)
> -   (replace-match "" t t)))
> + (while (re-search-forward 
> + "\\(\\( class=\"footnote\">\\)[^\000]*?\\)\\(\\(\\2\\)\\|\\'\\)" 
> + nil t)
> +   (push (match-string 1) footnotes)
> +   (replace-match "\\4" t nil)
> +   (goto-char (match-beginning 0
>(when footnotes
>   (insert (format org-export-html-footnotes-section
>   (nth 4 lang-words)
> 



Re: [O] org-clock-report to insert a :scope sutree report when called from within a subtree?

2011-03-23 Thread Bastien
Hi John,

John Hendy  writes:

> It probably depends on the number of people using huge files vs.
> those not. Or the number of people who want this vs. those that
> don't. Actually, I don't think it really matters because it's so easy
> to change it anyway. Once it's created and changed a little, I often
> don't change it again.
>
> Personally, my org-mode usage favors "bite-sized" files that get
> replaced over time rather than keeping huge files. My files cover one
> month and that's it. Then they are filed away. For me... :scope file
> isn't a big deal.

thanks for your feedback -- I've applied the patch.  I also think it's
quite easy to configure, and avoiding possibly long clock reports by
default is a good thing IMHO.

Best,

-- 
 Bastien



[Accepted] [O] Allow mixed export of numbered and unnumbered sections in HTML

2011-03-23 Thread Bastien Guerry
Patch 711 (http://patchwork.newartisans.com/patch/711/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3Cm34o6u2mwf.fsf_-_%40e4300lm.epcc.ed.ac.uk%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] Allow mixed export of numbered and unnumbered sections in HTML
> Date: Wed, 23 Mar 2011 14:38:18 -
> From: Lawrence Mitchell 
> X-Patchwork-Id: 711
> Message-Id: 
> To: emacs-orgmode@gnu.org
> 
> * lisp/org-html.el (org-export-as-html): Get local value of
> org-export-with-section-numbers from the buffer's plist.  Deal
> specially with the case the resulting value is an integer.
> (org-html-level-start): New optional argument of the option plist used
> instead of `org-export-with-section-numbers'.  Also deal specially
> with the case that the value is an integer.
> 
> When `org-export-with-section-numbers' (or the buffer-local
> :section-numbers option) is an integer, we now export the first NUM
> levels of headings with numbers and lower-level headings without.
> 
> ---
> lisp/org-html.el |   24 ++--
>  1 files changed, 18 insertions(+), 6 deletions(-)
> 
> Nick Dokos wrote:
> > Suvayu Ali  wrote:
> 
> >> This works too, but Lawrence's patch makes it much easier and
> >> probably works for other export formats too. Thanks a lot. :)
> 
> As Nick points out, each exporter backend needs a similar change.
> 
> > No doubt Lawrence's patch can be extended to work for other exports, but
> > it's not there yet: each exporter would need a change similar to the one
> > that he made to the LaTeX exporter.
> 
> Here's the matching change to the HTML exporter, which is the
> only other one I'm familiar with.  Maintainers, if you don't want
> the special-casing on integerp, the change to move from
> `org-export-with-section-numbers' to (plist-get opt-plist
> :section-numbers) is the correct one anyway.  I can split the
> patches if required.
> 
> diff --git a/lisp/org-html.el b/lisp/org-html.el
> index b13fb93..06305f6 100644
> --- a/lisp/org-html.el
> +++ b/lisp/org-html.el
> @@ -1150,6 +1150,7 @@ PUB-DIR is set, use this as the publishing directory."
>(language(plist-get opt-plist :language))
>(keywords(plist-get opt-plist :keywords))
>(description (plist-get opt-plist :description))
> +  (num (plist-get opt-plist :section-numbers))
>(lang-words  nil)
>(head-count  0) cnt
>(start   0)
> @@ -1355,7 +1356,7 @@ lang=\"%s\" xml:lang=\"%s\">
>  (if (string-match quote-re0 txt)
>  (setq txt (replace-match "" t t txt)))
>  (setq snumber (org-section-number level))
> -(if org-export-with-section-numbers
> +(if (and num (integerp num) (>= num level))
>  (setq txt (concat snumber " " txt)))
>  (if (<= level (max umax umax-toc))
>  (setq head-count (+ head-count 1)))
> @@ -1591,7 +1592,7 @@ lang=\"%s\" xml:lang=\"%s\">
>   (setq first-heading-pos (or first-heading-pos (point)))
>   (org-html-level-start level txt umax
> (and org-export-with-toc (<= level umax))
> -   head-count)
> +   head-count opt-plist)
>  
>   ;; QUOTES
>   (when (string-match quote-re line)
> @@ -1684,7 +1685,7 @@ lang=\"%s\" xml:lang=\"%s\">
>  
>(org-html-level-start 1 nil umax
>   (and org-export-with-toc (<= level umax))
> - head-count)
> + head-count opt-plist)
>;; the  to close the last text-... div.
>(when (and (> umax 0) first-heading-pos) (insert "\n"))
>  
> @@ -2330,7 +2331,7 @@ If there are links in the string, don't modify these."
>(insert (if (equal type "d") "\n" "\n")))
>  
>  (defvar body-only) ; dynamically scoped into this.
> -(defun org-html-level-start (level title umax with-toc head-count)
> +(defun org-html-level-start (level title umax with-toc head-count &optional 
> opt-plist)
>"Insert a new level in HTML export.
>  When TITLE is nil, just close all open levels."
>(org-close-par-maybe)
> @@ -2341,6 +2342,7 @@ When TITLE is nil, just close all open levels."
>(preferred (and target
>(cdr (assoc target 
> org-export-preferred-target-alist
>(l org-level-max)
> +  (num (plist-get opt-plist :section-numbers))
>snumber snu href suffix)
>  (setq extra-targets (remove (or preferred target) extra-targets))
>  (setq extra-targets
> @@ -2395,10 +2397,20 @@ When TITLE is nil, just close all open levels."
>   (setq snumber (

[Accepted] [O] Allow mixed export of numbered and unnumbered sections in LaTeX

2011-03-23 Thread Bastien Guerry
Patch 710 (http://patchwork.newartisans.com/patch/710/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3Cm3aagn2pi7.fsf_-_%40e4300lm.epcc.ed.ac.uk%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] Allow mixed export of numbered and unnumbered sections in LaTeX
> Date: Tue, 22 Mar 2011 19:26:14 -
> From: Lawrence Mitchell 
> X-Patchwork-Id: 710
> Message-Id: 
> To: emacs-orgmode@gnu.org
> 
> * lisp/org-latex.el (org-export-latex-subcontent): Deal specially with
> the case that NUM is an integer.
> 
> We would sometimes like to have numbered \sections in LaTeX export but
> unnumbered \subsections and so forth.  That is, use the starred
> equivalents for all sectioning commands below a certain level.
> Previously, the num: option specification could only specify whether
> sections should be numbered or unnumbered at all levels.  We now treat
> an integer value specially, if num:N is supplied then the highest N
> levels are numbered, and lower levels are exported without numbering.
> 
> ---
> lisp/org-latex.el |7 ++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> [...]
> Wouldn't it be nice if #+OPTIONS: num:2 exported
> \section{foo}
> \subsection{bar}
> \subsubsection*{baz}
> 
> It turns out the patch is relatively straightforward.  I haven't
> included a doc update, but could do so if required.
> 
> diff --git a/lisp/org-latex.el b/lisp/org-latex.el
> index fbdeb5e..7a3c629 100644
> --- a/lisp/org-latex.el
> +++ b/lisp/org-latex.el
> @@ -1151,7 +1151,9 @@ and its content."
>  
>  (defun org-export-latex-subcontent (subcontent num)
>"Export each cell of SUBCONTENT to LaTeX.
> -If NUM, export sections as numerical sections."
> +If NUM is non-nil export numbered sections, otherwise use unnumbered
> +sections.  If NUM is an integer, export the highest NUM levels as
> +numbered sections and lower levels as unnumbered sections."
>(let* ((heading (cdr (assoc 'heading subcontent)))
>(level (- (cdr (assoc 'level subcontent))
>  org-export-latex-add-level))
> @@ -1187,6 +1189,9 @@ If NUM, export sections as numerical sections."
>   ;; Normal conversion
>   ((<= level depth)
>(let* ((sec (nth (1- level) sectioning))
> +  (num (if (integerp num)
> +   (>= num level)
> + num))
>start end)
>   (if (consp (cdr sec))
>   (setq start (nth (if num 0 2) sec)
> 



[Accepted] [O] Protect starred commands in LaTeX export correctly

2011-03-23 Thread Bastien Guerry
Patch 712 (http://patchwork.newartisans.com/patch/712/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3Cm3zkom15w6.fsf_-_%40e4300lm.epcc.ed.ac.uk%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] Protect starred commands in LaTeX export correctly
> Date: Wed, 23 Mar 2011 15:28:04 -
> From: Lawrence Mitchell 
> X-Patchwork-Id: 712
> Message-Id: 
> To: emacs-orgmode@gnu.org
> 
> * lisp/org-latex.el (org-export-latex-preprocess): Correctly
> match starred command names.
> 
> Many LaTeX commands exist in both normal and starred forms.  Adjust
> the regexp in `org-export-latex-preprocess' to match the starred form
> as well.
> 
> ---
> lisp/org-latex.el |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> Eric S Fraga wrote:
> 
> > Eric Abrahamsen  writes:
> 
> >> Hi,
> 
> >> In a certain org file I put this line into the export options:
> 
> >> #+begin_src org-mode
> >> #+TEXT: \vspace*{0.5in}
> >> #+end_src
> 
> > Should this not be
> 
> 
> > #+LATEX: \vspace*{0.5in}
> 
> > instead of TEXT?
> 
> 
> [...]
> 
> > One could argue that the latex escaping that org does should
> > include *'ed commands as well... but this may have other repercussions
> > that I am not aware of.
> 
> Indeed it probably should, here's a patch that does exactly that,
> avoiding the need for the above workaround.  With this change
> \vspace*{1cm} is correctly exported like \vspace{1cm}.
> 
> diff --git a/lisp/org-latex.el b/lisp/org-latex.el
> index 2acc169..912ebba 100644
> --- a/lisp/org-latex.el
> +++ b/lisp/org-latex.el
> @@ -2364,7 +2364,7 @@ The conversion is made depending of STRING-BEFORE and 
> STRING-AFTER."
>;; Protect LaTeX commands like \command[...]{...} or \command{...}
>(goto-char (point-min))
>(let ((re (concat
> -  "\\([a-zA-Z]+\\)"
> +  "\\([a-zA-Z]+\\*?\\)"
>"\\(?:<[^<>\n]*>\\)*"
>"\\(?:\\[[^][\n]*?\\]\\)*"
>"\\(?:<[^<>\n]*>\\)*"
> 



[O] org-toggle-checkbox does not work on entry with logbook entries

2011-03-23 Thread Matt Lundin
When I call org-toggle-checkbox on the following headline:

--8<---cut here---start->8---
* An entry with logbook entries
  SCHEDULED: <2011-03-19 Sat 08:00 .+1d>
  :LOGBOOK:
  CLOCK: [2011-03-23 Wed 08:07]
  - State "DONE"   from "NOW"[2011-03-18 Fri 13:44]
  CLOCK: [2011-03-18 Fri 13:11]--[2011-03-18 Fri 13:44] =>  0:33
  - State "DONE"   from "NOW"[2011-03-01 Tue 08:51]
  :END:

 - [ ] Item one
 - [ ] Item two
 - [ ] Item three
--8<---cut here---end--->8---

All the items are checked correctly.

--8<---cut here---start->8---
 - [X] Item one
 - [X] Item two
 - [X] Item three
--8<---cut here---end--->8---

But when I call org-toggle-checkbox on the entry again, the items are
not unchecked.

If I remove the LOGBOOK drawer, everything works as expected.

Best,
Matt



[O] Re: [PATCH] Protect starred commands in LaTeX export correctly

2011-03-23 Thread Eric Abrahamsen
Lawrence Mitchell  writes:

> * lisp/org-latex.el (org-export-latex-preprocess): Correctly
> match starred command names.
>
> Many LaTeX commands exist in both normal and starred forms.  Adjust
> the regexp in `org-export-latex-preprocess' to match the starred form
> as well.

Awesome! This seems like a good idea. Though the other Eric's suggestion
just to use #+LATEX of course worked perfectly, I'm not sure why I
thought I needed #+TEXT in order to place the text before the first
headline…

Eric




[O] [PATCH] Protect starred commands in LaTeX export correctly

2011-03-23 Thread Lawrence Mitchell
* lisp/org-latex.el (org-export-latex-preprocess): Correctly
match starred command names.

Many LaTeX commands exist in both normal and starred forms.  Adjust
the regexp in `org-export-latex-preprocess' to match the starred form
as well.
---
 lisp/org-latex.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Eric S Fraga wrote:

> Eric Abrahamsen  writes:

>> Hi,

>> In a certain org file I put this line into the export options:

>> #+begin_src org-mode
>> #+TEXT: \vspace*{0.5in}
>> #+end_src

> Should this not be


> #+LATEX: \vspace*{0.5in}

> instead of TEXT?


[...]

> One could argue that the latex escaping that org does should
> include *'ed commands as well... but this may have other repercussions
> that I am not aware of.

Indeed it probably should, here's a patch that does exactly that,
avoiding the need for the above workaround.  With this change
\vspace*{1cm} is correctly exported like \vspace{1cm}.

diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 2acc169..912ebba 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -2364,7 +2364,7 @@ The conversion is made depending of STRING-BEFORE and 
STRING-AFTER."
   ;; Protect LaTeX commands like \command[...]{...} or \command{...}
   (goto-char (point-min))
   (let ((re (concat
-"\\([a-zA-Z]+\\)"
+"\\([a-zA-Z]+\\*?\\)"
 "\\(?:<[^<>\n]*>\\)*"
 "\\(?:\\[[^][\n]*?\\]\\)*"
 "\\(?:<[^<>\n]*>\\)*"
-- 
1.7.4.rc2.18.gb20e9




Re: [O] [Patch] For the Manual: using org-crypt

2011-03-23 Thread Julien Danjou
On Fri, Mar 18 2011, Ian Barton wrote:

> Apologies in advance this isn't a "real" patch:) This is the entry for the
> manual describing org-crypt.el. I was going to put it in
> http://orgmode.org/manual/Miscellaneous.html#Miscellaneous However, since I
> am not a Tex user, I rapidly came to the conclusion that if I tried to patch
> org.texi, I would probably do more harm than good.
>
> I have also pushed a short Tutorial to Worg about using encryption with org
> files.

It seems nobody answered you: I think that if you do not try to provide
this in form of a patch it will be forgotten.
Or could somebody help integrating this into a patch to org.texi maybe?

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpdKppigIth9.pgp
Description: PGP signature


Re: [O] beamer code and auctex

2011-03-23 Thread Eric S Fraga
Andrea Crotti  writes:

> I'm trying to put some nicely colored code in my org-beamer
> presentation.
>
> On one machine I have minted but it's not found and the other is not
> installed, but I guess that's a latex problem.
> With lstlisting it kind of work but the font is way too big and not very
> nice, but I'll try again maybe to see if I can get it better...
>
> The problem is that I use auctex for latex files, and the first time it
> asks a value for the tex-master file.
>
> Isn't it possible to disable this and why does it asks since I'm using
> pdflatex directly, right?
>
> Thanks,
> Andrea

You can customise auctex to do what you want.  From
[[info:auctex#Multifile]],

,
|When you, for example, ask AUCTeX to run a command on the master
| file, it has no way of knowing the name of the master file.  By default,
| it will assume that the current file is the master file.  If you insert
| the following in your `.emacs' file AUCTeX will use a more advanced
| algorithm.
| 
|  (setq-default TeX-master nil) ; Query for master file.
`

Set this variable to t to indicate that all files are "masters" by
default, I believe.  Even though you are using pdflatex directly, you
are prompted because the tex file is being loaded in the process of
creating that pdf.

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



Re: [O] s-tab not working as intended in kde's konsole

2011-03-23 Thread Eric S Fraga
Izzie  writes:

> Hi, I'm a newcomer to orgmode and a basic emacs user who has trouble with 
> some 
> shortcuts not doing what they should. I don't know how to fix it.
>
> This problem occurs on an aptosid (debian sid 64-bits) laptop with kde when 
> running emacs in konsole with the -nw parameter. 

My experience with console use of emacs is that many key sequences are
not possible.  Some are trapped by whatever terminal emulator is being
used and others are simply not understood.

The trick is to identify which ones are not and provide
alternative bindings for those commands if you really need them.  You
can, of course, always execute any given command using =M-x command RET=
(where M-x may have to be invoked by =ESC x=).

However, one must ask: why use emacs in console mode if you are running
kde?  This does limit what emacs can do.

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



Re: [O] escaping of #+TEXT lines: \vspace vs \vspace*

2011-03-23 Thread Eric S Fraga
Eric Abrahamsen  writes:

> Hi,
>
> In a certain org file I put this line into the export options:
>
> #+begin_src org-mode
> #+TEXT: \vspace*{0.5in}
> #+end_src

Should this not be 

#+LATEX: \vspace*{0.5in}

instead of TEXT?

By the way, if you want such commands to be recognised inline within
normal org text, without having to escape them, I do the following:

#+latex_header: \newcommand{\Gap}[1]{\vspace*{#1}}

and then simply type \Gap{0.5in} whenever you want to invoke this vspace
command.  One could argue that the latex escaping that org does should
include *'ed commands as well... but this may have other repercussions
that I am not aware of.

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



Re: [O] Re: Completing with anything

2011-03-23 Thread Julien Danjou
On Tue, Mar 22 2011, Eric S Fraga wrote:

> How do you invoke it?  I am currently struggling with the interactions
> between .mailrc (emacs mail aliases, expanding as abbrevs) and bbdb
> (expanding with TAB).  This is partly why I haven't even considered
> using org-contacts yet...

I promise you'll soon have both features in org-contacts. ;)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpGe2Rb746pd.pgp
Description: PGP signature


[O] [PATCH] Allow mixed export of numbered and unnumbered sections in HTML

2011-03-23 Thread Lawrence Mitchell
* lisp/org-html.el (org-export-as-html): Get local value of
org-export-with-section-numbers from the buffer's plist.  Deal
specially with the case the resulting value is an integer.
(org-html-level-start): New optional argument of the option plist used
instead of `org-export-with-section-numbers'.  Also deal specially
with the case that the value is an integer.

When `org-export-with-section-numbers' (or the buffer-local
:section-numbers option) is an integer, we now export the first NUM
levels of headings with numbers and lower-level headings without.
---
 lisp/org-html.el |   24 ++--
 1 files changed, 18 insertions(+), 6 deletions(-)

Nick Dokos wrote:
> Suvayu Ali  wrote:

>> This works too, but Lawrence's patch makes it much easier and
>> probably works for other export formats too. Thanks a lot. :)

As Nick points out, each exporter backend needs a similar change.

> No doubt Lawrence's patch can be extended to work for other exports, but
> it's not there yet: each exporter would need a change similar to the one
> that he made to the LaTeX exporter.

Here's the matching change to the HTML exporter, which is the
only other one I'm familiar with.  Maintainers, if you don't want
the special-casing on integerp, the change to move from
`org-export-with-section-numbers' to (plist-get opt-plist
:section-numbers) is the correct one anyway.  I can split the
patches if required.

diff --git a/lisp/org-html.el b/lisp/org-html.el
index b13fb93..06305f6 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1150,6 +1150,7 @@ PUB-DIR is set, use this as the publishing directory."
 (language(plist-get opt-plist :language))
 (keywords(plist-get opt-plist :keywords))
 (description (plist-get opt-plist :description))
+(num (plist-get opt-plist :section-numbers))
 (lang-words  nil)
 (head-count  0) cnt
 (start   0)
@@ -1355,7 +1356,7 @@ lang=\"%s\" xml:lang=\"%s\">
   (if (string-match quote-re0 txt)
   (setq txt (replace-match "" t t txt)))
   (setq snumber (org-section-number level))
-  (if org-export-with-section-numbers
+  (if (and num (integerp num) (>= num level))
   (setq txt (concat snumber " " txt)))
   (if (<= level (max umax umax-toc))
   (setq head-count (+ head-count 1)))
@@ -1591,7 +1592,7 @@ lang=\"%s\" xml:lang=\"%s\">
(setq first-heading-pos (or first-heading-pos (point)))
(org-html-level-start level txt umax
  (and org-export-with-toc (<= level umax))
- head-count)
+ head-count opt-plist)
 
;; QUOTES
(when (string-match quote-re line)
@@ -1684,7 +1685,7 @@ lang=\"%s\" xml:lang=\"%s\">
 
   (org-html-level-start 1 nil umax
(and org-export-with-toc (<= level umax))
-   head-count)
+   head-count opt-plist)
   ;; the  to close the last text-... div.
   (when (and (> umax 0) first-heading-pos) (insert "\n"))
 
@@ -2330,7 +2331,7 @@ If there are links in the string, don't modify these."
   (insert (if (equal type "d") "\n" "\n")))
 
 (defvar body-only) ; dynamically scoped into this.
-(defun org-html-level-start (level title umax with-toc head-count)
+(defun org-html-level-start (level title umax with-toc head-count &optional 
opt-plist)
   "Insert a new level in HTML export.
 When TITLE is nil, just close all open levels."
   (org-close-par-maybe)
@@ -2341,6 +2342,7 @@ When TITLE is nil, just close all open levels."
 (preferred (and target
 (cdr (assoc target 
org-export-preferred-target-alist
 (l org-level-max)
+(num (plist-get opt-plist :section-numbers))
 snumber snu href suffix)
 (setq extra-targets (remove (or preferred target) extra-targets))
 (setq extra-targets
@@ -2395,10 +2397,20 @@ When TITLE is nil, just close all open levels."
(setq snumber (org-section-number level)
  snu (replace-regexp-in-string "\\." "_" snumber))
(setq level (+ level org-export-html-toplevel-hlevel -1))
-   (if (and org-export-with-section-numbers (not body-only))
+   (if (and num (not body-only))
(setq title (concat
 (format "%s"
-level snumber)
+level
+(if (and (integerp num)
+ ;; fix up num to take into
+ ;; account the top-level
+ ;; heading value
+  

[O] Bug: :clock-keep...not kept [7.5 commit-078c01bf3b1742b1015fac9f5bab3a429505f3c6]

2011-03-23 Thread Giovanni Ridolfi

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

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

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


Emacs  : GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600)
 of 2011-03-10 on 3249CTO
Package: Org-mode version 7.5 commit-078c01bf3b1742b1015fac9f5bab3a429505f3c6


The option :clock-keep, in the capture template, is not honoured and 
org clocks out when I close my template buffer.

This is my template:
(setq org-capture-templates
'(("s" "Task" entry (file+headline "c:/Documents and  
Settings/user/Documents/test.org" "test") "*** %^{prompt}
   :PROPERTIES:
   :Note:
   :Comment:  %?
   :END: " :clock-in t :clock-keep t)))

-- this is the result --
** hi
CLOCK: [2011-03-23 mer 10:07]--[2011-03-23 mer 10:07] =>  0:00
   :PROPERTIES:
   :Note:
   :Comment:  
   :END:
---

Another useful information is that, if I customize the
org-capture-template variable  'C-c c C ' the option 
:clock-keep is nil  ?!
This way I do not have the possibility to set it to "clock-keep t"

-template
Org Capture Templates: Hide Value
INS DEL Choice: Value Menu Template entry:
Keys   : s
Description: Task
Capture Type   : Value Menu Org entry
Target location: Value Menu File & Headline:
  File: c:/Documents and Settings/user/Documents/test.org
  Headline: test
Template: Value Menu String: *** %^{prompt}
   :PROPERTIES:
   :Note:
   :Comment:  %?
   :END: 
Plist:
[ ] Key: :prepend t
[ ] Key: :immediate-finish t
[ ] Key: :empty-lines 1
[X] Key: :clock-in t
[ ] Key: :clock-keep nil
[ ] Key: :clock-resume t
[ ] Key: :unnarrowed t
[ ] Key: :kill-buffer t
INS DEL Key: :clock-keep
Value: t
INS


If I toggle the :clock-keep nil option [v], and set for current session,
the clock is clocked out.


current state:
==
(setq
 org-log-done 'time
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-capture-templates '(("s" "Task" entry
  (file+headline "c:/Documents and 
Settings/user/Documents/test.org"
   "test")
  "*** %^{prompt}\n   :PROPERTIES:\n   :Note:\n   
:Comment:  %?\n   :END: " :clock-in t :clock-keep
  t)
 )
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-finalize-agenda-hook '(my-org-agenda-to-appt)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-mode-hook '((lambda nil
  (org-add-hook (quote change-major-mode-hook) (quote 
org-show-block-all) (quote append) (quote local)))
 (lambda nil
  (org-add-hook (quote change-major-mode-hook) (quote 
org-babel-show-result-all) (quote append)
   (quote local))
  )
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src 
org-babel-exp-inline-src-blocks))
 org-enforce-todo-dependencies t
 org-occur-hook '(org-first-headline-recenter)
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc 
org-beamer-auto-fragile-frames
   org-beamer-place-default-actions

[O] error in tableformula or bug

2011-03-23 Thread Martin Halder
Hi all,

found some strange behavior which was working before as far as I remember.. I 
am on commit 078c01b.

this is working correctly:
| 10 |
| 10 |
| 20 |
||
| 40 |
#+TBLFM: @>$1=vsum(@1..@3)

this one with relative indexing (@>-1) not: (value is changing every time the 
formula is applied: 37, 73, 109 (+36 every time)
| 10 |
| 10 |
| 20 |
||
| 37 |
#+TBLFM: @>$1=vsum(@1..@>-1)

Thanks for help,
Martin