[O] link to windows version of emacs broken

2012-08-05 Thread Carl-Johan Wägner
Just a notice for a broken link:
At the page
http://orgmode.org/worg/org-tutorials/org4beginners.html
The link "Emacs for MS Windows" links to http://ftp.gnu.org/gnu/windows/Emacs/

The correct link for the intended page is:
http://ftp.gnu.org/gnu/emacs/windows/

If someone has a minute left for nothing else, it may be a convenient update =)

/Carl




Re: [O] babel awk with table input: Code block produced no output.

2012-08-05 Thread Greg Minshall
Tom,

> :results output sounds right for awk as a report formatter.  I'm
> wondering if there is a need for :results value with awk?

yes, i agree.  i didn't get far enough into the code to see where the
"value" result was coming from.

cheers, Greg



Re: [O] are super-hidden technical blocks required?

2012-08-05 Thread Ilya Shlyakhter
On Sun, Aug 5, 2012 at 10:46 PM, Torsten Wagner
 wrote:
> I can see the point that the property drawer header can be annoying
> too. Actually, when I used orgmobile for the first time I was not too
> happy to see all this property drawers suddenly appearing in my files.

> Alternatively to a new kind of drawer, I would think of the
> HIDDEN_PROP: line and an additional method which hides a drawer even
> more if it only contains hidden property elements. That could be done,
> for example, by the already mentioned custom face.
>
> That is, a drawer is clearly visible if it contains properties intend
> to be read/changed by the user (not marked invisible).
> A drawer is less visible, if it contains only properties marked as hidden.

That would be great.  Except, if a PROPERTIES drawer holds only hidden
properties,
it would be best to completely hide the :PROPERTIES: line (using
outline-flag-region), rather than display it in
a dimmed font.  So that, unless you explicitly ask to reveal these
lines, you edit the file as if they weren't there.



Re: [O] are super-hidden technical blocks required?

2012-08-05 Thread Torsten Wagner
Hey,

during this discussions people already claimed that they would prefer
to know what is stored and I can understand this.
That was the reason for the proposal of a HIDDEN_PROP: line to mark
certain properties hidden.
The benefit of this approach, people are actively aware of what they
hide and they can hide whatever they want, even stuff which they might
under other working schemes. E.g., for a certain workflow they might
prefer to hide each and all properties.

I can see the point that the property drawer header can be annoying
too. Actually, when I used orgmobile for the first time I was not too
happy to see all this property drawers suddenly appearing in my files.

Even proposing it first, I would not suggest to introduce a second
kind of drawer anymore. Chances are great that people start mixing
informations between two different drawers and then stuff could get
ugly and messy. It also introduce much new syntax and bug-fixing,
problem-solving, and further improvements have to be done for two
almost identically cases.

Alternatively to a new kind of drawer, I would think of the
HIDDEN_PROP: line and an additional method which hides a drawer even
more if it only contains hidden property elements. That could be done,
for example, by the already mentioned custom face.

That is, a drawer is clearly visible if it contains properties intend
to be read/changed by the user (not marked invisible).
A drawer is less visible, if it contains only properties marked as hidden.

Hidden properties do not reveal by the normal way of opening a drawer.
However, there presence might be indicate by a "..." line at the end.
A special key-combo reveals them (e.g. for debugging, or as some kind
of expert-mode).

That would really give the largest amount of flexibility, is backward
compatible, does not introduce to much new syntax ("just" a new header
parameter) and people can easily change what should be visible and
invisible by changing one single line.

BTW. Timestamps of the last changes are really a good example for a
hidden property. I was thinking already of a hashtag created by the
title and body of a node. That could be compared by synctools with the
present hash and thus, local changes could be identified.

If I just would now more about elisp ;)

Greetings

Torsten



Re: [O] babel awk with table input: Code block produced no output.

2012-08-05 Thread Thomas S. Dye
Hi Greg,

:results output sounds right for awk as a report formatter.  I'm
wondering if there is a need for :results value with awk?

All the best,
Tom

Greg Minshall  writes:

