[Orgmode] import text from firefox with hyperlinks

2010-05-17 Thread Kestutis Matonis
How can i copy/import selected page part from firefox to emacs with hyperlinks?

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


Re: [Orgmode] [babel] new key bindings

2010-05-17 Thread Daniel Clemente
I think this key reminder table should be somehow displayed or offered under
a C-c C-v prefix, in the same way as C-c a, C-c C-a, C-c e.
Or at least under C-c C-v ? or C-c C-v h

-- Daniel

On Thu, May 13, 2010 at 7:57 AM, Eric Schulte wrote:

> Org-babel is now making use of the newly available C-c C-v key binding.
>
> All Org-babel keybindings are now located behind this prefix, see the
> updated org reference card (/doc/orgcard.pdf in the org-mode repo) for
> the specific keybindings, they are also shown below.
>
> Best -- Eric
>
>
>   execute code block at pointC-c C-c open results of code block at pointC-c
> C-o preview body of code block at pointC-c C-v C-p go to named code blockC-c
> C-v C-g execute all code blocks in current bufferC-c C-v C-b execute all
> code blocks in current subtreeC-c C-v C-s tangle code blocks in current
> fileC-c C-v C-t tangle code blocks in supplied fileC-c C-v C-T ingest all
> code blocks in supplied file into the Library of BabelC-c C-v C-l switch
> to the session of the current code blockC-c C-v C-z view sha1 hash of the
> current code blockC-c C-v C-h
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Code snippet for Message Sequence Diagram export

2010-05-17 Thread Eric S Fraga
On Sun, 16 May 2010 17:18:39 -0300, Juan  wrote:
> 
> Hi,
> 
> The following code adds an export block of type 'mscgen'. The block
> body will be processed by the mscgen application. Sort of works, not
> very tested yet.

[...]

Juan,

this could be very useful.  Thanks!  I do wonder, however, whether it
would make sense to have this as a org-babel language?  It would be
nice to have the images generated appear in the org file directly...

Thanks again,
eric
-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Pretty org-entities in org-mode buffers

2010-05-17 Thread Eric S Fraga
On Sun, 16 May 2010 15:09:27 -0600, "Eric Schulte"  
wrote:
> 
> Hi Carsten,
> 
> Thanks for folding in this feature.
> 
> I'm having some weird issues using the new entities display.  The
> entities are not fontified in my org-mode buffers despite having set the
> org-pretty-entities variable to t.  However if I search
> `isearch-forward-regexp' for the "\\" character in the buffer then all
> of the entities are displayed (e.g. \sum is replaced with ∑).
> 
> Any idea why the entity display is only working during a search?
> 
> Thanks -- Eric

Eric,

the new entities display is working just fine for me (thanks both you
and Carsten for this!) with org-pretty-entities set to t.  Even the
bug I mentioned last week has been fixed.

Org-mode version 6.36trans (release_6.36.58.g99afb)
GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.18.2) of 2009-11-02 on 
raven, modified by Debian
-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [babel] new key bindings

2010-05-17 Thread Carsten Dominik


On May 17, 2010, at 9:27 AM, Daniel Clemente wrote:

I think this key reminder table should be somehow displayed or  
offered under a C-c C-v prefix, in the same way as C-c a, C-c C-a, C- 
c e.

Or at least under C-c C-v ? or C-c C-v h

-- Daniel

On Thu, May 13, 2010 at 7:57 AM, Eric Schulte  
 wrote:
Org-babel is now making use of the newly available C-c C-v key  
binding.


All Org-babel keybindings are now located behind this prefix, see the
updated org reference card (/doc/orgcard.pdf in the org-mode repo) for
the specific keybindings, they are also shown below.

Best -- Eric


execute code block at point
C-c C-c
open results of code block at point
C-c C-o
preview body of code block at point
C-c C-v C-p
go to named code block
C-c C-v C-g
execute all code blocks in current buffer
C-c C-v C-b
execute all code blocks in current subtree
C-c C-v C-s
tangle code blocks in current file
C-c C-v C-t
tangle code blocks in supplied file
C-c C-v C-T
ingest all code blocks in supplied file into the Library of Babel
C-c C-v C-l
switch to the session of the current code block
C-c C-v C-z
view sha1 hash of the current code block
C-c C-v C-h


Indeed, eric, you should not bind C-h in this keymap - this
is one of those conventions.  If you don't, then C-v C-v C-h
will display the keys in this prefix map automatically.

- Carsten


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


Re: [Orgmode] import text from firefox with hyperlinks

2010-05-17 Thread Carsten Dominik


On May 17, 2010, at 12:59 AM, Kestutis Matonis wrote:

How can i copy/import selected page part from firefox to emacs with  
hyperlinks?


What is wrong with just copy and paste?

Or take a look at org-w3m.el, this does some URL conversion when  
copying from w3m.


HTH

- Carsten




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


Re: [Orgmode] [PATCH] clock reports: Only include current clocking task when range includes task

2010-05-17 Thread Carsten Dominik

Applied, thanks.

- Carsten

On May 17, 2010, at 4:12 AM, Bernt Hansen wrote:


When org-clock-report-include-clocking-task is set we always add the
current clocking task to the clock report.  This is incorrect if you
are looking at an agenda clock report for a time range that does not
include the current clocking task (e.g. yesterday or last week).

Now we only include the current clocking task if the clock report
date range includes the current clocking task start time.
---
Update patch without the debug call to the (message)

This patch is available at git://git.norang.ca/org-mode.git for- 
carsten


-Bernt

lisp/org-clock.el |   13 -
1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 504f0c9..07e2e45 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1396,12 +1396,15 @@ nil are excluded from the clock summation."
  (* 60 (string-to-number (match-string 4))
 (t ;; A headline
  ;; Add the currently clocking item time to the total
- (when (and org-clock-report-include-clocking-task
-(equal (org-clocking-buffer) (current-buffer))
-(equal (marker-position org-clock-hd-marker) (point)))
+	  (let ((org-clock-start-time-as-float (org-float-time org-clock- 
start-time)))

+   (when (and org-clock-report-include-clocking-task
+  (equal (org-clocking-buffer) (current-buffer))
+  (equal (marker-position org-clock-hd-marker) (point))
+  (>= org-clock-start-time-as-float tstart)
+  (<= org-clock-start-time-as-float tend))
  (let ((time (floor (- (org-float-time)
-   (org-float-time org-clock-start-time)) 60)))
-   (setq t1 (+ t1 time
+   org-clock-start-time-as-float) 60)))
+   (setq t1 (+ t1 time)
  (let* ((headline-forced
  (get-text-property (point)
 :org-clock-force-headline- 
inclusion))

--
1.7.1.86.g0e460


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


- Carsten




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


[Orgmode] Re: TODO's dependency on nested-Checkboxes -- 'org-enforce-todo-checkbox-dependencies'

2010-05-17 Thread Livin Stephen Sharma
Hi again,
This is regarding a TODO which has:
a. nested-checkboxes AND
b. a statistics-cookie.

Need help to achieve this:
 The TODO should auto-update/-change to 'DONE' when the stats-cookie hits 
'100%'.

--lss


On May 15, 2010, at 23:44:21 , Livin Stephen Sharma wrote:

> This is a tree from a hypothetical minimal org-file:
>>  TODO meet people [100%]
>>   - [X] John
>>   - [X] Jane
> 
> 
> 
> 
> How can I achieve this:
>  TODO-state should automatically change to DONE when I have checked-off both 
> 'John' and 'Jane' ?
> 
> 1. The manual showed me how to do this if John and Jane are also TODOs: using 
> org-after-todo-statistics-hook.
> I just can't find the check-box equivalent.
> 
> 2. Google turned up 'org-enforce-todo-checkbox-dependencies' - but that is 
> only half of what I'm looking for.
> 
> 
> If this feature does not already exist, I'd like to suggest this as a useful 
> enhancement.
> 
> 
> Livin Stephen Sharma
> 
> 
> 

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


Re: [Orgmode] Lazy project definitions

2010-05-17 Thread Carsten Dominik

Hi Bernt,

I guess you can use the regexp options, both in the stuck projects,  
and in a skipping condition for an agenda custom command.


In the stuck project definition, adding "^\\*\\{3,\\}" as the 4th  
element should exclude anything that has level 3 or up in the subtree.


for the agenda commands,

   (org-skip-subtree-if 'regexp "\\*\\{3,\\}")

or so should take care of it, am I right?

- Carsten

On for 16, 2010, at 11:17 PM, Bernt Hansen wrote:


Hi,

I've been using the definition that all LEVEL 2 tasks are projects  
for a

long time.  Recently I tried switching to explicitly marked projects
using a :project: tag (or PROJECT keyword) but I really dislike having
to manually mark projects in my task lists.

A project for me is basically any LEVEL 2 task that has one or more
subtasks.

I would like to define my org stuck projects as LEVEL=2/!-DONE- 
CANCELLED
with an added skipping function that does not consider level 2 tasks  
if
they have no children.  I can't figure out how to make this work in  
the

org-agenda-custom-commands using the skipping function but I think it
should be possible.

My goal here is to add 2 custom agenda commands:
 p - show me projects (level 2 tasks not completed with children)
 o - show me other (non-project) tasks (level 2 tasks without  
children)


I don't want the 'o' - other tasks listed in my stuck projects view
since these are really one-task items and are not a project by my
simplistic definition above.

I've been using everything as a project that is defined at LEVEL 2 for
ages and that works really well for me -- except I want to stop  
spending

any time dealing with simple (non-project) tasks when looking for next
tasks and stuck projects.  Sure I could manually mark my tasks as
projects but I don't think that should really be necessary for what I
want to do here... and if it could just say a LEVEL 2 task with  
children

is a project it would work automagically for me without any additional
input.

For simple non-project tasks I don't need to mark them as NEXT to make
them unstuck -- they aren't projects to begin with and I can have
a convenient way to view all of these simple non-project commands in  
the

agenda using the 'o' custom command.

Is there a way to this?

Thanks,
Bernt

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


- Carsten




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


Re: [Orgmode] Re: TODO's dependency on nested-Checkboxes -- 'org-enforce-todo-checkbox-dependencies'

2010-05-17 Thread Carsten Dominik

Hi,


On May 17, 2010, at 11:40 AM, Livin Stephen Sharma wrote:


Hi again,
This is regarding a TODO which has:
a. nested-checkboxes AND
b. a statistics-cookie.

Need help to achieve this:
 The TODO should auto-update/-change to 'DONE' when the stats-cookie  
hits '100%'.


I think you should be able to build this using org-checkbox-statistics- 
hook.  Nothing like this is built-in.  You can do it relatively easily  
when you are using subtasks instead of checkboxes, there are examples  
for this in the documentation.


- Carsten



--lss


On May 15, 2010, at 23:44:21 , Livin Stephen Sharma wrote:


This is a tree from a hypothetical minimal org-file:

 TODO meet people [100%]
 - [X] John
 - [X] Jane





How can I achieve this:
 TODO-state should automatically change to DONE when I have checked- 
off both 'John' and 'Jane' ?


1. The manual showed me how to do this if John and Jane are also  
TODOs: using org-after-todo-statistics-hook.

I just can't find the check-box equivalent.

2. Google turned up 'org-enforce-todo-checkbox-dependencies' - but  
that is only half of what I'm looking for.



If this feature does not already exist, I'd like to suggest this as  
a useful enhancement.



Livin Stephen Sharma





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


- Carsten




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


Re: [Orgmode] import text from firefox with hyperlinks

2010-05-17 Thread Scot Becker
On Mon, May 17, 2010 at 10:33 AM, Carsten Dominik
 wrote:
>
> On May 17, 2010, at 12:59 AM, Kestutis Matonis wrote:
>
>> How can i copy/import selected page part from firefox to emacs with
>> hyperlinks?
>
> What is wrong with just copy and paste?

Well, the man wants to have hyperlinks converted to [[org][links]].
At least for my setup, there is no behind-the-scenes magic that does
this.  I just get the visible text, not the (invisible) links.

I can't answer your original question, (though I'll be keen to see if
someone can), but you also might be interested in org-protocol, which
can pass a URL, a document title and a selected region directly from a
web browser to a running instance of Emacs.  AFAIK,l it doesn't do
link formatting, but it will pass the link to the page you're looking
at.  See this blissfully complex introduction to it.

http://orgmode.org/worg/org-contrib/org-protocol.php

org-annotation-helper is a simpler tool that also does this.

http://orgmode.org/worg/org-contrib/org-annotation-helper.php


Scot

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


Re: [Orgmode] Re: TODO's dependency on nested-Checkboxes -- 'org-enforce-todo-checkbox-dependencies'

2010-05-17 Thread Livin Stephen Sharma

Thanks
Livin Stephen Sharma

On May 17, 2010, at 15:16:40 , Carsten Dominik wrote:

> Hi,
> 
> 
> On May 17, 2010, at 11:40 AM, Livin Stephen Sharma wrote:
> 
>> Hi again,
>> This is regarding a TODO which has:
>> a. nested-checkboxes AND
>> b. a statistics-cookie.
>> 
>> Need help to achieve this:
>> The TODO should auto-update/-change to 'DONE' when the stats-cookie hits 
>> '100%'.
> 
> I think you should be able to build this using org-checkbox-statistics-hook.  
> Nothing like this is built-in.

Thanks for the info, Carsten.

Too bad the code doesn't already exist.. and I don't know *any* lisp!
Still, I'm trying to give this a shot...

Could you let me know:
1. Where/how are n-done and n-not-done defined/set? I'm trying to see if I can 
reuse the example from the documentation.
2. are 'c-on' and 'c-off' the checkbox-equivalents for the n-(not)-done 
variables? Where/how are *these* set?

FWIW, this attempt did not work for me (this would leave the cursor at the 
TODO):

(defun org-summary-todo-checkbox (c-on c-off)
  "Switch entry to DONE when all subentry-checkboxes are done, to TODO 
otherwise."
  (outline-previous-visible-heading 1)
  (let (org-log-done org-log-states); turn off logging
(org-todo (if (= c-off 0) "DONE" "TODO"
(add-hook 'org-checkbox-statistics-hook 'org-summary-todo-checkbox)

I get this error:
run-hooks: Wrong number of arguments: #[(c-on c-off) "ÃÄ!\210Å\211^X^YÆ
Çu\203...@È\202^t^@É!*\207" [org-log-states org-log-done c-off 
outline-previous-visible-heading 1 nil org-todo 0 "DONE" "TODO"] 3 
("/Users/livin/.emacs.d/addons/org/org_stuff.elc" . 6903)], 0

Could you suggest a change in the above lisp, or point out what I'm doing wrong?



>  You can do it relatively easily when you are using subtasks instead of 
> checkboxes, there are examples for this in the documentation.

Yes, I recently started using this feature (picked it up from the 
documentation) to achieve this for subtask-TODOs ).

> 
> - Carsten
> 
>> 
>> --lss
>> 
>> 
>> On May 15, 2010, at 23:44:21 , Livin Stephen Sharma wrote:
>> 
>>> This is a tree from a hypothetical minimal org-file:
  TODO meet people [100%]
 - [X] John
 - [X] Jane
>>> 
>>> 
>>> 
>>> 
>>> How can I achieve this:
>>> TODO-state should automatically change to DONE when I have checked-off both 
>>> 'John' and 'Jane' ?
>>> 
>>> 1. The manual showed me how to do this if John and Jane are also TODOs: 
>>> using org-after-todo-statistics-hook.
>>> I just can't find the check-box equivalent.
>>> 
>>> 2. Google turned up 'org-enforce-todo-checkbox-dependencies' - but that is 
>>> only half of what I'm looking for.
>>> 
>>> 
>>> If this feature does not already exist, I'd like to suggest this as a 
>>> useful enhancement.
>>> 
>>> 
>>> Livin Stephen Sharma
>>> 
>>> 
>>> 
>> 
>> ___
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> 
> - Carsten
> 
> 
> 

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


[Orgmode] Re: Agenda log mode with archives

2010-05-17 Thread Detlef Steuer
On Sun, 16 May 2010 17:19:59 -0400
Bernt Hansen  wrote:

> Hi Carsten,
> 
> Today while playing with org-resolve clocks for John W. it found an open
> clock in one of my archives.  I wanted to see the log mode (clocked
> time) on that Sunday in March but most of the entries have been archived
> at this point.  I can view the agenda from only the archive file but I
> can't reconstruct the entire day conveniently from multiple archives.
> 
> Is there a way to get log mode in the agenda ('l') to show clock time
> from all org-agenda-files including their arhives?

That would be a very nice thing to have!

Detlef

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



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


Re: [Orgmode] Re: Agenda log mode with archives

2010-05-17 Thread Carsten Dominik


On May 17, 2010, at 12:42 PM, Detlef Steuer wrote:


On Sun, 16 May 2010 17:19:59 -0400
Bernt Hansen  wrote:


Hi Carsten,

Today while playing with org-resolve clocks for John W. it found an  
open

clock in one of my archives.  I wanted to see the log mode (clocked
time) on that Sunday in March but most of the entries have been  
archived
at this point.  I can view the agenda from only the archive file  
but I

can't reconstruct the entire day conveniently from multiple archives.

Is there a way to get log mode in the agenda ('l') to show clock time
from all org-agenda-files including their arhives?


That would be a very nice thing to have!


Cant you do `v A' and then `v l' in the agenda?  I believe that this  
should work.


