Re: [O] sitemap seems to cache old #+TITLE

2011-03-17 Thread iemacs
Hi Louis,

After modifying #+TITLE, you should press C-c C-c to tell orgmode the
title part has been changed.

On Fri, Mar 18, 2011 at 12:58 PM,   wrote:
>
> At one point in the recent past I had a file org.org with
> #+TITLE: LBM TCH KB Org
>
> Eventually I changed it to be
> #+TITLE: KBorg
>
> no matter what I do, the generated sitemap pick up the old title.
>
> Is this cached somewhere? and how do I get it to change?
>
> Thanks in advance,
>
> Louis
>
>



-- 
Kind regards,

Tian Qiu



[O] sitemap seems to cache old #+TITLE

2011-03-17 Thread lbmlist


At one point in the recent past I had a file org.org with
#+TITLE: LBM TCH KB Org

Eventually I changed it to be
#+TITLE: KBorg

no matter what I do, the generated sitemap pick up the old title.

Is this cached somewhere? and how do I get it to change?

Thanks in advance,

Louis



Re: [O] Worg updating?

2011-03-17 Thread Nick Dokos
Nick Dokos  wrote:

> ...but the sunrise/sunset section in org-hacks is still MIA. AFAICT, the
> publishing process didn't do anything with org-hacks because it thought it
> was unmodified. I'll try to push a small modification and we'll see whether it
> picks it up.
> 

OK, I fixed a typo in org-hacks, pushed it and watched Worg pull and publish it
successfully. The sunrise/sunset hack made it to the web!

Thanks to all,
Nick





Re: [O] Worg updating?

2011-03-17 Thread Nick Dokos
Jason Dunsmore  wrote:

> >
> > See:
> >
> > http://orgmode.org/worg/worg-setup.html
> >
Oh, wow: right in front of my eyes - thanks, Erik!

> > which will direct you to:
> >
> > http://orgmode.org/worg/publishing.txt
> >
> > AT the bottom of that file:
> >
> > "Generating tree-style sitemap for Sitemap for project worg-pages
> > Not a standard Org-mode time string: 2010.08.25 20:41:52"
> 
> This and another badly formatted date were causing the Worg publishing
> process to fail.  I fixed it in these two commits:
> 
> http://repo.or.cz/w/Worg.git/commitdiff/cba1f50f636401723c6bf9c38d86e725817123ff
> http://repo.or.cz/w/Worg.git/commitdiff/a5ba2e96757d7b5870f667f9bd23c9491bd9f14e
> 
> Thomas' new section is now present after republishing Worg:
> 
> http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-10_1
> 
> Regards,
> Jason
> 

...but the sunrise/sunset section in org-hacks is still MIA. AFAICT, the
publishing process didn't do anything with org-hacks because it thought it
was unmodified. I'll try to push a small modification and we'll see whether it
picks it up.

Thanks,
Nick






Re: [O] OrgCamp in India -- Interested?

2011-03-17 Thread Puneeth Chaganti
Hi Bastien,

Thanks for showing us this page.  We will use the page, if and when we need it.

Best,
Puneeth

On Thu, Mar 17, 2011 at 12:11 PM, Bastien  wrote:
> Hi Puneeth,
>
> Puneeth Chaganti  writes:
>
>> Inspired by the OrgCamps being conducted in Paris [1] [2], I would
>> like to propose an OrgCamp somewhere in India.
>
> thanks for suggesting this -- just a reminder: if you want, you can
> use the Worg/orgcamps.org page for storing information:
>
>  http://orgmode.org/worg/orgcamps.html
>
> Best,
>
> --
>  Bastien
>



Re: [O] OrgCamp in India -- Interested?

2011-03-17 Thread Puneeth Chaganti
Hello Venkatesh,

On Wed, Mar 16, 2011 at 7:35 PM, Venkatesh Choppella
 wrote:
> Hello Puneeth:
>
> I'd like to host this in IIIT in Hyderabad.  Apr and May would be very
> hot here, though.   June would be more pleasant.  Hyderabad is
> overnight by train from all the places mentioned earlier (Pune,
> Mumbai, Chennai), and just an hour flight.

Thanks for the offer.  I would be happy to come, if the others are
willing to make it. :)

Best,
Puneeth



Re: [O] Worg updating?

2011-03-17 Thread Jason Dunsmore
Erik Iverson  writes:

> On 03/17/2011 05:34 PM, Nick Dokos wrote:
>> Thomas S. Dye  wrote:
>>
>>> Aloha all,
>>>
>>> Changes I made to the LaTeX export tutorial several days ago haven't
>>> made their way to Worg yet.  Is Worg updating?
>>>
>>> All the best,
>>> Tom
>>>
>>
>> Thanks for reminding me: I made a change to org-hacks some time ago and it
>> hasn't shown up yet.  Maybe it would be a good idea to timestamp pages
>> with the update time?
>>
>> Does Worg contain any information on how Worg is built? I found
>>
>>http://orgmode.org/worg/sources/
>
> See:
>
> http://orgmode.org/worg/worg-setup.html
>
> which will direct you to:
>
> http://orgmode.org/worg/publishing.txt
>
> AT the bottom of that file:
>
> "Generating tree-style sitemap for Sitemap for project worg-pages
> Not a standard Org-mode time string: 2010.08.25 20:41:52"

This and another badly formatted date were causing the Worg publishing
process to fail.  I fixed it in these two commits:

http://repo.or.cz/w/Worg.git/commitdiff/cba1f50f636401723c6bf9c38d86e725817123ff
http://repo.or.cz/w/Worg.git/commitdiff/a5ba2e96757d7b5870f667f9bd23c9491bd9f14e

Thomas' new section is now present after republishing Worg:

http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-10_1

Regards,
Jason



[O] Re: Slow movement in large buffers

2011-03-17 Thread Matt Lundin
Bastien  writes:

> Matt, can you build and locally test such a file?  Then instrument
> next-line when jumping from headline 1 to 2, to 3, to 4?

I'm on the job. :)

I'll write back with an official report. Suffice it to say that my early
experiments show org-mode cruising through the examples you gave me, but
slowing considerably whenever, as you suspected, there are numerous
nested overlays.

I tried, unwisely, to create a tree consisting of 100 subtrees, each of
which contained a quote, a drawer, and 100 additional subtrees, each of
which, in turn contained a drawer. It not only took the better part of a
minute to cycle the tree, but it sent my emacs memory usage
skyrocketing. Needless to say, 1 nested entries, each with quotes
and drawers, is an extreme case. :)

Best,
Matt



Re: [O] Re: List-table feature (or a potential quick and easy mullti-lines table in org?)

2011-03-17 Thread feng shu
I wish org-mode can do like this...
 - Row 1  :exports tabel
  - 1.1
  - 1.2
  - 1.3
- Row 2
  - 2.1
  - 2.2
  - 2.3

On Fri, Mar 18, 2011 at 6:18 AM, Ben  wrote:
>>
>> Out of boredom, I've written a draft for it.
>>
>
>
> Woohoo! congrats for the way you're getting bored!
> Hey thank you Nicolas!
>
>>
>> #+begin_src emacs-lisp
>
> So here I'm guessing the whole code fits into Babel, right?
>>
>> All of this will convert
>
> (...)
>>
>> | Row 1 | 1.1 | 1.2 | 1.3 |
>> | Row 2 | 2.1 | 2.2 | 2.3 |
>>
>
> Oh actually you went the 'line' way -- and not the column.
> Considering, I actually think you're right.
> I got used to the ReST way (1 item + sub-items = 1 column) but I think your
> way seems more natural.
> Cool, thank you again!
>
>>
>> and the other way.
>>
>
> I'm afraid I don't get the 'and the other way', does it means your code can
> go the column way as well?!
> Splendid thanks again Nicolas!
>   -- Ben
>



Re: [O] Re: List-table feature (or a potential quick and easy mullti-lines table in org?)

2011-03-17 Thread Nick Dokos
Ben  wrote:

> > #+begin_src emacs-lisp
> >
> 
> So here I'm guessing the whole code fits into Babel, right?
> 

It depends on what you mean: you *can* use babel to evaluate the code
(C-c C-c on every code block, or similar), thereby loading it into your
current emacs, but if you want to use this code regularly, you probably
want to save it in a file (or tangle it if you prefer - although there
is no advantage to tangling in this case), and load it up from your
.emacs.

> 
> > and the other way.
> >
> >
> I'm afraid I don't get the 'and the other way', does it means your code can
> go the column way as well?!
> 

No, he means you can go back from the table to the list, by calling
org-convert-table-to-list.

> Splendid thanks again Nicolas!
> 
>   -- Ben
> 

Nick




Re: [O] Re: [Orgmode] Startup page

2011-03-17 Thread Matthew Sauer
Sorry, at times I forget about this when I use webmail (When I am at
school that is the only option due to wi-fi restrictions of the
university).  Hope this is better.

Here is what I have landed on so far, it works great:

---clip herecurrently in .emacs
(defun org-dblock-write:recently-modified (params) ;Credit to Ido
Magal for this function
 (insert (mapconcat (lambda (arg) (concat "[[file:" arg "][" arg "]]"
)) (split-string (shell-command-to-string "ls -t
/cygdrive/c/Dropbox/org *.org | head -10")) "\n")))
(let ((org-agenda-window-setup 'current-window));Thanks Nick, let me
eliminate the delete
 (org-agenda nil "a"))
(split-window-horizontally)
(find-file "/cygdrive/c/Dropbox/Org/Refile.org")
-clip here currently in .emacs

Below is the basic Refile.org file, some of my captures will fall
directly into here unless I refile them out to a specific place, it's
a land of things that need dealt with but I just did a quick capture.
Now I just need to work out a fun for the Unscheduled todo block and I
will have everything how I want it, well for now anyway.  I may also
add some links or a reminder, and eventually a random quote of the day
in a dynamic block from an RSS feed I pull, hmmm, maybe I should pull
the last 5 from one or two of the feeds into this block from the
feeds.org.   This is kind of becoming an aggregator set of buffers.

Matt
-clip here current refile.org file
* Config
 #+STARTUP: nofold
 #+STARTUP: indent
 #+STARTUP: align
 #+STARTUP: hidestars
 #-*- eval:(org-update-all-dblocks) -*-
* Tasks
* Refile
* Recently modified org files
 #+BEGIN: recently-modified

 #+END
* Unscheduled todo items
 #+BEGIN: unsched-todo

 #+END
-clip here  current Refile.org

On Thu, Mar 17, 2011 at 7:08 PM, Bastien  wrote:
>
> Filippo, Matthew,
>
> please use plain text emails, otherwise the code you send is not
> readable.  You can manually turn off rich-formatted (=HTML) emails
> in gmail for each email.
>
> Thanks,
>
> --
>  Bastien



Re: [O] Re: Problem with agenda and diary

2011-03-17 Thread Nick Dokos
=?utf-8?Q?S=C3=A9bastien_Vauban?=  wrote:

> Hi Nick,
> 
> Nick Dokos wrote:
> > =3D?utf-8?Q?S=3DC3=3DA9bastien_Vauban?=3D  wr=
> ote:
> >> Side question: how do you do to see a really full backtrace?
> >>=20
> >> My backtraces always are elided with ellipsis inside the lines...
> >>=20
> >
> > IIRC, these should do it:
> >
> > ,
> > |  -- Variable: print-length
> > |  The value of this variable is the maximum number of elements to
> > |  print in any list, vector or bool-vector.  If an object being
> > |  printed has more than this many elements, it is abbreviated with
> > |  an ellipsis.
> > |=20
> > |  If the value is `nil' (the default), then there is no limit.
> > |=20
> > |   (setq print-length 2)
> > |=3D> 2
> > |   (print '(1 2 3 4 5))
> > |-| (1 2 ...)
> > |=3D> (1 2 ...)
> > |=20
> > |  -- Variable: print-level
> > |  The value of this variable is the maximum depth of nesting of
> > |  parentheses and brackets when printed.  Any list or vector at a
> > |  depth exceeding this limit is abbreviated with an ellipsis.  A
> > |  value of `nil' (which is the default) means no limit.
> > `
> 
> Weird, they already both are at nil in my current setup.
> 
> As I don't play with them (in my config), I don't understand how the traces
> are still partial...
> 

There's also these two to worry about:

 -- User Option: eval-expression-print-length
 -- User Option: eval-expression-print-level
 These are the values for `print-length' and `print-level' used by
 `eval-expression', and thus, indirectly, by many interactive
 evaluation commands (*note Evaluating Emacs-Lisp Expressions:
 (emacs)Lisp Eval.).

by default, 12 and 4 resp.

In Tassilo's backtrace, I see ellipses at level 4, so I guess
eval-expression-print-level did that.

I also dug a bit deeper: if print_level is nil then backtrace sets the
maximum level to 8, so deeper calls will be elided. So try setting
print_level to some large number and see if that gets rid of the
ellipses. However, eight levels should be enough for just about
anything, no?

Nick





Re: [O] Re: org-src-fontify-natively makes things very, very slow

2011-03-17 Thread Julian Burgos
When editing the block in native mode everything works fine.  Closing
the buffer (or even rebooting the computer) had no effect.
I´ll keep this off until is fixed.  It is though a great feature!

2011/3/17 Sébastien Vauban :
> Hi all,
>
> Eric S Fraga wrote:
>> Julian Burgos  writes:
>>> I was very excited to discover org-src-fontify-natively, but I´m not having
>>> a good experience with it. When it is on, org-mode becomes very slow while
>>> typing into a code block. This happens regardless of the size of the file
>>> or number of blocks, and the slow down is very noticeable. Each keystroke
>>> takes about half a second to appear in screen. Typing outside of the code
>>> blocks everything works fine. Turning off font-lock-verbose and
>>> global-linum-mode did not make any difference. I´m running OrgMode 7.5 and
>>> GNU Emacs 23.2.1. on Windows XP.
>>>
>>> Any ideas?
>
> Idem for me. Slow(er) in Org buffer itself.
>
>> If you edit the source code block in its native mode (C-c',
>> =org-edit-special=), is it fast or slow?
>
> Fast(er) in dedicated buffer.
>
>> In any case, this may be related to the thread on slow behaviour
>> discussed on this list the past few days.  Does the response improve if
>> you kill the buffer and load the file again?
>
> Maybe this is (partly?) due to the overlay I added:
>
> #+begin_src emacs-lisp
>                (overlay-put (make-overlay beg1 block-end)
>                             'face 'org-block-background))
> #+end_src
>
> in function
>
> #+begin_src emacs-lisp
> (defun org-fontify-meta-lines-and-blocks (limit)
> #+end_src
>
> in file org.el.
>
> Best regards,
>  Seb
>
> --
> Sébastien Vauban
>
>
>



-- 
Julian Mariano Burgos
Hafrannsóknastofnunin/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: jul...@hafro.is, jmbur...@uw.edu



Re: [O] Re: [Orgmode] Startup page

2011-03-17 Thread Bastien
Filippo, Matthew,

please use plain text emails, otherwise the code you send is not
readable.  You can manually turn off rich-formatted (=HTML) emails 
in gmail for each email.

Thanks,

-- 
 Bastien



Re: [O] Re: [Orgmode] Startup page

2011-03-17 Thread Filippo A. Salustri
That's right.  Somewhere else in my config, I also set org-agenda-window-setup
to 'current-window.  That was the secret ingredient for me.

Sorry I didn't bring this up sooner.  I use Aquamacs, and the easiest thing
for me is to use both emacs customize and .emacs (Preferences.el in
Mac-speak).  I set org-agenda-window-setup in customize, but have the code I
included in Preferences.el.  Makes it hard for me to remember where stuff
is.

Cheers.
Fil

On 17 March 2011 18:48, Nick Dokos  wrote:

> Matthew Sauer  wrote:
>
>
> > Sigh, at times it's the small things that you miss that bite you in the
> > foot.
> >
> > (defun org-dblock-write:recently-modified (params)
> >  (insert (mapconcat (lambda (arg) (concat "[[file:" arg "][" arg "]]" ))
> > (split-string (shell-command-to-string "ls -t
> > /cygdrive/c/Dropbox/org *.org | head -10")) "\n")))
> > (org-agenda nil "a")
> > (delete-other-windows)
> > (split-window-horizontally)
> > (find-file "/cygdrive/c/Dropbox/org/Refile.org")
> >
> >
> > I forgot (delete-other-windows), I don't know if it the default behavior
> but
> > my agenda opens up 1/2 height and I have to run C-x 1  to make it full
> > screen after C-c a a. . .now to get my next dynamic block function
> > (another thread to be started) working and I will have my weekly agenda
> on
> > one side of the screen.  On the tother I will have recently modified
> files
> > on the other, needing filed captures and Unscheduled TODO items.
> >
> > Thanks for all the help everyone has thrown my way.  I am going to look
> at
> > Filippos' code to see if I can even make this a bit more elegant.
> >
>
> The org-agenda call has the potential of messing up your carefully crafted
> window
> configuration, depending on the value of org-agenda-window-setup. The
> default
> value is reorganize-frame which should tell you something :-). You might
> want
> to change it temporarily (or customize it to make it permanent):
>
>   (let ((org-agenda-window-setup 'current-window))
>  (org-agenda nil "a"))
>
> Nick
>



-- 
Filippo A. Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/979-5000 ext 7749
Fax: 416/979-5265
Email: salus...@ryerson.ca
http://deseng.ryerson.ca/~fil/


[O] Re: Problem with agenda and diary

2011-03-17 Thread Sébastien Vauban
Hi Nick,

Nick Dokos wrote:
> =?utf-8?Q?S=C3=A9bastien_Vauban?=  wrote:
>> Side question: how do you do to see a really full backtrace?
>> 
>> My backtraces always are elided with ellipsis inside the lines...
>> 
>
> IIRC, these should do it:
>
> ,
> |  -- Variable: print-length
> |  The value of this variable is the maximum number of elements to
> |  print in any list, vector or bool-vector.  If an object being
> |  printed has more than this many elements, it is abbreviated with
> |  an ellipsis.
> | 
> |  If the value is `nil' (the default), then there is no limit.
> | 
> |   (setq print-length 2)
> |=> 2
> |   (print '(1 2 3 4 5))
> |-| (1 2 ...)
> |=> (1 2 ...)
> | 
> |  -- Variable: print-level
> |  The value of this variable is the maximum depth of nesting of
> |  parentheses and brackets when printed.  Any list or vector at a
> |  depth exceeding this limit is abbreviated with an ellipsis.  A
> |  value of `nil' (which is the default) means no limit.
> `

Weird, they already both are at nil in my current setup.

As I don't play with them (in my config), I don't understand how the traces
are still partial...

Best regards,
  Seb

-- 
Sébastien Vauban




Re: [O] Custom Agenda View for Projects

2011-03-17 Thread Josh Berry
On Tue, Mar 15, 2011 at 14:35, Christian Zang
 wrote:
> 2011/3/15 Christian Zang :
>> 2011/3/15 Manish :
>>> On Tue, Mar 15, 2011 at 11:54 AM, Christian Zang wrote:
 2011/3/15 Manish:
> On Tue, Mar 15, 2011 at 12:54 AM, Christian Zang wrote:
>> Dear all,
>>
>> I might be overlooking something very obvious, but I cannot find the
>> solution: I have various org files, in which "projects" (anything
>> requiring more than one action step...) are first level headings
>> marked using the TODO kwd PROJ. If I tell my agenda to list all items
>> with kwd PROJ (either via C-a T PROJ or as a custom agenda view via
>> "tags-todo "LEVEL=1""), only the ones without siblings are returned.
>> I've looked into "org-tags-match-list-sublevels" but this is not quite
>> the right thing to calibrate...
...
> Update: I found the culprit in "org-enforce-todo-dependencies", set to
> nil and all projects labeled as PROJ are displayed again. Have to
> think about why this affects the agenda views in that way...

Someone correct me if I'm wrong, but:

I think org considers child tasks to be dependencies of the parent
task -- so if a parent task (such as your PROJ) has children, it won't
be displayed in a tags-todo agenda view, because that takes
dependencies into account.

Have you tried just a "tags" view with a match of "TODO=\"PROJ\""?
IIRC this will do what you want.

So it would be:

   ("P" "Projects" tags "TODO=\"PROJ\""
((org-agenda-overriding-header "List of Projects")))

-- Josh



Re: [O] Worg updating?

2011-03-17 Thread Erik Iverson

On 03/17/2011 05:34 PM, Nick Dokos wrote:

Thomas S. Dye  wrote:


Aloha all,

Changes I made to the LaTeX export tutorial several days ago haven't
made their way to Worg yet.  Is Worg updating?

All the best,
Tom



Thanks for reminding me: I made a change to org-hacks some time ago and it
hasn't shown up yet.  Maybe it would be a good idea to timestamp pages
with the update time?

Does Worg contain any information on how Worg is built? I found

   http://orgmode.org/worg/sources/


See:

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

which will direct you to:

http://orgmode.org/worg/publishing.txt

AT the bottom of that file:

"Generating tree-style sitemap for Sitemap for project worg-pages
Not a standard Org-mode time string: 2010.08.25 20:41:52"





Re: [O] Re: [Orgmode] Startup page

2011-03-17 Thread Nick Dokos
Matthew Sauer  wrote:


> Sigh, at times it's the small things that you miss that bite you in the
> foot.
> 
> (defun org-dblock-write:recently-modified (params)
>  (insert (mapconcat (lambda (arg) (concat "[[file:" arg "][" arg "]]" ))
> (split-string (shell-command-to-string "ls -t
> /cygdrive/c/Dropbox/org *.org | head -10")) "\n")))
> (org-agenda nil "a")
> (delete-other-windows)
> (split-window-horizontally)
> (find-file "/cygdrive/c/Dropbox/org/Refile.org")
> 
> 
> I forgot (delete-other-windows), I don't know if it the default behavior but
> my agenda opens up 1/2 height and I have to run C-x 1  to make it full
> screen after C-c a a. . .now to get my next dynamic block function
> (another thread to be started) working and I will have my weekly agenda on
> one side of the screen.  On the tother I will have recently modified files
> on the other, needing filed captures and Unscheduled TODO items.
> 
> Thanks for all the help everyone has thrown my way.  I am going to look at
> Filippos' code to see if I can even make this a bit more elegant.
> 

The org-agenda call has the potential of messing up your carefully crafted 
window
configuration, depending on the value of org-agenda-window-setup. The default
value is reorganize-frame which should tell you something :-). You might want
to change it temporarily (or customize it to make it permanent):

   (let ((org-agenda-window-setup 'current-window))
  (org-agenda nil "a"))

Nick



Re: [O] Worg updating?

2011-03-17 Thread Nick Dokos
Thomas S. Dye  wrote:

> Aloha all,
> 
> Changes I made to the LaTeX export tutorial several days ago haven't  
> made their way to Worg yet.  Is Worg updating?
> 
> All the best,
> Tom
> 

Thanks for reminding me: I made a change to org-hacks some time ago and it
hasn't shown up yet.  Maybe it would be a good idea to timestamp pages
with the update time?

Does Worg contain any information on how Worg is built? I found 

  http://orgmode.org/worg/sources/

but if those are the sources for the website, they are way out of date:
org-hacks.org has a date of 2011/03/03 but git log on my (recently
pulled) local repo shows many entries after that date. Since I pushed on
2011/03/04, I wonder if I am the one who broke it...

Nick





[O] Re: List-table feature (or a potential quick and easy mullti-lines table in org?)

2011-03-17 Thread Ben
>
>
> Out of boredom, I've written a draft for it.
>
>

Woohoo! congrats for the way you're getting bored!
Hey thank you Nicolas!



> #+begin_src emacs-lisp
>

So here I'm guessing the whole code fits into Babel, right?

All of this will convert
>
(...)

> | Row 1 | 1.1 | 1.2 | 1.3 |
> | Row 2 | 2.1 | 2.2 | 2.3 |
>
>
Oh actually you went the 'line' way -- and not the column.
Considering, I actually think you're right.
I got used to the ReST way (1 item + sub-items = 1 column) but I think your
way seems more natural.
Cool, thank you again!



> and the other way.
>
>
I'm afraid I don't get the 'and the other way', does it means your code can
go the column way as well?!

Splendid thanks again Nicolas!

  -- Ben


Re: [O] Re: [Orgmode] Startup page

2011-03-17 Thread Matthew Sauer
Sigh, at times it's the small things that you miss that bite you in the
foot.

(defun org-dblock-write:recently-modified (params)
 (insert (mapconcat (lambda (arg) (concat "[[file:" arg "][" arg "]]" ))
(split-string (shell-command-to-string "ls -t
/cygdrive/c/Dropbox/org *.org | head -10")) "\n")))
(org-agenda nil "a")
(delete-other-windows)
(split-window-horizontally)
(find-file "/cygdrive/c/Dropbox/org/Refile.org")


I forgot (delete-other-windows), I don't know if it the default behavior but
my agenda opens up 1/2 height and I have to run C-x 1  to make it full
screen after C-c a a. . .now to get my next dynamic block function
(another thread to be started) working and I will have my weekly agenda on
one side of the screen.  On the tother I will have recently modified files
on the other, needing filed captures and Unscheduled TODO items.

Thanks for all the help everyone has thrown my way.  I am going to look at
Filippos' code to see if I can even make this a bit more elegant.

Matt

On Thu, Mar 17, 2011 at 5:52 AM, Filippo A. Salustri wrote:

> Here's what I do:
> (let ((initial-buffer (current-buffer))
>   (agenda-window (selected-window))
>   right-window)
>   ;; We're still in the root window.
>   (set-frame-size (selected-frame) 162 50) ; resize the aquamacs
> window.
>   (org-agenda nil "0")
>   (tabbar-close-tab ; close *scratch* tab.
>(tabbar-get-tab (get-buffer "*scratch*")
>(tabbar-current-tabset)))
>   (setq right-window (split-window-horizontally 80)) ; make the right
> window.
>   (select-window right-window)
>   ;; whatever buffer we started in, make it appear in the right side.
>   (switch-to-buffer initial-buffer)
>   (select-window agenda-window) ; go back to the agenda.
>   )
>
> The call to org-agenda is just a custom block view.
> I end up with the agenda on the left, and some initial, other buffer on the
> right.  No scratch or anything else visible.
> Seems to work for me.
>
> Cheers.
> Fil
>
> On 17 March 2011 06:34, Matthew Sauer  wrote:
>
>> No, that still gives me the scratch buffer over the top and the the two
>> windows I want down below.  When I had the startup page activated it would
>> override one of the two buffers that I had selected but for some reason the
>> scratch buffer is dividing the screen horizontally and place itself over the
>> top of the two buffers I open at the end of .emacs
>>
>> Going to have to look at some of the emacs documentation.   What I am
>> trying to create is a bit of elisp magic that will open the agenda on the
>> right buffer and my refile.org (with everything I have captured that
>> needs sent to a home and some dblocks with recently opened items and maybe
>> another one with my unscheduled todo's.
>>
>> Matthew
>>
>> On Wed, Mar 16, 2011 at 11:45 AM, Nick Dokos wrote:
>>
>>> Matthew Sauer  wrote:
>>>
>>> > Okay, so I have been working on some ideas for a customization file for
>>> startup, an org-agenda,
>>> > recently modified and maybe unscheduled todo's . . accessible via a
>>> function key and at startup.
>>> > Kind of a "home screen".   I have it working fine when I run the code
>>> but my problem is that when I
>>> > have it run in .emacs on startup it comes up (agenda on the right and
>>> my other chosen buffer on the
>>> > left (last code in my .emacs to be run) and then the screen is split
>>> horizontal and the scratch
>>> > buffer opens on the top.  For me this isn't the desired behavior,
>>> didn't know if anyone knew how to
>>> > turn off emacs opening into a file or if I should move this code to
>>> another location because emacs
>>> > is running something to open that after it goes through .emacs???  or
>>> is that just a behavior that
>>> > is going to occur?
>>> >
>>>
>>> Add
>>>
>>>  (setq inhibit-splash-screen t)
>>>
>>> to your .emacs and see if that solves your problem. You might also need
>>> one
>>> of the packages that can restore a saved window configuration on startup
>>> if you have complicated goings-on.
>>>
>>> Nick
>>>
>>
>>
>
>
> --
> Filippo A. Salustri, Ph.D., P.Eng.
> Mechanical and Industrial Engineering
> Ryerson University
> 350 Victoria St, Toronto, ON
> M5B 2K3, Canada
> Tel: 416/979-5000 ext 7749
> Fax: 416/979-5265
> Email: salus...@ryerson.ca
> http://deseng.ryerson.ca/~fil/
>


Re: [O] Re: Problem with agenda and diary

2011-03-17 Thread Nick Dokos
Dan Griswold  wrote:


>   org-format-agenda-item("" "" "Diary" nil time)
>   (setq x (org-format-agenda-item "" x "Diary" nil (quote time)))
>   (lambda (x) (setq x (org-format-agenda-item "" x "Diary" nil ...)) (org-a=
> dd-props x (text-properties-at ... x) (quote type) "diary" (quote date) dat=
> e (quote face) (quote org-agenda-diary)))("")
> 

Actually, this pretty much confirms that the call came from 
org-get-diary-entries:
it matches the code exactly.

Nick








Re: [O] Re: Problem with agenda and diary

2011-03-17 Thread Nick Dokos
=?utf-8?Q?S=C3=A9bastien_Vauban?=  wrote:


> Side question: how do you do to see a really full backtrace?
> 
> My backtraces always are elided with ellipsis inside the lines...
> 

IIRC, these should do it:

,
|  -- Variable: print-length
|  The value of this variable is the maximum number of elements to
|  print in any list, vector or bool-vector.  If an object being
|  printed has more than this many elements, it is abbreviated with
|  an ellipsis.
| 
|  If the value is `nil' (the default), then there is no limit.
| 
|   (setq print-length 2)
|=> 2
|   (print '(1 2 3 4 5))
|-| (1 2 ...)
|=> (1 2 ...)
| 
|  -- Variable: print-level
|  The value of this variable is the maximum depth of nesting of
|  parentheses and brackets when printed.  Any list or vector at a
|  depth exceeding this limit is abbreviated with an ellipsis.  A
|  value of `nil' (which is the default) means no limit.
`

Nick



Re: [O] Re: Problem with agenda and diary

2011-03-17 Thread Nick Dokos
Dan Griswold  wrote:


> Sure. But I don't want to include absolutely everything, because of
> personal calendar entries. Here it is, back to the point where it gets
> too specific to my life:
> 

That's of course as it should be.

> 
> Debugger entered--Lisp error: (args-out-of-range -1 0)
>   add-text-properties(0 -1 (org-heading t) "")
...
>   org-format-agenda-item("" "" "Diary" nil time)


The code in org-format-agenda-item is 

,
|   ;; Set org-heading property on `txt' to mark the start of the
|   ;; heading.
|   (add-text-properties 0 (1- (length txt)) '(org-heading t) txt)
| 
`

where txt is the second argument of org-format-agenda-item. As you can see
from your backtrace, that is the empty string, so the call to 
add-text-properties
ends up trying to give some property to an empty string: it does not like that.
So the problem is that that second argument is the empty string.

Now org-format-agenda-item is called from many places:

In org-agenda.el

- org-search-view
- org-get-entries-from-diary
- org-agenda-get-todos
- org-agenda-get-timestamps
- org-agenda-get-sexps
- org-agenda-get-progress
- org-agenda-get-deadlines
- org-agenda-get-scheduled
- org-agenda-get-blocks
- org-agenda-add-time-grid-maybe
- org-agenda-change-all-lines
- org-agenda-add-entry-to-org-agenda-diary-file

In org.el

- org-scan-tags

Of these, org-get-entries-from-diary and
org-agenda-add-entry-to-org-agenda-diary-file sound like the plausible
candidates, but since I don't have the rest of the backtrace, I cannot
tell for sure. Can you check whether one or the other (or both) occurs
further down in your backtrace and let us know? If neither appears, can
you check whether one of the others does?

Proceeding on the *assumption* that it is org-get-entries-from-diary,
the call chain is

org-agenda-list --> org-get-entries-from-diary --> org-format-agenda-item 
--> boom

The code in org-get-entries-from-diary that calls org-format-agenda-item looks 
like this:
  ...
  (when entries
  (setq entries (org-split-string entries "\n"))
  (setq entries
(mapcar
 (lambda (x)
   (setq x (org-format-agenda-item "" x "Diary" nil 'time))
   ;; Extend the text properties to the beginning of the line
   (org-add-props x (text-properties-at (1- (length x)) x)
 'type "diary" 'date date 'face 'org-agenda-diary))
 entries)))

and the entries come from your diary, so that's the end of the road for us.

What I would suggest you do depends on a number of factors: whether you
use git to manage your org sources, how conversant you are with elisp
and the debugger and how much time you want to spend on it.

At the most basic level, I would first take a jaundiced look at the
diary file: see if there is anything that looks strange, like an empty
entry. Then I would bisect my way through it: copy the diary file to a
backup. Then start editing the original by whacking half of it away at
each stage, and seeing whether you still have the problem: if you do,
continue on this half; if you don't, continue on the other half - until
you are down to a single entry.  Then copy your backup back to the
original, delete the suspect entry and try again.

Alternatively, if you want to get your hands dirty with some debugging,
you can try changing the code above as follows:

  ...
  (when entries
  (setq entries (org-split-string entries "\n"))
  (debug)
  (setq entries
(mapcar
 (lambda (x)
   (setq x (org-format-agenda-item "" x "Diary" nil 'time))
   ;; Extend the text properties to the beginning of the line
   (org-add-props x (text-properties-at (1- (length x)) x)
 'type "diary" 'date date 'face 'org-agenda-diary))
 entries)))

adding a call to debug: when it reaches that point, emacs will drop you
into the debugger and you can examine the variable `entries' with

 e entries 

The result will be shown in the minibuffer which may not be large enough
for everything, in which case switch to the *Messages* buffer which will
have everything. Look for an empty entry and check its neighbors. I haven't
looked at the code that reads the stuff from the diary, but chances are that
the empty entry's neighbors will be its neighbors in the diary file as well.
That should give you a good indication of what entry is at fault.

If you use git, you can create a temporary branch and make your changes there,
experiment and then switch back to master and delete the temporary branch.
If you don't use git, save org-agenda.el in a backup file, do the experiment
and restore it afterwards. In either case, it's probably best to restart your
emacs and possibly use a minimal .emacs file to get only the behavior you need
to test.

Good luck! And let us know how you fare.

Nick



[O] Update Emacs development sources to 7.5 ?

2011-03-17 Thread Óscar Fuentes
Are there plans for updating the org-mode sources contained in the Emacs
bzr repository?

Can I help to speed up the process?




[O] Worg updating?

2011-03-17 Thread Thomas S. Dye

Aloha all,

Changes I made to the LaTeX export tutorial several days ago haven't  
made their way to Worg yet.  Is Worg updating?


All the best,
Tom





Re: [O] Professional PDF LaTeX templates?

2011-03-17 Thread Thomas S. Dye

Aloha Rasmus,

On Mar 17, 2011, at 10:34 AM, Rasmus wrote:




I can't translate it into anything that looks the quality of
using MS Word and Adobe Flashpaper.

Well, that sounds wrong. There are a number of blogs which publish
templates. Look into them. For starters, look into the blog-roll at
texample.


Just wondering if anyone has some template examples of letter/logo
headed well styled PDFs they use on a professional basis?


Yeah, I just defined my own org class, resembling my preferences
(primarly KOMA-Script with Kp-fonts). You should do the same. It quite
powerful. Whatever you are looking for, it is do-able in (La)TeX and
thus in org (with some minor quirks like not being able to escape  
space,

as I have discussed elsewhere).


I've updated the LaTeX export tutorial with Lawrence Mitchell's  
solution for escaping spaces using org-entities-user.  I just noticed  
that Worg hasn't updated.  I'll send a note to the list about this.


Tom




[O] Re: [PATCH 0/5] Improvements to Taskjuggler export

2011-03-17 Thread Christian Egli
Bastien  writes:

> Did Anthony advertized his enhancements on this list?

AFAIK he did announce them here, but that was a long time ago, probably
more than six months.

Thanks

-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland




[O] Re: [PATCH 0/5] Improvements to Taskjuggler export

2011-03-17 Thread Christian Egli
Hi Marc

Marc-Oliver Ihm  writes:

> Does your fork incorporate Anthonys enhancements (e.g. the
> :TJ:-Drawer) ?

It contains some of his enhancements but not all. He has two versions of
the code. One for tj2 and one for tj3. I would like to have one version
for both. The code as it stands right now can export a project for both
tj2 and tj3. However the way the defaults are set for the reports now
(in defcustom variables) it will not work for tj3. You'll have to
redefine the variables via M-x customize.

If you look at his code you'll see that he has some other enhancements.
There is support for project specific definitions, for global
definitions (such as shifts, etc) and for flags. One really nice idea is
that he added support for Drawers that can contain taskjuggler specific
code that is tied to a specific node. However I would like to implement
this as a src block, which would probably also cover global definitions
and file specific reports. My initial idea was to use something like
#+BEGIN_TASKJUGGLER and #+END_TASKJUGGLER. But nowadays it seems more
kosher to use something along the line of #+BEGIN_SRC taskjuggler. I
don't know what that would entail though. I might have to write a Babel
backend for Taskjuggler. I basically just want to use these code blocks
in my exporter.

> Is it available at your github (https://github.com/egli/org-mode) ?

No, this is stale (I should probably remove it). My most up to date code
should be in the orgmode repo.

Thanks
Christian
-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland




[O] Re: Problem with agenda and diary

2011-03-17 Thread Dan Griswold
On 17 Mar 2011, nicholas.do...@hp.com wrote:

> Can you provide a backtrace? See section 1.4, "Feedback", of the Org
> manual on how to produce a backtrace.

Sure. But I don't want to include absolutely everything, because of
personal calendar entries. Here it is, back to the point where it gets
too specific to my life:

Debugger entered--Lisp error: (args-out-of-range -1 0)
  add-text-properties(0 -1 (org-heading t) "")
  (let* ((category ...) (category-icon ...) (category-icon ...) (tag ...) time 
effort neffort (ts ...) (time-of-day ...) stamp plain s0 s1 s2 rtn srp l 
duration thecategory) (and (org-mode-p) buffer-file-name (add-to-list ... 
buffer-file-name)) (when (and dotime time-of-day) (when ... ... ...) (if s1 
...) (if s2 ...) (when ... ...) (when s2 ...)) (when (string-match ... txt) (if 
... ... ...)) (when (org-mode-p) (setq effort ...) (when effort ...)) (when 
remove-re (while ... ...)) (add-text-properties 0 (1- ...) (quote ...) txt) 
(setq time (cond ... ... ...) extra (or ... "") category (if ... ... category) 
thecategory (copy-sequence category)) (if (string-match org-bracket-link-regexp 
category) (progn ... ...) (if ... ...)) (setq rtn (concat ... txt)) 
(remove-text-properties 0 (length rtn) (quote ...) rtn) (org-add-props rtn nil 
(quote org-category) (if thecategory ... category) (quote tags) (mapcar ... 
tags) (quote org-highest-priority) org-highest-priority (quote 
org-lowest-priority) org-lowest-priority (quote time-of-day) time-of-day (quote 
duration) duration (quote effort) effort (quote effort-minutes) neffort (quote 
txt) txt (quote time) time (quote extra) extra (quote dotime) dotime))
  (progn (if (string-match "^ +" txt) (setq txt ...)) (setq txt 
(org-agenda-fix-displayed-tags txt tags org-agenda-show-inherited-tags 
org-agenda-hide-tags-regexp)) (let* (... ... ... ... time effort neffort ... 
... stamp plain s0 s1 s2 rtn srp l duration thecategory) (and ... 
buffer-file-name ...) (when ... ... ... ... ... ...) (when ... ...) (when ... 
... ...) (when remove-re ...) (add-text-properties 0 ... ... txt) (setq time 
... extra ... category ... thecategory ...) (if ... ... ...) (setq rtn ...) 
(remove-text-properties 0 ... ... rtn) (org-add-props rtn nil ... ... ... ... 
... org-highest-priority ... org-lowest-priority ... time-of-day ... duration 
... effort ... neffort ... txt ... time ... extra ... dotime)))
  (unwind-protect (progn (if ... ...) (setq txt ...) (let* ... ... ... ... ... 
... ... ... ... ... ... ...)) (set-match-data save-match-data-internal (quote 
evaporate)))
  (let ((save-match-data-internal ...)) (unwind-protect (progn ... ... ...) 
(set-match-data save-match-data-internal ...)))
  (save-match-data (if (string-match "^ +" txt) (setq txt ...)) (setq txt 
(org-agenda-fix-displayed-tags txt tags org-agenda-show-inherited-tags 
org-agenda-hide-tags-regexp)) (let* (... ... ... ... time effort neffort ... 
... stamp plain s0 s1 s2 rtn srp l duration thecategory) (and ... 
buffer-file-name ...) (when ... ... ... ... ... ...) (when ... ...) (when ... 
... ...) (when remove-re ...) (add-text-properties 0 ... ... txt) (setq time 
... extra ... category ... thecategory ...) (if ... ... ...) (setq rtn ...) 
(remove-text-properties 0 ... ... rtn) (org-add-props rtn nil ... ... ... ... 
... org-highest-priority ... org-lowest-priority ... time-of-day ... duration 
... effort ... neffort ... txt ... time ... extra ... dotime)))
  org-format-agenda-item("" "" "Diary" nil time)
  (setq x (org-format-agenda-item "" x "Diary" nil (quote time)))
  (lambda (x) (setq x (org-format-agenda-item "" x "Diary" nil ...)) 
(org-add-props x (text-properties-at ... x) (quote type) "diary" (quote date) 
date (quote face) (quote org-agenda-diary)))("")


[O] Re: org-src-fontify-natively makes things very, very slow

2011-03-17 Thread Sébastien Vauban
Hi all,

Eric S Fraga wrote:
> Julian Burgos  writes:
>> I was very excited to discover org-src-fontify-natively, but I´m not having
>> a good experience with it. When it is on, org-mode becomes very slow while
>> typing into a code block. This happens regardless of the size of the file
>> or number of blocks, and the slow down is very noticeable. Each keystroke
>> takes about half a second to appear in screen. Typing outside of the code
>> blocks everything works fine. Turning off font-lock-verbose and
>> global-linum-mode did not make any difference. I´m running OrgMode 7.5 and
>> GNU Emacs 23.2.1. on Windows XP.
>>
>> Any ideas?

Idem for me. Slow(er) in Org buffer itself.

> If you edit the source code block in its native mode (C-c',
> =org-edit-special=), is it fast or slow?

Fast(er) in dedicated buffer.

> In any case, this may be related to the thread on slow behaviour
> discussed on this list the past few days.  Does the response improve if
> you kill the buffer and load the file again?

Maybe this is (partly?) due to the overlay I added:

#+begin_src emacs-lisp
(overlay-put (make-overlay beg1 block-end)
 'face 'org-block-background))
#+end_src

in function

#+begin_src emacs-lisp
(defun org-fontify-meta-lines-and-blocks (limit)
#+end_src

in file org.el.

Best regards,
  Seb

-- 
Sébastien Vauban




Re: [O] Professional PDF LaTeX templates?

2011-03-17 Thread Rasmus

> I can't translate it into anything that looks the quality of
> using MS Word and Adobe Flashpaper.
Well, that sounds wrong. There are a number of blogs which publish
templates. Look into them. For starters, look into the blog-roll at
texample.

> Just wondering if anyone has some template examples of letter/logo
> headed well styled PDFs they use on a professional basis?

Yeah, I just defined my own org class, resembling my preferences
(primarly KOMA-Script with Kp-fonts). You should do the same. It quite
powerful. Whatever you are looking for, it is do-able in (La)TeX and
thus in org (with some minor quirks like not being able to escape space,
as I have discussed elsewhere). 




[O] Re: Problem with agenda and diary

2011-03-17 Thread Sébastien Vauban
Hi Tassilo,

Tassilo Horn wrote:
>> It may has been introduced by one of my latest commit. Could you load
>> org-agenda.el (not compiled) and give me the full backtrace (in
>> private)?
>
> Sure, here it is.  There' nothing private in it, so we can stay on list.
>
> Debugger entered--Lisp error: (wrong-type-argument integerp nil)
>   substring(#("  Diary:  St. Patrick's Day" 0 2 (org-category "diary" 
> tags nil org-highest-priority 65 org-lowest-priority 67 time-of-day nil 
> duration nil effort nil effort-minutes nil txt #("St. Patrick's Day" 0 17 
> (fontified nil org-heading t)) time "" extra "" dotime time fontified nil 
> org-heading t type "diary" date (3 17 2011) face org-todo) 2 14 (org-category 
> "diary" tags nil org-highest-priority 65 org-lowest-priority 67 time-of-day 
> nil duration nil effort nil effort-minutes nil txt #("St. Patrick's Day" 0 17 
> (fontified nil org-heading t)) time "" extra "" dotime time fontified nil 
> org-heading t type "diary" date (3 17 2011) face org-agenda-diary) 14 31 
> (org-heading t fontified nil org-category "diary" tags nil 
> org-highest-priority 65 org-lowest-priority 67 time-of-day nil duration nil 
> effort nil effort-minutes nil txt #("St. Patrick's Day" 0 17 (fontified nil 
> org-heading t)) time "" extra "" dotime time type "diary" date (3 17 2011) 
> face org-agenda-diary)) nil)
>   (concat (substring x 0 (match-end 1)) (format 
> org-agenda-todo-keyword-format (match-string 2 x)) (org-add-props #(" " 0 1 
> (done-face org-agenda-done undone-face org-warning face org-todo date (3 17 
> 2011) type "diary" todo-state #("STARTED" 0 7 (fontified nil org-category 
> "uni")) priority 1002 org-hd-marker # org-marker 
> # help-echo "mouse-2 or RET jump to org file 
> ~/repos/org/uni.org" org-complex-heading-regexp "^\\(\\*+\\)[ 
> ]+\\(?:\\(TODO\\|STARTED\\|DELEGATED\\|IDEA\\|DONE\\|CANCELLED\\)\\>\\)?\\(?:[
>   ]*\\(\\[#.\\]\\)\\)?[   ]*\\(.*?\\)\\(?:[   
> ]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[]*$" org-todo-regexp 
> "\\<\\(TODO\\|STARTED\\|DELEGATED\\|IDEA\\|DONE\\|CANCELLED\\)\\>" 
> org-not-done-regexp "\\<\\(TODO\\|STARTED\\|DELEGATED\\|IDEA\\)\\>" 
> mouse-face highlight dotime time extra "" time "" txt #("St. Patrick's Day" 0 
> 17 (fontified nil org-heading t)) effort-minutes nil effort nil duration nil 
> time-of-day nil org-lowest-priority 67 org-highest-priority 65 tags nil ...)) 
> (text-properties-at 0 x)) (substring x (match-end 3)))
>   [...]
>   org-agenda(nil)
>   call-interactively(org-agenda nil nil)

Side question: how do you do to see a really full backtrace?

My backtraces always are elided with ellipsis inside the lines...

Best regards,
  Seb

-- 
Sébastien Vauban




Re: [O] `session-jump-to-last-change' and org-mode

2011-03-17 Thread Carsten Dominik

On 17.3.2011, at 19:30, Eric S Fraga wrote:

> Le Wang  writes:
> 
>> On Thu, Mar 17, 2011 at 10:27 PM, Nick Dokos  wrote:
>> 
>>> Why would you need to coordinate with the session author about advising
>>> a function? It's your own personal advice and you can do whatever you
>>> want. Of course, as Carsten pointed out, there is good advice and there
>>> is bad advice, and you should only give good advice. But you are not
>>> requesting any changes to the session code. You just stick the advice in
>>> your .emacs and that's that.
>>> 
>>> Am I missing something?
>> 
>> 
>> The defadvice is a hack until session can be changed to not need it.  I
>> assume I won't be the only one to ever find this useful.
> 
> Sure but I don't think it makes sense to customise the behaviour of
> /session/ for /org/ specific issues?  The session code should be kept as
> general as possible, I would suggest.

A good solution would be for session to provide a hook that we can use.

- Carsten

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




Re: [O] Re: Problem with agenda and diary

2011-03-17 Thread Nick Dokos
Dan Griswold  wrote:

> On 17 Mar 2011, tass...@member.fsf.org wrote:
> 
> > I've just update my org checkout, and the issue seems to be already
> > fixed by
> >
> > * 9216453..: Julien Danjou 2011-03-17 org-agenda: remove useless
> >   concat
> > commit 9216453a3882eb45d0ba05e4e4fdeba9488205cc
> > Author: Julien Danjou 
> > Date:   Thu Mar 17 17:07:10 2011 +0100
> >
> > org-agenda: remove useless concat
> >
> > * lisp/org-agenda.el (org-agenda-highlight-todo): Remove useless
> >   `concat'.
> >
> 
> Mine is somewhat fixed. The first time I try org-agenda-list I get:
> 
>   org-format-agenda-item: Args out of range: -1, 0
> 
> but if I try it a second time, right away, it works.
> 
> However, this seems to be a different manifestation of another problem,
> one I've had for a while. Before today, the first time in an emacs
> session I tried to do org-agenda-list, it would bring future
> appointments from my diary file into the agenda for the current
> day. Running org-agenda-list a second time would correct it: today's
> appointments would appear in the current day's agenda, tomorrow's
> appointments in tomorrow's agenda. As I said, different problem. I would
> like to know what is causing that, but the problem that is the focus for
> this thread appears to be resolved.
> 
> Thanks to all, especially Julien.
> 

Can you provide a backtrace? See section 1.4, "Feedback", of the Org manual
on how to produce a backtrace.

Thanks,
Nick



[O] Re: Problem with agenda and diary

2011-03-17 Thread Dan Griswold
On 17 Mar 2011, tass...@member.fsf.org wrote:

> I've just update my org checkout, and the issue seems to be already
> fixed by
>
> * 9216453..: Julien Danjou 2011-03-17 org-agenda: remove useless
>   concat
> commit 9216453a3882eb45d0ba05e4e4fdeba9488205cc
> Author: Julien Danjou 
> Date:   Thu Mar 17 17:07:10 2011 +0100
>
> org-agenda: remove useless concat
>
> * lisp/org-agenda.el (org-agenda-highlight-todo): Remove useless
>   `concat'.
>

Mine is somewhat fixed. The first time I try org-agenda-list I get:

  org-format-agenda-item: Args out of range: -1, 0

but if I try it a second time, right away, it works.

However, this seems to be a different manifestation of another problem,
one I've had for a while. Before today, the first time in an emacs
session I tried to do org-agenda-list, it would bring future
appointments from my diary file into the agenda for the current
day. Running org-agenda-list a second time would correct it: today's
appointments would appear in the current day's agenda, tomorrow's
appointments in tomorrow's agenda. As I said, different problem. I would
like to know what is causing that, but the problem that is the focus for
this thread appears to be resolved.

Thanks to all, especially Julien.

Dan

-- 
Dan Griswold
dgris...@rochester.rr.com




Re: [O] `session-jump-to-last-change' and org-mode

2011-03-17 Thread Eric S Fraga
Le Wang  writes:

> On Thu, Mar 17, 2011 at 10:27 PM, Nick Dokos  wrote:
>
>> Why would you need to coordinate with the session author about advising
>> a function? It's your own personal advice and you can do whatever you
>> want. Of course, as Carsten pointed out, there is good advice and there
>> is bad advice, and you should only give good advice. But you are not
>> requesting any changes to the session code. You just stick the advice in
>> your .emacs and that's that.
>>
>> Am I missing something?
>
>
> The defadvice is a hack until session can be changed to not need it.  I
> assume I won't be the only one to ever find this useful.

Sure but I don't think it makes sense to customise the behaviour of
/session/ for /org/ specific issues?  The session code should be kept as
general as possible, I would suggest.

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



Re: [O] org-src-fontify-natively makes things very, very slow

2011-03-17 Thread Eric S Fraga
Julian Burgos  writes:

> Dear list,
>
> I was very excited to discover org-src-fontify-natively, but I´m not
> having a good experience with it.  When it is on, org-mode becomes
> very slow while typing into a code block.  This happens regardless of
> the size of the file or number of blocks, and the slow down is very
> noticeable.  Each keystroke takes about half a second to appear in
> screen.  Typing outside of the code blocks everything works fine.
> Turning off font-lock-verbose and global-linum-mode did not make any 
> difference.
> I´m running OrgMode 7.5 and GNU Emacs 23.2.1. on Windows XP.
>
> Any ideas?
>
> Julian

If you edit the source code block in its native mode (C-c',
=org-edit-special=), is it fast or slow?

In any case, this may be related to the thread on slow behaviour
discussed on this list the past few days.  Does the response improve if
you kill the buffer and load the file again?

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



Re: [O] Re: Problem with agenda and diary

2011-03-17 Thread Tassilo Horn
Hi all,

I've just update my org checkout, and the issue seems to be already
fixed by

* 9216453..: Julien Danjou 2011-03-17 org-agenda: remove useless concat
  commit 9216453a3882eb45d0ba05e4e4fdeba9488205cc
  Author: Julien Danjou 
  Date:   Thu Mar 17 17:07:10 2011 +0100

  org-agenda: remove useless concat

  * lisp/org-agenda.el (org-agenda-highlight-todo): Remove useless `concat'.

  Signed-off-by: Julien Danjou 

Bye,
Tassilo



Re: [O] Re: Problem with agenda and diary

2011-03-17 Thread Nick Dokos
Julien Danjou  wrote:

> On Thu, Mar 17 2011, Tassilo Horn wrote:
> 
> > Sure, here it is.  There' nothing private in it, so we can stay on
> > list.
> 
> There's something I really do not understand in this bt.
> 
> > Debugger entered--Lisp error: (wrong-type-argument integerp nil)
> >   substring(#("  Diary:  St. Patrick's Day" 0 2 (org-category
> >   "diary" tags nil org-highest-priority 65 org-lowest-priority 67
> >   time-of-day nil duration nil effort nil effort-minutes nil txt
> >   #("St. Patrick's Day" 0 17 (fontified nil org-heading t)) time ""
> >   extra "" dotime time fontified nil org-heading t type "diary" date
> >   (3 17 2011) face org-todo) 2 14 (org-category "diary" tags nil
> >   org-highest-priority 65 org-lowest-priority 67 time-of-day nil
> >   duration nil effort nil effort-minutes nil txt #("St. Patrick's Day"
> >   0 17 (fontified nil org-heading t)) time "" extra "" dotime time
> >   fontified nil org-heading t type "diary" date (3 17 2011) face
> >   org-agenda-diary) 14 31 (org-heading t fontified nil org-category
> >   "diary" tags nil org-highest-priority 65 org-lowest-priority 67
> >   time-of-day nil duration nil effort nil effort-minutes nil txt
> >   #("St. Patrick's Day" 0 17 (fontified nil org-heading t)) time ""
> >   extra "" dotime time type "diary" date (3 17 2011) face
> >   org-agenda-diary)) nil)
> 
> This is (substring x (match-end 3))
> So the string `x' is well, the entry about St. Patrick.
> 
> >   (concat (substring x 0 (match-end 1)) (format
> >   org-agenda-todo-keyword-format (match-string 2 x)) (org-add-props
> >   #(" " 0 1 (done-face org-agenda-done undone-face org-warning face
> >   org-todo date (3 17 2011) type "diary" todo-state #("STARTED" 0 7
> >   (fontified nil org-category "uni")) priority 1002 org-hd-marker
> >   # org-marker # >   uni.org> help-echo "mouse-2 or RET jump to org file
> >   ~/repos/org/uni.org" org-complex-heading-regexp "^\\(\\*+\\)[
> >   
> > ]+\\(?:\\(TODO\\|STARTED\\|DELEGATED\\|IDEA\\|DONE\\|CANCELLED\\)\\>\\)?\\(?:[
> >   ]*\\(\\[#.\\]\\)\\)?[ ]*\\(.*?\\)\\(?:[
> >   ]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[  ]*$" org-todo-regexp
> >   "\\<\\(TODO\\|STARTED\\|DELEGATED\\|IDEA\\|DONE\\|CANCELLED\\)\\>"
> >   org-not-done-regexp "\\<\\(TODO\\|STARTED\\|DELEGATED\\|IDEA\\)\\>"
> >   mouse-face highlight dotime time extra "" time "" txt #("St.
> >   Patrick's Day" 0 17 (fontified nil org-heading t)) effort-minutes
> >   nil effort nil duration nil time-of-day nil org-lowest-priority 67
> >   org-highest-priority 65 tags nil ...)) (text-properties-at 0 x))
> >   (substring x (match-end 3)))
> 
> Where the this is coming from ?
> The code is:
> 
> #+begin_src emacs-lisp
>   (setq x (concat (substring x 0 (match-end 1))
>   (format org-agenda-todo-keyword-format
>   (match-string 2 x))
> (org-add-props " " (text-properties-at 0 x))
> (substring x (match-end 3)
> #+end_src
> 
> How the " " used as first arg of `org-add-props' can have so much
> properties, like a todo-state set to "STARTED" and even a org-marker set
> to a position in the uni.org file set? It's an empty string for Emacs's
> sake.
> 
> What's even more troubling is that this code is executed only if `re' is
> not nil:
> 
> #+begin_src emacs-lisp
> (setq re (get-text-property 0 'org-todo-regexp x))
>   (when (and re
> &))
> #+end_src
> 
> How `re' cannot be nil since there's no org-todo-regexp in `x' (the
> entry about St. Patrick.
> 
> Tassilo, if you can reproduce the backtrace, could you take a look at
> the value of `re', `x' and `pl'? Maybe it can help, I'm a bit lost right
> now.
> 

I can reproduce it just by setting org-agenda-include-diary to t
(Org-mode version 7.5 (release_7.5.60.g706a.dirty))

Here are the values in my case, just before it blows up:

x is the St.Patrick's Day entry: #("  Diary:  St. Patrick's Day" 0 2 
(org-category #5="diary" tags nil org-highest-priority 65 org-lowest-priority 
67 time-of-day nil duration nil effort nil effort-minutes nil txt #4=#("St. 
Patrick's Day" 0 17 (org-heading t)) time #1="" extra #1# dotime time 
org-heading t type #3="diary" date #2=(3 17 2011) face org-todo) 2 14 
(org-category #5# tags nil org-highest-priority 65 org-lowest-priority 67 
time-of-day nil duration nil effort nil effort-minutes nil txt #4# time #1# 
extra #1# dotime time org-heading t type #3# date #2# face org-agenda-diary) 14 
31 (org-heading t org-category #5# tags nil org-highest-priority 65 
org-lowest-priority 67 time-of-day nil duration nil effort nil effort-minutes 
nil txt #4# time #1# extra #1# dotime time type #3# date #2# face 
org-agenda-diary))

re is the empty string so indeed it is not nil: ""

pl is 0

(match-end 3) is nil ==> boom

HTH,
Nick





Re: [O] Re: [REGRESSION] Description List + HTML

2011-03-17 Thread Jambunathan K

Nicolas

>> Would you consider enclosing them in paragraph tags.
>
> I've pushed a fix in that direction. Is it correct now?

Thanks for this. Verified that my test file exports fine.

Jambunathan K.

-- 




[O] Re: [Bug] MCE for HTML test of export

2011-03-17 Thread Nicolas
Hello,

Sébastien Vauban  writes:

> Regarding this problem only, it must be an interaction then with my following
> setting for the inline task in HTML:
>
> #+begin_src emacs-lisp
>   ;; templates for inline tasks in various exporters
>   (setq org-inlinetask-export-templates
> '((html "%s%s%s"
> '((unless (eq todo "")
> (format "%s%s "
> class todo todo priority))
>   heading content))
>   (latex "\\todo[inline]{\\textbf{\\textsf{%s 
> %s}}\\linebreak{} %s}"
>  '((unless (eq todo "")
>  (format "\\textsc{%s%s}" todo priority))
>heading content))
>   (ascii " -- %s%s%s"
>  '((unless (eq todo "")
>  (format "%s%s " todo priority))
>heading
>(unless (eq content "")
>  (format "\n ¦ %s"
>  (mapconcat 'identity
> (org-split-string content 
> "\n")
> "\n ¦ ")))
> #+end_src

Indeed, it came from your templates. To prevent this, I made sure, with
the following patch, that CONTENT is always enclosed by newline
characters. Would you mind testing it before I apply it ?

Also, you may have a look at default templates, as your HTML variant is
slightly wrong (wrt  tag).

Thanks.

Regards,

-- 
Nicolas
>From 35c116e16b319354322318b8405e557a61da4459 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Thu, 17 Mar 2011 12:12:31 +0100
Subject: [PATCH] org-inlinetask: modify export of inline tasks

* lisp/org-inlinetask.el (org-inlinetask-export-templates): fix
  default templates.
  (org-inlinetask-export-handler): Ensure contents of inline task, if
  any, starts and ends with a newline character. Refactor and comment
  code.
---
 lisp/org-inlinetask.el |   98 ++--
 1 files changed, 53 insertions(+), 45 deletions(-)

diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el
index 990a1ac..96809ce 100644
--- a/lisp/org-inlinetask.el
+++ b/lisp/org-inlinetask.el
@@ -107,12 +107,12 @@ When nil, they will not be exported."
   :type 'boolean)
 
 (defvar org-inlinetask-export-templates
-  '((html "%s%s\n%s\n"
+  '((html "%s%s%s"
  '((unless (eq todo "")
  (format "%s%s "
  class todo todo priority))
heading content))
-(latex "\\begin\{description\}\n\\item[%s%s]~\n%s\n\\end\{description\}"
+(latex "\\begin\{description\}\n\\item[%s%s]~%s\\end\{description\}"
   '((unless (eq todo "") (format "\\textsc\{%s%s\} " todo priority))
 heading content))
 (ascii " -- %s%s%s"
@@ -306,66 +306,74 @@ If the task has an end part, also demote it."
   "Handle headlines with level larger or equal to `org-inlinetask-min-level'.
 Either remove headline and meta data, or do special formatting."
   (goto-char (point-min))
-  (let* ((nstars (if org-odd-levels-only
-(1- (* 2 (or org-inlinetask-min-level 200)))
-  (or org-inlinetask-min-level 200)))
-(re1 (format "^\\(\\*\\{%d,\\}\\)[ \t]+.*\n" nstars))
-(re2 (concat "^[ \t]*" org-keyword-time-regexp))
-headline beg end stars content)
-(while (re-search-forward re1 nil t)
-  (setq headline (match-string 0)
-   stars (match-string 1)
-   content nil)
-  (replace-match "")
-  (while (looking-at re2)
-   (delete-region (point) (1+ (point-at-eol
-  (while (looking-at org-drawer-regexp)
-   (setq beg (point))
-   (if (re-search-forward org-property-end-re nil t)
-   (delete-region beg (1+ (match-end 0)
-  (setq beg (point))
-  (when (and (re-search-forward "^\\(\\*+\\)[ \t]+" nil t)
-(= (length (match-string 1)) (length stars))
-(progn (goto-char (match-end 0))
-   (looking-at "END[ \t]*$")))
-   (setq content (buffer-substring beg (1- (point-at-bol
-   (delete-region beg (1+ (match-end 0
+  (let* ((keywords-re (concat "^[ \t]*" org-keyword-time-regexp))
+(inline-re (concat (org-inlinetask-outline-regexp) ".*")))
+(while (re-search-forward inline-re nil t)
+  (let ((headline (match-string 0))
+   (beg (point-at-bol))
+   (end (copy-marker (save-excursion
+   (org-inlinetask-goto-end) (point
+   content)
+  ;; Delete SCHEDULED, DEADLINE...
+  (while (re-search-forward keywords-re end t)
+   (delete-region (point-at-bol) (1+ (point-at-eol
+  (goto-char beg)
+  ;; Delete drawers
+  (while (re-search-forward org-drawer-regexp end t)
+   (whe

[O] Re: Gmane no longer keep the in the subject

2011-03-17 Thread Achim Gratz
Bastien  writes:

 Thanks to Lars Magne Ingebrigtsen for configuring Gmane for this.

Looks like he is a very thorough man and removes it from everywhere in
the line... :-)

Thanks to LarsI and you for making that change.


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

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




Re: [O] Re: Problem with agenda and diary

2011-03-17 Thread Julien Danjou
On Thu, Mar 17 2011, Tassilo Horn wrote:

> Sure, here it is.  There' nothing private in it, so we can stay on
> list.

There's something I really do not understand in this bt.

> Debugger entered--Lisp error: (wrong-type-argument integerp nil)
>   substring(#("  Diary:  St. Patrick's Day" 0 2 (org-category
>   "diary" tags nil org-highest-priority 65 org-lowest-priority 67
>   time-of-day nil duration nil effort nil effort-minutes nil txt
>   #("St. Patrick's Day" 0 17 (fontified nil org-heading t)) time ""
>   extra "" dotime time fontified nil org-heading t type "diary" date
>   (3 17 2011) face org-todo) 2 14 (org-category "diary" tags nil
>   org-highest-priority 65 org-lowest-priority 67 time-of-day nil
>   duration nil effort nil effort-minutes nil txt #("St. Patrick's Day"
>   0 17 (fontified nil org-heading t)) time "" extra "" dotime time
>   fontified nil org-heading t type "diary" date (3 17 2011) face
>   org-agenda-diary) 14 31 (org-heading t fontified nil org-category
>   "diary" tags nil org-highest-priority 65 org-lowest-priority 67
>   time-of-day nil duration nil effort nil effort-minutes nil txt
>   #("St. Patrick's Day" 0 17 (fontified nil org-heading t)) time ""
>   extra "" dotime time type "diary" date (3 17 2011) face
>   org-agenda-diary)) nil)

This is (substring x (match-end 3))
So the string `x' is well, the entry about St. Patrick.

>   (concat (substring x 0 (match-end 1)) (format
>   org-agenda-todo-keyword-format (match-string 2 x)) (org-add-props
>   #(" " 0 1 (done-face org-agenda-done undone-face org-warning face
>   org-todo date (3 17 2011) type "diary" todo-state #("STARTED" 0 7
>   (fontified nil org-category "uni")) priority 1002 org-hd-marker
>   # org-marker #   uni.org> help-echo "mouse-2 or RET jump to org file
>   ~/repos/org/uni.org" org-complex-heading-regexp "^\\(\\*+\\)[
>   
> ]+\\(?:\\(TODO\\|STARTED\\|DELEGATED\\|IDEA\\|DONE\\|CANCELLED\\)\\>\\)?\\(?:[
>   ]*\\(\\[#.\\]\\)\\)?[   ]*\\(.*?\\)\\(?:[
>   ]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[]*$" org-todo-regexp
>   "\\<\\(TODO\\|STARTED\\|DELEGATED\\|IDEA\\|DONE\\|CANCELLED\\)\\>"
>   org-not-done-regexp "\\<\\(TODO\\|STARTED\\|DELEGATED\\|IDEA\\)\\>"
>   mouse-face highlight dotime time extra "" time "" txt #("St.
>   Patrick's Day" 0 17 (fontified nil org-heading t)) effort-minutes
>   nil effort nil duration nil time-of-day nil org-lowest-priority 67
>   org-highest-priority 65 tags nil ...)) (text-properties-at 0 x))
>   (substring x (match-end 3)))

Where the this is coming from ?
The code is:

#+begin_src emacs-lisp
(setq x (concat (substring x 0 (match-end 1))
(format org-agenda-todo-keyword-format
(match-string 2 x))
  (org-add-props " " (text-properties-at 0 x))
  (substring x (match-end 3)
#+end_src

How the " " used as first arg of `org-add-props' can have so much
properties, like a todo-state set to "STARTED" and even a org-marker set
to a position in the uni.org file set? It's an empty string for Emacs's
sake.

What's even more troubling is that this code is executed only if `re' is
not nil:

#+begin_src emacs-lisp
(setq re (get-text-property 0 'org-todo-regexp x))
(when (and re
…))
#+end_src

How `re' cannot be nil since there's no org-todo-regexp in `x' (the
entry about St. Patrick.

Tassilo, if you can reproduce the backtrace, could you take a look at
the value of `re', `x' and `pl'? Maybe it can help, I'm a bit lost right
now.

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


pgp9IKWhVRGcX.pgp
Description: PGP signature


[O] Re: List-table feature (or a potential quick and easy mullti-lines table in org?)

2011-03-17 Thread Nicolas
Hello,

Ben  writes:

> I'm thinking about a potential alternative and I would like to know if
> anyone here would know if this can be done with org.
> ReStructured Text [2] has a nice feature called list-tables. As you can
> guess from the name, you write a list and an instruction to process it and
> it creates a table out of the list in the export target. See the ReST
> documentation for a quick explanation [3]. What is does it to transform a
> nested list in a simple table. And potentially it would make long list items
> / table content easy to edit.
>
> Does anyone has heard of such a possibility in Org?

Out of boredom, I've written a draft for it.

First we need the following function that might be of some use (i.e. to
Babel, as you can write an Org list as a lisp list and write it to the
buffer). Well anyway, here it is:

#+begin_src emacs-lisp
(defun org-list-to-org (list)
  "Convert LIST into an Org list.
LIST is as returned by `org-list-parse-list'."
  (let ((sep (if (eq org-plain-list-ordered-item-terminator ?\)) ")" "."))
(ltype (make-vector 20 "-")))
(org-list-to-generic
 list
 '(:isep "\n"
 :ostart (and (aset ltype depth (concat "1" sep)) "")
 :dstart (and (aset ltype depth "-") "")
 :ustart (and (aset ltype depth "-") "")
 :icount (concat (make-string depth ?\ )
 (org-list-bullet-string (aref ltype depth))
 (format "[@%d] " counter))
 :istart (concat (make-string depth ?\ )
 (org-list-bullet-string (aref ltype depth)))
 :cbon "[X]" :cboff "[ ]"
 :dtstart (if (and org-list-two-spaces-after-bullet-regexp
   (string-match 
org-list-two-spaces-after-bullet-regexp
 "-")) "  " " ")
 :csep "\n"
 :ddstart " :: "
#+end_src

Next, we need bi-directional internal representation converters from
a table to a list:

#+begin_src emacs-lisp
(defun org-lisp-list-to-table (list)
  "Change LIST lisp representation into a table lisp representation."
  (mapcar (lambda (sub)
(cons (nth 1 sub)
  (mapcar (lambda (item) (nth 1 item)) (cdr (nth 2 sub)
  (cdr list)))

(defun org-lisp-table-to-list (table)
  "Change TABLE lisp representation into a list lisp representation."
  (cons 'unordered
(mapcar (lambda (row)
  (list nil (car row)
(cons 'unordered
  (mapcar (lambda (cell)
(list nil cell))
  (cdr row)
table)))
#+end_src

Finally, we need the interactive functions for the user. Those will
also clean up output.

#+begin_src emacs-lisp
(defun org-convert-list-to-table ()
  "Transform list at point into a table."
  (interactive)
  (if (org-at-item-p)
  (let ((parsed (org-list-parse-list t)))
(insert (orgtbl-to-orgtbl (org-lisp-list-to-table parsed) nil) "\n")
(goto-char (org-table-begin))
(org-table-align))
(error "Not at a list")))

(defun org-convert-table-to-list ()
  "Transform table at point into a list."
  (interactive)
  (if (org-at-table-p)
  (let ((pos (point))
(table (org-table-to-lisp)))
(delete-region (org-table-begin) (org-table-end))
(insert (org-list-to-org (org-lisp-table-to-list table)))
(goto-char pos)
(org-list-repair))
(error "Not at a table")))
#+end_src

That's it.

All of this will convert

- Row 1
  - 1.1
  - 1.2
  - 1.3
- Row 2
  - 2.1
  - 2.2
  - 2.3

to

| Row 1 | 1.1 | 1.2 | 1.3 |
| Row 2 | 2.1 | 2.2 | 2.3 |

and the other way.

Notes :
- I'm far from being an Org table expert. There probably are corner
  cases. This also doesn't support hlines.
- This requires latest git head (b6fc03b)


Regards,

-- 
Nicolas



Re: [O] `session-jump-to-last-change' and org-mode

2011-03-17 Thread Le Wang
On Thu, Mar 17, 2011 at 10:27 PM, Nick Dokos  wrote:

> Why would you need to coordinate with the session author about advising
> a function? It's your own personal advice and you can do whatever you
> want. Of course, as Carsten pointed out, there is good advice and there
> is bad advice, and you should only give good advice. But you are not
> requesting any changes to the session code. You just stick the advice in
> your .emacs and that's that.
>
> Am I missing something?


The defadvice is a hack until session can be changed to not need it.  I
assume I won't be the only one to ever find this useful.



-- 
Le


Re: [O] Another HTML Export Problem

2011-03-17 Thread Scott Randby
On 03/17/2011 04:07 AM, Bastien wrote:
> Hi Scott,
> 
> Bastien  writes:
> 
>> If you can, please test this patch.  I'm not applying it right now as 
>> I want to make sure to apply a safe and complete patch.
> 
> I've applied this patch now.

Hi Bastien,

It works and doesn't break anything else as far as I can tell. Thanks
for fixing this. I'm sorry I couldn't test the patch, but I want to
learn how to do such things sometime. I'll stick with reporting any bugs
I find for now.

Scott



[O] Re: Problem with agenda and diary

2011-03-17 Thread Dan Griswold
On 17 Mar 2011, tass...@member.fsf.org wrote:

> Hm, the entry it errors with seems to come from the St. Patrick's Day
> entry in `calendar-holidays'...

I thought the same thing. But then I customized holiday-general-holidays
to exclude St. Patrick's Day, and the error still comes up, the
backtrace showing the first diary entry it encounters.

Dan

-- 
Dan Griswold
dgris...@rochester.rr.com




Re: [O] Re: Problem with agenda and diary

2011-03-17 Thread Julien Danjou
On Thu, Mar 17 2011, Tassilo Horn wrote:

> Yes, I can confirm that.  Here's parts of the backtrace:
>
> Debugger entered--Lisp error: (wrong-type-argument integerp nil)
>   org-agenda-highlight-todo(#("  Diary:  St. Patrick's Day" 0 2 
> (org-category "diary" tags nil org-highest-priority 65 org-lowest-priority 67 
> time-of-day nil duration nil effort nil effort-minutes nil txt #("St. 
> Patrick's Day" 0 17 (fontified nil org-heading t)) time "" extra "" dotime 
> time fontified nil org-heading t type "diary" date (3 17 2011) face org-todo) 
> 2 14 (org-category "diary" tags nil org-highest-priority 65 
> org-lowest-priority 67 time-of-day nil duration nil effort nil effort-minutes 
> nil txt #("St. Patrick's Day" 0 17 (fontified nil org-heading t)) time "" 
> extra "" dotime time fontified nil org-heading t type "diary" date (3 17 
> 2011) face org-agenda-diary) 14 31 (org-heading t fontified nil org-category 
> "diary" tags nil org-highest-priority 65 org-lowest-priority 67 time-of-day 
> nil duration nil effort nil effort-minutes nil txt #("St. Patrick's Day" 0 17 
> (fontified nil org-heading t)) time "" extra "" dotime time type "diary" date 
> (3 17 2011) face org-agenda-diary)))
>   [...]
>   org-agenda-list(nil)
>   call-interactively(org-agenda-list)
>   byte-code("\306\307 \232\203

It may has been introduced by one of my latest commit. Could you load
org-agenda.el (not compiled) and give me the full backtrace (in
private)?

Thanks.

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


pgpB8sPXQbBjy.pgp
Description: PGP signature


Re: [O] Re: Another HTML Export Problem

2011-03-17 Thread Eric S Fraga
David Maus  writes:

> Hi,
>
> Bastien's patch looks good and/but introduces a regression: The commit
> that started all this trobule --
> 163cd58ffd6461c98a96b1b63a3cf082b2825a52 -- fixed a problem with
> exporting links with a description that contained an ISO Date.  The
> current problem can be located in `org-html-do-expand' which uses the
> regexp "@<\\([^&]*\\)>" to remove protection from elements.
> Obviously this function was never meant to deal with links :|
>
> I think we should accept the regression, restore the old behaviour and
> find a better solution for the problem I tried to solve in the first
> place.
>
> Best,
>   -- David
>

I don't know if this is the same problem but exporting, to HTML, the
following

#+begin_src org
[[http://petition.stopsoftwarepatents.eu/831004564935/][http://petition.stopsoftwarepatents.eu/banner/831004564935/ssp-362-60.gif]]
#+end_src

generates the following HTML:

--8<---cut here---start->8---
http://petition.stopsoftwarepatents.eu/831004564935/";>@http://petition.stopsoftwarepatents.eu/banner/831004564935/ssp-362-60.gif"/>
--8<---cut here---end--->8---

Note the spurious "@" introduced before the =

Re: [O] `session-jump-to-last-change' and org-mode

2011-03-17 Thread Nick Dokos
Le Wang  wrote:

> On Thu, Mar 17, 2011 at 3:02 PM, Carsten Dominik  
> wrote:
> 
> (defadvice session-jump-to-last-change (after org-expand activate compile)
>  "Reveal hidden point after jumping."
>  (when (and (eq major-mode 'org-mode)
>             (outline-invisible-p))
>    (org-reveal)))
> 
> Thanks Carsten!  That's xactly what I wanted.  I'll coordinate with session's 
> author to get this
> change integrated.
> 

Why would you need to coordinate with the session author about advising
a function? It's your own personal advice and you can do whatever you
want. Of course, as Carsten pointed out, there is good advice and there
is bad advice, and you should only give good advice. But you are not
requesting any changes to the session code. You just stick the advice in
your .emacs and that's that.

Am I missing something?
Nick



[O] Re: [Babel] why did ob-ditaa generate image file fail in orgmode?

2011-03-17 Thread Eric Luo
Thanks for your reminder, I updated the orgmode to the lastest, now it's ok




Re: [O] Table formula changes are not always necessary when moving rows

2011-03-17 Thread Nick Dokos
Carsten Dominik  wrote:

> 
> On 28.2.2011, at 12:43, Tom wrote:
> 
> > I have a table in which I sum the values of all rows in the last
> > row: vsum(@1..@-I-1). The problem is when move a row with M-up
> > before the first row (e.g. I press M-up on the second row) then
> > org modifies this formula to vsum(@2..@-I-1).
> 
> 
> Hi Tom,
> 
> I have thought a bit more about this issue.  I do agree that,
> in particular when specifying ranges, it may not always
> desirable to have the formulas automatically adapt when
> rows and columns are swapped.
> 
> I have just pushed a change that makes $< and @< refer in
> a stable way to the first column and row, respectively.
> You can also use @<<< to mean the second row and @>>
> the second to last row.
> 

I hope you mean @<< above: otherwise the symmetry is spoiled :-)

> I hope this will prove to be useful for such cases.
> 
> Regards
> 
> P.S. Nick (Dokos), I also added them to get the symmetry with
> the @> and $> references :)
> 
And a thing of beauty it is, too! ;-)

Much appreciated,
Nick



[O] Following links in an indirect buffer

2011-03-17 Thread Shaun Johnson

Hi all,

I regularly work in an indirect buffer created by org-tree-to-indirect-buffer.

Following an id: type link in such a buffer seems to always switche to the
base buffer even if the target is visible in the indirect buffer.

Is the buffer switching intended behaviour or is this a bug?

Following an ordinary link (like [[Target]]) does not exhibit this buffer
switching behaviour. However if the target is outside the visible part of
the indirect buffer the buffer will be widened and point will move to the
target but only after being told that there is no match and asked if I want
to create a new heading.

In the case where the target is outside the visible part of the indirect
buffer I would prefer it if the link was opened in the base buffer.

Again is this intended behaviour or a bug?

Thanks in advance,

Shaun.




[O] org-src-fontify-natively makes things very, very slow

2011-03-17 Thread Julian Burgos
Dear list,

I was very excited to discover org-src-fontify-natively, but I´m not
having a good experience with it.  When it is on, org-mode becomes
very slow while typing into a code block.  This happens regardless of
the size of the file or number of blocks, and the slow down is very
noticeable.  Each keystroke takes about half a second to appear in
screen.  Typing outside of the code blocks everything works fine.
Turning off font-lock-verbose and global-linum-mode did not make any difference.
I´m running OrgMode 7.5 and GNU Emacs 23.2.1. on Windows XP.

Any ideas?

Julian

-- 
Julian Mariano Burgos
Hafrannsóknastofnunin/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: jul...@hafro.is, jmbur...@uw.edu



[O] Re: Problem with agenda and diary

2011-03-17 Thread Tassilo Horn
Dan Griswold  writes:

Hi Dan,

> As of today, there's a problem with org-agenda-list when
> org-agenda-include-diary is set to t. I get this error:
>   mapcar: Wrong type argument: integerp, nil

Yes, I can confirm that.  Here's parts of the backtrace:

--8<---cut here---start->8---
Debugger entered--Lisp error: (wrong-type-argument integerp nil)
  org-agenda-highlight-todo(#("  Diary:  St. Patrick's Day" 0 2 
(org-category "diary" tags nil org-highest-priority 65 org-lowest-priority 67 
time-of-day nil duration nil effort nil effort-minutes nil txt #("St. Patrick's 
Day" 0 17 (fontified nil org-heading t)) time "" extra "" dotime time fontified 
nil org-heading t type "diary" date (3 17 2011) face org-todo) 2 14 
(org-category "diary" tags nil org-highest-priority 65 org-lowest-priority 67 
time-of-day nil duration nil effort nil effort-minutes nil txt #("St. Patrick's 
Day" 0 17 (fontified nil org-heading t)) time "" extra "" dotime time fontified 
nil org-heading t type "diary" date (3 17 2011) face org-agenda-diary) 14 31 
(org-heading t fontified nil org-category "diary" tags nil org-highest-priority 
65 org-lowest-priority 67 time-of-day nil duration nil effort nil 
effort-minutes nil txt #("St. Patrick's Day" 0 17 (fontified nil org-heading 
t)) time "" extra "" dotime time type "diary" date (3 17 2011) face 
org-agenda-diary)))
  [...]
  org-agenda-list(nil)
  call-interactively(org-agenda-list)
  byte-code("\306\307   \232\203
--8<---cut here---end--->8---

> I have confirmed that the error occurs with only one item in the diary
> file, such as this one:
>
> Mar 18, 2011  8:00 planning

It also occurs with an totally empty diary file like mine.

My settings are as follows.

,[ C-h v org-agenda-diary-file RET ]
| org-agenda-diary-file is a variable defined in `org.el'.
| Its value is diary-file
`

,[ C-h v diary-file RET ]
| diary-file is a variable defined in `calendar.el'.
| Its value is "~/.emacs.d/diary"
| Original value was "~/diary"
`

Hm, the entry it errors with seems to come from the St. Patrick's Day
entry in `calendar-holidays'...

Bye,
Tassilo




Re: [O] Problem with agenda and diary

2011-03-17 Thread Erik Iverson

Dan,

My agenda won't build this morning either, so it's more than you.
I don't have time to investigate right now, but just know it's not
something you did.

--e

Dan Griswold wrote:

Hi all,

As of today, there's a problem with org-agenda-list when
org-agenda-include-diary is set to t. I get this error:
  mapcar: Wrong type argument: integerp, nil

I have confirmed that the error occurs with only one item in the diary
file, such as this one:

Mar 18, 2011  8:00 planning

I feel that I am now just spinning around in circles and wasting time. I
really don't know what I'm doing anymore.

What do you think is wrong?

Thank you,

Dan





[O] Problem with agenda and diary

2011-03-17 Thread Dan Griswold
Hi all,

As of today, there's a problem with org-agenda-list when
org-agenda-include-diary is set to t. I get this error:
  mapcar: Wrong type argument: integerp, nil

I have confirmed that the error occurs with only one item in the diary
file, such as this one:

Mar 18, 2011  8:00 planning

I feel that I am now just spinning around in circles and wasting time. I
really don't know what I'm doing anymore.

What do you think is wrong?

Thank you,

Dan

-- 
Dan Griswold
Rochester, NY




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

2011-03-17 Thread John Hendy
On Thu, Mar 17, 2011 at 5:52 AM, Bastien  wrote:

> 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.
>
>
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.


John


>
> --
>  Bastien
>
>


[O] Re: Another HTML Export Problem

2011-03-17 Thread David Maus
Hi,

Bastien's patch looks good and/but introduces a regression: The commit
that started all this trobule --
163cd58ffd6461c98a96b1b63a3cf082b2825a52 -- fixed a problem with
exporting links with a description that contained an ISO Date.  The
current problem can be located in `org-html-do-expand' which uses the
regexp "@<\\([^&]*\\)>" to remove protection from elements.
Obviously this function was never meant to deal with links :|

I think we should accept the regression, restore the old behaviour and
find a better solution for the problem I tried to solve in the first
place.

Best,
  -- David



Re: [O] Trying to replace PasswordSafe with org-crypt

2011-03-17 Thread Óscar Fuentes
Julien Danjou  writes:

> On Thu, Mar 17 2011, Óscar Fuentes wrote:
>
>> It would nice to get rid of that noise, if possible.
>
> It's kinda handy to have them to match the text. I don't think it's a
> real problem. They are very standard.

Ok, I can live with that.

>> Second:
>>
>> Version: GnuPG v1.4.10 (GNU/Linux)
>>
>> That changes from system to system (GNU/Linux, MinGW32) and gpg version,
>> which is not good when the file is versioned.
>
> Same here. This is part of the standard output of GPG. This is not
> something org-crypt add for itself.

I just tried and it is possible to remove the boilerplate and keep
org-crypt/gpg working. Maybe org-crypt may filter it out. I'll how hard
is to add an option for that, it nobody beats me.

>> Third, the encryped text changes from invocation to invocation. That
>> means that the sequence
>>
>> org-decrypt-entry
>> 
>> org-encrypt-entry
>>
>> alters the cyphertext. Again, this is annoying when the file is under
>> version control.
>
> This has been fixed in git recently by me, and should be fixed in Org >=
> 7.5.

Thanks!

>> Finally, is there a way to force symmetric encryption?
>
> If you do not set any key, it's symmetric. But I think there's no
> property to force symmetric on specific entry. I could add such a think
> I guess, if you need it.

I was confused by a dialog that pops out on Kubuntu asking for a
passphrase. I thought that it was asking for authorization for using my
ssh key, but tried again and it accepts any text that I throw at it. On
Windows the passphrase is asked using the minibuffer. So it seems that
there is no issue here.

>> I'm using the org 7.4 that comes with Emacs 24.0.50 (development
>> sources) on Linux and Windows.
>
> Go update! :)

Well, with this and org-contacts, which I'm eager to try, I think I'll
finally start using org from git (sticking to some release tag, I guess)
although using the version distributed with Emacs is much more
convenient for those of us working on multiple machines.

Thanks for making org-mode even more useful.



Re: [Accepted] [O] New option to create unique, random labels for footnotes.

2011-03-17 Thread Scot Becker
I like this, Matt!

On Thu, Mar 17, 2011 at 8:25 AM, Bastien Guerry  wrote:

> Patch 680 (http://patchwork.newartisans.com/patch/680/) is now "Accepted".
>
> Maintainer comment: none
>
> This relates to the following submission:
>
> http://mid.gmane.org/%3C87y64ji2hj.fsf%40fastmail.fm%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] New option to create unique, random labels for footnotes.
> > Date: Fri, 11 Mar 2011 18:50:59 -
> > From: Matt Lundin 
> > X-Patchwork-Id: 680
> > Message-Id: <87y64ji2hj@fastmail.fm>
> > To: Org Mode 
> >
> > * lisp/org-footnote.el: (org-footnote-auto-label): New random option
> > * lisp/org-footnote.el: (org-footnote-new): Create random footnote
> >   labels with unique ids
> >
> > ---
> > lisp/org-footnote.el |   16 
> >  1 files changed, 12 insertions(+), 4 deletions(-)
> >
> > diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
> > index 2ce6668..9dbd6be 100644
> > --- a/lisp/org-footnote.el
> > +++ b/lisp/org-footnote.el
> > @@ -113,12 +113,14 @@ t  create unique labels of the form [fn:1],
> [fn:2], ...
> >  confirmlike t, but let the user edit the created value.  In
> particular,
> > the label can be removed from the minibuffer, to create
> > an anonymous footnote.
> > +random  Automatically generate a unique, random label.
> >  plain  Automatically create plain number labels like [1]"
> >:group 'org-footnote
> >:type '(choice
> > (const :tag "Prompt for label" nil)
> > (const :tag "Create automatic [fn:N]" t)
> > (const :tag "Offer automatic [fn:N] for editing" confirm)
> > +   (const :tag "Create a random label" random)
> > (const :tag "Create automatic [N]" plain)))
> >
> >  (defcustom org-footnote-auto-adjust nil
> > @@ -253,16 +255,22 @@ This command prompts for a label.  If this is a
> label referencing an
> >  existing label, only insert the label.  If the footnote label is empty
> >  or new, let the user edit the definition of the footnote."
> >(interactive)
> > -  (let* ((labels (org-footnote-all-labels))
> > +  (let* ((labels (and (not (equal org-footnote-auto-label 'random))
> > +   (org-footnote-all-labels)))
> >(propose (org-footnote-unique-label labels))
> >(label
> > -   (if (member org-footnote-auto-label '(t plain))
> > -   propose
> > +   (cond
> > +((member org-footnote-auto-label '(t plain))
> > + propose)
> > +((equal org-footnote-auto-label 'random)
> > + (require 'org-id)
> > + (substring (org-id-uuid) 0 8))
> > +(t
> >   (completing-read
> >"Label (leave empty for anonymous): "
> >(mapcar 'list labels) nil nil
> >(if (eq org-footnote-auto-label 'confirm) propose nil)
> > -  'org-footnote-label-history
> > +  'org-footnote-label-history)
> >  (setq label (org-footnote-normalize-label label))
> >  (cond
> >   ((equal label "")
> >
>
>


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

2011-03-17 Thread Nicolas Goaziou
Hello,

"Eric Schulte"  writes:

>> The real problem is: how should Org react when parsing syntactically
>> erroneous buffers? I concede that freezing Emacs isn't nice, but otoh,
>> code can't deal with every possible user error.
>>
>> So, what is the expected behavior here? Consider orphan #+end_ as
>> normal text, throw an error, or both? An answer to this question would
>> be more useful than code, honestly.
>>
>
> This is just opinion and gut reaction, but my first instinct is to say
> that Org just treat an orphan #+end_ as normal text (or technically as
> an Org-mode comment).
>
> The same is true for a floating #+begin_src.  Until the block is closed,
> it is just a comment.

As it's the only answer so far, I guess it was more trivial than
I thought.

Here is a patch that should fix the original problem.

Martyn, as you are writing tests, would you mind running it against
them, before I apply it?

Many thanks in advance.

Regards,
>From 805e11e419c58a9f3fdb470987056c5ac970817f Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Thu, 17 Mar 2011 13:01:06 +0100
Subject: [PATCH] org-list: fix infinite loop on erroneous block and drawer 
constructs

* lisp/org-list.el (org-list-struct,org-in-item-p): don't assume end
  of blocks or drawers necessarily start somewhere. It it isn't the
  case, treat them as normal text.
---
 lisp/org-list.el |   24 
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/lisp/org-list.el b/lisp/org-list.el
index aea8634..8bfd359 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -465,10 +465,10 @@ This checks `org-list-ending-method'."
 (looking-at org-list-end-re))
(throw 'exit nil))
   ;; Skip blocks, drawers, inline-tasks, blank lines
-  ((looking-at "^[ \t]*#\\+end_")
-   (re-search-backward "^[ \t]*#\\+begin_" nil t))
-  ((looking-at "^[ \t]*:END:")
-   (re-search-backward org-drawer-regexp nil t)
+  ((and (looking-at "^[ \t]*#\\+end_")
+(re-search-backward "^[ \t]*#\\+begin_" lim-up t)))
+  ((and (looking-at "^[ \t]*:END:")
+(re-search-backward org-drawer-regexp lim-up t))
(beginning-of-line))
   ((and inlinetask-re (looking-at inlinetask-re))
(org-inlinetask-goto-beginning)
@@ -686,10 +686,10 @@ Assume point is at an item."
 (memq (assq (car beg-cell) itm-lst) itm-lst
   ;; Skip blocks, drawers, inline tasks, blank lines
   ;; along the way.
-  ((looking-at "^[ \t]*#\\+end_")
-   (re-search-backward "^[ \t]*#\\+begin_" nil t))
-  ((looking-at "^[ \t]*:END:")
-   (re-search-backward drawers-re nil t)
+  ((and (looking-at "^[ \t]*#\\+end_")
+(re-search-backward "^[ \t]*#\\+begin_" lim-up t)))
+  ((and (looking-at "^[ \t]*:END:")
+(re-search-backward drawers-re lim-up t))
(beginning-of-line))
   ((and inlinetask-re (looking-at inlinetask-re))
(org-inlinetask-goto-beginning)
@@ -753,11 +753,11 @@ Assume point is at an item."
  (throw 'exit (push (cons 0 (point)) end-lst-2)))
 ;; Skip blocks, drawers, inline tasks and blank lines
 ;; along the way
-((looking-at "^[ \t]*#\\+begin_")
- (re-search-forward "^[ \t]*#\\+end_")
+((and (looking-at "^[ \t]*#\\+begin_")
+  (re-search-forward "^[ \t]*#\\+end_" lim-down t))
  (forward-line 1))
-((looking-at drawers-re)
- (re-search-forward "^[ \t]*:END:" nil t)
+((and (looking-at drawers-re)
+  (re-search-forward "^[ \t]*:END:" lim-down t))
  (forward-line 1))
 ((and inlinetask-re (looking-at inlinetask-re))
  (org-inlinetask-goto-end))
-- 
1.7.4.1


-- 
Nicolas Goaziou


Re: [O] Professional PDF LaTeX templates?

2011-03-17 Thread Russell Adams
On Wed, Mar 16, 2011 at 10:54:18AM -0400, Nick Dokos wrote:
> 'Mash  wrote:
>
> >
> > I suppose by "professional" I really meant "polished", and so it is
> > LaTeX styling I have having trouble with, it may also be laziness on
> > my part. I have tried searching for LaTeX styling which I can
> > translate into a few org-mode header declarations but still can't work
> > out what is or is not compatible with org-mode (LaTeX classes) or how
> > to implement styling correctly.
> >

I understand completely! So here's a few tricks I use.

First, my org-class for latex is "none". This lets me manage my
documentclass and other features in the org export header.

(setq org-export-latex-classes (cons '("none"
   
"[NO-DEFAULT-PACKAGES][NO-PACKAGES]"
   
("\\section{%s}" . "\\section*{%s}")
   
("\\subsection{%s}" . "\\subsection*{%s}")
   
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
   
("\\paragraph{%s}" . "\\paragraph*{%s}")
   
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
 
org-export-latex-classes))

Then, my documents start like this:

--
#+OPTIONS:   H:3 num:nil toc:t \n:t @:t ::t |:t ^:nil -:t f:t *:t TeX:t 
LaTeX:nil skip:nil d:nil tags:not-in-toc
#+BIND: org-export-latex-title-command ""
#+LaTeX_CLASS: none
#+LATEX_HEADER: \documentclass[10pt,letterpaper]{article}
#+LATEX_HEADER: 
\usepackage[letterpaper,includeheadfoot,top=0.5in,bottom=0.5in,left=0.75in,right=0.75in]{geometry}
#+LATEX_HEADER: \usepackage[utf8]{inputenc}
#+LATEX_HEADER: \usepackage[T1]{fontenc}
#+LATEX_HEADER: \usepackage{lastpage}
#+LATEX_HEADER: \usepackage{fancyhdr}
#+LATEX_HEADER: \pagestyle{fancy}
#+LATEX_HEADER: \usepackage{hyperref}
#+LATEX_HEADER: \hypersetup{colorlinks,linkcolor=blue}
#+LATEX_HEADER: \renewcommand{\headrulewidth}{1pt}
#+LATEX_HEADER: \renewcommand{\footrulewidth}{0.5pt}
#+LATEX_HEADER: \usepackage{graphicx}
#+LATEX_HEADER: \usepackage{multicol}
#+LATEX_HEADER: \geometry{headheight=47pt}
#+LATEX_HEADER:
#+LATEX_HEADER: \def\ORGTITLE  {Latex Example}
#+LATEX_HEADER: \def\ORGAUTHOR {Russell Adams}
#+LATEX_HEADER:
#+LATEX_HEADER: % Header
#+LATEX_HEADER: \fancyhead[L]{\LARGE \ORGTITLE  }
#+LATEX_HEADER: \fancyhead[R]{\bf\ORGAUTHOR }
#+LATEX_HEADER:
#+LATEX_HEADER: % Footer
#+LATEX_HEADER: \fancyfoot[L]{\small \ORGTITLE\\ \today}
#+LATEX_HEADER: \fancyfoot[C]{\small Revision: \Revision \\ Page \thepage\ of 
\pageref{LastPage}}
#+LATEX_HEADER: \fancyfoot[R]{\small \ORGAUTHOR }

--


That way I can control all of the output in the Org file. I intend to
make a custom class eventually for letterhead, but haven't yet.

Other ones to experiment with are:

\setlength{\parindent}{0pt}   - Don't indent each paragraph (pet peeve)
\setlength{\parskip}{10pt}- Add a small indent between paragraps

Better fonts:

\usepackage[scaled]{helvet}
\renewcommand*\familydefault{\sfdefault}

I also don't export from inside emacs. I use a makefile and call a
separate emacs instance in batch mode.

> > There are a huge amount of LaTeX examples on the web, but they are
> > full documents with inline elements, I wanted to know if anyone has
> > already setup classes that work, with notes on LaTeX dependencies (and
> > how and where to download them from) which they use day to day to
> > produce reports, articles, contracts or client proposals from simple
> > .org files?

I know there are many pre-made classes available for Latex,
unfortunately I haven't found any good "galleries" of sample
output. That makes it difficult to know where to start.

Let me know if you find one!

> Both Eric Fraga and John Hendy have given valid answers to how one goes
> about it: you settle down to *one* kind of document that you want to
> produce (take the simplest one and leave the rest for later), then
> either learn enough LaTeX to be able to produce it or cajole/beg/hire
> somebody to do it for you, and *then* figure out how to use org to produce
> the LaTeX needed to produce that kind of document.
>
> The trouble is that neither org nor LaTeX are black boxes whose insides
> you can afford to ignore. With the approach outlined above, at the end
> of the process, you *will* have a (blackbox-like) almost automatic way of
> going from org to "professional" output, but it is fragile in the sense
> that if you want to change something, you will need to implement the
> change in LaTeX first, and once you are satisfied

Re: [O] a small contribution

2011-03-17 Thread Bastien
Hi Filippo,

"Filippo A. Salustri"  writes:

> So I wrote a small perl program that digests every file in my org
> directory looking for todos.

Such a script could go on Worg -- perhaps here:

  http://orgmode.org/worg/org-tools/index.html

If you want to contribute to Worg, please read this:

  http://orgmode.org/worg/worg-about.html

Best,

-- 
 Bastien



Re: [O] Table formula changes are not always necessary when moving rows

2011-03-17 Thread Carsten Dominik

On Mar 17, 2011, at 11:02 AM, Christian Moe wrote:

> 
> 
>> You can also use @<<<  to mean the second row
> 
> Did you mean @<<

No, I meant "third" :D

> ?
> 
> Yours,
> Christian

- Carsten






[O] Re: List-table feature (or a potential quick and easy mullti-lines table in org?)

2011-03-17 Thread Jambunathan K

>  What is does it to transform a nested list in a simple table.

Just a thought. 

If someone takes a stab at it, I suggest that they use my experimental
staging branch (org-html/org-odt) that implements callbacks for various
org entities like paragraphs, outline, lists and tables.

Without looking in to the specifics of the proposal and the links
provided, my initial reaction is that a quick prototype could be
developed with my generic backend.

Let me add that my experimental has gone through 3 cycles of
re-implementation and is very usable. 

http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg00839.html
http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg00840.html

Jambunathan K.




[O] List-table feature (or a potential quick and easy mullti-lines table in org?)

2011-03-17 Thread Ben
Dear Orgers,

I would have a question for you. I'm writing more and more documentation in
OrgMode (with HTML and DocBook exports) and I'm very happy with it. There's
a little hitch though on tables. Org tables are great with one known and
documented constraints: it does not accept multi lines [1].

In some types of documents it can be a challenge, however, editing large
columns could be a mess too.

I'm thinking about a potential alternative and I would like to know if
anyone here would know if this can be done with org.
ReStructured Text [2] has a nice feature called list-tables. As you can
guess from the name, you write a list and an instruction to process it and
it creates a table out of the list in the export target. See the ReST
documentation for a quick explanation [3]. What is does it to transform a
nested list in a simple table. And potentially it would make long list items
/ table content easy to edit.

Does anyone has heard of such a possibility in Org?

Many thanks to all!

  -- Ben


[1] http://orgmode.org/worg/org-faq.html#table-multiline-fields
[2] http://docutils.sourceforge.net/rst.html
[3] http://docutils.sourceforge.net/docs/ref/rst/directives.html#list-table


Re: [O] Re: [PATCH 0/5] Improvements to Taskjuggler export

2011-03-17 Thread Bastien
Hi Christian,

Christian Egli  writes:

> Bastien  writes:
>
>> Ps: I had trouble applying your patches: they came in one order on the
>> list, and on a different one on patchwork.  Applying them from patchwork
>> didn't always work, so I had to do a few things manually.  Not a problem.
>
> Is there anything I can do about this?

I don't think so.  I'll investigate deeper if I see this problem again.

Thanks,

-- 
 Bastien



Re: [O] Re: [PATCH 1/5] Add some minimal infrastructure to handle export to both tj2 and tj3

2011-03-17 Thread Bastien
Hi Christian,

Christian Egli  writes:

> How do we proceed? Do I resubmit the patch?

No need, I just applied the fix you suggest.  Thanks for it!

-- 
 Bastien



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

2011-03-17 Thread Bastien
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 ()

-- 
 Bastien


Re: [O] Re: [Orgmode] Startup page

2011-03-17 Thread Filippo A. Salustri
Here's what I do:
(let ((initial-buffer (current-buffer))
  (agenda-window (selected-window))
  right-window)
  ;; We're still in the root window.
  (set-frame-size (selected-frame) 162 50) ; resize the aquamacs window.
  (org-agenda nil "0")
  (tabbar-close-tab ; close *scratch* tab.
   (tabbar-get-tab (get-buffer "*scratch*")
   (tabbar-current-tabset)))
  (setq right-window (split-window-horizontally 80)) ; make the right
window.
  (select-window right-window)
  ;; whatever buffer we started in, make it appear in the right side.
  (switch-to-buffer initial-buffer)
  (select-window agenda-window) ; go back to the agenda.
  )

The call to org-agenda is just a custom block view.
I end up with the agenda on the left, and some initial, other buffer on the
right.  No scratch or anything else visible.
Seems to work for me.

Cheers.
Fil

On 17 March 2011 06:34, Matthew Sauer  wrote:

> No, that still gives me the scratch buffer over the top and the the two
> windows I want down below.  When I had the startup page activated it would
> override one of the two buffers that I had selected but for some reason the
> scratch buffer is dividing the screen horizontally and place itself over the
> top of the two buffers I open at the end of .emacs
>
> Going to have to look at some of the emacs documentation.   What I am
> trying to create is a bit of elisp magic that will open the agenda on the
> right buffer and my refile.org (with everything I have captured that needs
> sent to a home and some dblocks with recently opened items and maybe another
> one with my unscheduled todo's.
>
> Matthew
>
> On Wed, Mar 16, 2011 at 11:45 AM, Nick Dokos wrote:
>
>> Matthew Sauer  wrote:
>>
>> > Okay, so I have been working on some ideas for a customization file for
>> startup, an org-agenda,
>> > recently modified and maybe unscheduled todo's . . accessible via a
>> function key and at startup.
>> > Kind of a "home screen".   I have it working fine when I run the code
>> but my problem is that when I
>> > have it run in .emacs on startup it comes up (agenda on the right and my
>> other chosen buffer on the
>> > left (last code in my .emacs to be run) and then the screen is split
>> horizontal and the scratch
>> > buffer opens on the top.  For me this isn't the desired behavior, didn't
>> know if anyone knew how to
>> > turn off emacs opening into a file or if I should move this code to
>> another location because emacs
>> > is running something to open that after it goes through .emacs???  or is
>> that just a behavior that
>> > is going to occur?
>> >
>>
>> Add
>>
>>  (setq inhibit-splash-screen t)
>>
>> to your .emacs and see if that solves your problem. You might also need
>> one
>> of the packages that can restore a saved window configuration on startup
>> if you have complicated goings-on.
>>
>> Nick
>>
>
>


-- 
Filippo A. Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/979-5000 ext 7749
Fax: 416/979-5265
Email: salus...@ryerson.ca
http://deseng.ryerson.ca/~fil/


[O] Re: [PATCH 0/5] Improvements to Taskjuggler export

2011-03-17 Thread Christian Egli
Hi Bastien

Bastien  writes:

> Ps: I had trouble applying your patches: they came in one order on the
> list, and on a different one on patchwork.  Applying them from patchwork
> didn't always work, so I had to do a few things manually.  Not a problem.

Is there anything I can do about this? I just commited the changes
locally and used git format-patch and git send-email.

Thanks
Christian

-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland




[O] Re: [PATCH 1/5] Add some minimal infrastructure to handle export to both tj2 and tj3

2011-03-17 Thread Christian Egli
Bastien  writes:

> Christian Egli  writes:
>
>> +(defun org-taskjuggler-targeting-tj3-p ()
>> +  "Return true if we are targeting TaskJuggler III."
>> +  (< org-export-taskjuggler-target-version 3.0))
>
> I'm dubious on this one.
>
> Shouldn't it be 
>
> #+begin_src emacs-lisp
> (defun org-taskjuggler-targeting-tj3-p ()
>   "Return true if we are targeting TaskJuggler III."
>   (> org-export-taskjuggler-target-version 3.0))
> #+end
>
> ?

Basically org-export-taskjuggler-target-version can be 2.4 or 3.0. So
org-taskjuggler-targeting-tj3-p should return true if
org-export-taskjuggler-target-version is 3.0 or higher and false
otherwise.

So, let's see what the *scratch* buffer has to say about this

#+begin_src emacs-lisp
(setq org-export-taskjuggler-target-version 2.4)
2.4
(defun org-taskjuggler-targeting-tj3-p ()
  "Return true if we are targeting TaskJuggler III."
  (> org-export-taskjuggler-target-version 3.0))
org-taskjuggler-targeting-tj3-p
(org-taskjuggler-targeting-tj3-p)
nil
(setq org-export-taskjuggler-target-version 3.0)
3.0
(org-taskjuggler-targeting-tj3-p)
nil
(setq org-export-taskjuggler-target-version 3.1)
3.1
(org-taskjuggler-targeting-tj3-p)
t
#+end

Ah, you're right. There is a problem :-\.

The correct version should be 

#+begin_src emacs-lisp
(defun org-taskjuggler-targeting-tj3-p ()
  "Return true if we are targeting TaskJuggler III."
  (>= org-export-taskjuggler-target-version 3.0))
#+end

Let's test this in *scratch*
#+begin_src emacs-lisp
(setq org-export-taskjuggler-target-version 2.4)
2.4

(defun org-taskjuggler-targeting-tj3-p ()
  "Return true if we are targeting TaskJuggler III."
  (>= org-export-taskjuggler-target-version 3.0))
org-taskjuggler-targeting-tj3-p

(org-taskjuggler-targeting-tj3-p)
nil

(setq org-export-taskjuggler-target-version 3.0)
3.0

(org-taskjuggler-targeting-tj3-p)
t

(setq org-export-taskjuggler-target-version 3.1)
3.1

(org-taskjuggler-targeting-tj3-p)
t
#+end

How do we proceed? Do I resubmit the patch?

Thanks
Christian
-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland




[O] [Accepted] [O,5/5] Escape double quotes in headlines

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

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C1300273502-12977-6-git-send-email-christian.egli%40alumni.ethz.ch%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,5/5] Escape double quotes in headlines
> Date: Wed, 16 Mar 2011 16:05:02 -
> From: Christian Egli 
> X-Patchwork-Id: 692
> Message-Id: <1300273502-12977-6-git-send-email-christian.e...@alumni.ethz.ch>
> To: emacs-orgmode@gnu.org
> 
> * org-taskjuggler.el (org-taskjuggler-components): Escape quotes in
> headlines.
> 
> Taskjuggler will barf if the task names (which are double quoted
> strings) contain double quotes.
> 
> ---
> lisp/org-taskjuggler.el |4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
> index b39353c..ed3af48 100644
> --- a/lisp/org-taskjuggler.el
> +++ b/lisp/org-taskjuggler.el
> @@ -354,7 +354,9 @@ information, all the properties, etc."
>(let* ((props (org-entry-properties))
>(components (org-heading-components))
>(level (nth 1 components))
> -  (headline (nth 4 components))
> +  (headline 
> +   (replace-regexp-in-string 
> +"\"" "\\\"" (nth 4 components) t t)) ; quote double quotes in 
> headlines
>(parent-ordered (org-taskjuggler-parent-is-ordered-p)))
>  (push (cons "level" level) props)
>  (push (cons "headline" headline) props)
> 



[O] [Accepted] [O, 2/5] Mark a task as a milestone if it is a leaf node and cannot be scheduled

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

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C1300273502-12977-3-git-send-email-christian.egli%40alumni.ethz.ch%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, 2/5] Mark a task as a milestone if it is a leaf node and cannot 
> be
>   scheduled
> Date: Wed, 16 Mar 2011 16:04:59 -
> From: Christian Egli 
> X-Patchwork-Id: 695
> Message-Id: <1300273502-12977-3-git-send-email-christian.e...@alumni.ethz.ch>
> To: emacs-orgmode@gnu.org
> 
> * org-taskjuggler.el (org-taskjuggler-compute-task-leafiness): Compute
> the leafiness of a node.
> (org-taskjuggler-open-task, org-export-as-taskjuggler): Mark a node as
> a milestone if it is a leaf and has no effort.
> 
> Mark a task as a milestone if it has neither an effort, a duration, an
> end or a period. This is needed for tj3 export as tj3 fails to compile
> the file if there is a leaf node with no computable end date. tj2
> happily ignored the situation, but TJ3 throws an error.
> 
> ---
> lisp/org-taskjuggler.el |   37 +++--
>  1 files changed, 31 insertions(+), 6 deletions(-)
> 
> diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
> index ec6bb30..2d16790 100644
> --- a/lisp/org-taskjuggler.el
> +++ b/lisp/org-taskjuggler.el
> @@ -263,9 +263,10 @@ defined in `org-export-taskjuggler-default-reports'."
>(let* ((tasks
> (org-taskjuggler-resolve-dependencies
>  (org-taskjuggler-assign-task-ids 
> - (org-map-entries 
> -  '(org-taskjuggler-components) 
> -  org-export-taskjuggler-project-tag nil 'archive 'comment
> + (org-taskjuggler-compute-task-leafiness
> +  (org-map-entries 
> +   '(org-taskjuggler-components) 
> +   org-export-taskjuggler-project-tag nil 'archive 'comment)
>(resources
> (org-taskjuggler-assign-resource-ids
>  (org-map-entries 
> @@ -392,6 +393,23 @@ a path to the current task."
>   (setq previous-level level)
>   (setq resolved-tasks (append resolved-tasks (list task)))
>  
> +(defun org-taskjuggler-compute-task-leafiness (tasks)
> +  "Figure out if each task is a leaf by looking at it's level,
> +and the level of its successor. If the successor is higher (ie
> +deeper), then it's not a leaf."
> +  (cond
> +   ((null tasks) nil)
> +   ;; if a task has no successors it is a leaf
> +   ((null (car (cdr tasks)))
> +(cons (cons (cons "leaf-node" t) (car tasks)) 
> +   (org-taskjuggler-compute-task-leafiness (cdr tasks
> +   ;; if the successor has a lower level than task it is a leaf
> +   ((<= (cdr (assoc "level" (car (cdr tasks (cdr (assoc "level" (car 
> tasks 
> +(cons (cons (cons "leaf-node" t) (car tasks)) 
> +   (org-taskjuggler-compute-task-leafiness (cdr tasks
> +   ;; otherwise examine the rest of the tasks
> +   (t (cons (car tasks) (org-taskjuggler-compute-task-leafiness (cdr 
> tasks))
> +
>  (defun org-taskjuggler-assign-resource-ids (resources &optional unique-ids)
>"Given a list of resources return the same list, assigning a
>  unique id to each resource."
> @@ -621,11 +639,17 @@ org-mode priority string."
> (cdr (assoc "complete" task
>   (parent-ordered (cdr (assoc "parent-ordered" task)))
>   (previous-sibling (cdr (assoc "previous-sibling" task)))
> + (milestone (or (cdr (assoc "milestone" task))
> +(and (assoc "leaf-node" task)
> + (not (or effort 
> +  (cdr (assoc "duration" task))
> +  (cdr (assoc "end" task))
> +  (cdr (assoc "period" task)))
>   (attributes 
>'(account start note duration endbuffer endcredit end
> -flags journalentry length maxend maxstart milestone
> -minend minstart period reference responsible
> -scheduling startbuffer startcredit statusnote)))
> +flags journalentry length maxend maxstart minend
> +minstart period reference responsible scheduling
> +startbuffer startcredit statusnote)))
>  (insert
>   (concat 
>"task " unique-id " \"" headline "\" {\n" 
> @@ -639,6 +663,7 @@ org-mode priority string."
>(and complete (format " complete %s\n" complete))
>(and effort (format " effort %s\n" effort))
>(and priority (format " priority %s\n" priority))
> +  (and milestone (format " milestone\n"))
>
>(org-taskjuggler-get-attributes task attributes)
>"\n"
> 



Re: [O] Re: [Orgmode] Startup page

2011-03-17 Thread Matthew Sauer
No, that still gives me the scratch buffer over the top and the the two
windows I want down below.  When I had the startup page activated it would
override one of the two buffers that I had selected but for some reason the
scratch buffer is dividing the screen horizontally and place itself over the
top of the two buffers I open at the end of .emacs

Going to have to look at some of the emacs documentation.   What I am trying
to create is a bit of elisp magic that will open the agenda on the right
buffer and my refile.org (with everything I have captured that needs sent to
a home and some dblocks with recently opened items and maybe another one
with my unscheduled todo's.

Matthew

On Wed, Mar 16, 2011 at 11:45 AM, Nick Dokos  wrote:

> Matthew Sauer  wrote:
>
> > Okay, so I have been working on some ideas for a customization file for
> startup, an org-agenda,
> > recently modified and maybe unscheduled todo's . . accessible via a
> function key and at startup.
> > Kind of a "home screen".   I have it working fine when I run the code but
> my problem is that when I
> > have it run in .emacs on startup it comes up (agenda on the right and my
> other chosen buffer on the
> > left (last code in my .emacs to be run) and then the screen is split
> horizontal and the scratch
> > buffer opens on the top.  For me this isn't the desired behavior, didn't
> know if anyone knew how to
> > turn off emacs opening into a file or if I should move this code to
> another location because emacs
> > is running something to open that after it goes through .emacs???  or is
> that just a behavior that
> > is going to occur?
> >
>
> Add
>
>  (setq inhibit-splash-screen t)
>
> to your .emacs and see if that solves your problem. You might also need one
> of the packages that can restore a saved window configuration on startup
> if you have complicated goings-on.
>
> Nick
>


[O] [Accepted] [O, 1/5] Add some minimal infrastructure to handle export to both tj2 and tj3

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

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C1300273502-12977-2-git-send-email-christian.egli%40alumni.ethz.ch%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,
>   1/5] Add some minimal infrastructure to handle export to both tj2 and
>   tj3
> Date: Wed, 16 Mar 2011 16:04:58 -
> From: Christian Egli 
> X-Patchwork-Id: 691
> Message-Id: <1300273502-12977-2-git-send-email-christian.e...@alumni.ethz.ch>
> To: emacs-orgmode@gnu.org
> 
> * org-taskjuggler.el (org-export-taskjuggler-target-version):
> (org-taskjuggler-targeting-tj3-p): Add some minimal infrastructure to
> handle export to both tj2 and tj3.
> (org-taskjuggler-open-task): Use a different way to purge allocations
> for tj2 and tj3.
> 
> ---
> lisp/org-taskjuggler.el |   14 +-
>  1 files changed, 13 insertions(+), 1 deletions(-)
> 
> diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
> index 8d6318e..ec6bb30 100644
> --- a/lisp/org-taskjuggler.el
> +++ b/lisp/org-taskjuggler.el
> @@ -181,6 +181,11 @@ resources for the project."
>:group 'org-export-taskjuggler
>:type 'string)
>  
> +(defcustom org-export-taskjuggler-target-version 2.4
> +  "Which version of TaskJuggler the exporter is targeting."
> +  :group 'org-export-taskjuggler
> +  :type 'number)
> +
>  (defcustom org-export-taskjuggler-default-project-version "1.0"
>"Default version string for the project."
>:group 'org-export-taskjuggler
> @@ -331,6 +336,10 @@ with the TaskJuggler GUI."
>(command (concat process-name " " file-name)))
>  (start-process-shell-command process-name nil command)))
>  
> +(defun org-taskjuggler-targeting-tj3-p ()
> +  "Return true if we are targeting TaskJuggler III."
> +  (< org-export-taskjuggler-target-version 3.0))
> +
>  (defun org-taskjuggler-parent-is-ordered-p ()
>"Return true if the parent of the current node has a property
>  \"ORDERED\". Return nil otherwise."
> @@ -623,7 +632,10 @@ org-mode priority string."
>(if (and parent-ordered previous-sibling)
> (format " depends %s\n" previous-sibling)
>   (and depends (format " depends %s\n" depends)))
> -  (and allocate (format " purge allocations\n allocate %s\n" allocate))
> +  (and allocate (format " purge %s\n allocate %s\n"
> + (or (and (org-taskjuggler-targeting-tj3-p) 
> "allocations")
> + "allocate")
> + allocate))
>(and complete (format " complete %s\n" complete))
>(and effort (format " effort %s\n" effort))
>(and priority (format " priority %s\n" priority))
> 



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

2011-03-17 Thread Bastien
Hi Martin,

Martin Halder  writes:

> this is fantastic, already love lisp, thanks a lot.. now I have exactly
> what I wanted.. additionally I needed the time format in industrial mode
> (1h = 100m = 100s), implemented in ihms.

thanks for these functions -- I allowed myself to add them to
Worg/org-hacks.html, in a new "Times computation" section:

  http://orgmode.org/worg/org-hacks.html

I added these functions I myself wrote for a particular purpose:

#+begin_src emacs-lisp
(defun org-hh:mm:ss-string-to-seconds (s)
  "Convert a string HH:MM:SS to a number of seconds."
  (when (string-match "\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\)" s)
(let ((hour (string-to-number (match-string 1 s)))
  (min (string-to-number (match-string 2 s)))
  (sec (string-to-number (match-string 3 s
  (+ (* hour 3600) (* min 60) sec

(defun org-subtract-hh:mm:ss-time (t1 t2)
  "Substract two hh:mm:ss time values."
  (let* ((sec (- (org-hh:mm:ss-string-to-seconds t2)
 (org-hh:mm:ss-string-to-seconds t1)))
 (hour (floor (/ sec 3600)))
 (min (floor (/ (- sec (* 3600 hour)) 60)))
 (secs (round (- sec (* 3600 hour) (* 60 min)
(format "%.2d:%.2d:%.2d" hour min secs)))
#+end_src

With these function, you can subtract durations in a table like this:

| Part  |Begin |  End | Duration |
|---+--+--+--|
| One   | 00:00:00 | 00:01:11 | 00:01:11 |
| Two   | 00:01:12 | 00:02:00 | 00:00:48 |
| Three | 00:02:05 | 00:16:06 | 00:14:01 |
#+TBLFM: $4='(org-subtract-hh:mm:ss-time $2 $3)

Which was useful for me when I had to derush video files.

HTH,

-- 
 Bastien



Re: [O] [BUG] in LaTeX export

2011-03-17 Thread Thomas Holst
Hi Bastien,

· Bastien  wrote:

> Hi Thomas,
>
> Thomas Holst  writes:
>
>>   _abc /_abc/ *_abc* /a_bc/ *a_bc*
>
> You need to escape the underscore:
>
>   \_abc /\_abc/ *\_abc* /a\_bc/ *a\_bc*
>
> HTH,

thank you for your answer. Escaping does help. But I thought with setting

#+OPTIONS: ^:{}

there is no need to escape underscores.

#+begin_src org
  _abc and /a_bc/ 
#+end_src

is correctly exported:

#+begin_src latex
  \_{}abc \emph{a\_{}bc}
#+end_src

without escaping the underscore. Only strings wihch start with an
underscore and are emphsised are not exported correctly.

#+begin_src org
  /_abc/
#+end_src

gets exported to:

#+begin_src latex
  \emph{_abc}
#+end_src

Which confuses latex.

-- 
Best regards
  Thomas



Re: [O] [Bug?] org-crypt warning and --daemon

2011-03-17 Thread Bastien
Julien Danjou  writes:

> On Thu, Mar 17 2011, Bastien wrote:
>
>> (Btw, I also wonder if it really makes sense to have auto-save-default
>> turned on in daemon mode.)
>
> I don't see why it would not?

Mh.. yes, you're right. 

-- 
 Bastien



Re: [O] [Bug?] org-crypt warning and --daemon

2011-03-17 Thread Bastien
Julien Danjou  writes:

> On Thu, Mar 17 2011, Bastien wrote:
>
>> (Btw, I also wonder if it really makes sense to have auto-save-default
>> turned on in daemon mode.)
>
> I don't see why it would not?

Yes, you're right.

-- 
 Bastien



Re: [O] [Bug?] org-crypt warning and --daemon

2011-03-17 Thread Julien Danjou
On Thu, Mar 17 2011, Bastien wrote:

> (Btw, I also wonder if it really makes sense to have auto-save-default
> turned on in daemon mode.)

I don't see why it would not?

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


pgpTKunFMukca.pgp
Description: PGP signature


Re: [O] OrgCamp in India -- Interested?

2011-03-17 Thread Bastien
Hi Puneeth,

Puneeth Chaganti  writes:

> Inspired by the OrgCamps being conducted in Paris [1] [2], I would
> like to propose an OrgCamp somewhere in India.

thanks for suggesting this -- just a reminder: if you want, you can 
use the Worg/orgcamps.org page for storing information:

  http://orgmode.org/worg/orgcamps.html

Best,

-- 
 Bastien



Re: [O] Other programs to edit Org documents?

2011-03-17 Thread Christian Moe
I've toyed around with a jQuery-based web interface to this end. I 
think a reasonable target would be to emulate the functions you can 
reach with speed keys on the first column of a heading in Org: 
folding, navigation, todo states, promoting, demoting... plus perhaps 
extend them to lists and checkboxes.


I plan to post some sample code here when I've got more of those 
features implemented (not for the next few weeks I'm afraid).


Yours,
Christian


On 3/16/11 11:48 AM, Scot Becker wrote:

A simple org-mode viewer (that allows you to do some basic
folding/unfolding and search -- or even something more complex that
would allow you to view it as a mind-map?) would be nice. It could
even be simplified with more GUI bells and whistles and still allow
one to insert data and save the file. It would not be a full
replacement for emacs, ever, but would allow other less technical
users to use it as well.

There are all kinds of advantages to this, seems to me, and of course
it partly exists in the form of Moblie Org.  Org-mode is both an
interface and a specification, you could say (as well as a friendly
club).  And you can work with the latter (the markup specification)
apart from the former if you have need to.   A web-app for viewing and
editing org-mode files would open nice possibilities for collaboration
with the not-yet-initiated and for using your files when you are
away-from-emacs.

Scot





[Accepted] [O] Goto correct footnote insertion point in org-mode buffers

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

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C871v2bjh4z.fsf%40fastmail.fm%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] Goto correct footnote insertion point in org-mode buffers
> Date: Fri, 11 Mar 2011 18:47:08 -
> From: Matt Lundin 
> X-Patchwork-Id: 678
> Message-Id: <871v2bjh4z@fastmail.fm>
> To: Org Mode 
> 
> * lisp/org-footnote.el: (org-footnote-create-definition): Don't search
>   for last footnote when in org-mode file.
> 
> The recent changes to accommodate signatures in message-mode instruct
> org-mode to search for the last footnote in the entire buffer when
> inserting a new footnote definition. This causes problems in org
> buffers, since org-footnote-goto-local-insertion-point already finds
> the correct insertion point. (I.e., the insertion point is always
> placed in beneath the last footnote in the buffer, even if
> org-footnote-section is nil.) This patch invokes the search only if in
> non org-mode buffers.
> 
> ---
> lisp/org-footnote.el |8 
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
> index f2b3489..0524b41 100644
> --- a/lisp/org-footnote.el
> +++ b/lisp/org-footnote.el
> @@ -310,10 +310,10 @@ or new, let the user edit the definition of the 
> footnote."
> (skip-chars-backward " \t\r\n")
> (delete-region (point) max)
> (insert "\n\n")
> -   (insert org-footnote-tag-for-non-org-mode-files "\n")
> -;; Skip existing footnotes
> -(while (re-search-forward "^[[:space:]]*\\[[^]]+\\] " nil t)
> -  (forward-line))
> +   (insert org-footnote-tag-for-non-org-mode-files "\n")))
> + ;; Skip existing footnotes
> +  (while (re-search-forward "^[[:space:]]*\\[[^]]+\\] " nil t)
> + (forward-line
>  (insert "\n[" label "] \n")
>  (goto-char (1- (point)))
>  (message "Edit definition and go back with `C-c &' or, if unique, with 
> `C-c C-c'.")))
> 



Re: [O] how to compare org-mode version to current file needs

2011-03-17 Thread Olaf.Hamann

Am 17.03.2011 10:12, schrieb Bastien:

[...]
I don't see the real need for something complicated.  Just say that the
.org file needs current head until it's not true anymore.  If you don't
want to have to update this message, say

(insert "This file needs " (org-version))
[..]

Pragmatical, easy to implement solution, Bastien, thank you very much.


What I was thinking about meanwhile is:
* write an emacs-lisp function to check whether the needed 
variable/function is available

** if not, throw an error
* attach that function to org-babel-pretangle-hook

So now I can choose between two solutions to this problem,
thanks to the list for answering my question.

Regards,
Olaf








[Accepted] [O] New option to create unique, random labels for footnotes.

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

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C87y64ji2hj.fsf%40fastmail.fm%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] New option to create unique, random labels for footnotes.
> Date: Fri, 11 Mar 2011 18:50:59 -
> From: Matt Lundin 
> X-Patchwork-Id: 680
> Message-Id: <87y64ji2hj@fastmail.fm>
> To: Org Mode 
> 
> * lisp/org-footnote.el: (org-footnote-auto-label): New random option
> * lisp/org-footnote.el: (org-footnote-new): Create random footnote
>   labels with unique ids
> 
> ---
> lisp/org-footnote.el |   16 
>  1 files changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
> index 2ce6668..9dbd6be 100644
> --- a/lisp/org-footnote.el
> +++ b/lisp/org-footnote.el
> @@ -113,12 +113,14 @@ t  create unique labels of the form [fn:1], 
> [fn:2], ...
>  confirmlike t, but let the user edit the created value.  In particular,
> the label can be removed from the minibuffer, to create
> an anonymous footnote.
> +random  Automatically generate a unique, random label.
>  plain  Automatically create plain number labels like [1]"
>:group 'org-footnote
>:type '(choice
> (const :tag "Prompt for label" nil)
> (const :tag "Create automatic [fn:N]" t)
> (const :tag "Offer automatic [fn:N] for editing" confirm)
> +   (const :tag "Create a random label" random)
> (const :tag "Create automatic [N]" plain)))
>  
>  (defcustom org-footnote-auto-adjust nil
> @@ -253,16 +255,22 @@ This command prompts for a label.  If this is a label 
> referencing an
>  existing label, only insert the label.  If the footnote label is empty
>  or new, let the user edit the definition of the footnote."
>(interactive)
> -  (let* ((labels (org-footnote-all-labels))
> +  (let* ((labels (and (not (equal org-footnote-auto-label 'random))
> +   (org-footnote-all-labels)))
>(propose (org-footnote-unique-label labels))
>(label
> -   (if (member org-footnote-auto-label '(t plain))
> -   propose
> +   (cond 
> +((member org-footnote-auto-label '(t plain))
> + propose)
> +((equal org-footnote-auto-label 'random)
> + (require 'org-id)
> + (substring (org-id-uuid) 0 8))
> +(t
>   (completing-read
>"Label (leave empty for anonymous): "
>(mapcar 'list labels) nil nil
>(if (eq org-footnote-auto-label 'confirm) propose nil)
> -  'org-footnote-label-history
> +  'org-footnote-label-history)
>  (setq label (org-footnote-normalize-label label))
>  (cond
>   ((equal label "")
> 



Re: [O] Table formula changes are not always necessary when moving rows

2011-03-17 Thread Christian Moe




You can also use @<<<  to mean the second row


Did you mean @<<
?

Yours,
Christian



Re: [O] documentary filmmaking and reproducible research?

2011-03-17 Thread Bastien
Hi David,

"David O'Toole"  writes:

> So, what do people think of assembling free software so that anyone
> can make reproducibly-researched, remixable, crowd-sourced documentary
> films?

I think it would be nice.

-- 
 Bastien



Re: [O] Uniquely url-ify sentences?

2011-03-17 Thread Bastien
Hi Ross,

r...@rosslaird.com (Ross A. Laird) writes:

> Feedback and suggestions most welcome.

Jason replied -- did you get his code?

Thanks for confirming,

-- 
 Bastien



Re: [O] [BUG] in LaTeX export

2011-03-17 Thread Bastien
Hi Thomas,

Thomas Holst  writes:

>   _abc /_abc/ *_abc* /a_bc/ *a_bc*

You need to escape the underscore:

  \_abc /\_abc/ *\_abc* /a\_bc/ *a\_bc*

HTH,

-- 
 Bastien



Re: [O] quick question about face names

2011-03-17 Thread Bastien
Hi,

having a body-text specific face would considerably slow down motion in
Org buffers, as the fontification process would need to check against a
new body-text syntactic structure.

The solution would be to change the face "default" on a buffer basis,
but AFAIK that's currently not possible.

HTH,

-- 
 Bastien



Re: [O] Having problem with latex export of image file

2011-03-17 Thread Bastien
Hi Nick,

Nick Dokos  writes:

> I didn't look very hard, but I didn't find documentation on these.

If Robert or you can provide a documentation patch for this, it would
be nice.  It's not (only) laziness from me: since you stumbled on the
issue, I guess you can better explain what is at stake.

Thanks!

-- 
 Bastien



Re: [O] Other programs to edit Org documents?

2011-03-17 Thread Jude DaShiell
Has anyone used their iPhone to search for emacs in the apps store?  
Someone wrote an app that can import org-mode files onto the iPhone.  
Don't yet know how good it is since I'm just starting out with org-mode 
myself.On Wed, 16 Mar 2011, Scot Becker wrote  I have other flavors of 
Linux available but for now am using Slackware 13.0 so much of what's on 
the tutorials for org-mode isn't applicable because several of the add-on 
packages like remember and bbdb don't come with Slackware.

 > > > > A
simple org-mode viewer (that allows you to do some basic
> > folding/unfolding and search -- or even something more complex that
> > would allow you to view it as a mind-map?) would be nice. It could
> > even be simplified with more GUI bells and whistles and still allow
> > one to insert data and save the file. It would not be a full
> > replacement for emacs, ever, but would allow other less technical
> > users to use it as well.
> >
> > There are all kinds of advantages to this, seems to me, and of course it
> partly exists in the form of Moblie Org.  Org-mode is both an interface and
> a specification, you could say (as well as a friendly club).  And you can
> work with the latter (the markup specification) apart from the former if you
> have need to.   A web-app for viewing and editing org-mode files would open
> nice possibilities for collaboration with the not-yet-initiated and for
> using your files when you are away-from-emacs.
> 
> Scot
> 





Re: [O] [Bug?] org-crypt warning and --daemon

2011-03-17 Thread Bastien
Hi Memnon,

Memnon Anon  writes:

> However, this would mean that users who always start as daemon will
> never actually see it, right? So it may be better to always message the
> warning but only sit-for when emacs is started as daemon...

I removed the warning when emacs is run in daemon.  Both sit-for and the
warning seem useless to me in daemon mode.  

(Btw, I also wonder if it really makes sense to have auto-save-default
turned on in daemon mode.)

-- 
 Bastien



Re: [O] Trying to replace PasswordSafe with org-crypt

2011-03-17 Thread Julien Danjou
On Thu, Mar 17 2011, Óscar Fuentes wrote:

> It would nice to get rid of that noise, if possible.

It's kinda handy to have them to match the text. I don't think it's a
real problem. They are very standard.

> Second:
>
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> That changes from system to system (GNU/Linux, MinGW32) and gpg version,
> which is not good when the file is versioned.

Same here. This is part of the standard output of GPG. This is not
something org-crypt add for itself.

> Third, the encryped text changes from invocation to invocation. That
> means that the sequence
>
> org-decrypt-entry
> 
> org-encrypt-entry
>
> alters the cyphertext. Again, this is annoying when the file is under
> version control.

This has been fixed in git recently by me, and should be fixed in Org >=
7.5.

> Finally, is there a way to force symmetric encryption?

If you do not set any key, it's symmetric. But I think there's no
property to force symmetric on specific entry. I could add such a think
I guess, if you need it.

> I'm using the org 7.4 that comes with Emacs 24.0.50 (development
> sources) on Linux and Windows.

Go update! :)

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


pgpr9LcTgUBc4.pgp
Description: PGP signature


Re: [O] Other programs to edit Org documents?

2011-03-17 Thread Carsten Dominik

On 17.3.2011, at 08:21, Bastien wrote:

> Hi Scot,
> 
> Scot Becker  writes:
> 
>> There are all kinds of advantages to this, seems to me, and of course
>> it partly exists in the form of Moblie Org.  Org-mode is both an
>> interface and a specification, you could say (as well as a friendly
>> club).
> 
> During the FOSDEM meeting, someone asked whether we had a description of
> the .org format -- we don't.  A file on Worg detailing these specs would
> actually be useful and probably help third-party programs to handle it.

What they really asked for was a formal description that can be
fed into a parser.  I am sure that this would be a useful thing to
have and would open a world of applications for the Org-mode format
as a plain text format.

- Carsten




Re: [O] Publishing notes to a website

2011-03-17 Thread Bastien
Hi Thomas,

Thomas Herbert  writes:

> I have a  single php file for the CMS and a single php file for
> the "orgile"  class. The class is totally independent of the CMS, like
> "textile" and  the "textile class".

This is actually a clean approach, and I'm looking forward testing this
when you consider it mature enough.

Thanks!

-- 
 Bastien



  1   2   >