> hi.  i did a bit of poking around.  here are my findings, but i'm not
> conversant enough with the semantics and interconnectivity of org-mode
> to know what should be done.
>
> to summarize: if a Babel awk script returns something that starts out
> with a left paren ("("), i get "Code block returned no value".
>
> basically, org-babel-execute:awk calls org-babel-import-elisp-from-file:
> which calls org-babel-string-read [1] with each cell of the result.
>
> org-babel-string-read calls org-babel-read.  org-babel-read
> looks to see if the first character of the cell is one of {[,(,',`} and,
> if it is, tries to evaluate the cell as e-lisp.  in my case (below),
> what is in the cell is "(minimal)" and since there is no minimal
> function in e-lisp, an error is thrown.
>
> so, the first question is, are the semantics of parsing results such
> that random e-lisp-looking code should be executed?  (this seems
> dangerous, but may nevertheless be the intended semantics.)  if one did
> *not* want that behavior, one can call org-babel-read with the
> inhibit-lisp-eval parameter 't, which causes it to *not* try to execute
> any embedded lisp-looking code [2].
>
> the error that eval throws is caught by
> org-babel-import-elisp-from-file, which then just silently returns a
> nil.  the second question is, should it report an error to the user?
>
> cheers, Greg Minshall
>
> 
>
>> hi.  it appears that a left or right paren in an entry in a table makes
>> awk not execute.  here's an example (change ":stdin fails" to ":stdin
>> works" to see it work).  cheers, Greg
>> 
>> #+tblname: fails
>> | proto  | no c code   ||
>> | pscl   | c code, just fine   ||
>> | quadprog   | (minimal) c code, just fine ||
>> 
>> #+tblname: works
>> | proto  | no c code   ||
>> | pscl   | c code, just fine   ||
>> | quadprog   | minimal c code, just fine   ||
>> 
>> #+begin_src awk :stdin fails
>>   BEGIN {
>>   print "starting"
>>   }
>>   {
>>   print $0
>>   }
>> #+end_src
> 
>
> [1] in spite of its documentation, i'm not sure what
> org-babel-string-read does.  i thought it was removing quotation marks
> from strings (but wasn't sure why).  but, running this in *scratch*
> gives:
> 
> (org-babel-string-read "this is \"a\" test")
> "a"
> 
> rather than "this is a test", as i had assumed.  maybe that was a bogus
> test?
>
> [2] changing org-babel-string-read to call org-babel-read with
> inhibit-lisp-eval 't causes *my code* to work.  my code *also* works if
> i say ":results output" or ":results scalar"; i will defensively use one
> of these for my code.
>
>

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Templates for cloning

2012-08-05 Thread Nathan Neff
On Fri, Aug 3, 2012 at 9:40 PM, Sebastian Fischmeister
 wrote:
> As an idea, this is how I use templates:
>
> %+begin_src
> (defun org-p (key)
>   (let ((val (read-from-minibuffer (concat "Define " key ": "
> (plist-put org-store-link-plist
>(intern (concat ":" key)) val))
>   ""
>   )
>
> (defmacro org-g (key)
>   (or (plist-get org-store-link-plist (intern (concat ":" key)))
>   (concat "MISSING-KEY-" key)))
>
> (setq org-capture-templates
>(quote (("p4" "Template: Bla" plain (file+headline
>"~/.org/todo.org" "Projects") (file "~/.org/templates/bla.tmpl")
> %+end_src
>
> %+begin_src yasnippet
> %(org-p "var1")
> %(org-p "var2")
> ** Now copy here %(org-g "var1")
> ** And here %(org-g "var1")
>SCHEDULED: %^t
> %+end_src
>
> If you just swap the sequence of the buffer evaluation in
> org-capture-fill-template, then you would even have a nicer version of
> this. See this previous post for details:
>
> http://comments.gmane.org/gmane.emacs.orgmode/57248
>
>   Sebastian
>

Sebastian, thanks for your suggestion, but I'm having trouble understanding
how your solution works, and I don't know what you mean by "If you just swap
the sequence of the buffer evaluation".  I only glanced at your suggestion and
will review it later (hopefully).

If you can point me to more documentation about what's going on in
your solution,
or perhaps enlighten me a bit more, I would appreciate it!

Thanks,
--Nate



Re: [O] Is there a way to selectively change the line spacing for visual line mode?

2012-08-05 Thread Paul Whipp
Thanks Brian, but that does not help me adjust the line spacing or height
of a line.

I use emacs24 for organising, programming in Python, PHP and for writing
fiction. Visual line mode is perfect except for the minor irritation of my
having to put in that extra linefeed to clearly visually separate
paragraphs.

Being able to turn visual mode off is handy too - each paragraph ends up on
one line - its effectively folding for fiction ;) - very handy when
scanning a 10k+ word story.

The 'enhancement' I'm after is being able to make the explicit newline take
up more screen height than the implicit newline used in visual-line-mode so
that there is no need to put in two explicit newlines to separate
paragraphs clearly. I think this would be universally appreciated.

I guess I could possibly dig into the code and rebind the line-spacing
within the visual-line-mode relevant scope but it would take me an age to
work out how to do that.

Cheers,
Paul


On 5 August 2012 01:53, brian powell  wrote:

> * http://www.emacswiki.org/emacs/VisualLineMode --very intereting...
>
> ** This may explain why you found no help thru google:
>
> "Visual line mode is a new mode in Emacs 23 that is on by default."
>
> * "The following code convinces visual-line-mode to wrap at a given column
> by expanding the right margin of the buffer’s window. It’s worked pretty
> well for me, although it depends on being the only one that fiddles with
> the margins. --JamesWright
>
> (defvar visual-wrap-column nil)
> (defun set-visual-wrap-column (new-wrap-column &optional buffer)
> 
> etc.
>
> ** To use the original behavior put the following in your .emacs:
>
> (setq line-move-visual nil)
>
>
>
> On Sat, Aug 4, 2012 at 8:06 AM, Paul Whipp  wrote:
>
>> I can adjust the line-spacing variable but I'm looking for a way to
>> separate paragraphs when writing large amounts of text in org-mode.
>> Sticking in an extra carriage return works and has become my habit but it
>> is annoying when the text is copy/pasted or exported to certain formats
>> (such as libreoffice).
>>
>> I'd like to be able to set the line-spacing such that there is a nice
>> visible vertical gap where I've actually hit the carriage return to create
>> a new paragraph and a smaller vertical spacing where visual line mode has
>> emulated a carriage return for readability. This would probably help in my
>> elisp or python code too because it would make it easy to distinguish
>> wrapped and new lines.
>>
>> I've tried google but I can't see any way to do this. Can anyone suggest
>> where I should look for a solution?
>>
>> Regards,
>> Paul Whipp
>>
>> Office: 07 3103 2894
>> Mobile: 0410 545 357
>>
>> Do more business with your website!
>>
>> Joomla, Python, PHP and MySQL web application 
>> developer
>>
>>
>>
>>
>>
>


Re: [O] babel awk with table input: Code block produced no output.

2012-08-05 Thread Greg Minshall
hi.  i did a bit of poking around.  here are my findings, but i'm not
conversant enough with the semantics and interconnectivity of org-mode
to know what should be done.

to summarize: if a Babel awk script returns something that starts out
with a left paren ("("), i get "Code block returned no value".

basically, org-babel-execute:awk calls org-babel-import-elisp-from-file:
which calls org-babel-string-read [1] with each cell of the result.

org-babel-string-read calls org-babel-read.  org-babel-read
looks to see if the first character of the cell is one of {[,(,',`} and,
if it is, tries to evaluate the cell as e-lisp.  in my case (below),
what is in the cell is "(minimal)" and since there is no minimal
function in e-lisp, an error is thrown.

so, the first question is, are the semantics of parsing results such
that random e-lisp-looking code should be executed?  (this seems
dangerous, but may nevertheless be the intended semantics.)  if one did
*not* want that behavior, one can call org-babel-read with the
inhibit-lisp-eval parameter 't, which causes it to *not* try to execute
any embedded lisp-looking code [2].

the error that eval throws is caught by
org-babel-import-elisp-from-file, which then just silently returns a
nil.  the second question is, should it report an error to the user?

cheers, Greg Minshall



> hi.  it appears that a left or right paren in an entry in a table makes
> awk not execute.  here's an example (change ":stdin fails" to ":stdin
> works" to see it work).  cheers, Greg
> 
> #+tblname: fails
> | proto  | no c code   ||
> | pscl   | c code, just fine   ||
> | quadprog   | (minimal) c code, just fine ||
> 
> #+tblname: works
> | proto  | no c code   ||
> | pscl   | c code, just fine   ||
> | quadprog   | minimal c code, just fine   ||
> 
> #+begin_src awk :stdin fails
>   BEGIN {
>   print "starting"
>   }
>   {
>   print $0
>   }
> #+end_src


[1] in spite of its documentation, i'm not sure what
org-babel-string-read does.  i thought it was removing quotation marks
from strings (but wasn't sure why).  but, running this in *scratch*
gives:

(org-babel-string-read "this is \"a\" test")
"a"

rather than "this is a test", as i had assumed.  maybe that was a bogus
test?

[2] changing org-babel-string-read to call org-babel-read with
inhibit-lisp-eval 't causes *my code* to work.  my code *also* works if
i say ":results output" or ":results scalar"; i will defensively use one
of these for my code.



Re: [O] are super-hidden technical blocks required?

2012-08-05 Thread Ilya Shlyakhter
On Sun, Aug 5, 2012 at 6:20 PM, Nicolas Goaziou  wrote:
>> What about a HIDDEN_PROPERTIES drawer that, when folded, folds
>> completely (so that its title line is hidden too), and have a key to
>> reveal such drawers (the way M-tab opens archived entries)?
>
> This is begging for problems.  At some point, an user will start to
> notice weird behaviour he cannot explain from, let's say, the exporter,
> because he will have completely forgotten about one totally hidden
> drawer setting export options.
>
> I don't think anything should be made totally invisible. There should
> always be visual clues for such things.

But if _every_ entry has a visible PROPERTIES drawer (because a
creation and last-modification
dates of the entry are stored there), then entries for which custom
export options were set no longer stand out.
Just as, if you BOLD every word in a document, BOLD no longer acts as
a highlight.

So, I agree that unique customizations should lead to a visible indicator.
But for properties that aren't really customizations ( creation date,
modification date, unique ID ),
a visible indicator only clutters things without acting as a useful highlight.
So, what about making a UNIVERSAL_PROPERTIES drawer that is normally
completely hidden,
unless you explicitly reveal it?



Re: [O] are super-hidden technical blocks required?

2012-08-05 Thread Nicolas Goaziou
Hello,

> What about a HIDDEN_PROPERTIES drawer that, when folded, folds
> completely (so that its title line is hidden too), and have a key to
> reveal such drawers (the way M-tab opens archived entries)?

This is begging for problems.  At some point, an user will start to
notice weird behaviour he cannot explain from, let's say, the exporter,
because he will have completely forgotten about one totally hidden
drawer setting export options.

I don't think anything should be made totally invisible. There should
always be visual clues for such things.

PROPERTIES drawer is as hidden as it can decently be. Since its contents
are mostly for Org internals, the average user is, usually, not supposed
to expand it. If you often need to have a look at some properties, you
may use column view instead.


Regards,

-- 
Nicolas Goaziou



Re: [O] Is there a way to selectively change the line spacing for visual line mode?

2012-08-05 Thread Jambunathan K
Paul Whipp  writes:

> Sticking in an extra carriage return works and has become my habit but
> it is annoying when the text is copy/pasted or exported to certain
> formats (such as libreoffice).

You can create LibreOffice documents using the OpenDocument text
exporter.  Type C-c C-e O in the org buffer.  If you export this way,
the *.odt file will not have any newline issues.

I am not sure why you are copy, pasting when there is a better
alternative.
-- 



Re: [O] are super-hidden technical blocks required?

2012-08-05 Thread Ilya Shlyakhter

On 8/5/2012 5:16 AM, Bastien wrote:

Hi Ilya,

Ilya Shlyakhter  writes:


But I don't want to see the timestamps during normal Org usage.


What do you think of "hiding" them by having a new face for properties
matching a custom regexp?  This has the advantage of letting the user
decide what to do with such properties: either hiding or highlighting
them.  This is also easier to implement.


Then _every_ entry will still have a PROPERTIES drawer.
The problem wasn't what's in the drawer (which you hardly ever open), 
but having to see (and step around) that PROPERTIES line on every entry.


What about a HIDDEN_PROPERTIES drawer that, when folded, folds
completely (so that its title line is hidden too), and have a key to 
reveal such

drawers (the way M-tab opens archived entries)?






Re: [O] [PATCH 00/10] Takjuggler exporter improvements

2012-08-05 Thread Yann Hodique
> "Bastien" == Bastien   writes:

> Hi Yann,
> Yann Hodique  writes:

>> Here are a couple of patches for org-taskjuggler.el

> thanks for this.  I've quickly check by just reading the patches,
> and this looks good.  I copy Christian, hoping he will have time
> to double-check.

> Did you sign the FSF papers?  

Hi Bastien,

Thanks for the quick feedback.

I did sign FSF papers a few years ago, but not sure Emacs was explicitly
in the scope. Anyway, I just sent another form to be sure.

> Also, please reread http://orgmode.org/worg/org-contribute.html#sec-5 
> to format the commit messages more appropriately.

Ok. I'll wait a bit for potential feedback from Christian and rework
the messages.

Thanks,

Yann.

-- 
The surest way to keep a secret is to make
people believe they already know the answer.

  -- Ancient Fremen Wisdom



Re: [O] org-caldav: Sync Org with external calendars through CalDAV (Owncloud, Google, ...)

2012-08-05 Thread David Engster
Bastien writes:
> David Engster  writes:
>> That is very strange. It should first
>> ask: "Username [for Google CalDAV]:". If it does not do that, maybe you
>> have that information in your .authinfo?
>
> I have this:
>
> machine smtp.gmail.com login bastiengue...@gmail.com password xx

Since we're connecting to google.com this shouldn't matter, obviously,
thus I'm at a loss why it doesn't ask. I currently cannot test anything
reliably because I'm on vacation and there's no 3G around here, so I'm
afraid this has to wait a bit. Unless "someone" beats me to it. ;-)

-David



Re: [O] Agenda Upcoming Faces

2012-08-05 Thread Bastien
SW  writes:

> Solved :)

Good -- thanks for chasing this down,

-- 
 Bastien



Re: [O] [PATCH 00/10] Takjuggler exporter improvements

2012-08-05 Thread Bastien
Hi Yann,

Yann Hodique  writes:

> Here are a couple of patches for org-taskjuggler.el

thanks for this.  I've quickly check by just reading the patches,
and this looks good.  I copy Christian, hoping he will have time
to double-check.

Did you sign the FSF papers?  

If you didn't, please fill in this form and send it to ass...@fsf.org:

http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=request-assign-future.txt;hb=HEAD

Also, please reread http://orgmode.org/worg/org-contribute.html#sec-5 
to format the commit messages more appropriately.

Thanks,

-- 
 Bastien



Re: [O] test-ob-sh/session

2012-08-05 Thread Achim Gratz
Achim Gratz writes:
> I'm currently seeing a problem with this test (only on Win7, both
> NTEmacs and Cygwin).  The test just hangs and never finishes.  All my
> attempts to have it fail in the same way in an interactive sessions were
> fruitless.  However, it seems that the first time a session is
> initiated, it does not start at all.  The second time it then works as
> expected.  Why Emacs hangs when it gets there in batch mode I can't
> see...

Emacs23 on Linux doesn't hang but fails the test anyway.


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

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves




Re: [O] Fetch failed

2012-08-05 Thread Achim Gratz
Johan Ekh writes:
> git pull
> error: Unable to find 16d23c07dd3697db790b14e6873c65404c912e3f under
> http://repo.or.cz/r/org-mode.git
> Cannot obtain needed object 16d23c07dd3697db790b14e6873c65404c912e3f
> error: Fetch failed.

Check the files in .git/objects/pack — delete those *.idx files that
have no corresponding *.pack file and do the upadte again.


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

DIY Stuff:
http://Synth.Stromeko.net/DIY.html




Re: [O] [BUG] Traceback on Org-Export

2012-08-05 Thread Achim Gratz
Bastien writes:
> All right.  If useful, please push a public branch for this on
> orgmode.org.  I will try downloading Emacs 23 and see what warnings
> will have here.

Done, branch name is "Globals".  Merge it fast or be prepared for tons
of merge conflicts.  I already resolved the ones created by your recent
changes, but not the warnings introduced by them.


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

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




Re: [O] [BUG] [PATCH] shell links broken

2012-08-05 Thread Bastien
François Allisson  writes:

> As I was pulling your latest fix, I noticed there was a little typo in
> org.texi. I hope the attached patch will help fix it.

Applied, thanks!

-- 
 Bastien



Re: [O] Fetch failed

2012-08-05 Thread Bastien
Hi Johan,

Johan Ekh  writes:

> git pull
> error: Unable to find 16d23c07dd3697db790b14e6873c65404c912e3f under 
> http://repo.or.cz/r/org-mode.git
> Cannot obtain needed object 16d23c07dd3697db790b14e6873c65404c912e3f
> error: Fetch failed.
> make: *** [update] Error 1
>
> Does anyone know what I have to do?

org-mode git repo is now hosted on orgmode.org:

  ~$ git clone git://orgmode.org/org-mode.git

HTH,

-- 
 Bastien



[O] Fetch failed

2012-08-05 Thread Johan Ekh
Hi all,
I try to update my org-mode v7.7 installation on my OpenSuse 11.4 laptop
with

make up2

but I get

git pull
error: Unable to find 16d23c07dd3697db790b14e6873c65404c912e3f under
http://repo.or.cz/r/org-mode.git
Cannot obtain needed object 16d23c07dd3697db790b14e6873c65404c912e3f
error: Fetch failed.
make: *** [update] Error 1

Does anyone know what I have to do?

Best regards,

Johan


Re: [O] [BUG] [PATCH] shell links broken

2012-08-05 Thread François Allisson
Hi Bastien

Le dimanche 05 aoû 2012 à 11:41:36 (+0200), Bastien a écrit :
> Hi François,
> 
> François Allisson  writes:
> 
> > Since last update of org this morning, I cannot open shell links any
> > longer. Instead, I get the message "void-variable
> > clean-buffer-list-kill-buffer-names" in the mini-buffer.
> 
> Fixed, thanks.

Thanks! I confirm it works.

As I was pulling your latest fix, I noticed there was a little typo in
org.texi. I hope the attached patch will help fix it.

All the best,

François.
>From 7277580fd27d91c22e5dbc701af6862392c58a3e Mon Sep 17 00:00:00 2001
From: François Allisson 
Date: Sun, 5 Aug 2012 14:07:10 +0200
Subject: [PATCH] org.texi: Fix typo

* doc/org.texi: Remove extra curly bracket.

TINYCHANGE
---
 doc/org.texi |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/org.texi b/doc/org.texi
index 44aa362..3fdb4ac 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -5020,7 +5020,7 @@ TIMESTAMP_IA @r{The first inactive timestamp in the entry.}
 CLOCKSUM @r{The sum of CLOCK intervals in the subtree.  @code{org-clock-sum}}
  @r{must be run first to compute the values in the current buffer.}
 CLOCKSUM_T   @r{The sum of CLOCK intervals in the subtree for today.}
- @r{@code{org-clock-sum-today}} must be run first to compute the}
+ @r{@code{org-clock-sum-today} must be run first to compute the}
  @r{values in the current buffer.}
 BLOCKED  @r{"t" if task is currently blocked by children or siblings}
 ITEM @r{The headline of the entry.}
-- 
1.7.10.4



[O] [PATCH 07/10] org-taskjuggler: make project umbrella task optional

2012-08-05 Thread Yann Hodique
introduce `org-export-taskjuggler-keep-project-as-task' as a flag to toggle
the behavior. Keep old behavior as default.

* org-taskjuggler.el (org-export-taskjuggler-keep-project-as-task): new custom 
variable
 (org-export-as-taskjuggler): optionally drop the topmost "task" (project)
 (org-taskjuggler-assign-task-ids): adapt path computation by optionally 
dropping the topmost component (project)
---
 lisp/org-taskjuggler.el | 23 ---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
index 92ba79c..996665d 100644
--- a/lisp/org-taskjuggler.el
+++ b/lisp/org-taskjuggler.el
@@ -263,6 +263,14 @@ but before any resource and task declarations."
   the corresponding resource."
   :group 'org-export-taskjuggler)
 
+(defcustom org-export-taskjuggler-keep-project-as-task t
+  "Whether to keep the project headline as an umbrella task for
+  all declared tasks. Setting this to nil will allow maintaining
+  completely separated task buckets, while still sharing the same
+  resources pool."
+  :group 'org-export-taskjuggler
+  :type 'boolean)
+
 ;;; Hooks
 
 (defvar org-export-taskjuggler-final-hook nil
@@ -349,7 +357,10 @@ defined in `org-export-taskjuggler-default-reports'."
 
   (org-clone-local-variables old-buffer "^org-")
   (insert org-export-taskjuggler-default-global-header)
-  (org-taskjuggler-open-project (car tasks))
+  (org-taskjuggler-open-project
+   (if org-export-taskjuggler-keep-project-as-task
+  (car tasks)
+(pop tasks)))
   (insert org-export-taskjuggler-default-global-properties)
   (insert "\n")
   (dolist (resource resources)
@@ -364,7 +375,9 @@ defined in `org-export-taskjuggler-default-reports'."
  (org-taskjuggler-close-maybe level)
  (org-taskjuggler-open-task task)
  (setq org-export-taskjuggler-old-level level)))
-  (org-taskjuggler-close-maybe 1)
+  (org-taskjuggler-close-maybe
+   (if org-export-taskjuggler-keep-project-as-task
+  1 2))
   (org-taskjuggler-insert-reports)
   (save-buffer)
   (or (org-export-push-to-kill-ring "TaskJuggler")
@@ -445,7 +458,11 @@ a path to the current task."
  (push unique-id (car unique-ids))
  (setcar path unique-id)))
(push (cons "unique-id" unique-id) task)
-   (push (cons "path" (mapconcat 'identity (reverse path) ".")) task)
+   (push (cons "path"
+   (mapconcat 'identity
+  (if org-export-taskjuggler-keep-project-as-task
+  (reverse path)
+(cdr (reverse path))) ".")) task)
(setq previous-level level)
(setq resolved-tasks (append resolved-tasks (list task)))
 
-- 
1.7.11.3




[O] [PATCH 03/10] org-taskjuggler: make use of org properties

2012-08-05 Thread Yann Hodique
infer start and end date from SCHEDULED/DEADLINE information

* org-taskjuggler.el (org-taskjuggler-date): new function, produce a 
taskjuggler-compatible date
 (org-taskjuggler-components): make use of SCHEDULED/DEADLINE properties
---
 lisp/org-taskjuggler.el | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
index 102eabc..7974d1e 100644
--- a/lisp/org-taskjuggler.el
+++ b/lisp/org-taskjuggler.el
@@ -138,8 +138,6 @@
 ;;   :END:
 ;;
  * TODO
-;;   - Use SCHEDULED and DEADLINE information (not just start and end
-;; properties).
 ;;   - Look at org-file-properties, org-global-properties and
 ;; org-global-properties-fixed
 ;;   - What about property inheritance and org-property-inherit-p?
@@ -384,6 +382,10 @@ with the TaskJuggler GUI."
   (save-excursion
 (and (org-up-heading-safe) (org-entry-get (point) "ORDERED"
 
+(defun org-taskjuggler-date (date)
+  (let ((time (parse-time-string date)))
+(format "%d-%02d-%02d" (nth 5 time) (nth 4 time) (nth 3 time
+
 (defun org-taskjuggler-components ()
   "Return an alist containing all the pertinent information for
 the current node such as the headline, the level, todo state
@@ -395,6 +397,12 @@ information, all the properties, etc."
  (replace-regexp-in-string
   "\"" "\\\"" (nth 4 components) t t)) ; quote double quotes in 
headlines
 (parent-ordered (org-taskjuggler-parent-is-ordered-p)))
+(let ((scheduled (assoc "SCHEDULED" props))
+ (deadline (assoc "DEADLINE" props)))
+  (when scheduled
+   (push (cons "start" (org-taskjuggler-date (cdr scheduled))) props))
+  (when deadline
+   (push (cons "end" (org-taskjuggler-date (cdr deadline))) props)))
 (push (cons "level" level) props)
 (push (cons "headline" headline) props)
 (push (cons "parent-ordered" parent-ordered) props)))
-- 
1.7.11.3




Re: [O] Reftex in Org-Mode exporting and recognizing figures or equations

2012-08-05 Thread Rasmus
Jeffrey Spencer  writes:

> When I use your setup and insert a citation then export to latex I get:
> [[cite:Paper]]
> turns into:
> \ref{cite-Paper}

You need to add them as link types:

See Worg.  Here's my setup

#+begin_src emacs-lisp

;; add latex:link-type [[latex:textsc][small caps]]
(org-add-link-type
 "latex" nil
 (lambda (path desc format)
   (cond
((eq format 'html)
 (format "%s" path desc))
((eq format 'latex)
 (format "\\%s{%s}" path desc)


(org-add-link-type
 "citepos" 'ebib
 (lambda (path desc format)
   (cond
((eq format 'latex)
 (if (or (not desc) (equal 0 (search "citepos:" desc)))
 (format "\\posscite{%s}" path)
   (format "\\posscite[%s]{%s}" desc path)
   )


(org-add-link-type
 "citep" 'ebib
 (lambda (path desc format)
   (cond
((eq format 'latex)
 (if (or (not desc) (equal 0 (search "citep:" desc)))
 (format "\\citep{%s}" path)
   (format "\\citep[%s]{%s}" desc path)
   )

(org-add-link-type
 "citet" 'ebib
 (lambda (path desc format)
   (cond
((eq format 'latex)
 (if (or (not desc) (equal 0 (search "citet:" desc)))
 (format "\\citet{%s}" path)
   (format "\\citet[%s]{%s}" desc path)
   )


(org-add-link-type
 "citeauthor" 'ebib
 (lambda (path desc format)
   (cond
((eq format 'latex)
 (if (or (not desc) (equal 0 (search "citeauthor:" desc)))
 (format "\\citeauthor{%s}" path)
   (format "\\citeauthor[%s]{%s}" desc path)
   )

(org-add-link-type
 "citeyear" 'ebib
 (lambda (path desc format)
   (cond
((eq format 'latex)
 (if (or (not desc) (equal 0 (search "citeyear:" desc)))
 (format "\\citeyear{%s}" path)
   (format "\\citeyear[%s]{%s}" desc path)
   )


(org-add-link-type
 "cite" 'ebib
 (lambda (path desc format)
   (cond
((eq format 'html)
 (format "(%s)" path))
((eq format 'latex)
 (if (or (not desc) (equal 0 (search "cite:" desc)))
 (format "\\textcite{%s}" path)
   (format "\\textcite[%s][%s]{%s}"
   (cadr (split-string desc ";"))
   (car (split-string desc ";"))  path))


  (org-add-link-type
   "parencite" 'ebib
   (lambda (path desc format)
 (cond
  ((eq format 'html)
   (format "(%s)" path))
  ((eq format 'latex)
   (if (or (not desc) (equal 0 (search "parencite:" desc)))
   (format "\\parencite{%s}" path)
 (format "\\parencite[%s][%s]{%s}"
 (cadr (split-string desc ";"))
 (car (split-string desc ";"))  path))
#+end_src

-- 
When the facts change, I change my mind. What do you do, sir?



[O] [PATCH 04/10] org-taskjuggler: task with end-only is also a milestone (deadline)

2012-08-05 Thread Yann Hodique
---
 lisp/org-taskjuggler.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
index 7974d1e..f668e7f 100644
--- a/lisp/org-taskjuggler.el
+++ b/lisp/org-taskjuggler.el
@@ -689,7 +689,8 @@ org-mode priority string."
(and (assoc "leaf-node" task)
 (not (or effort
  (cdr (assoc "duration" task))
- (cdr (assoc "end" task))
+ (and (cdr (assoc "start" task))
+  (cdr (assoc "end" task)))
  (cdr (assoc "period" task)))
 (attributes org-export-taskjuggler-valid-task-attributes))
 (insert
-- 
1.7.11.3




[O] [PATCH 08/10] org-taskjuggler: disambiguate "headline", as it's also a valid taskjuggler property

2012-08-05 Thread Yann Hodique
---
 lisp/org-taskjuggler.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
index 996665d..b08dcdf 100644
--- a/lisp/org-taskjuggler.el
+++ b/lisp/org-taskjuggler.el
@@ -328,7 +328,7 @@ defined in `org-export-taskjuggler-default-reports'."
 (unless resources
   (setq resources
`((("resource_id" . ,(user-login-name))
-  ("headline" . ,user-full-name)
+  ("HEADLINE" . ,user-full-name)
   ("level" . 1)
 ;; add a default allocation to the first task if none was given
 (unless (assoc "allocate" (car tasks))
@@ -426,7 +426,7 @@ information, all the properties, etc."
   (when deadline
(push (cons "end" (org-taskjuggler-date (cdr deadline))) props)))
 (push (cons "level" level) props)
-(push (cons "headline" headline) props)
+(push (cons "HEADLINE" headline) props)
 (push (cons "parent-ordered" parent-ordered) props)))
 
 (defun org-taskjuggler-assign-task-ids (tasks)
@@ -600,7 +600,7 @@ The id is derived from the headline and made unique against
 UNIQUE-IDS. If the (downcased) first token of the headline is not
 unique try to add more (downcased) tokens of the headline or
 finally add more underscore characters (\"_\")."
-  (let* ((headline (cdr (assoc "headline" item)))
+  (let* ((headline (cdr (assoc "HEADLINE" item)))
 (parts (split-string headline))
 (id (org-taskjuggler-clean-id (downcase (pop parts)
 ; try to add more parts of the headline to make it unique
@@ -626,7 +626,7 @@ attributes from the PROJECT alist are inserted. If no end 
date is
 specified it is calculated
 `org-export-taskjuggler-default-project-duration' days from now."
   (let* ((unique-id (cdr (assoc "unique-id" project)))
-(headline (cdr (assoc "headline" project)))
+(headline (cdr (assoc "HEADLINE" project)))
 (version (cdr (assoc "version" project)))
 (start (cdr (assoc "start" project)))
 (end (cdr (assoc "end" project
@@ -677,7 +677,7 @@ is defined it will calculate a unique id for the resource 
using
 (or (cdr (assoc "resource_id" resource))
 (cdr (assoc "ID" resource))
 (cdr (assoc "unique-id" resource)
-   (headline (cdr (assoc "headline" resource)))
+   (headline (cdr (assoc "HEADLINE" resource)))
(attributes org-export-taskjuggler-valid-resource-attributes))
 (insert
  (concat
@@ -702,7 +702,7 @@ org-mode priority string."
 
 (defun org-taskjuggler-open-task (task)
   (let* ((unique-id (cdr (assoc "unique-id" task)))
-(headline (cdr (assoc "headline" task)))
+(headline (cdr (assoc "HEADLINE" task)))
 (effort (org-taskjuggler-clean-effort (cdr (assoc org-effort-property 
task
 (depends (cdr (assoc "depends" task)))
 (allocate (cdr (assoc "allocate" task)))
-- 
1.7.11.3




Re: [O] Agenda Upcoming Faces

2012-08-05 Thread SW
I wrote:

> 
> 
> http://imgur.com/ge0hY
> 
> 

In the example image above:

 1d is in org-upcoming-deadline face
 5d is in org-upcoming-deadline face
 8d is in default face
10d is in org-upcoming-deadline face
26d is in default face
45d is in default face

*However*, the entry for the "10d" line is:

*** TODO EXAMPLE
DEADLINE: <2012-08-15 Wed 12:00 -30d>

If I remove the "-30d" advanced warning part, then "10d" appears in default
face. So this has to do with the "org-agenda-deadline-faces", which I have *not*
modified:


Its value is ((1.0 . org-warning)
 (0.5 . org-upcoming-deadline)
 (0.0 . default))


If EXAMPLE is due in 10 days and the advanced warning is 30 days, then 20 days
have already elapsed. Therefore, for this entry, more than 0.5 (50%) of the time
has passed, therefore triggering the use of org-upcoming-deadline face.

Solved :)





[O] bug#7133: Fwd: Bug#7133

2012-08-05 Thread Chong Yidong
-- Forwarded message --
From: Bastien 
Date: Sun, Aug 5, 2012 at 6:32 PM
Subject: Re: Bug#7133
To: Chong Yidong 


Hi Chong,

Chong Yidong  writes:

> Please review the proposed patch by Lennart Borgman at
>
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7133

You can close this bug.  (I cannot close it myself as I don't
find it through Gmane or with M-x debbugs-gnu RET)

Errors while creating a pdf from an org-mode buffer already
display the pdfLaTeX error buffer.

Thanks,

--
 Bastien





[O] [PATCH 09/10] org-taskjuggler: allow reports definition from within the org file

2012-08-05 Thread Yann Hodique
This renders reports production much more flexible.

* org-taskjuggler.el (org-export-taskjuggler-report-tag): new custom variable
 (org-export-taskjuggler-valid-report-attributes): new custom variable
 (org-export-as-taskjuggler): compute reports
 (org-taskjuggler-open-report): generate report from org item
 (org-taskjuggler-insert-reports): insert default reports only if no explicit 
one is defined
---
 lisp/org-taskjuggler.el | 42 +-
 1 file changed, 37 insertions(+), 5 deletions(-)

diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
index b08dcdf..ad1873a 100644
--- a/lisp/org-taskjuggler.el
+++ b/lisp/org-taskjuggler.el
@@ -181,6 +181,13 @@ resources for the project."
   :version "24.1"
   :type 'string)
 
+(defcustom org-export-taskjuggler-report-tag "taskjuggler_report"
+  "Tag, property or todo used to find the tree containing all the
+reports for the project."
+  :group 'org-export-taskjuggler
+  :version "24.1"
+  :type 'string)
+
 (defcustom org-export-taskjuggler-target-version 2.4
   "Which version of TaskJuggler the exporter is targeting."
   :group 'org-export-taskjuggler
@@ -263,6 +270,14 @@ but before any resource and task declarations."
   the corresponding resource."
   :group 'org-export-taskjuggler)
 
+(defcustom org-export-taskjuggler-valid-report-attributes
+  '(headline columns definitions timeformat hideresource hidetask
+loadunit sorttasks formats)
+  "Valid attributes for Taskjuggler reports. If one of these
+  appears as a property for a headline, it will be exported with
+  the corresponding report."
+  :group 'org-export-taskjuggler)
+
 (defcustom org-export-taskjuggler-keep-project-as-task t
   "Whether to keep the project headline as an umbrella task for
   all declared tasks. Setting this to nil will allow maintaining
@@ -313,6 +328,10 @@ defined in `org-export-taskjuggler-default-reports'."
   (org-map-entries
'org-taskjuggler-components
org-export-taskjuggler-resource-tag nil 'archive 'comment)))
+(reports
+ (org-map-entries
+  'org-taskjuggler-components
+  org-export-taskjuggler-report-tag nil 'archive 'comment))
 (filename (expand-file-name
(concat
 (file-name-sans-extension
@@ -378,7 +397,7 @@ defined in `org-export-taskjuggler-default-reports'."
   (org-taskjuggler-close-maybe
(if org-export-taskjuggler-keep-project-as-task
   1 2))
-  (org-taskjuggler-insert-reports)
+  (org-taskjuggler-insert-reports reports)
   (save-buffer)
   (or (org-export-push-to-kill-ring "TaskJuggler")
  (message "Exporting... done"))
@@ -739,6 +758,16 @@ org-mode priority string."
   (org-taskjuggler-get-attributes task attributes)
   "\n"
 
+(defun org-taskjuggler-open-report (report)
+  (let* ((kind (or (cdr (assoc "report-kind" report)) "taskreport"))
+(headline (cdr (assoc "HEADLINE" report)))
+(attributes org-export-taskjuggler-valid-report-attributes))
+(insert
+ (concat
+  kind " \"" headline "\" {\n"
+  (org-taskjuggler-get-attributes report attributes)
+  "\n}\n"
+
 (defun org-taskjuggler-close-maybe (level)
   (while (> org-export-taskjuggler-old-level level)
 (insert "}\n")
@@ -746,10 +775,13 @@ org-mode priority string."
   (when (= org-export-taskjuggler-old-level level)
 (insert "}\n")))
 
-(defun org-taskjuggler-insert-reports ()
-  (let (report)
-(dolist (report org-export-taskjuggler-default-reports)
-  (insert report "\n"
+(defun org-taskjuggler-insert-reports (reports)
+  (if reports
+  (dolist (report (cdr reports))
+   (org-taskjuggler-open-report report))
+(let (report)
+  (dolist (report org-export-taskjuggler-default-reports)
+   (insert report "\n")
 
 (provide 'org-taskjuggler)
 
-- 
1.7.11.3




[O] [PATCH 10/10] org-taskjuggler: update doc to reflect latest changes

2012-08-05 Thread Yann Hodique
---
 doc/org.texi | 48 ++--
 1 file changed, 30 insertions(+), 18 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 8613793..53e001b 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -11882,9 +11882,9 @@ nodes of a document or strictly follow the order of the 
nodes in the
 document.
 
 Instead the TaskJuggler exporter looks for a tree that defines the tasks and
-a optionally tree that defines the resources for this project.  It then
-creates a TaskJuggler file based on these trees and the attributes defined in
-all the nodes.
+optionally trees that define the resources and reports for this project.
+It then creates a TaskJuggler file based on these trees and the attributes
+defined in all the nodes.
 
 @subsection TaskJuggler export commands
 
@@ -11893,7 +11893,8 @@ all the nodes.
 Export as a TaskJuggler file.
 
 @orgcmd{C-c C-e J,org-export-as-taskjuggler-and-open}
-Export as a TaskJuggler file and then open the file with TaskJugglerUI.
+Export as a TaskJuggler file and then open the file with TaskJugglerUI (only
+for TaskJugglerUI 2.x).
 @end table
 
 @subsection Tasks
@@ -11931,15 +11932,17 @@ time.
 
 @subsection Export of properties
 
-The exporter also takes TODO state information into consideration, i.e.@: if a
-task is marked as done it will have the corresponding attribute in
-TaskJuggler (@samp{complete 100}).  Also it will export any property on a task
-resource or resource node which is known to TaskJuggler, such as
-@samp{limits}, @samp{vacation}, @samp{shift}, @samp{booking},
-@samp{efficiency}, @samp{journalentry}, @samp{rate} for resources or
-@samp{account}, @samp{start}, @samp{note}, @samp{duration}, @samp{end},
-@samp{journalentry}, @samp{milestone}, @samp{reference}, @samp{responsible},
-@samp{scheduling}, etc for tasks.
+The exporter also takes TODO state information into consideration, i.e.@: if
+a task is marked as done it will have the corresponding attribute in
+TaskJuggler (@samp{complete 100}).  Scheduling information is also taken into
+account to set start/end dates for tasks.
+
+The exporter will also export any property on a task resource or resource
+node which is known to TaskJuggler, such as @samp{limits}, @samp{vacation},
+@samp{shift}, @samp{booking}, @samp{efficiency}, @samp{journalentry},
+@samp{rate} for resources or @samp{account}, @samp{start}, @samp{note},
+@samp{duration}, @samp{end}, @samp{journalentry}, @samp{milestone},
+@samp{reference}, @samp{responsible}, @samp{scheduling}, etc for tasks.
 
 @subsection Dependencies
 
@@ -11985,11 +11988,20 @@ examples should illustrate this:
 @vindex org-export-taskjuggler-default-reports
 TaskJuggler can produce many kinds of reports (e.g.@: gantt chart, resource
 allocation, etc).  The user defines what kind of reports should be generated
-for a project in the TaskJuggler file.  The exporter will automatically insert
-some default reports in the file.  These defaults are defined in
-@code{org-export-taskjuggler-default-reports}.  They can be modified using
-customize along with a number of other options.  For a more complete list, see
-@kbd{M-x customize-group @key{RET} org-export-taskjuggler @key{RET}}.
+for a project in the TaskJuggler file.  By default, the exporter will
+automatically insert some pre-set reports in the file.  These defaults are
+defined in @code{org-export-taskjuggler-default-reports}.  They can be
+modified using customize along with a number of other options.  For a more
+complete list, see @kbd{M-x customize-group @key{RET} org-export-taskjuggler
+@key{RET}}.
+
+Alternately, the user can tag a tree with
+@code{org-export-taskjuggler-report-tag}, and define reports in sub-nodes,
+similarly to what is done with tasks or resources.  The properties used for
+report generation are defined in
+@code{org-export-taskjuggler-valid-report-attributes}. In addition, a special
+property named @samp{report-kind} is used to define the kind of report one
+wants to generate (by default, a @samp{taskreport}).
 
 For more information and examples see the Org-taskjuggler tutorial at
 @uref{http://orgmode.org/worg/org-tutorials/org-taskjuggler.html}.
-- 
1.7.11.3




[O] [PATCH 02/10] org-taskjuggler: properly install local variables at export time

2012-08-05 Thread Yann Hodique
* org-taskjuggler.el (org-export-as-taskjuggler): compute opt-plist, use 
`org-install-letbind'
---
 lisp/org-taskjuggler.el | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
index 3c56630..102eabc 100644
--- a/lisp/org-taskjuggler.el
+++ b/lisp/org-taskjuggler.el
@@ -284,7 +284,10 @@ defined in `org-export-taskjuggler-default-reports'."
 
   (message "Exporting...")
   (setq-default org-done-keywords org-done-keywords)
-  (let* ((tasks
+  (let* ((opt-plist (org-combine-plists (org-default-export-plist)
+(org-infile-export-plist)))
+(org-export-opt-plist opt-plist)
+ (tasks
  (org-taskjuggler-resolve-dependencies
   (org-taskjuggler-assign-task-ids
(org-taskjuggler-compute-task-leafiness
@@ -335,6 +338,14 @@ defined in `org-export-taskjuggler-default-reports'."
   (insert org-export-taskjuggler-default-global-properties)
   (insert "\n")
   (dolist (resource resources)
+  (org-install-letbind)
+  ;; create local variables for all options, to make sure all called
+  ;; functions get the correct information
+  (mapc (lambda (x)
+  (set (make-local-variable (nth 2 x))
+   (plist-get opt-plist (car x
+org-export-plist-vars)
+
(let ((level (cdr (assoc "level" resource
  (org-taskjuggler-close-maybe level)
  (org-taskjuggler-open-resource resource)
-- 
1.7.11.3




[O] [PATCH 06/10] org-taskjuggler: use project end date, if specified

2012-08-05 Thread Yann Hodique
* org-taskjuggler.el (org-taskjuggler-open-project): use START - END as an 
alternative to START +Xd
---
 lisp/org-taskjuggler.el | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
index 3f829b3..92ba79c 100644
--- a/lisp/org-taskjuggler.el
+++ b/lisp/org-taskjuggler.el
@@ -614,9 +614,11 @@ specified it is calculated
 (start (cdr (assoc "start" project)))
 (end (cdr (assoc "end" project
 (insert
- (format "project %s \"%s\" \"%s\" %s +%sd {\n }\n"
+ (format "project %s \"%s\" \"%s\" %s %s {\n }\n"
 unique-id headline version start
-org-export-taskjuggler-default-project-duration
+ (or (and end (format "- %s" end))
+ (format "+%sd"
+ org-export-taskjuggler-default-project-duration))
 
 (defun org-taskjuggler-filter-and-join (items)
   "Filter all nil elements from ITEMS and join the remaining ones
-- 
1.7.11.3




[O] [PATCH 05/10] org-taskjuggler: introduce a global header, for early macros

2012-08-05 Thread Yann Hodique
* org-taskjuggler.el (org-export-taskjuggler-default-global-header): new custom 
variable
 (org-export-as-taskjuggler): insert global header before anything else
---
 lisp/org-taskjuggler.el | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
index f668e7f..3f829b3 100644
--- a/lisp/org-taskjuggler.el
+++ b/lisp/org-taskjuggler.el
@@ -221,6 +221,14 @@ with `org-export-taskjuggler-project-tag'"
   :version "24.1"
   :type '(repeat (string :tag "Report")))
 
+(defcustom org-export-taskjuggler-default-global-header
+  ""
+  "Default global header for the project. This goes before
+project declaration, and might be useful for early macros"
+  :group 'org-export-taskjuggler
+  :version "24.1"
+  :type '(string :tag "Preamble"))
+
 (defcustom org-export-taskjuggler-default-global-properties
   "shift s40 \"Part time shift\" {
   workinghours wed, thu, fri off
@@ -331,11 +339,6 @@ defined in `org-export-taskjuggler-default-reports'."
(setcar tasks (push (cons "version" version) task
 (with-current-buffer buffer
   (erase-buffer)
-  (org-clone-local-variables old-buffer "^org-")
-  (org-taskjuggler-open-project (car tasks))
-  (insert org-export-taskjuggler-default-global-properties)
-  (insert "\n")
-  (dolist (resource resources)
   (org-install-letbind)
   ;; create local variables for all options, to make sure all called
   ;; functions get the correct information
@@ -344,6 +347,12 @@ defined in `org-export-taskjuggler-default-reports'."
(plist-get opt-plist (car x
 org-export-plist-vars)
 
+  (org-clone-local-variables old-buffer "^org-")
+  (insert org-export-taskjuggler-default-global-header)
+  (org-taskjuggler-open-project (car tasks))
+  (insert org-export-taskjuggler-default-global-properties)
+  (insert "\n")
+  (dolist (resource resources)
(let ((level (cdr (assoc "level" resource
  (org-taskjuggler-close-maybe level)
  (org-taskjuggler-open-resource resource)
-- 
1.7.11.3




[O] [PATCH 01/10] org-taskjuggler: make task and resource properties customizable

2012-08-05 Thread Yann Hodique
* org-taskjuggler.el (org-export-taskjuggler-valid-task-attributes): new custom 
variable
 (org-export-taskjuggler-valid-resource-attributes): new custom variable
---
 lisp/org-taskjuggler.el | 25 +++--
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
index 4409013..3c56630 100644
--- a/lisp/org-taskjuggler.el
+++ b/lisp/org-taskjuggler.el
@@ -240,6 +240,23 @@ but before any resource and task declarations."
   :version "24.1"
   :type '(string :tag "Preamble"))
 
+(defcustom org-export-taskjuggler-valid-task-attributes
+  '(account start note duration endbuffer endcredit end
+   flags journalentry length limits maxend maxstart minend
+   minstart period reference responsible scheduling
+   startbuffer startcredit statusnote)
+  "Valid attributes for Taskjuggler tasks. If one of these
+  appears as a property for a headline, it will be exported with
+  the corresponding task."
+  :group 'org-export-taskjuggler)
+
+(defcustom org-export-taskjuggler-valid-resource-attributes
+  '(limits vacation shift booking efficiency journalentry rate)
+  "Valid attributes for Taskjuggler resources. If one of these
+  appears as a property for a headline, it will be exported with
+  the corresponding resource."
+  :group 'org-export-taskjuggler)
+
 ;;; Hooks
 
 (defvar org-export-taskjuggler-final-hook nil
@@ -614,7 +631,7 @@ is defined it will calculate a unique id for the resource 
using
 (cdr (assoc "ID" resource))
 (cdr (assoc "unique-id" resource)
(headline (cdr (assoc "headline" resource)))
-   (attributes '(limits vacation shift booking efficiency journalentry 
rate)))
+   (attributes org-export-taskjuggler-valid-resource-attributes))
 (insert
  (concat
   "resource " id " \"" headline "\" {\n "
@@ -655,11 +672,7 @@ org-mode priority string."
  (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 minend
-   minstart period reference responsible scheduling
-   startbuffer startcredit statusnote)))
+(attributes org-export-taskjuggler-valid-task-attributes))
 (insert
  (concat
   "task " unique-id " \"" headline "\" {\n"
-- 
1.7.11.3




[O] [PATCH 00/10] Takjuggler exporter improvements

2012-08-05 Thread Yann Hodique
Here are a couple of patches for org-taskjuggler.el

My main goals with these were to:

 - be able to leverage SCHEDULE/DEADLINE information, so as to be able
   to leverage org timelines in complement to the reports

 - be able to #+BIND some of the exporter variables (such as the
   preamble)

 - be able to define reports in the org file itself, without having to
   mess with a custom variable

Any feedback is highly welcome.

Thanks,
Yann.


Yann Hodique (10):
  org-taskjuggler: make task and resource properties customizable
  org-taskjuggler: properly install local variables at export time
  org-taskjuggler: make use of org properties
  org-taskjuggler: task with end-only is also a milestone (deadline)
  org-taskjuggler: introduce a global header, for early macros
  org-taskjuggler: use project end date, if specified
  org-taskjuggler: make project umbrella task optional
  org-taskjuggler: disambiguate "headline", as it's also a valid
taskjuggler property
  org-taskjuggler: allow reports definition from within the org file
  org-taskjuggler: update doc to reflect latest changes

 doc/org.texi|  48 ++--
 lisp/org-taskjuggler.el | 145 +++-
 2 files changed, 149 insertions(+), 44 deletions(-)

-- 
1.7.11.3




Re: [O] Agenda Upcoming Faces

2012-08-05 Thread SW
Bastien  gnu.org> writes:

> Can you provide a reproducible recipe?

I'm going to try to make a minimal example. In the previous image, 10 days was
*not* in the "upcoming faces" face -- it was in default face. However, in this
example:

http://imgur.com/ge0hY

10 days *is* now in the "upcoming faces" face. "org-deadline-warning-days" is
set to 14.








Re: [O] [BUG] Traceback on Org-Export

2012-08-05 Thread Bastien
Achim Gratz  writes:

> Bastien writes:
>> Yes.  The whole maze needs a treat.  Please submit a patch if you feel
>> like undertaking this task.  I managed to get zero warnings with Emacs
>> 24.1 and did not take the time to check with Emacs 23.
>
> That is going to be one big hairy patch that touches almost everything.
> Maybe it is is possible to chop that down into a more manageable series
> of smaller changes, starting with those that will rescue org-element.

All right.  If useful, please push a public branch for this on
orgmode.org.  I will try downloading Emacs 23 and see what warnings
will have here.

-- 
 Bastien



Re: [O] [BUG] shell links broken

2012-08-05 Thread Bastien
Hi François,

François Allisson  writes:

> Since last update of org this morning, I cannot open shell links any
> longer. Instead, I get the message "void-variable
> clean-buffer-list-kill-buffer-names" in the mini-buffer.

Fixed, thanks.

> Commit 96551f3dd8885dee6972c70ce06888fd3d5f4dd4
> (http://orgmode.org/w/?p=org-mode.git;a=commit;h=96551f3dd8885dee6972c70ce06888fd3d5f4dd4)
> seems to be responsible. I don't understand the idea behind this huge
> commit (I just started to read the elisp intro, since all my e-life is
> in org now, it's time to start understanding the tool I use ;-)
> hopefully I'll be more useful in some time for these kind of stuffs).

This is not from this commit.

> Anyway, below are potentially useful stuffs to reproduce the bug.

Thanks for the detailed recipe!

All best,

-- 
 Bastien



Re: [O] org-icalendar-alarm-time different time for different category

2012-08-05 Thread Bastien
Enda  writes:

> Can there be a per file option to set org-icalendar-alarm-time for a
> different time for a different category?

You can now use APPT_WARNTIME in each entry before exporting to
icalendar.

Hitting ̀W' at the beginning of a headline lets you insert this
property, that `org-agenda-to-appt' also reads when adding an
appointment with ̀appt-add'.

Thanks,

-- 
 Bastien



[O] [BUG] shell links broken

2012-08-05 Thread François Allisson
Hello list,

Since last update of org this morning, I cannot open shell links any
longer. Instead, I get the message "void-variable
clean-buffer-list-kill-buffer-names" in the mini-buffer.

Commit 96551f3dd8885dee6972c70ce06888fd3d5f4dd4
(http://orgmode.org/w/?p=org-mode.git;a=commit;h=96551f3dd8885dee6972c70ce06888fd3d5f4dd4)
seems to be responsible. I don't understand the idea behind this huge
commit (I just started to read the elisp intro, since all my e-life is
in org now, it's time to start understanding the tool I use ;-)
hopefully I'll be more useful in some time for these kind of stuffs).

Anyway, below are potentially useful stuffs to reproduce the bug.

Best,
François


Versions:
Org-mode version 7.8.11 (release_7.8.11-366-g6f571d @ 
/usr/local/share/emacs/24.1.50/site-lisp/org/)
GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-08-02 on 
debian

-*ecm.org*
* An eshell link
[[shell:echo 'Hello!'][My shell is polite.]]


-*Backtrace*--
Debugger entered--Lisp error: (void-variable 
clean-buffer-list-kill-buffer-names)
  org-open-at-point(nil)
  call-interactively(org-open-at-point nil nil)
--

-*minimal-org.el*-
(setq debug-on-error t
  debug-on-signal nil
  debug-on-quit nil) 
(add-to-list 'load-path (expand-file-name 
"/usr/local/share/emacs/24.1.50/site-lisp/org"))
(require 'org-install)
--



Re: [O] Macros [was: Re: ATTR_HTML for a clickable image, howto?]

2012-08-05 Thread Bastien
Hi Nicolas,

Nicolas Goaziou  writes:

>> I'd welcome some improvement of the manual wrt macros -- any taker?
>
> Before documenting anything, we should first define them clearly.

FWIW, I don't forget this important thread.

Let's revive it after the release of Org 7.9, when we will think of
moving org-export.el into core.

-- 
 Bastien



Re: [O] are super-hidden technical blocks required?

2012-08-05 Thread Bastien
Hi Ilya,

Ilya Shlyakhter  writes:

> But I don't want to see the timestamps during normal Org usage.

What do you think of "hiding" them by having a new face for properties
matching a custom regexp?  This has the advantage of letting the user
decide what to do with such properties: either hiding or highlighting
them.  This is also easier to implement.

-- 
 Bastien



Re: [O] Agenda view column mode: How to a column showing just today's time?

2012-08-05 Thread Bastien
Hi Brian,

Brian Wood  writes:

> I'd like to replace CLOCKSUM with a column that shows me just the
> time spent on the task *today* (not all the time ever spent on the
> task). 

>From latest git HEAD, you can try this column view:

  #+COLUMNS: %30ITEM %%10CLOCKSUM(Total) %10CLOCKSUM_T(Today)

It will show the total clock sum along with that of today.

HTH,

-- 
 Bastien



Re: [O] Reftex in Org-Mode exporting and recognizing figures or equations

2012-08-05 Thread Jeffrey Spencer
When I use your setup and insert a citation then export to latex I get:
[[cite:Paper]]
turns into:
\ref{cite-Paper}


On Fri, Aug 3, 2012 at 7:38 PM, Rasmus  wrote:

> (defun org-mode-reftex-setup ()
> (load-library "reftex")
> (and (buffer-file-name)
>  (file-exists-p (buffer-file-name))
>  (reftex-parse-all))
> (make-local-variable 'reftex-cite-format)
> (setq reftex-cite-format 'org)
> (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
>
>   (add-hook 'org-mode-hook 'org-mode-reftex-setup)
>
>
> (eval-after-load 'reftex-vars
>   '(progn
>
>  (add-to-list 'reftex-cite-format-builtin
>   '(org "Org-mode citation"
> ((?\C-m . "[[cite:%l]]")
>  (?t . "[[textcite:%l]]")
>  (?p . "[[parencite:%l]]")
>  (?s . "[[posscite:%l]]")
>  (?a . "[[citeauthor:%l]]")
>  (?y . "[[citeyear:%l]]"))
>