- Carsten


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


[Orgmode] Re: Agenda view > Day separator

2010-05-17 Thread Sébastien Vauban
Hi Eric and Carsten,

Eric S Fraga wrote:
> On Thu, 13 May 2010 20:27:27 +0200, Carsten Dominik 
>  wrote:
>>
>> Take a look at the variable org-agenda-format-date.
>> Or you can write your own function to do something fancier, maybe based on
>> `org-agenda-format-date-aligned'.
>
> Thanks Carsten. This did the job. I modified your function to add a 120 long
> blank string at the end of the date [...] and I have a clear date separator!
> Underline would work as well, of course.

Another version, I guess, from what you wrote. No length hard-coded, except
for the 10 characters of the ISO date and 1 space after.

--8<---cut here---start->8---
(setq org-agenda-format-date
  (concat "%Y-%m-%d "
  (make-string (- (window-width) 11) (string-to-char "_"
--8<---cut here---end--->8---

The agenda view is much, much clearer now...

Thanks both for your help,
  Seb

-- 
Sébastien Vauban


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


Re: [Orgmode] Lazy project definitions

2010-05-17 Thread Bernt Hansen
This works:

 ("p" "Projects" tags-todo "LEVEL=2/!-DONE-CANCELLED"
  ((org-agenda-skip-function
'(org-agenda-skip-subtree-if 'notregexp "^\\*\\{3,\\}"
 ("o" "Other (non-project tasks)" tags "LEVEL=2/!-DONE-CANCELLED"
  ((org-agenda-skip-function
'(org-agenda-skip-subtree-if 'regexp "^\\*\\{3,\\}"


Awesome!

Thanks Carsten!

-Bernt


Carsten Dominik  writes:

> Hi Bernt,
>
> I guess you can use the regexp options, both in the stuck projects,
> and in a skipping condition for an agenda custom command.
>
> In the stuck project definition, adding "^\\*\\{3,\\}" as the 4th
> element should exclude anything that has level 3 or up in the subtree.
>
> for the agenda commands,
>
>(org-skip-subtree-if 'regexp "\\*\\{3,\\}")
>
> or so should take care of it, am I right?
>
> - Carsten
>
> On for 16, 2010, at 11:17 PM, Bernt Hansen wrote:
>
>> Hi,
>>
>> I've been using the definition that all LEVEL 2 tasks are projects
>> for a
>> long time.  Recently I tried switching to explicitly marked projects
>> using a :project: tag (or PROJECT keyword) but I really dislike having
>> to manually mark projects in my task lists.
>>
>> A project for me is basically any LEVEL 2 task that has one or more
>> subtasks.
>>
>> I would like to define my org stuck projects as LEVEL=2/!-DONE- 
>> CANCELLED
>> with an added skipping function that does not consider level 2 tasks
>> if
>> they have no children.  I can't figure out how to make this work in
>> the
>> org-agenda-custom-commands using the skipping function but I think it
>> should be possible.
>>
>> My goal here is to add 2 custom agenda commands:
>>  p - show me projects (level 2 tasks not completed with children)
>>  o - show me other (non-project) tasks (level 2 tasks without
>> children)
>>
>> I don't want the 'o' - other tasks listed in my stuck projects view
>> since these are really one-task items and are not a project by my
>> simplistic definition above.
>>
>> I've been using everything as a project that is defined at LEVEL 2 for
>> ages and that works really well for me -- except I want to stop
>> spending
>> any time dealing with simple (non-project) tasks when looking for next
>> tasks and stuck projects.  Sure I could manually mark my tasks as
>> projects but I don't think that should really be necessary for what I
>> want to do here... and if it could just say a LEVEL 2 task with
>> children
>> is a project it would work automagically for me without any additional
>> input.
>>
>> For simple non-project tasks I don't need to mark them as NEXT to make
>> them unstuck -- they aren't projects to begin with and I can have
>> a convenient way to view all of these simple non-project commands in
>> the
>> agenda using the 'o' custom command.
>>
>> Is there a way to this?
>>
>> Thanks,
>> Bernt
>>
>> ___
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> - Carsten

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


[Orgmode] Re: How do you control sorting in org agenda?

2010-05-17 Thread Emin.shopper Martinian.shopper
On Thu, May 13, 2010 at 4:59 PM, Bernt Hansen  wrote:
> "Emin.shopper Martinian.shopper"  writes:
>
>
> See the variable org-agenda-sorting-strategy.
>
> -Bernt


Thanks for the pointer. I put the following in my .emacs file and the
I change my prioritized items to things like TODO [#A]-01 foo, TODO
[#A]-02 bar, etc. and things sort as I wanted.


(defun org-cmp-title (a b)
  "Compare the titles of string A and B"
  (cond ((string-lessp a b) -1)
((string-lessp b a) +1)
(t nil)))

(setq org-agenda-cmp-user-defined 'org-cmp-title)

(setq org-agenda-sorting-strategy
  '((agenda habit-down time-up priority-down category-keep)
(todo   priority-down user-defined-up category-keep)
(tags   priority-down category-keep)
(search category-keep)))

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


[Orgmode] [PATCH] Fix clock report when not clocking an entry

2010-05-17 Thread Bernt Hansen
I tried to save a few calls to org-float-time but org-clock-start-time is not
valid as a parameter to org-float-time when it is an empty string (when you
are not clocking anything).

Verify tstart and tend are non-nil so we can compare them to the current 
clocking time
using <= and >=
---
 I need to test more :/

 I ran into two cases this morning where the clock report patch throws an error.
 Here's a fix for both.

 -Bernt

 lisp/org-clock.el |   21 +++--
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 07e2e45..68a40ce 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1396,17 +1396,18 @@ nil are excluded from the clock summation."
  (* 60 (string-to-number (match-string 4))
 (t ;; A headline
  ;; Add the currently clocking item time to the total
- (let ((org-clock-start-time-as-float (org-float-time 
org-clock-start-time)))
-   (when (and org-clock-report-include-clocking-task
-  (equal (org-clocking-buffer) (current-buffer))
-  (equal (marker-position org-clock-hd-marker) (point))
-  (>= org-clock-start-time-as-float tstart)
-  (<= org-clock-start-time-as-float tend))
- (let ((time (floor (- (org-float-time)
-   org-clock-start-time-as-float) 60)))
-   (setq t1 (+ t1 time)
+ (when (and org-clock-report-include-clocking-task
+(equal (org-clocking-buffer) (current-buffer))
+(equal (marker-position org-clock-hd-marker) (point))
+tstart
+tend
+(>= (org-float-time org-clock-start-time) tstart)
+(<= (org-float-time org-clock-start-time) tend))
+   (let ((time (floor (- (org-float-time)
+ (org-float-time org-clock-start-time)) 60)))
+ (setq t1 (+ t1 time
  (let* ((headline-forced
-  (get-text-property (point)
+ (get-text-property (point)
  :org-clock-force-headline-inclusion))
  (headline-included
   (or (null headline-filter)
-- 
1.7.1.86.g0e460


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


Re: [Orgmode] [PATCH] Fix clock report when not clocking an entry

2010-05-17 Thread Carsten Dominik

Applied, thanks.

- Carsten

On May 17, 2010, at 1:51 PM, Bernt Hansen wrote:


diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 07e2e45..68a40ce 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1396,17 +1396,18 @@ nil are excluded from the clock summation."
  (* 60 (string-to-number (match-string 4))
 (t ;; A headline
  ;; Add the currently clocking item time to the total
-	  (let ((org-clock-start-time-as-float (org-float-time org-clock- 
start-time)))

-   (when (and org-clock-report-include-clocking-task
-  (equal (org-clocking-buffer) (current-buffer))
-  (equal (marker-position org-clock-hd-marker) (point))
-  (>= org-clock-start-time-as-float tstart)
-  (<= org-clock-start-time-as-float tend))
- (let ((time (floor (- (org-float-time)
-   org-clock-start-time-as-float) 60)))
-   (setq t1 (+ t1 time)
+ (when (and org-clock-report-include-clocking-task
+(equal (org-clocking-buffer) (current-buffer))
+(equal (marker-position org-clock-hd-marker) (point))
+tstart
+tend
+(>= (org-float-time org-clock-start-time) tstart)
+(<= (org-float-time org-clock-start-time) tend))
+   (let ((time (floor (- (org-float-time)
+ (org-float-time org-clock-start-time)) 60)))
+ (setq t1 (+ t1 time
  (let* ((headline-forced
-  (get-text-property (point)
+ (get-text-property (point)
  :org-clock-force-headline- 
inclusion))

  (headline-included
   (or (null headline-filter)


- Carsten




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


Re: [Orgmode] Lazy project definitions

2010-05-17 Thread Bernt Hansen
Carsten Dominik  writes:

> In the stuck project definition, adding "^\\*\\{3,\\}" as the 4th
> element should exclude anything that has level 3 or up in the subtree.

I don't think this will work.  The regexp matches all tasks with level 3
or higher subtrees ... which is all projects so all projects are
considered unstuck.

I need to be able to somehow say a project is not stuck if it doesn't
have a level 3 task (ie. no children) because it's not a project in this
case.

Is there a way to do that?

Regards,
Bernt

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


Re: [Orgmode] Re: Bug: Cloning a task also clones the unique id [6.36trans]

2010-05-17 Thread Giovanni Ridolfi
Carsten Dominik  writes:

> On May 14, 2010, at 11:01 PM, David Maus wrote:
>> [...] Org removes the ID property in the copy of the original
>>  subtree before it is inserted anywhere.
>>
> Applied, thanks.
>
Arrrgh /me is too late, sorry! 

Feature request:

Would it be possible that org-mode changes the :ID: while cloning
and not delete it?

- we can have a variable 
  + org-clone-change-id 
+ nil : not change, delete it
+ t   : yes get a new :id:
- org-mode can ask every time 
  'do you want to change[C c] the :ID: or to delete [D d] it?'

   But isn't that boring?

cheers,
Giovanni

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


Re: [Orgmode] Re: Bug: Cloning a task also clones the unique id [6.36trans]

2010-05-17 Thread Carsten Dominik
Hi Giovannui, this is good as well.  why don't you try to implement  
it... ?


- Carsten

On May 17, 2010, at 3:00 PM, Giovanni Ridolfi wrote:


Carsten Dominik  writes:


On May 14, 2010, at 11:01 PM, David Maus wrote:

[...] Org removes the ID property in the copy of the original
subtree before it is inserted anywhere.


Applied, thanks.


Arrrgh /me is too late, sorry!

Feature request:

Would it be possible that org-mode changes the :ID: while cloning
and not delete it?

- we can have a variable
 + org-clone-change-id
   + nil : not change, delete it
   + t   : yes get a new :id:
- org-mode can ask every time
 'do you want to change[C c] the :ID: or to delete [D d] it?'

  But isn't that boring?

cheers,
Giovanni


- Carsten




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


Re: [Orgmode] Hyperlinks capable?

2010-05-17 Thread Giovanni Ridolfi
Bob Paje  writes:

>
> Does Org-mode understand Windows shortcuts  and Web hyperlinks?  
> Can a simple press of the RETURN key (a la Outlook) open a new window to 
> the shortcut file/folder or the web page
>  
Jan Böcker has already answered to you regarding the web part.
I'll answer for the Windows part. My OS is Windows XP SP 3.
I double clicked with the mouse over the links.

directory:
  [[C:\Documents and Settings\My-User\Documents\AAA\BBB\]]
  Windows opens Explorer in the BBB directory

file:
  [[C:\Documents and Settings\My-User\Documents\AAA\BBB\text.org]]
  text.org is opened in Emacs

  For other files: pdf, doc...
  depends on the application you have selected to open the file;
  for me the following link, to a file.doc, worked:
  [[C:\Documents and Settings\My-User\Documents\AAA\BBB\text.doc]]

shortcuts:
I have a link (shortcut in English?) to a directory:
  [[C:\Documents and Settings\My-User\Documents\link-to-BBB]]
  But when I click on it the BBB directory is not opened and I get an
  error message:
  org-open-file: No such 
  file: c:/Documents and Settings/My-User/Documents/link-to-BBB

hth
Giovanni

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


Re: [Orgmode] spreadsheet table limitations, specifically summing hours?

2010-05-17 Thread oinksocket
Carsten Dominik wrote:
> Hi Nick, these are useful functions, thanks!  Maybe add the to org-hacks?

You mean here?

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

I didn't know about that, thanks.   My initial question is "how?" but I see
there is some information here:

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

Will need to read up and follow those instructions first.


> Also, I could think of generalizations:
> 
> Allow 94h and 94:16h and 94:16:22h.
> 
> I would, in fact, strip the "h" and just use 94:16

Good suggestions, I will see what I can do.

(I'm starting to think it's going to need some test cases, and I'll need to
polish my elisp somewhat to find out how to do that. Are there any suggested
unit-testing schemes for elisp?)

Cheers,

N

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


Re: [Orgmode] Why does org-html.org refuse to export a table of contents when body-only is t?

2010-05-17 Thread Ian Barton


I'd like to add a table of contents to a HTML export with body-only
set
to t (to feed into jekyll later), but org-html.el automatically
disables
the TOC when body-only is given.

I have used the attached one-line patch without any problems, the
(still
XHTML strict compliant) result can be seen here:

http://www.jboecker.de/2010/04/14/general-reference-filing-with-org-mode.html


I have just run into the same problem, also using Jekyll. However, I 
have managed to generate a TOC using jQuery and a jQuery plugin. This 
turns out to be more flexible than using org directly. I can post more 
details if it's of any interest.


Ian.

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


[Orgmode] Bug: `org-w3m-copy-for-org-mode' fails with byte compiled Org [6.36trans]

2010-05-17 Thread David Maus

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

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

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


When calling `org-w3m-copy-for-org-mode' in a w3m buffer the command
fails complaining about w3m-anchor being an invalid function.

,
| invalid function w3m-anchor
`

This error only occurs when I use byte compiled installation of Org.

A look into w3m-util.el, the place where `w3m-anchor' is defined,
reveals that it is not a function but a macro.  So what makes sense to
me is that the byte compiler compiles org-w3m.el assuming that
`w3m-anchor' is a function and puts a function call inside the byte
compiled file -- that fails, because `w3m-anchor' isn't a function.

 -- David

emacs-w3m-version: 1.4.393

Emacs  : GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.18.2)
 of 2009-11-02 on raven, modified by Debian
Package: Org-mode version 6.36trans
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


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


[Orgmode] QUESTION how to revert repeating sub-tasks?

2010-05-17 Thread Eraldo Helal
link: how to revert repeating sub-tasks? http://openpaste.org/en/21646/

I have a repeating tasks that looks like this:
,
| * TODO daily review
|   SCHEDULED: <2010-01-01 .+1d>
|   :LOGBOOK:...
|   :PROPERTIES:...
| ** TODO task A...
| ** TODO task B...
`

Problem:
After I have marked the sub-tasks and main task (in that order) done,
but the sub-tasks remain in 'DONE' state.

Longer problem description:
I have blocking enables, so I can only mark the main repeating task 'DONE'
after all the sub-tasks are 'DONE' as well.
The main repeating task (daily review) works great.
It reverts to 'TODO' with the new scheduled date (day after today)
and leaves a note in the 'LOGBOOK'.
However the sub-tasks remain in the 'DONE' state
instead of reverting to 'TODO' as well.

Example: (based on example above with current date being 2010-05-17)
- switched all sub-tasks to DONE
- switched the main task to DONE
current output:
,
| * TODO daily review
|   SCHEDULED: <2010-05-18 .+1d >
|   :LOGBOOK:...
|   :PROPERTIES:...
| ** DONE task A...
| ** DONE task B...
`

desired output:
,
| * TODO daily review
|   SCHEDULED: <2010-05-18 .+1d >
|   :LOGBOOK:...
|   :PROPERTIES:...
| ** TODO task A...
| ** TODO task B...
`

I would prefer 'TODO's instead of checkboxed if possible.
Any ideas how to get there?

Greetings from Austria,
Eraldo

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


Re: [Orgmode] Pretty org-entities in org-mode buffers

2010-05-17 Thread Carsten Dominik


On May 16, 2010, at 11:09 PM, Eric Schulte wrote:


Hi Carsten,

Thanks for folding in this feature.

I'm having some weird issues using the new entities display.  The
entities are not fontified in my org-mode buffers despite having set  
the

org-pretty-entities variable to t.  However if I search
`isearch-forward-regexp' for the "\\" character in the buffer then all
of the entities are displayed (e.g. \sum is replaced with ∑).

Any idea why the entity display is only working during a search?


Hmm, I am unable to reproduce this problem.  What happens while you  
toggle the variable using `C-c C-x \' ?


- Carsten



Thanks -- Eric

Carsten Dominik  writes:


Hi everyone,

a modified version of Eric's code is now included into Org, I just
pushed it
to the git repo.

You can use the command `C-c C-x \' to toggle this feature.

The variable `org-pretty-entities' determines if this mode is on by
default.

Finally, you can use

#+STARTUP: entitiespretty
#+STARTUP: entitiesplain

to change things on a per-file base.

Thanks to Eric for this great idea.

- Carsten

On May 5, 2010, at 6:19 PM, Eric Schulte wrote:


Hi,

Recently I've been making use of org-entites for exporting my greek/
math
heavy class notes to HTML.  I'm really loving the results.

This morning I've started playing around with the below function
`org-pretty-entities', which is adapted from Phil Hagelberg's
`pretty-lambdas'[1].  Calling this function in an org-mode buffer  
will

have the effect of fontifying all org-entities text strings as the
character which they represent, so \Delta is replaced with Δ,  
\lambda

with λ, \in with ∈, and so forth.

I've just started playing with this, and I make no guarantees as to
it's
safety or utility, but I was very pleasantly surprised by the
simplicity
of the function, and how nice it's been to see my special characters
appear in org-mode buffers as I type.

#+begin_src emacs-lisp :results silent
(defun org-pretty-entities ()
  (interactive)
  (font-lock-add-keywords
   nil (mapcar
(lambda (el)
  (list
   (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\
\)")
   `(0 (progn (compose-region (match-beginning 1) (-
(match-
end 1) 1)
  ,(nth 6 el)) nil
org-entities)))

(org-pretty-entities)
#+end_src

To try this out, just evaluate the above code block inside of an
org-mode buffer, then starting typing out org-entities.

Hope others find this useful.

Best -- Eric

Footnotes:
[1]  
http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135


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


- Carsten


- Carsten




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


Re: [Orgmode] Pretty org-entities in org-mode buffers

2010-05-17 Thread Carsten Dominik


On May 16, 2010, at 11:09 PM, Eric Schulte wrote:


Hi Carsten,

Thanks for folding in this feature.

I'm having some weird issues using the new entities display.  The
entities are not fontified in my org-mode buffers despite having set  
the

org-pretty-entities variable to t.  However if I search
`isearch-forward-regexp' for the "\\" character in the buffer then all
of the entities are displayed (e.g. \sum is replaced with ∑).

Any idea why the entity display is only working during a search?


One idea:  Do you have turned on org-highlight-latex-fragments-and- 
specials?


- Carsten




Thanks -- Eric

Carsten Dominik  writes:


Hi everyone,

a modified version of Eric's code is now included into Org, I just
pushed it
to the git repo.

You can use the command `C-c C-x \' to toggle this feature.

The variable `org-pretty-entities' determines if this mode is on by
default.

Finally, you can use

#+STARTUP: entitiespretty
#+STARTUP: entitiesplain

to change things on a per-file base.

Thanks to Eric for this great idea.

- Carsten

On May 5, 2010, at 6:19 PM, Eric Schulte wrote:


Hi,

Recently I've been making use of org-entites for exporting my greek/
math
heavy class notes to HTML.  I'm really loving the results.

This morning I've started playing around with the below function
`org-pretty-entities', which is adapted from Phil Hagelberg's
`pretty-lambdas'[1].  Calling this function in an org-mode buffer  
will

have the effect of fontifying all org-entities text strings as the
character which they represent, so \Delta is replaced with Δ,  
\lambda

with λ, \in with ∈, and so forth.

I've just started playing with this, and I make no guarantees as to
it's
safety or utility, but I was very pleasantly surprised by the
simplicity
of the function, and how nice it's been to see my special characters
appear in org-mode buffers as I type.

#+begin_src emacs-lisp :results silent
(defun org-pretty-entities ()
  (interactive)
  (font-lock-add-keywords
   nil (mapcar
(lambda (el)
  (list
   (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\
\)")
   `(0 (progn (compose-region (match-beginning 1) (-
(match-
end 1) 1)
  ,(nth 6 el)) nil
org-entities)))

(org-pretty-entities)
#+end_src

To try this out, just evaluate the above code block inside of an
org-mode buffer, then starting typing out org-entities.

Hope others find this useful.

Best -- Eric

Footnotes:
[1]  
http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135


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


- Carsten


- Carsten




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


Re: [Orgmode] Xemacs incompatibilities

2010-05-17 Thread Michael Sperber

Carsten Dominik  writes:

> This is a really non-standard way for a mode definition which I guess
> should be fixed in XEmacs.  I have made that change anyway.  Eric or
> Dan, please note this change I made in the Babel sources.

As someone else pointed out, python-mode.el is something different from
python.el:

https://launchpad.net/python-mode

In particular, fixing the require won't be enough: org-babel-python.el
uses `run-python' and interacts with the inferior Python, whereas
python-mode.el defines `py-shell'.

Should I try to abstract over the differences?

>> 3.)
>>
>> When editing a src block with C-c ' in a temporary buffer in it's
>> native mode and then switching back with C-c ' to the original org
>> file, whenever I try to save a file with C-x C-s (not only the org
>> file) I'll get the message
>>
>>   This is not a sub-editing buffer, something is wrong...

Could you provide a little bit more context on what you did?  I'm not
very familiar with org-src (which I assume this is about), so a
step-by-step recipe would help me greatly.

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla

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


Re: [Orgmode] Xemacs incompatibilities

2010-05-17 Thread Carsten Dominik


On May 17, 2010, at 4:39 PM, Michael Sperber wrote:



Carsten Dominik  writes:


This is a really non-standard way for a mode definition which I guess
should be fixed in XEmacs.  I have made that change anyway.  Eric or
Dan, please note this change I made in the Babel sources.


As someone else pointed out, python-mode.el is something different  
from

python.el:

https://launchpad.net/python-mode

In particular, fixing the require won't be enough: org-babel-python.el
uses `run-python' and interacts with the inferior Python, whereas
python-mode.el defines `py-shell'.

Should I try to abstract over the differences?


Yes, this would be much appreciated. (I think, Eric or Dan?)




3.)

When editing a src block with C-c ' in a temporary buffer in it's
native mode and then switching back with C-c ' to the original org
file, whenever I try to save a file with C-x C-s (not only the org
file) I'll get the message

 This is not a sub-editing buffer, something is wrong...


Could you provide a little bit more context on what you did?  I'm not
very familiar with org-src (which I assume this is about), so a
step-by-step recipe would help me greatly.

--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla


- Carsten




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


[Orgmode] Re: Agenda log mode with archives

2010-05-17 Thread Bernt Hansen
Carsten Dominik  writes:

> On May 17, 2010, at 12:42 PM, Detlef Steuer wrote:
>
>> On Sun, 16 May 2010 17:19:59 -0400
>> Bernt Hansen  wrote:
>>
>>> Hi Carsten,
>>>
>>> Today while playing with org-resolve clocks for John W. it found an
>>> open
>>> clock in one of my archives.  I wanted to see the log mode (clocked
>>> time) on that Sunday in March but most of the entries have been
>>> archived
>>> at this point.  I can view the agenda from only the archive file
>>> but I
>>> can't reconstruct the entire day conveniently from multiple archives.
>>>
>>> Is there a way to get log mode in the agenda ('l') to show clock time
>>> from all org-agenda-files including their arhives?
>>
>> That would be a very nice thing to have!
>
> Cant you do `v A' and then `v l' in the agenda?  I believe that this
> should work.

That works for me.  Thanks!

-Bernt

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


[Orgmode] Update table > Bug

2010-05-17 Thread Sébastien Vauban
Hello,

An example of update bug:

--8<---cut here---start->8---
 #+TBLNAME: InvestSupp
 #+ATTR_LaTeX: align=l
 |   | |   2010 |   2011 |   2012 | Total (HTVA) |
 |---+-++++--|
 |   | %   |  26.90 |  46.20 |  26.90 |   100.00 |
 |   | OFR | 3804467.00 | 6534066.00 | 3804467.00 |  1400.00 |
 | ^ | |  y2010 |  y2011 |  y2012 |  |
 #+TBLFM: 
$6=$3+$4+$5;%.2f::$y2010=14143000@2$3/100;%.2f::$y2011=14143000@2$4/100;%.2f::$y2012=14143000@2$5/100;%.2f
 #+LaTeX: {{{aftertableskip}}}
--8<---cut here---end--->8---

Putting point in first data, column Total, for example, and `C-u C-u C-*' does
not update the 14M.

Same problem when putting it in second data row, column 2012, for example.

Though, with point there, `C-c *' (without the `C-u' prefixes) does work!???

Best regards,
  Seb

-- 
Sébastien Vauban


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


Re: [Orgmode] Pretty org-entities in org-mode buffers

2010-05-17 Thread Eric Schulte
So looking into this slightly deeper,

I do have org-pretty-entities set to t in my config.

Toggling entities display with C-c C-x \ has no effect.

The value of org-highlight-latex-fragments-and-specials is nil.

Entities are only displayed when I search for the "\\" character, no
other searches result in displayed entities.

Interestingly, when starting with a fresh "emacs -Q" and only loading

--8<---cut here---start->8---
(load-file "~/src/org/lisp/org-install.el")
(setq org-pretty-entities t)
--8<---cut here---end--->8---

I have the same problem, so maybe my version of Emacs is to blame, I'm
using the latest from the emacs git/bzr repo

--8<---cut here---start->8---
~/src/emacs/src/emacs --version
GNU Emacs 24.0.50.1
Copyright (C) 2010 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
--8<---cut here---end--->8---

When I get some more time, I'll look into this further.

Thanks -- Eric

Carsten Dominik  writes:

> On May 16, 2010, at 11:09 PM, Eric Schulte wrote:
>
>> Hi Carsten,
>>
>> Thanks for folding in this feature.
>>
>> I'm having some weird issues using the new entities display.  The
>> entities are not fontified in my org-mode buffers despite having set
>> the
>> org-pretty-entities variable to t.  However if I search
>> `isearch-forward-regexp' for the "\\" character in the buffer then all
>> of the entities are displayed (e.g. \sum is replaced with ∑).
>>
>> Any idea why the entity display is only working during a search?
>
> One idea:  Do you have turned on org-highlight-latex-fragments-and-
> specials?
>
> - Carsten
>
>
>>
>> Thanks -- Eric
>>
>> Carsten Dominik  writes:
>>
>>> Hi everyone,
>>>
>>> a modified version of Eric's code is now included into Org, I just
>>> pushed it
>>> to the git repo.
>>>
>>> You can use the command `C-c C-x \' to toggle this feature.
>>>
>>> The variable `org-pretty-entities' determines if this mode is on by
>>> default.
>>>
>>> Finally, you can use
>>>
>>> #+STARTUP: entitiespretty
>>> #+STARTUP: entitiesplain
>>>
>>> to change things on a per-file base.
>>>
>>> Thanks to Eric for this great idea.
>>>
>>> - Carsten
>>>
>>> On May 5, 2010, at 6:19 PM, Eric Schulte wrote:
>>>
 Hi,

 Recently I've been making use of org-entites for exporting my greek/
 math
 heavy class notes to HTML.  I'm really loving the results.

 This morning I've started playing around with the below function
 `org-pretty-entities', which is adapted from Phil Hagelberg's
 `pretty-lambdas'[1].  Calling this function in an org-mode buffer
 will
 have the effect of fontifying all org-entities text strings as the
 character which they represent, so \Delta is replaced with Δ,
 \lambda
 with λ, \in with ∈, and so forth.

 I've just started playing with this, and I make no guarantees as to
 it's
 safety or utility, but I was very pleasantly surprised by the
 simplicity
 of the function, and how nice it's been to see my special characters
 appear in org-mode buffers as I type.

 #+begin_src emacs-lisp :results silent
 (defun org-pretty-entities ()
   (interactive)
   (font-lock-add-keywords
nil (mapcar
 (lambda (el)
   (list
(concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\
 \)")
`(0 (progn (compose-region (match-beginning 1) (-
 (match-
 end 1) 1)
   ,(nth 6 el)) nil
 org-entities)))

 (org-pretty-entities)
 #+end_src

 To try this out, just evaluate the above code block inside of an
 org-mode buffer, then starting typing out org-entities.

 Hope others find this useful.

 Best -- Eric

 Footnotes:
 [1]  
 http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135


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

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


[Orgmode] Re: Agenda log mode with archives

2010-05-17 Thread Detlef Steuer
On Mon, 17 May 2010 12:56:59 +0200
Carsten Dominik  wrote:

> > That would be a very nice thing to have!  
> 
> Cant you do `v A' and then `v l' in the agenda?  I believe that this  
> should work.

As always. It's already in there ...

Thx Carsten!

detlef


> 
> - Carsten


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


Re: [Orgmode] Update table > Bug

2010-05-17 Thread Carsten Dominik


On May 17, 2010, at 4:52 PM, Sébastien Vauban wrote:


Hello,

An example of update bug:

--8<---cut here---start->8---
#+TBLNAME: InvestSupp
#+ATTR_LaTeX: align=l
|   | |   2010 |   2011 |   2012 | Total (HTVA) |
|---+-++++--|
|   | %   |  26.90 |  46.20 |  26.90 |   100.00 |
|   | OFR | 3804467.00 | 6534066.00 | 3804467.00 |  1400.00 |
| ^ | |  y2010 |  y2011 |  y2012 |  |
#+TBLFM: $6=$3+$4+$5;%.2f::$y2010=14143000@2$3/100;%.2f:: 
$y2011=14143000@2$4/100;%.2f::$y2012=14143000@2$5/100;%.2f

#+LaTeX: {{{aftertableskip}}}
--8<---cut here---end--->8---

Putting point in first data, column Total, for example, and `C-u C-u  
C-*' does

not update the 14M.

Same problem when putting it in second data row, column 2012, for  
example.


Though, with point there, `C-c *' (without the `C-u' prefixes) does  
work!???


You have a special first column, which means that only lines with #  
and * will be computed.  This is in the manual.


HTH

- Carsten


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


Re: [Orgmode] Lazy project definitions

2010-05-17 Thread Carsten Dominik


On May 17, 2010, at 2:14 PM, Bernt Hansen wrote:


Carsten Dominik  writes:


In the stuck project definition, adding "^\\*\\{3,\\}" as the 4th
element should exclude anything that has level 3 or up in the  
subtree.


I don't think this will work.  The regexp matches all tasks with  
level 3

or higher subtrees ... which is all projects so all projects are
considered unstuck.

I need to be able to somehow say a project is not stuck if it doesn't
have a level 3 task (ie. no children) because it's not a project in  
this

case.


You are right.  Ahh, I wish we had the power of Perl
regular expressions in Emacs.  It would be sooo easy then.
No, I don't see a good way here.

Maybe the best is to completely write your own skipper here.  This
is actually not too hard, see the Appendix A7 for an example.

HTH

- Carsten




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


[Orgmode] Refile target caching

2010-05-17 Thread Carsten Dominik

Hi Sebastian, hi Samuel,

I remember that both of you have in the past reported that refiling
has a long startup time because of target collection.

I have now built a cache for refile targets and would like you to try  
it out.


(setq org-refile-use-cache t)

This will speed up refile target collection for the second and further  
instance.
If you are moving or adding entries that are targets themselves, that  
chace needs to be cleared with prefix arg 0 (zero), i.e. `C-0 C-c C-w'  
or, if you prefer, with a triple C-u prefix.


Samuel, note that this only speeds up target collection - it does  
nothing to the overhead added by ido - so we will have to see how much  
this helps for your use-case.



- Carsten




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


Re: [Orgmode] Xemacs incompatibilities

2010-05-17 Thread Dan Davison
Carsten Dominik  writes:

> On May 17, 2010, at 4:39 PM, Michael Sperber wrote:
>
>>
>> Carsten Dominik  writes:
>>
>>> This is a really non-standard way for a mode definition which I guess
>>> should be fixed in XEmacs.  I have made that change anyway.  Eric or
>>> Dan, please note this change I made in the Babel sources.
>>
>> As someone else pointed out, python-mode.el is something different
>> from
>> python.el:
>>
>> https://launchpad.net/python-mode
>>
>> In particular, fixing the require won't be enough: org-babel-python.el
>> uses `run-python' and interacts with the inferior Python, whereas
>> python-mode.el defines `py-shell'.
>>
>> Should I try to abstract over the differences?
>
> Yes, this would be much appreciated. (I think, Eric or Dan?)

Hi Michael,

Yes, that would be appreciated. As you say, our only dependence on
python.el is this requirement for a suitable inferior python comint
buffer, currently supplied by `run-python'.

I'll just note that this is not a requirement for absolutely vanilla,
default org-babel operation: by default org-babel runs interpreters as
external shell processes; persistent emacs sessions using inferior
processes are made available as an option for certain languages via
the :session argument.

Dan

>
>>
 3.)

 When editing a src block with C-c ' in a temporary buffer in it's
 native mode and then switching back with C-c ' to the original org
 file, whenever I try to save a file with C-x C-s (not only the org
 file) I'll get the message

  This is not a sub-editing buffer, something is wrong...
>>
>> Could you provide a little bit more context on what you did?  I'm not
>> very familiar with org-src (which I assume this is about), so a
>> step-by-step recipe would help me greatly.
>>
>> --
>> Cheers =8-} Mike
>> Friede, Völkerverständigung und überhaupt blabla
>
> - Carsten


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


[Orgmode] [PATCH] Fix typo

2010-05-17 Thread Julien Danjou
Signed-off-by: Julien Danjou 
---
 lisp/org-exp.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index a4f9ac3..024d802 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -887,7 +887,7 @@ value of `org-export-run-in-background'."
 \[1]   only export the current subtree
 \[SPC] publish enclosing subtree (with LaTeX_CLASS or EXPORT_FILE_NAME prop)
 
-\[a/n/u] export as ASCII/Latin-1/UFT-8 [A/N/U] to temporary buffer
+\[a/n/u] export as ASCII/Latin-1/UTF-8 [A/N/U] to temporary buffer
 
 \[h] export as HTML  [H] to temporary buffer   [R] export region
 \[b] export as HTML and open in browser
-- 
1.7.1


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


[Orgmode] Re: spreadsheet table limitations, specifically summing hours?

2010-05-17 Thread Štěpán Němec
oinksoc...@letterboxes.org writes:

> (I'm starting to think it's going to need some test cases, and I'll need to
> polish my elisp somewhat to find out how to do that. Are there any suggested
> unit-testing schemes for elisp?)

http://news.gmane.org/group/gmane.emacs.devel/thread=122140

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


Re: [Orgmode] Code snippet for Message Sequence Diagram export

2010-05-17 Thread Juan
Below goes code snippet using org-babel instead of org-export.

On Mon, May 17, 2010 at 09:13:29AM +0100, Eric S Fraga wrote:
> On Sun, 16 May 2010 17:18:39 -0300, Juan  wrote:
> > The following code adds an export block of type 'mscgen'. The block
> > body will be processed by the mscgen application. Sort of works, not
> > very tested yet.
>
> [...]
>
> Juan,
>
> this could be very useful.  Thanks!  I do wonder, however, whether it
> would make sense to have this as a org-babel language?  It would be
> nice to have the images generated appear in the org file directly...
>
> Thanks again,
> eric

;;; org-babel-mscgen.el --- org-babel functions for mscgen evaluation

;;; TODO insert GPL header here

;;; Commentary:
;;
;; This software provides EMACS org-babel export support for message
;; sequence charts. The mscgen utility is used for processing the
;; sequence definition, and must therefore be installed in the system.
;;
;; The code is a direct modification of org-babel-ditaa
;; from the org-mode distribution.
;;
;; Mscgen is available and documented at 
http://www.mcternan.me.uk/mscgen/index.html
;;
;; Customize path to mscgen utility with org-mscgen-path variable
;;
;; Example:
;;
;; #+begin_src mscgen :file example.png
;;  A,B;
;;  A -> B [ label = "send message" ];
;;  B <: A [ label = "get answer" ];
;; #+end_src

;;; Code:
(require 'org-babel)

(defvar org-mscgen-path
  "/opt/local/bin/mscgen"
  "Complete path to the mscgen executable")

(org-babel-add-interpreter "mscgen")

(add-to-list 'org-babel-tangle-langs '("mscgen" "mscgen"))

(defvar org-babel-default-header-args:mscgen
  '((:results . "file") (:exports . "results"))
  "Default arguments to use when evaluating a mscgen source block.")

(defun org-babel-expand-body:mscgen (body params &optional processed-params) 
body)

(defun org-babel-execute:mscgen (body params)
  "Execute a block of Mscgen code with org-babel.  This function is
called by `org-babel-execute-src-block'."
  (message "executing Mscgen source code block")
  (let ((result-params (split-string (or (cdr (assoc :results params)) "")))
(out-file (cdr (assoc :file params)))
(cmdline (cdr (assoc :cmdline params)))
(in-file (make-temp-file "org-babel-mscgen")))
(unless (file-exists-p org-mscgen-path)
  (error (format "Could not find mscgen at %s" org-mscgen-path)))
(with-temp-file in-file (insert (concat "msc {\n" body "\n}\n")))
(message (concat org-mscgen-path " -T png  -o " out-file " -i " in-file))
(shell-command (concat org-mscgen-path " -T png  -o " out-file " -i " 
in-file))
out-file))

(defun org-babel-prep-session:mscgen (session params)
  (error "Mscgen does not support sessions"))

(provide 'org-babel-mscgen)
;;; org-babel-mscgen.el ends here

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


[Orgmode] Re: Agenda view > Day separator

2010-05-17 Thread Markus Heller

On 5/17/2010 4:23 AM, Sébastien Vauban wrote:

Hi Eric and Carsten,

Eric S Fraga wrote:

On Thu, 13 May 2010 20:27:27 +0200, Carsten Dominik  
wrote:


Take a look at the variable org-agenda-format-date.
Or you can write your own function to do something fancier, maybe based on
`org-agenda-format-date-aligned'.


Thanks Carsten. This did the job. I modified your function to add a 120 long
blank string at the end of the date [...] and I have a clear date separator!
Underline would work as well, of course.


Another version, I guess, from what you wrote. No length hard-coded, except
for the 10 characters of the ISO date and 1 space after.

--8<---cut here---start->8---
 (setq org-agenda-format-date
   (concat "%Y-%m-%d "
   (make-string (- (window-width) 11) (string-to-char "_"
--8<---cut here---end--->8---

The agenda view is much, much clearer now...



That's a nice piece of lisp, thanks for sharing.

Just curious, how can I get the day of the week in there as a string?

Thanks
Markus


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


Re: [Orgmode] Re: Agenda view > Day separator

2010-05-17 Thread Nick Dokos
Markus Heller  wrote:

> ...
> Just curious, how can I get the day of the week in there as a string?
> 

%a - abbreviated
%A - full name

If you do

   C-h f format-time-string  

you'll get the complete list of formatting chars.

Nick

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


[Orgmode] Re: Agenda view > Day separator

2010-05-17 Thread Markus Heller

On 5/17/2010 2:02 PM, Nick Dokos wrote:

Markus Heller  wrote:


...
Just curious, how can I get the day of the week in there as a string?



%a - abbreviated
%A - full name

If you do

C-h f format-time-string

you'll get the complete list of formatting chars.



Ah, I was not aware of this.  Emacs just takes a long time to learn. 
Thanks for the answer, Nick!


Markus


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


[Orgmode] Bug involving *bold* text in second level headings

2010-05-17 Thread Ali Tofigh
i'm using org version 6.36. writing *bold* text does not work in
second level headings, which is very weird since it works in all other
levels (i've tried up to 60 levels...). For example try the following:

* text *bold* text
** text *bold* text
*** text *bold* text

/ali

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


Re: [Orgmode] Displaying day-resources (or a secondary time-line)

2010-05-17 Thread Sven Bretfeld
Hi Carsten and all others

Carsten Dominik  writes:

> You can also use diary sexp entries to also do the others, by checking
> for weekdays. See the examples in the FAQ
>
> http://orgmode.org/worg/org-faq.php#diary-sexp-in-org-files
>
> For example (untested)
>
> ** Secretary present 8:00-12:00
><%%(and (member (calendar-day-of-week date) '(1 3)))>
>
> As for sorting, I guess the easiest would be use a special tag and
> then a custom sorting strategy function in org-agenda-cmp-user-defined
> to sort these to the end of the agenda display.

Thanks for all your suggestions. I didn't know about the power of
diary-sexps. Thanks to Memnon, I have also learned about the
org-agenda-skip-function which I now have used to construct a solution
that works fine for me:

 (setq org-agenda-custom-commands
  '(("q" "Agenda and Metadata"
 ((agenda "" ((org-agenda-skip-function '(org-agenda-skip-subtree-if
  'regexp ":META:"
  (agenda "" ((org-agenda-skip-function '(org-agenda-skip-subtree-if
  'notregexp 
":META:"))(org-agenda-overriding-header "Today's resources (metadata): ")))
  (tags "MIT")
  (tags "BIGROCK")

I would prefer to have this Agenda View bound to the standard C-aa. Is
that possible? Setting "a" via org-agenda-custom-commands results in an
error at starttime. This keybinding seems to be hard-coded.

Greetings,

Sven

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


[Orgmode] Re: Code snippet for Message Sequence Diagram export

2010-05-17 Thread Dan Davison
Juan  writes:

> Below goes code snippet using org-babel instead of org-export.

Hi Juan,

Thanks, we'd be pleased to include this in org-babel. First question is:
if you haven't already, can you sign FSF copyright transfer forms for
Emacs / Org-mode?

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

And a couple of little questions:

- I think I'd prefer to get rid of the org-mscgen-path variable, and
  simply require that mscgen is on the user's $PATH. Is that OK or am I
  missing a reason for doing it differently?
- Is it definitely correct to automatically wrap the user's code in msg
  { ... }? I initially fell into the trap of including that inside my
  code block. I do not know the language; are there situations where the
  desired mscgen code will not be generated by wrapping everything in a
  msg { ... } block?
- If you are feeling energetic, it would be really nice to check the
  exit code from the shell-command and use org-babel-error-notify if
  necessary, similar to this fragment from org-babel-python

 (setq exit-code (org-babel-shell-command-on-region
  (point-min) (point-max) "python" nil 
'replace (current-buffer)))
 (buffer-string
 (if (> exit-code 0) (org-babel-error-notify exit-code stderr))

  (Looks like we should be doing this in org-babel-ditaa also)

Thanks again,

Dan


>
> On Mon, May 17, 2010 at 09:13:29AM +0100, Eric S Fraga wrote:
>> On Sun, 16 May 2010 17:18:39 -0300, Juan  wrote:
>> > The following code adds an export block of type 'mscgen'. The block
>> > body will be processed by the mscgen application. Sort of works, not
>> > very tested yet.
>>
>> [...]
>>
>> Juan,
>>
>> this could be very useful.  Thanks!  I do wonder, however, whether it
>> would make sense to have this as a org-babel language?  It would be
>> nice to have the images generated appear in the org file directly...
>>
>> Thanks again,
>> eric
>
> ;;; org-babel-mscgen.el --- org-babel functions for mscgen evaluation
>
> ;;; TODO insert GPL header here
>
> ;;; Commentary:
> ;;
> ;; This software provides EMACS org-babel export support for message
> ;; sequence charts. The mscgen utility is used for processing the
> ;; sequence definition, and must therefore be installed in the system.
> ;;
> ;; The code is a direct modification of org-babel-ditaa
> ;; from the org-mode distribution.
> ;;
> ;; Mscgen is available and documented at 
> http://www.mcternan.me.uk/mscgen/index.html
> ;;
> ;; Customize path to mscgen utility with org-mscgen-path variable
> ;;
> ;; Example:
> ;;
> ;; #+begin_src mscgen :file example.png
> ;;  A,B;
> ;;  A -> B [ label = "send message" ];
> ;;  B <: A [ label = "get answer" ];
> ;; #+end_src
>
> ;;; Code:
> (require 'org-babel)
>
> (defvar org-mscgen-path
>   "/opt/local/bin/mscgen"
>   "Complete path to the mscgen executable")
>
> (org-babel-add-interpreter "mscgen")
>
> (add-to-list 'org-babel-tangle-langs '("mscgen" "mscgen"))
>
> (defvar org-babel-default-header-args:mscgen
>   '((:results . "file") (:exports . "results"))
>   "Default arguments to use when evaluating a mscgen source block.")
>
> (defun org-babel-expand-body:mscgen (body params &optional processed-params) 
> body)
>
> (defun org-babel-execute:mscgen (body params)
>   "Execute a block of Mscgen code with org-babel.  This function is
> called by `org-babel-execute-src-block'."
>   (message "executing Mscgen source code block")
>   (let ((result-params (split-string (or (cdr (assoc :results params)) "")))
> (out-file (cdr (assoc :file params)))
> (cmdline (cdr (assoc :cmdline params)))
> (in-file (make-temp-file "org-babel-mscgen")))
> (unless (file-exists-p org-mscgen-path)
>   (error (format "Could not find mscgen at %s" org-mscgen-path)))
> (with-temp-file in-file (insert (concat "msc {\n" body "\n}\n")))
> (message (concat org-mscgen-path " -T png  -o " out-file " -i " in-file))
> (shell-command (concat org-mscgen-path " -T png  -o " out-file " -i " 
> in-file))
> out-file))
>
> (defun org-babel-prep-session:mscgen (session params)
>   (error "Mscgen does not support sessions"))
>
> (provide 'org-babel-mscgen)
> ;;; org-babel-mscgen.el ends here
>
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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


Re: [Orgmode] [babel] new key bindings

2010-05-17 Thread Eric Schulte
Ok thanks,

I've changed the binding of `org-babel-sha1-hash' to C-c C-v C-a so that
it no longer shadows the key-binding help.  While making changes to this
key binding I've made two other changes.

1) I've changed org-babel-tangle-file from C-c C-v C-T to C-c C-v C-f,
   because it was shadowing the binding of org-babel-tangle

2) I've added the option of calling any key-binding without holding
   control on the final character.

The resulting key-binding map is as shown below.

Thanks -- Eric

--8<---cut here---start->8---

Major Mode Bindings Starting With C-c C-v:
key binding
--- ---

C-c C-v C-a org-babel-sha1-hash
C-c C-v C-b org-babel-execute-buffer
C-c C-v C-f org-babel-tangle-file
C-c C-v C-g org-babel-goto-named-source-block
C-c C-v C-l org-babel-lob-ingest
C-c C-v C-p org-babel-expand-src-block
C-c C-v C-s org-babel-execute-subtree
C-c C-v C-t org-babel-tangle
C-c C-v C-z org-babel-switch-to-session
C-c C-v a   org-babel-sha1-hash
C-c C-v b   org-babel-execute-buffer
C-c C-v f   org-babel-tangle-file
C-c C-v g   org-babel-goto-named-source-block
C-c C-v h   org-babel-describe-bindings
C-c C-v l   org-babel-lob-ingest
C-c C-v p   org-babel-expand-src-block
C-c C-v s   org-babel-execute-subtree
C-c C-v t   org-babel-tangle
C-c C-v z   org-babel-switch-to-session


Global Bindings Starting With C-c C-v:
key binding
--- ---

[back]
--8<---cut here---end--->8---

Carsten Dominik  writes:

> On May 17, 2010, at 9:27 AM, Daniel Clemente wrote:
>
>> I think this key reminder table should be somehow displayed or
>> offered under a C-c C-v prefix, in the same way as C-c a, C-c C-a,
>> C- 
>> c e.
>> Or at least under C-c C-v ? or C-c C-v h
>>
>> -- Daniel
>>
>> On Thu, May 13, 2010 at 7:57 AM, Eric Schulte
>>  wrote:
>> Org-babel is now making use of the newly available C-c C-v key
>> binding.
>>
>> All Org-babel keybindings are now located behind this prefix, see the
>> updated org reference card (/doc/orgcard.pdf in the org-mode repo) for
>> the specific keybindings, they are also shown below.
>>
>> Best -- Eric
>>
>>
>> execute code block at point
>> C-c C-c
>> open results of code block at point
>> C-c C-o
>> preview body of code block at point
>> C-c C-v C-p
>> go to named code block
>> C-c C-v C-g
>> execute all code blocks in current buffer
>> C-c C-v C-b
>> execute all code blocks in current subtree
>> C-c C-v C-s
>> tangle code blocks in current file
>> C-c C-v C-t
>> tangle code blocks in supplied file
>> C-c C-v C-T
>> ingest all code blocks in supplied file into the Library of Babel
>> C-c C-v C-l
>> switch to the session of the current code block
>> C-c C-v C-z
>> view sha1 hash of the current code block
>> C-c C-v C-h
>
> Indeed, eric, you should not bind C-h in this keymap - this
> is one of those conventions.  If you don't, then C-v C-v C-h
> will display the keys in this prefix map automatically.
>
> - Carsten

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


Re: [Orgmode] org-babel and Xemacs incompatibilities

2010-05-17 Thread Eric Schulte
Hi,

A patch has just been applied to the org-mode repository which should
fix this issue.

Please let me know if the issue remains.

Best -- Eric

"Dr. Volker Zell"  writes:

> Hi
>
> When trying to do Source Code Execution with C-c C-c in Xeamcs with 
> org-babel-6.35i
> I get:
>
>   args-out-of-range # 0 0
>
>
>   
> Debugger entered--Lisp error: (args-out-of-range # 0 0)
>   map-extents(# [buffer-or-string extent end start remove-text-properties extent-property 
> text-prop nil] 6> nil 0 0 nil nil text-prop)
>   set-text-properties(0 0 nil nil)
>   org-babel-clean-text-properties(nil)
>   org-babel-result-hash(("ruby" "\"This file was last evaluated on 
> #{Date.today}\"\n" ((:cache . "no") (:comments . "") (:exports . "code") 
> (:noweb . "no") (:results . "replace") (:session . "none") (:shebang . "") 
> (:tangle . "")) ""))
>   (let* ((info ...) (lang ...) (params ...) (new-hash ...) (old-hash ...) 
> (body ...) (result-params ...) (result-type ...) (cmd ...) (dir ...) 
> (default-directory ...) (call-process-region-original ...) result) 
> (unwind-protect (flet ... ... ...) (setq call-process-region ...)))
>   org-babel-execute-src-block(nil ("ruby" "\"This file was last evaluated on 
> #{Date.today}\"\n" ((:cache . "no") (:comments . "") (:exports . "code") 
> (:noweb . "no") (:results . "replace") (:session . "none") (:shebang . "") 
> (:tangle . "")) ""))
>   (progn (org-babel-execute-src-block current-prefix-arg info) t)
>   (if info (progn (org-babel-execute-src-block current-prefix-arg info) t) 
> nil)
>   (let ((info ...)) (if info (progn ... t) nil))
>   org-babel-execute-src-block-maybe()
>   run-hook-with-args-until-success(org-babel-execute-src-block-maybe)
>   (cond ((or ... org-occur-highlights org-latex-fragment-image-overlays) (and 
> ... ...) (org-remove-occur-highlights) 
> (org-remove-latex-fragment-image-overlays) (message "Temporary 
> highlights/overlays removed from current buffer")) ((and ... ...) (funcall 
> org-finish-function)) ((run-hook-with-args-until-success ...)) ((or ... ...) 
> (call-interactively ...)) ((org-on-target-p) (call-interactively ...)) ((and 
> ... ...) (call-interactively ...)) ((org-on-heading-p) (call-interactively 
> ...)) ((org-at-table\.el-p) (message "Use C-c ' to edit table.el tables")) 
> ((org-at-table-p) (org-table-maybe-eval-formula) (if arg ... ...) 
> (call-interactively ...)) ((or ... ...) (call-interactively ...)) 
> ((org-at-item-checkbox-p) (call-interactively ...)) ((org-at-item-p) (if arg 
> ... ...)) ((save-excursion ... ...) (beginning-of-line 1) (save-excursion 
> ...)) ((save-excursion ... ...) (cond ... ...)) 
> ((org-clock-update-time-maybe)) (t (error "C-c C-c can do nothing useful at 
> this location")))
>   (let ((org-enable-table-editor t)) (cond (... ... ... ... ...) (... ...) 
> (...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ... ... ...) 
> (... ...) (... ...) (... ...) (... ... ...) (... ...) (...) (t ...)))
>   org-ctrl-c-ctrl-c(nil)
>   call-interactively(org-ctrl-c-ctrl-c)
>
>
> Ciao
>   Volker
>
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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


[Orgmode] Re: Refile target caching

2010-05-17 Thread Richard Riley
Carsten Dominik  writes:

> Hi Sebastian, hi Samuel,
>
> I remember that both of you have in the past reported that refiling
> has a long startup time because of target collection.
>
> I have now built a cache for refile targets and would like you to try  
> it out.
>
> (setq org-refile-use-cache t)
>
> This will speed up refile target collection for the second and further  
> instance.
> If you are moving or adding entries that are targets themselves, that  
> chace needs to be cleared with prefix arg 0 (zero), i.e. `C-0 C-c C-w'  
> or, if you prefer, with a triple C-u prefix.
>
> Samuel, note that this only speeds up target collection - it does  
> nothing to the overhead added by ido - so we will have to see how much  
> this helps for your use-case.
>
> - Carsten


On the subject of refile, I frequently refile C-c C-w from the new item
buffer in which case the item is correctly refiled but the new item
buffer empties and remains open. Is there a way to configure it that after
the C-c C-w the new org item buffer closes?


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


Re: [Orgmode] org-html link building diff

2010-05-17 Thread Tom Breton (Tehom)

Hi, Carsten.  The new changes are pushed as
tehom-html-export-refactor-build-link

I couldn't undo the basing onto tehom-master, try though I might.
Something to do with intermediate changes that I couldn't fast-forward
and that I probably edited wrong.  So I made a separate branch,
tehom-html-export-refactor-build-link, which is now pushed to the
repo.  So tehom-master and html-export-refactor-build-link are already
obsolete.

I moved the tests into top-level directory testing, as you asked.  I'm
going to write a separate post describing the test conventions I use.

Now a question: IIUC you want a branch that has no tests, that
"contains only the changes that would go into org".  Since I develop
tests and code at about the same time (tests slightly before code),
I'm not sure how to arrange the branching in a maintainable way.

I could of course make a one-time branch that just removes the testing
directory.  But then what happens for any future fixes?  Seems like
each time I'd have to rebase that branch and pick thru changes and
make it discard each change that deals with testing/.  It seems hard
to maintain.

Tom Breton (Tehom)



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


[Orgmode] Test-file naming conventions - mine and suggested for org

2010-05-17 Thread Tom Breton (Tehom)
In developing emtest, I've given some thought to conventions for test
files.  My convention is that:

   * tests of foo.el go into foo/tests.el

 * With feature name foo/tests

   * Any shared testhelp goes into foo/testhelp.el

 * With feature name foo/testhelp

   * Example files go in foo/examples/

   * Alternative, they can all be placed in another directory
 hierarchy, like "org/testing/foo/tests.el" as long as
 "org/testing" is in the load-path (emacs doesn't know the
 difference).

I welcome any comments on this convention.  I considered it carefully;
I wrote a small document considering the alternatives and chose this
as best.  But it's young enough that it could be changed, were strong
arguments made towards some alternative.

Tom Breton (Tehom)



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


[Orgmode] Re: Code snippet for Message Sequence Diagram export

2010-05-17 Thread Juan
On Mon, May 17, 2010 at 07:04:14PM -0400, Dan Davison wrote:
> Juan  writes:
> > Below goes code snippet using org-babel instead of org-export.

...

> Thanks, we'd be pleased to include this in org-babel. First question is:
> if you haven't already, can you sign FSF copyright transfer forms for
> Emacs / Org-mode?
> http://orgmode.org/worg/org-contribute.php

I just sent the email to gnu.org

> And a couple of little questions:
>
> - I think I'd prefer to get rid of the org-mscgen-path variable, and
>   simply require that mscgen is on the user's $PATH. Is that OK or am I
>   missing a reason for doing it differently?

You're right. I'll get rid of it.

That variable was inherited from both ditaa (which I used as a
template) and my non-standard path (darwin-ports on mac).

> - Is it definitely correct to automatically wrap the user's code in msg
>   { ... }? I initially fell into the trap of including that inside my
>   code block. I do not know the language; are there situations where the
>   desired mscgen code will not be generated by wrapping everything in a
>   msg { ... } block?

All the mscgen script must go inside msg{ ... }. 1st version was an
org-export block, so I felt OK not having to include that every time.

But now that it's gone to org-babel -which is more source-code purist
with the literate programming halo- I'd rather make the user include
the complete mscgen source code.

Eventually (version 2), it can be made optional (check if the msc{ }
wrapper is not there and add it on the fly).

> - If you are feeling energetic, it would be really nice to check the
>   exit code from the shell-command and use org-babel-error-notify if
>   necessary

I'll look into it.

Thank you for your support!

Saludos,
.j.



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


Re: [Orgmode] Lazy project definitions

2010-05-17 Thread Bernt Hansen
Carsten Dominik  writes:

> On May 17, 2010, at 2:14 PM, Bernt Hansen wrote:
>
>> Carsten Dominik  writes:
>>
>>> In the stuck project definition, adding "^\\*\\{3,\\}" as the 4th
>>> element should exclude anything that has level 3 or up in the
>>> subtree.
>>
>> I don't think this will work.  The regexp matches all tasks with
>> level 3
>> or higher subtrees ... which is all projects so all projects are
>> considered unstuck.
>>
>> I need to be able to somehow say a project is not stuck if it doesn't
>> have a level 3 task (ie. no children) because it's not a project in
>> this
>> case.
>
> You are right.  Ahh, I wish we had the power of Perl
> regular expressions in Emacs.  It would be sooo easy then.
> No, I don't see a good way here.
>
> Maybe the best is to completely write your own skipper here.  This
> is actually not too hard, see the Appendix A7 for an example.

Thanks for the pointer to the manual.  I've been beating my head against
the wall for hours on this now.  I tried the example from the manual and
have similar results to the description below.

Here's what I came up with as my skip function

,
| (defun bh/skip-non-stuck-projects ()
|   "Skip trees that are not projects"
|   (let* ((subtree-end (save-excursion (org-end-of-subtree t)))
|(is-project (save-excursion (re-search-forward "^\\*\\{3,\\}" 
subtree-end t)))
|(has-next (save-excursion (re-search-forward "^\\*\\** NEXT " 
subtree-end t
| (if (and is-project (not has-next))
|   nil ; a stuck project, has subtasks but no next task
|   subtree-end)))
`

and my custom agenda command is 'x' for testing

,
|  ("x" "Stuck Projects" tags-todo "LEVEL=2-REFILE/!-DONE-CANCELLED"
|   ((org-agenda-skip-function
| (bh/skip-non-stuck-projects)
`

but this doesn't work at all like I expect.  I lost a bunch of time when
I had the 'stuck projects' selection instead of tags-todo -- it seems
the skip function doesn't do anything useful with the stuck-projects
setting.

My returned list of tasks is still incorrect -- it contains level 2
tasks with no children.  Sometimes it throws an error -- depending on
what buffer is displayed and where (point) is when I run C-c a x.

In this mail buffer I get

Debugger entered--Lisp error: (error "Before first headline at position 2577 in 
buffer *wide reply to Carsten Dominik*")
  signal(error ("Before first headline at position 2577 in buffer *wide reply 
to Carsten Dominik*"))
  error("Before first headline at position %d in buffer %s" 2577 #)
  (condition-case nil (outline-back-to-heading invisible-ok) (error (error 
"Before first headline at position %d in buffer %s" ... ...)))
  org-back-to-heading(t)
  org-end-of-subtree(t)
  (save-excursion (org-end-of-subtree t))
  (let* ((subtree-end ...) (is-project ...) (has-next ...)) (message "is a 
project %s" is-project) (message "has next %s" has-next) (if (and is-project 
...) nil subtree-end))
  (save-excursion (let* (... ... ...) (message "is a project %s" is-project) 
(message "has next %s" has-next) (if ... nil subtree-end)))
  bh/skip-non-stuck-projects()
  (let ((org-agenda-skip-function ...)) (org-tags-view (quote ...) match))
  eval((let ((org-agenda-skip-function ...)) (org-tags-view (quote ...) match)))
  org-let(((org-agenda-skip-function (bh/skip-non-stuck-projects))) 
(org-tags-view (quote (4)) match))
  (cond ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-let lprops 
...)) ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-let lprops ...)) 
((eq type ...) (org-let lprops ...)) ((eq type ...) (org-let lprops ...)) ((eq 
type ...) (org-let lprops ...)) ((eq type ...) (org-check-for-org-mode) 
(org-let lprops ...)) ((eq type ...) (org-check-for-org-mode) (org-let lprops 
...)) ((eq type ...) (org-check-for-org-mode) (org-let lprops ...)) ((functionp 
type) (org-let lprops ...)) ((fboundp type) (org-let lprops ...)) (t (error 
"Invalid custom agenda command type %s" type)))
  (progn (setq type (nth 2 entry) match (eval ...) lprops (nth 4 entry)) (put 
(quote org-agenda-redo-command) (quote org-lprops) lprops) (cond (... ...) (... 
...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ... ...) (... ... 
...) (... ... ...) (... ...) (... ...) (t ...)))
  (if (or (symbolp ...) (functionp ...)) (progn (setq type ... match ... lprops 
...) (put ... ... lprops) (cond ... ... ... ... ... ... ... ... ... ... ... ... 
...)) (org-run-agenda-series (nth 1 entry) (cddr entry)))
  (cond ((setq entry ...) (if ... ... ...)) ((equal keys "C") (setq 
org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable 
...)) ((equal keys "a") (call-interactively ...)) ((equal keys "s") 
(call-interactively ...)) ((equal keys "t") (call-interactively ...)) ((equal 
keys "T") (org-call-with-arg ... ...)) ((equal keys "m") (call-interactively 
...)) ((equal keys "M") (org-call-with-arg ... ...)) ((equal keys "e") 
(call-interactively ...)) ((equal keys "?") (org-tags-view nil "+FLAGGED") 

[Orgmode] Re: Lazy project definitions

2010-05-17 Thread Matt Lundin
Hi Bernt,

Bernt Hansen  writes:

>  I've been beating my head against the wall for hours on this now. I
> tried the example from the manual and have similar results to the
> description below.
>
> Here's what I came up with as my skip function
>
> ,
> | (defun bh/skip-non-stuck-projects ()
> |   "Skip trees that are not projects"
> |   (let* ((subtree-end (save-excursion (org-end-of-subtree t)))
> |  (is-project (save-excursion (re-search-forward "^\\*\\{3,\\}" 
> subtree-end t)))
> |  (has-next (save-excursion (re-search-forward "^\\*\\** NEXT " 
> subtree-end t
> | (if (and is-project (not has-next))
> | nil ; a stuck project, has subtasks but no next task
> |   subtree-end)))
> `
>
> and my custom agenda command is 'x' for testing
>
> ,
> |  ("x" "Stuck Projects" tags-todo "LEVEL=2-REFILE/!-DONE-CANCELLED"
> |   ((org-agenda-skip-function
> | (bh/skip-non-stuck-projects)
> `
>
> but this doesn't work at all like I expect.  I lost a bunch of time when
> I had the 'stuck projects' selection instead of tags-todo -- it seems
> the skip function doesn't do anything useful with the stuck-projects
> setting.
>
> My returned list of tasks is still incorrect -- it contains level 2
> tasks with no children.  Sometimes it throws an error -- depending on
> what buffer is displayed and where (point) is when I run C-c a x.

The custom command (and the skip function) works for me when written as
follows:

--8<---cut here---start->8---
(setq org-agenda-custom-commands
  '(("x" "Stuck Projects" tags "LEVEL=2-REFILE/-DONE-CANCELLED"
 ((org-agenda-skip-function 'bh/skip-non-stuck-projects)
--8<---cut here---end--->8---

I made a couple of changes: (a) I quoted the function name and (b) I
changed tags-todo to tags and removed the exclamation point. Both
tags-todo and the exclamation point limited the results to entries with
active states, whereas (if I understand correctly) you are interested in
all level 2 headings.

When I tested the command/skip function on the following tree, only the
first 2nd level entry (** Testing) showed up in the agenda. Is this the
desired result?

--8<---cut here---start->8---
* Example
** Testing
*** Nothing
** Testing two
*** NEXT A todo
** Testing three
--8<---cut here---end--->8---

Best,
Matt

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


Re: [Orgmode] org-show-following-heading shows even when nil

2010-05-17 Thread Samuel Wales
Hi Carsten,

On 2010-05-14, Carsten Dominik  wrote:
> for some reason I do not remember, I enforce showing the next headline
> in this special case.  Please try the following patch and run with if
> for a while, to see if it causes any problems.

The patch did not apply for some reason, but I manually applied it,
and it seemed in trivial testing to work perfectly.  Strangely,
however, today the behavior is as if I did not apply the patch.  I did
eval the function, so it must be some other piece of code that is
involved.  I don't get it.  (Not physically able to investigate now,
unfortunately.)

Samuel

-- 
Q: How many CDC "scientists" does it take to change a lightbulb?
A: "You only think it's dark." [CDC has denied a deadly disease for 25 years]
==
Retrovirus: http://www.wpinstitute.org/xmrv/index.html

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


[Orgmode] Re: error loading org-mode

2010-05-17 Thread Daniel Goldin
Sorry for the interruption. The problem was I had several versions of
org in my load-path.

d.

On Sun, 16 May 2010, Daniel Goldin wrote:

> Non-programmer type here. I pulled the latest release from git. Now I
> get an error when I load org-mode:
> 
> "Symbol's value is void: calendar-mode-map"
> 
> Any thoughts?
> 
> d.
> 

-- 
Daniel Goldin 
213.926.1960

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


Re: [Orgmode] org-html link building diff

2010-05-17 Thread Carsten Dominik


On May 18, 2010, at 2:59 AM, Tom Breton (Tehom) wrote:



Hi, Carsten.  The new changes are pushed as
tehom-html-export-refactor-build-link

I couldn't undo the basing onto tehom-master, try though I might.
Something to do with intermediate changes that I couldn't fast-forward
and that I probably edited wrong.  So I made a separate branch,
tehom-html-export-refactor-build-link, which is now pushed to the
repo.  So tehom-master and html-export-refactor-build-link are already
obsolete.

I moved the tests into top-level directory testing, as you asked.  I'm
going to write a separate post describing the test conventions I use.

Now a question: IIUC you want a branch that has no tests, that
"contains only the changes that would go into org".  Since I develop
tests and code at about the same time (tests slightly before code),
I'm not sure how to arrange the branching in a maintainable way.


Hi Tom,

If we decide to use your emtests framework for Org on a brader basis,  
then there would be no reason to have a branch free of tests.  This is  
only necessary because I am supposed to apply your patches, but  
without the testing framework at the moment.


Maybe we should just go ahead and start using emtest for Org-mode.   
Why don't you go ahead and propose this in a mail to emacs-orgmode.   
Lets see if there is any resistance by people who understand more  
about testing than I do.  If not, we go ahead and do it.


I would still prefer to have the tests in a separate directory if your  
package allows to do so.  Hope that this is no problem?


I guess all the emtest code itself would then have to go into the org- 
mode git repo as well, so that we can use it?


And we should develop a make target that will run all tests.

- Carsten




I could of course make a one-time branch that just removes the testing
directory.  But then what happens for any future fixes?  Seems like
each time I'd have to rebase that branch and pick thru changes and
make it discard each change that deals with testing/.  It seems hard
to maintain.

Tom Breton (Tehom)




- Carsten




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


[Orgmode] [PATCH 0/2] org-id: New org-id-method uuid

2010-05-17 Thread David Maus
Replace customization value 'uuidgen by new customization value 'uuid
and make it the default.  With `org-id-method' set to 'uuid Org uses
UUIDs for ID properties.  The preferred way to obtain a UUID is
calling the program defined in `org-id-uuid-program'.  If the program
is not available (i.e. the call to the program does not return a UUID)
an elisp function is used to create a random (version 4) UUID.

Docstrings and comments are modified accordingly.  The old
customization value 'uuidgen is silently accepted as an alias for
'uuid.

David Maus (2):
  Provide function that returns a string with a random (version 4)
UUID.
  Use new customization value for `org-id-method'.


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


[Orgmode] [PATCH 1/2] Provide function that returns a string with a random (version 4) UUID.

2010-05-17 Thread David Maus
---
 lisp/ChangeLog |5 +
 lisp/org-id.el |   24 
 2 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4fb3aac..fafe7db 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-16  David Maus  
+
+   * org-id.el (org-id-uuid): New function.  Return string with
+   random (version 4) UUID.
+
 2010-05-15  Carsten Dominik  
 
* org-latex.el (org-export-latex-format-image): Add support
diff --git a/lisp/org-id.el b/lisp/org-id.el
index 0678161..6175eee 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -318,6 +318,30 @@ So a typical ID could look like \"Org:4nd91V40HI\"."
  (t (error "Invalid `org-id-method'")))
 (concat prefix unique)))
 
+(defun org-id-uuid ()
+  "Return string with random (version 4) UUID."
+  (let ((rnd (md5 (format "%s%s%s%s%s%s%s"
+ (random t)
+ (current-time)
+ (user-uid)
+ (emacs-pid)
+ (user-full-name)
+ user-mail-address
+ (recent-keys)
+(format "%s-%s-4%s-%s%s-%s"
+   (substring rnd 0 8)
+   (substring rnd 8 12)
+   (substring rnd 13 16)
+   (format "%x"
+   (logior
+#B1000
+(logand
+ #B1011
+ (string-to-number
+  (substring rnd 16 18) 16
+   (substring rnd 18 20)
+   (substring rnd 20 32
+
 (defun org-id-reverse-string (s)
   (mapconcat 'char-to-string (nreverse (string-to-list s)) ""))
 
-- 
1.7.1


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


[Orgmode] Re: [PATCH 0/2] org-id: New org-id-method uuid

2010-05-17 Thread David Maus
Sorry, forgot:

Patches are available in git://github.com/dmj/dmj-org-mode.git org-id-uuid

HTH
 -- David

--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


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


[Orgmode] [PATCH 2/2] Use new customization value for `org-id-method'.

2010-05-17 Thread David Maus
Silently accept the old value for backward compatibility.
---
 lisp/ChangeLog |3 +++
 lisp/org-id.el |   28 
 2 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fafe7db..b143fbf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -2,6 +2,9 @@
 
* org-id.el (org-id-uuid): New function.  Return string with
random (version 4) UUID.
+   (org-id-method): Make 'uuid the new default value.
+   (org-id-new): Use `org-id-uuid' if call to uuidgen program
+   does not return a UUID.
 
 2010-05-15  Carsten Dominik  
 
diff --git a/lisp/org-id.el b/lisp/org-id.el
index 6175eee..66b1790 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -37,8 +37,9 @@
 ;; time of the ID, with microsecond accuracy.  This virtually
 ;; guarantees globally unique identifiers, even if several people are
 ;; creating IDs at the same time in files that will eventually be used
-;; together.  As an external method `uuidgen' is supported, if installed
-;; on the system.
+;; together.
+;;
+;; By default Org uses UUIDs as global unique identifiers.
 ;;
 ;; This file defines the following API:
 ;;
@@ -84,18 +85,9 @@
   :group 'org-id
   :type 'string)
 
-(defcustom org-id-method
-  (condition-case nil
-  (if (string-match "\\`[-0-9a-fA-F]\\{36\\}\\'"
-   (org-trim (shell-command-to-string
-  org-id-uuid-program)))
- 'uuidgen
-   'org)
-(error 'org))
+(defcustom org-id-method 'uuid
   "The method that should be used to create new IDs.
 
-If `uuidgen' is available on the system, it will be used as the default method.
-if not, the method `org' is used.
 An ID will consist of the optional prefix specified in `org-id-prefix',
 and a unique part created by the method this variable specifies.
 
@@ -105,11 +97,13 @@ orgOrg's own internal method, using an encoding of 
the current time to
microsecond accuracy, and optionally the current domain of the
computer.  See the variable `org-id-include-domain'.
 
-uuidgenCall the external command uuidgen."
+uuid   Create random (version 4) UUIDs.  If the program defined in
+   `org-id-uuid-program' is available it is used to create the ID.
+   Otherwise an internal functions is used."
   :group 'org-id
   :type '(choice
  (const :tag "Org's internal method" org)
- (const :tag "external: uuidgen" uuidgen)))
+ (const :tag "external: uuidgen" uuid)))
 
 (defcustom org-id-prefix nil
   "The prefix for IDs.
@@ -306,8 +300,10 @@ So a typical ID could look like \"Org:4nd91V40HI\"."
 unique)
 (if (equal prefix ":") (setq prefix ""))
 (cond
- ((eq org-id-method 'uuidgen)
-  (setq unique (org-trim (shell-command-to-string org-id-uuid-program
+ ((memq org-id-method '(uuidgen uuid))
+  (setq unique (org-trim (shell-command-to-string org-id-uuid-program)))
+  (unless (org-uuidgen-p unique)
+   (setq unique (org-id-uuid
  ((eq org-id-method 'org)
   (let* ((etime (org-id-reverse-string (org-id-time-to-b36)))
 (postfix (if org-id-include-domain
-- 
1.7.1


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


Re: [Orgmode] Bug involving *bold* text in second level headings

2010-05-17 Thread David Maus
Ali Tofigh wrote:
>i'm using org version 6.36. writing *bold* text does not work in
>second level headings, which is very weird since it works in all other
>levels (i've tried up to 60 levels...). For example try the following:

>* text *bold* text
>** text *bold* text
>*** text *bold* text

I can confirm this even for 6.21b, shipped with

GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.18.2)
 of 2009-11-02 on raven, modified by Debian

The substring *bold* in a second level headline does not have to face
"bold" (M-x describe-face RET).

HTH
 -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


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