Re: [Orgmode] Re: arranging and publishing music with Org-mode and lilypond

2010-10-03 Thread Stefan Vollmar
Dear Rustom,

I have looked at the NtEd example and, obviously, this is also a very powerful 
piece of software. However, I see as a significant drawback that it only works 
on one platform and does not have the plain text TeX-ish appeal many on this 
list  appreciate. But using it as a front-end for lilypond might be   helpful 
for some users - similar to using equation editors with elaborate graphical 
user interfaces that can export TeX snippets.

As Nick has pointed out, lilypond can generate MIDI output along with 
high-quality PDF. At least in my examples, the MIDI output even reflected 
dynamics and voices correctly (a good way of checking a score). 

I have written a simple elisp function: on pressing F1, the current lilypond 
buffer is compiled (in the usual meaning) and, on success, the resulting PDF 
opened. Nice: clicking on a note in the PDF file will open the appropriate 
lilypond file in Emacs - at the appropriate position (of that note). Instead of 
opening the PDF, one could play the MIDI file with an external player. However, 
although this will work well in general, there will still be cases where this 
kind of approach is not "immediate" enough if your focus is on fast audio 
feedback (ideally, you would want to mark a lilypond snippet in Emacs and 
listen to it immediately; if you keep the lilypond input simple enough, this is 
not so difficult to implement, maybe I will look into it).

Warm regards,
 Stefan

On 03.10.2010, at 05:19, Rustom Mody wrote:

> Hi Stefan
> 
> Maybe a bit OT but I find nted useful for my musical needs:
> http://vsr.informatik.tu-chemnitz.de/~jan/nted/nted.xhtml
> because it both plays and shows music quite well. [I use it to teach singing]
> Does lilypond play also?
> 
> One small gripe with nted is that it exports but does not import lilypond.
> 
> Rustom
> 
> ___
> 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

-- 
Dr. Stefan Vollmar, Dipl.-Phys.
Head of IT group
Max-Planck-Institut für neurologische Forschung
Gleuelerstr. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213  FAX +49-221-4726-298
Tel.: +49-221-478-5713  Mobile: 0160-93874279
Email: voll...@nf.mpg.de   http://www.nf.mpg.de








smime.p7s
Description: S/MIME cryptographic 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] Latex exporter bug or feature?

2010-10-03 Thread Indraneel Majumdar

 Or am I doing something wrong?

With
#+OPTIONS H:5

paragraphs are not exported if subsubsection is missing.

eg. my orgfile:

* Section
** Sub section

My paragraph starts here...


The paragraph is not exported. The reason I want H:5 is that this is the 
simplest way to obtain numbered paragraphs (I do not have to put 
\paragraph{} in front of every paragraph).


Please help,

Indraneel

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


[Orgmode] How to disable log done notes for specific project?

2010-10-03 Thread Water Lin

I have set the log done time and log done note for my org files using
code:
---
(setq org-log-done 'time)
(setq org-log-done 'note)
---

The log done time and log done note are very useful while I am editing
my org files. But when I publish the projects, I don't want to publish
these TODO keywords and so does the log done notes.

I used following line to disable export TODO keywords:
---
 :todo-keywords nil
---

But I don't know how to disable log done notes.

How can I do these? To set the project not to export log done notes, or
to set the project not to mark log done notes?

How?

Thanks

Water Lin


-- 
The Big Bang on Busy Reading: http://bigbang.WaterLin.org
Email: water...@sohu.com

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


[Orgmode] How to not publish log done note?

2010-10-03 Thread Water Lin

I have set the log done time and log done note for my org files using
code:
---
(setq org-log-done 'time)
(setq org-log-done 'note)
---

The log done time and log done note are very useful while I am editing
my org files. But when I publish the projects, I don't want to publish
these TODO keywords and so does the log done notes.

I used following line to disable export TODO keywords:
---
 :todo-keywords nil
---

But I don't know how to disable log done notes.

How can I do these? To set the project not to export log done notes, or
to set the project not to mark log done notes?

How?

Thanks

Water Lin

-- 
The Big Bang on Busy Reading: http://bigbang.WaterLin.org
Email: water...@sohu.com

___
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] How to disable log done notes for specific project?

2010-10-03 Thread Carsten Dominik


On Oct 3, 2010, at 1:14 PM, Water Lin wrote:



I have set the log done time and log done note for my org files using
code:
---
(setq org-log-done 'time)
(setq org-log-done 'note)
---

The log done time and log done note are very useful while I am editing
my org files. But when I publish the projects, I don't want to publish
these TODO keywords and so does the log done notes.

I used following line to disable export TODO keywords:
---
:todo-keywords nil
---

But I don't know how to disable log done notes.


Hi Walter,


use

   (setq org-log-into-drawer t)

This will put the notes into the LOGBOOK drawer, which is not published.

HTH

- Carsten




How can I do these? To set the project not to export log done notes,  
or

to set the project not to mark log done notes?

How?

Thanks

Water Lin


--
The Big Bang on Busy Reading: http://bigbang.WaterLin.org
Email: water...@sohu.com

___
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] How to not publish log done note?

2010-10-03 Thread Noorul Islam
On Sun, Oct 3, 2010 at 4:36 PM, Water Lin  wrote:
>
> I have set the log done time and log done note for my org files using
> code:
> ---
> (setq org-log-done 'time)
> (setq org-log-done 'note)
> ---
>
> The log done time and log done note are very useful while I am editing
> my org files. But when I publish the projects, I don't want to publish
> these TODO keywords and so does the log done notes.
>
> I used following line to disable export TODO keywords:
> ---
>         :todo-keywords nil
> ---
>
> But I don't know how to disable log done notes.
>

Did you try

#+OPTIONS: <:nil

Thanks and Regards
Noorul

___
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] How to not publish log done note?

2010-10-03 Thread Noorul Islam
On Sun, Oct 3, 2010 at 5:48 PM, Noorul Islam  wrote:
> On Sun, Oct 3, 2010 at 4:36 PM, Water Lin  wrote:
>>
>> I have set the log done time and log done note for my org files using
>> code:
>> ---
>> (setq org-log-done 'time)
>> (setq org-log-done 'note)
>> ---
>>
>> The log done time and log done note are very useful while I am editing
>> my org files. But when I publish the projects, I don't want to publish
>> these TODO keywords and so does the log done notes.
>>
>> I used following line to disable export TODO keywords:
>> ---
>>         :todo-keywords nil
>> ---
>>
>> But I don't know how to disable log done notes.
>>
>
> Did you try
>
> #+OPTIONS: <:nil
>

Also I found this interesting thread.

http://www.mail-archive.com/emacs-orgmode@gnu.org/msg10095.html

-Noorul

___
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] How to not publish log done note?

2010-10-03 Thread Water Lin
Noorul Islam  writes:

> On Sun, Oct 3, 2010 at 4:36 PM, Water Lin  wrote:
>>
>> I have set the log done time and log done note for my org files using
>> code:
>> ---
>> (setq org-log-done 'time)
>> (setq org-log-done 'note)
>> ---
>>
>> The log done time and log done note are very useful while I am editing
>> my org files. But when I publish the projects, I don't want to publish
>> these TODO keywords and so does the log done notes.
>>
>> I used following line to disable export TODO keywords:
>> ---
>>         :todo-keywords nil
>> ---
>>
>> But I don't know how to disable log done notes.
>>
>
> Did you try
>
> #+OPTIONS: <:nil

This works. But it will leave a blank line under the title in the
exported html file.

Any better solutions?

Thanks

Water Lin

>
> Thanks and Regards
> Noorul
>

-- 
The Big Bang on Busy Reading: http://bigbang.WaterLin.org
Email: water...@sohu.com

___
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] Omit top level heading in latex export?

2010-10-03 Thread Indraneel Majumdar

 Hi,

I'm running into a problem with latex export. I have several essays 
under a top level heading "Essays". How can I export say only one essay 
without the top level heading "Essays" also showing up in the output as 
a "Section"? I want the heading of my essay to be displayed as a latex 
section. Is this possible in any simple way? The manual describes some 
option to define my own class in the .emacs file, but I couldn't 
understand that very well.

eg.

* Essays
** Essay One
** Essay Two

I want to export only "Essay Two" (eg with a :export: tag) and don't 
want "Essays" to show up.



Thanks in advance,
Indraneel

___
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 lets me mess things up too easily [7.01trans]

2010-10-03 Thread David Abrahams


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.


I've been repeatedly finding org items in my agenda that don't behave
correctly.  I discovered a partial explanation for the issue today
when I inspected this item, which I couldn't seem to reschedule:

*** TODO create network user for itunes and iphoto
SCHEDULED: <2010-10-03 Sun>
Why didn't I think of this earlier!?
SCHEDULED: <2010-10-01 Fri>
:PROPERTIES:
:ID:   909C7F52-FC6C-4EAC-8287-39A289A1ADAD
:END:
[2010-10-01 Fri 13:09]

This always showed up in the agenda as being scheduled for 10-01, but
rescheduling it would put the new scheduled date in just below the
TODO line, rather than changing the line from 10-01.  I guess that
means I added the "Why didn't I think of this earlier!?"  text right
below the TODO line, but I wasn't supposed to?  So what *are* the
rules for where body text can appear in an item?  And why doesn't org
make it harder for me to break those rules?

[As a general theme, I've had similar problems with habits, where I've
misspelled the format for the repeating date and Org didn't warn me.
Can this stuff be made more idiot-proof?]

Thanks!

Emacs  : GNU Emacs 23.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.29)
 of 2010-05-08 on black.local
Package: Org-mode version 7.01trans

current state:
==
(setq
 org-agenda-deadline-leaders '("D: " "D%d: ")
 org-clock-in-switch-to-state "STARTED"
 org-agenda-skip-scheduled-if-deadline-is-shown t
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-todo-keyword-faces '(("TODO" :foreground "medium blue" :weight bold)
  ("APPT" :foreground "medium blue" :weight bold)
  ("NOTE" :foreground "brown" :weight bold)
  ("STARTED" :foreground "dark orange" :weight bold)
  ("WAITING" :foreground "red" :weight bold)
  ("DELEGATED" :foreground "dark violet" :weight bold)
  ("DEFERRED" :foreground "dark blue" :weight bold)
  ("SOMEDAY" :foreground "dark blue" :weight bold)
  ("PROJECT" :height 1.5 :weight bold :foreground 
"black"))
 org-agenda-custom-commands '(("E" "Errands (next 3 days)" tags
   
"Errand&TODO<>\"DONE\"&TODO<>\"CANCELLED\"&STYLE<>\"habit\"&SCHEDULED<\"<+3d>\""
   ((org-agenda-overriding-header "Errands (next 3 
days)")

 )
   )
  ("A" "Priority #A tasks" agenda ""
   ((org-agenda-ndays 1)
(org-agenda-overriding-header "Today's priority 
#A tasks: ")
(org-agenda-skip-function
 (quote (org-agenda-skip-entry-if (quote 
notregexp) "\\=.*\\[#A\\]"))
 )
)
   )
  ("B" "Priority #A and #B tasks" agenda ""
   ((org-agenda-ndays 1)
(org-agenda-overriding-header "Today's priority 
#A and #B tasks: ")
(org-agenda-skip-function
 (quote (org-agenda-skip-entry-if (quote 
regexp) "\\=.*\\[#C\\]")))
)
   )
  ("w" "Waiting/delegated tasks" tags
   "TODO=\"WAITING\"|TODO=\"DELEGATED\""
   ((org-agenda-overriding-header 
"Waiting/delegated tasks:")
(org-agenda-sorting-strategy
 (quote (todo-state-up priority-down 
category-up)))
)
   )
  ("u" "Unscheduled tasks" tags
   
"TODO<>\"\"&TODO<>\"DONE\"&TODO<>\"CANCELLED\"&TODO<>\"NOTE\"&CATEGORY<>{CEG\\|ABC\\|Bizcard\\|Adagio\\|EVAprint\\|\\}"
   ((org-agenda-overriding-header "Unscheduled 
tasks: ")


  
(org-agenda-skip-function

   

[Orgmode] [PATCH] Revert "Update modeline with effort and task name on re-clock-in"

2010-10-03 Thread Bernt Hansen
This reverts commit 4a4fbf1b8caa338a3a59f7b6f3f89b279615725d.

Clocking in the currently clocking task was leaving open clock entries
which is incorrect.  Updating the modeline is less important than
keeping correct clocking data.
---
This reverts a commit I made back in December.  I ran into this bug this morning
clocking in the same task quickly.  This was leaving open clocks which the 
dangling clock code tried to fix.

Regards,
Bernt

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

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 8979396..5b4b39c 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -959,7 +959,7 @@ the clocking selection, associated with the letter `d'."
;; We are interrupting the clocking of a different task.
;; Save a marker to this task, so that we can go back.
;; First check if we are trying to clock into the same task!
-   (if (save-excursion
+   (when (save-excursion
(unless selected-task
  (org-back-to-heading t))
(and (equal (marker-buffer org-clock-hd-marker)
@@ -970,13 +970,12 @@ the clocking selection, associated with the letter `d'."
(if selected-task
(marker-position selected-task)
  (point)
-   (message "Clock continues in \"%s\"" org-clock-heading)
- (progn
-   (move-marker org-clock-interrupted-task
-(marker-position org-clock-marker)
-(org-clocking-buffer))
-   (let ((org-clock-clocking-in t))
- (org-clock-out t)
+ (message "Clock continues in \"%s\"" org-clock-heading)
+ (throw 'abort nil))
+   (move-marker org-clock-interrupted-task
+(marker-position org-clock-marker)
+(marker-buffer org-clock-marker))
+   (org-clock-out t))
 
   (when (equal select '(16))
;; Mark as default clocking task
-- 
1.7.3.1.50.g1e633


___
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] Omit top level heading in latex export?

2010-10-03 Thread suvayu ali
On 3 October 2010 06:31, Indraneel Majumdar  wrote:
>  Hi,
>
> I'm running into a problem with latex export. I have several essays under a
> top level heading "Essays". How can I export say only one essay without the
> top level heading "Essays" also showing up in the output as a "Section"? I
> want the heading of my essay to be displayed as a latex section. Is this
> possible in any simple way? The manual describes some option to define my
> own class in the .emacs file, but I couldn't understand that very well.
> eg.
>
> * Essays
> ** Essay One
> ** Essay Two
>
> I want to export only "Essay Two" (eg with a :export: tag) and don't want
> "Essays" to show up.
>

What about just exporting the subtree you want? I believe the way to
do that is to go to the subtree and while exporting limit the export
with `1'. Hope this helps.

>
> Thanks in advance,
> Indraneel
>

-- 
Suvayu

Open source is the future. It sets us free.

___
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] Revert "Update modeline with effort and task name on re-clock-in"

2010-10-03 Thread Carsten Dominik

Applied, thanks.

- Carsten

On Oct 3, 2010, at 5:21 PM, Bernt Hansen wrote:


This reverts commit 4a4fbf1b8caa338a3a59f7b6f3f89b279615725d.

Clocking in the currently clocking task was leaving open clock entries
which is incorrect.  Updating the modeline is less important than
keeping correct clocking data.
---
This reverts a commit I made back in December.  I ran into this bug  
this morning
clocking in the same task quickly.  This was leaving open clocks  
which the

dangling clock code tried to fix.

Regards,
Bernt

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

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 8979396..5b4b39c 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -959,7 +959,7 @@ the clocking selection, associated with the  
letter `d'."

;; We are interrupting the clocking of a different task.
;; Save a marker to this task, so that we can go back.
;; First check if we are trying to clock into the same task!
-   (if (save-excursion
+   (when (save-excursion
(unless selected-task
  (org-back-to-heading t))
(and (equal (marker-buffer org-clock-hd-marker)
@@ -970,13 +970,12 @@ the clocking selection, associated with the  
letter `d'."

(if selected-task
(marker-position selected-task)
  (point)
-   (message "Clock continues in \"%s\"" org-clock-heading)
- (progn
-   (move-marker org-clock-interrupted-task
-(marker-position org-clock-marker)
-(org-clocking-buffer))
-   (let ((org-clock-clocking-in t))
- (org-clock-out t)
+ (message "Clock continues in \"%s\"" org-clock-heading)
+ (throw 'abort nil))
+   (move-marker org-clock-interrupted-task
+(marker-position org-clock-marker)
+(marker-buffer org-clock-marker))
+   (org-clock-out t))

  (when (equal select '(16))
;; Mark as default clocking task
--
1.7.3.1.50.g1e633


___
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] Omit top level heading in latex export?

2010-10-03 Thread Indraneel Majumdar


On 2010-10-03 20:57, suvayu ali wrote:

On 3 October 2010 06:31, Indraneel Majumdar  wrote:

  Hi,

I'm running into a problem with latex export. I have several essays under a
top level heading "Essays". How can I export say only one essay without the
top level heading "Essays" also showing up in the output as a "Section"? I
want the heading of my essay to be displayed as a latex section. Is this
possible in any simple way? The manual describes some option to define my
own class in the .emacs file, but I couldn't understand that very well.
eg.

* Essays
** Essay One
** Essay Two

I want to export only "Essay Two" (eg with a :export: tag) and don't want
"Essays" to show up.


What about just exporting the subtree you want? I believe the way to
do that is to go to the subtree and while exporting limit the export
with `1'. Hope this helps.

Yes, that exports the subtree (Essay Two) and also exports "Essays" (but 
not "Essay One"). I do not want "Essays" to show up at all.


Indraneel

Thanks in advance,
Indraneel



___
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] Omit top level heading in latex export?

2010-10-03 Thread suvayu ali
On 3 October 2010 08:31, Indraneel Majumdar  wrote:
>
> On 2010-10-03 20:57, suvayu ali wrote:
>>
>> On 3 October 2010 06:31, Indraneel Majumdar
>>  wrote:
>>>
>>>  Hi,
>>>
>>> I'm running into a problem with latex export. I have several essays under
>>> a
>>> top level heading "Essays". How can I export say only one essay without
>>> the
>>> top level heading "Essays" also showing up in the output as a "Section"?
>>> I
>>> want the heading of my essay to be displayed as a latex section. Is this
>>> possible in any simple way? The manual describes some option to define my
>>> own class in the .emacs file, but I couldn't understand that very well.
>>> eg.
>>>
>>> * Essays
>>> ** Essay One
>>> ** Essay Two
>>>
>>> I want to export only "Essay Two" (eg with a :export: tag) and don't want
>>> "Essays" to show up.
>>>
>> What about just exporting the subtree you want? I believe the way to
>> do that is to go to the subtree and while exporting limit the export
>> with `1'. Hope this helps.
>>
> Yes, that exports the subtree (Essay Two) and also exports "Essays" (but not
> "Essay One"). I do not want "Essays" to show up at all.
>

In that case you can try the `noexport' tag on the top level headline
with this header `#+EXPORT_EXCLUDE_TAGS: noexport' option. I just
tried it, seems to work pretty well.

> Indraneel

-- 
Suvayu

Open source is the future. It sets us free.

___
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] Omit top level heading in latex export?

2010-10-03 Thread Indraneel Majumdar



On 2010-10-03 21:12, suvayu ali wrote:

On 3 October 2010 08:31, Indraneel Majumdar  wrote:

On 2010-10-03 20:57, suvayu ali wrote:

On 3 October 2010 06:31, Indraneel Majumdar
  wrote:

  Hi,

I'm running into a problem with latex export. I have several essays under
a
top level heading "Essays". How can I export say only one essay without
the
top level heading "Essays" also showing up in the output as a "Section"?
I
want the heading of my essay to be displayed as a latex section. Is this
possible in any simple way? The manual describes some option to define my
own class in the .emacs file, but I couldn't understand that very well.
eg.

* Essays
** Essay One
** Essay Two

I want to export only "Essay Two" (eg with a :export: tag) and don't want
"Essays" to show up.


What about just exporting the subtree you want? I believe the way to
do that is to go to the subtree and while exporting limit the export
with `1'. Hope this helps.


Yes, that exports the subtree (Essay Two) and also exports "Essays" (but not
"Essay One"). I do not want "Essays" to show up at all.


In that case you can try the `noexport' tag on the top level headline
with this header `#+EXPORT_EXCLUDE_TAGS: noexport' option. I just
tried it, seems to work pretty well.

Does not work for me. It blocks out the entire tree, even if I have 
:export: on "Essay Two". From the manual, it seems that is how it should be.

Indraneel


___
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 dangling clocks created by org-clock-out-hook clocking in again

2010-10-03 Thread Bernt Hansen
This is a fixup patch to commit
17c71a40c6d07baae2e9cac606668683ddb3759c.  The org-clock-clocking-in
variable needs to be set when we are clocking out - in case the clock
out hook clocks-in again.  This fixes a bug that creates dangling
clock entries.
---
 lisp/org-clock.el |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 5b4b39c..c6f05fc 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -975,7 +975,8 @@ the clocking selection, associated with the letter `d'."
(move-marker org-clock-interrupted-task
 (marker-position org-clock-marker)
 (marker-buffer org-clock-marker))
-   (org-clock-out t))
+   (let ((org-clock-clocking-in t))
+ (org-clock-out t)))
 
   (when (equal select '(16))
;; Mark as default clocking task
-- 
1.7.3.1.50.g1e633


___
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] Omit top level heading in latex export?

2010-10-03 Thread suvayu ali
On 3 October 2010 08:49, Indraneel Majumdar  wrote:
>
>
> On 2010-10-03 21:12, suvayu ali wrote:
>>
>> On 3 October 2010 08:31, Indraneel Majumdar
>>  wrote:
>>>
>>> On 2010-10-03 20:57, suvayu ali wrote:

 On 3 October 2010 06:31, Indraneel Majumdar
  wrote:
>
>  Hi,
>
> I'm running into a problem with latex export. I have several essays
> under
> a
> top level heading "Essays". How can I export say only one essay without
> the
> top level heading "Essays" also showing up in the output as a
> "Section"?
> I
> want the heading of my essay to be displayed as a latex section. Is
> this
> possible in any simple way? The manual describes some option to define
> my
> own class in the .emacs file, but I couldn't understand that very well.
> eg.
>
> * Essays
> ** Essay One
> ** Essay Two
>
> I want to export only "Essay Two" (eg with a :export: tag) and don't
> want
> "Essays" to show up.
>
 What about just exporting the subtree you want? I believe the way to
 do that is to go to the subtree and while exporting limit the export
 with `1'. Hope this helps.

>>> Yes, that exports the subtree (Essay Two) and also exports "Essays" (but
>>> not
>>> "Essay One"). I do not want "Essays" to show up at all.
>>>
>> In that case you can try the `noexport' tag on the top level headline
>> with this header `#+EXPORT_EXCLUDE_TAGS: noexport' option. I just
>> tried it, seems to work pretty well.
>>
> Does not work for me. It blocks out the entire tree, even if I have :export:
> on "Essay Two". From the manual, it seems that is how it should be.

Could be a result of some setting in my setup. Only remotely relevant
variable I could find was `(setq org-hierarchical-todo-statistics
nil)'. I don't usually export my trees except for beamer
presentations. Not sure what else you could try. Sorry. :(

>>>
>>> Indraneel
>

-- 
Suvayu

Open source is the future. It sets us free.

___
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: latex export [7.01trans (release_7.01h.613.g17c71)]

2010-10-03 Thread markscala

I use org and latex export to write logic exercises and tests for my
classes, and I've noticed the following problem.  In the following
items, all but the last item export correctly:


P \rightarrow Q

P \vee Q

P \& Q

P \leftrightarrow Q

P \vdash Q


Here is the output for C-c C-e L:


P $\rightarrow$ Q

P $\vee$ Q

P \& Q

P $\leftrightarrow$ Q

P \vdash Q


The last item in this list should be P $\vdash$ Q.

Thanks,
Mark Scala


Emacs  : GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2010-05-08 on pidsley.hoetzel.info
Package: Org-mode version 7.01trans (release_7.01h.613.g17c71)

current state:
==
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-agenda-files '("~/code/org/refile.org" "~/code/org/todo.org")
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-capture-templates '(("n" "note" entry (file+headline 
"~/code/org/refile.org" "Notes")
  "* %?\n   :PROPERTIES:\n   :ADDED: %U\n   :END:\n %i 
\n" :prepend t)
 )
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-default-notes-file "~/code/org/refile.org"
 org-directory "~/code/org/"
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-mode-hook '((lambda nil
  (org-add-hook (quote change-major-mode-hook) (quote 
org-show-block-all) (quote append) (quote local)))
 (lambda nil
  (org-add-hook (quote change-major-mode-hook) (quote 
org-babel-show-result-all) (quote append) (quote local)))
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-refile-use-outline-path 'file
 org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src 
org-babel-exp-inline-src-blocks))
 org-refile-allow-creating-parent-nodes 'confirm
 org-occur-hook '(org-first-headline-recenter)
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-export-preprocess-after-include-files-hook '(org-export-blocks-preprocess)
 org-modules '(org-bbdb org-bibtex org-docview org-gnus org-id org-info 
org-jsinfo org-habit org-irc org-mew org-mhe org-rmail
   org-vm org-wl org-w3m org-capture)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc 
org-beamer-auto-fragile-frames
   org-beamer-place-default-actions-for-lists)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-blocks '((src org-babel-exp-src-blocks nil) (comment 
org-export-blocks-format-comment t)
 (ditaa org-export-blocks-format-ditaa nil) (dot 
org-export-blocks-format-dot nil))
 )

___
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: Omit top level heading in latex export?

2010-10-03 Thread Matt Lundin
Indraneel Majumdar  writes:

> On 2010-10-03 20:57, suvayu ali wrote:
>> On 3 October 2010 06:31, Indraneel Majumdar  wrote:
>>>   Hi,
>>>
>>> I'm running into a problem with latex export. I have several essays under a
>>> top level heading "Essays". How can I export say only one essay without the
>>> top level heading "Essays" also showing up in the output as a "Section"? I
>>> want the heading of my essay to be displayed as a latex section. Is this
>>> possible in any simple way? The manual describes some option to define my
>>> own class in the .emacs file, but I couldn't understand that very well.
>>> eg.
>>>
>>> * Essays
>>> ** Essay One
>>> ** Essay Two
>>>
>>> I want to export only "Essay Two" (eg with a :export: tag) and don't want
>>> "Essays" to show up.
>>>
>> What about just exporting the subtree you want? I believe the way to
>> do that is to go to the subtree and while exporting limit the export
>> with `1'. Hope this helps.
>>
> Yes, that exports the subtree (Essay Two) and also exports "Essays"
> (but not "Essay One"). I do not want "Essays" to show up at all.

I cannot replicate this. Take the following subtree:

--8<---cut here---start->8---
* Essays
** Essay One
Some text.
** Essay Two
Some special text.
--8<---cut here---end--->8---

With the latest org from git, if I press "C-c C-e 1 h" while the cursor
is on (or under) the Essay Two headline, the html output looks like
this:

--8<---cut here---start->8---
Essay Two

Some special text.

Author: Matt Lundin

Date: 2010-10-03 12:47:58 EDT

HTML generated by org-mode 7.01trans in emacs 24
--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] Re: Omit top level heading in latex export?

2010-10-03 Thread Indraneel Majumdar

 Thanks Matt and Suvayu,

I messed up with my lisp and that was causing the error. So now I have 
another problem, how to fix the lisp code...


I'm using a org export hook to make all targets invisible by a regex 
replace. This is probably messing up the selection, so what do I do to 
not lose the selected text till the exporter takes over (or probably not 
tamper with the selection or something)? I don't know any lisp.


(defun regex-replace (regex string)
  (goto-char (point-min))
  (while (re-search-forward regex nil t)
(replace-match string)))

(defun invisibletag()
  "Make all targets invisible"
  (regex-replace "\\(<<.+?>>\\) " "\\1(INVISIBLE) ")
)
(add-hook 'org-export-first-hook 'invisibletag)


Indraneel

On 2010-10-03 22:21, Matt Lundin wrote:

Indraneel Majumdar  writes:


On 2010-10-03 20:57, suvayu ali wrote:

On 3 October 2010 06:31, Indraneel Majumdar   wrote:

   Hi,

I'm running into a problem with latex export. I have several essays under a
top level heading "Essays". How can I export say only one essay without the
top level heading "Essays" also showing up in the output as a "Section"? I
want the heading of my essay to be displayed as a latex section. Is this
possible in any simple way? The manual describes some option to define my
own class in the .emacs file, but I couldn't understand that very well.
eg.

* Essays
** Essay One
** Essay Two

I want to export only "Essay Two" (eg with a :export: tag) and don't want
"Essays" to show up.


What about just exporting the subtree you want? I believe the way to
do that is to go to the subtree and while exporting limit the export
with `1'. Hope this helps.


Yes, that exports the subtree (Essay Two) and also exports "Essays"
(but not "Essay One"). I do not want "Essays" to show up at all.

I cannot replicate this. Take the following subtree:

--8<---cut here---start->8---
* Essays
** Essay One
Some text.
** Essay Two
Some special text.
--8<---cut here---end--->8---

With the latest org from git, if I press "C-c C-e 1 h" while the cursor
is on (or under) the Essay Two headline, the html output looks like
this:

--8<---cut here---start->8---
Essay Two

Some special text.

Author: Matt Lundin

Date: 2010-10-03 12:47:58 EDT

HTML generated by org-mode 7.01trans in emacs 24
--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



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


[Orgmode] Re: Bug: latex export [7.01trans (release_7.01h.613.g17c71)]

2010-10-03 Thread Matt Lundin
marksc...@gmail.com writes:

> I use org and latex export to write logic exercises and tests for my
> classes, and I've noticed the following problem.  In the following
> items, all but the last item export correctly:
>
>
> P \rightarrow Q
>
> P \vee Q
>
> P \& Q
>
> P \leftrightarrow Q
>
> P \vdash Q
>
>
> Here is the output for C-c C-e L:
>
>
> P $\rightarrow$ Q
>
> P $\vee$ Q
>
> P \& Q
>
> P $\leftrightarrow$ Q
>
> P \vdash Q
>
>
> The last item in this list should be P $\vdash$ Q.
>

This occurs because \vdash is not defined in org-entities, while the
other symbols are. If you want it to export properly to LaTeX, you can
add something like the following to your ~/.emacs:

(add-to-list 'org-entities-user '("vdash" "\\vdash" t "⊢" "|-" nil "⊢"))

For more information, type

C-h v org-entities
C-h v org-entities-user

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] Timestamps & Agenda

2010-10-03 Thread Russell Adams
Right! I found it, I hadn't realized there was a new variable in 6.27
and behavior, and I hadn't noticed the change take effect until now
when I was trying to read a file in the agenda journal mode looking
for specific times.

For future reference, the variable
org-agenda-skip-additional-timestamps-same-entry controls this
behavior. The default (t) is to skip additional timestamps after the
first, set it to nil to have it use all the stamps as I prefer.

Thanks!


On Sat, Oct 02, 2010 at 09:38:55AM -0500, Russell Adams wrote:
> I just noticed today that the agenda is now only showing the *first*
> timestamp in any headline, whether active or inactive. I'm not sure
> when this changed, I'm running 7.01e. I found that ability valuable,
> so I suspect a bug?
>
> Example:
> * Testing multiples
> <2010-10-02 Sat 05:31>
>
> <2010-10-02 Sat 06:31>
>
> <2010-10-02 Sat 07:31>
>
> [2010-10-02 Sat 08:31]
>
> [2010-10-02 Sat 09:31]
>
> [2010-10-02 Sat 10:31]
>
> When the example is loaded in agenda, and log mode turned on and then
> optionally inactive timestamps enabled, only the first timestamp
> is displayed.
>
> Thanks.
>
> --
> Russell Adamsrlad...@adamsinfoserv.com
>
> PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/
>
> Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
>
> ___
> 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
>


--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

___
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: Omit top level heading in latex export?

2010-10-03 Thread Indraneel Majumdar

 I fixed my lisp. Just to archive the solution, here's my new defun:

(defun regex-replace (regex string)
  (point-to-register 'rrr)
  (goto-char (point-min))
  (while (re-search-forward regex nil t)
(replace-match string))
  (jump-to-register 'rrr))


On 2010-10-03 23:01, Indraneel Majumdar wrote:

 Thanks Matt and Suvayu,

I messed up with my lisp and that was causing the error. So now I have 
another problem, how to fix the lisp code...


I'm using a org export hook to make all targets invisible by a regex 
replace. This is probably messing up the selection, so what do I do to 
not lose the selected text till the exporter takes over (or probably 
not tamper with the selection or something)? I don't know any lisp.


(defun regex-replace (regex string)
  (goto-char (point-min))
  (while (re-search-forward regex nil t)
(replace-match string)))

(defun invisibletag()
  "Make all targets invisible"
  (regex-replace "\\(<<.+?>>\\) " "\\1(INVISIBLE) ")
)
(add-hook 'org-export-first-hook 'invisibletag)


Indraneel

On 2010-10-03 22:21, Matt Lundin wrote:

Indraneel Majumdar  writes:


On 2010-10-03 20:57, suvayu ali wrote:
On 3 October 2010 06:31, Indraneel 
Majumdar   wrote:

   Hi,

I'm running into a problem with latex export. I have several 
essays under a
top level heading "Essays". How can I export say only one essay 
without the
top level heading "Essays" also showing up in the output as a 
"Section"? I
want the heading of my essay to be displayed as a latex section. 
Is this
possible in any simple way? The manual describes some option to 
define my
own class in the .emacs file, but I couldn't understand that very 
well.

eg.

* Essays
** Essay One
** Essay Two

I want to export only "Essay Two" (eg with a :export: tag) and 
don't want

"Essays" to show up.


What about just exporting the subtree you want? I believe the way to
do that is to go to the subtree and while exporting limit the export
with `1'. Hope this helps.


Yes, that exports the subtree (Essay Two) and also exports "Essays"
(but not "Essay One"). I do not want "Essays" to show up at all.

I cannot replicate this. Take the following subtree:

--8<---cut here---start->8---
* Essays
** Essay One
Some text.
** Essay Two
Some special text.
--8<---cut here---end--->8---

With the latest org from git, if I press "C-c C-e 1 h" while the cursor
is on (or under) the Essay Two headline, the html output looks like
this:

--8<---cut here---start->8---
Essay Two

Some special text.

Author: Matt Lundin

Date: 2010-10-03 12:47:58 EDT

HTML generated by org-mode 7.01trans in emacs 24
--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



___
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] How to modify org-export-latex-emphasis-alist

2010-10-03 Thread Thomas S. Dye

Aloha all,

I use this patch locally to let the LaTeX url package typeset and  
break lines in long path names.  Is there a way to make this change  
from my .emacs, so I can continue to use the Org-mode master branch  
and not my url branch?  Or, is there a better way to implement this  
without changing the Org-mode core?


Changes from master to url
Modified lisp/org-latex.el
diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 9a62457..920591a 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -230,7 +230,7 @@ are written as utf8 files."
 ("/" "\\emph{%s}" nil)
 ("_" "\\underline{%s}" nil)
 ("+" "\\st{%s}" nil)
-("=" "\\verb" t)
+("=" "\\url{%s}" nil)
 ("~" "\\verb" t))
   "Alist of LaTeX expressions to convert emphasis fontifiers.
 Each element of the list is a list of three elements.

All the best,
Tom

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


Re: [Orgmode] [PATCH] Fix dangling clocks created by org-clock-out-hook clocking in again

2010-10-03 Thread Carsten Dominik

Hi Bernt,

I am having some problem here with the patches - could you please make  
me a new patch against the current master?


Thanks!

- Carsten

On Oct 3, 2010, at 5:52 PM, Bernt Hansen wrote:


This is a fixup patch to commit
17c71a40c6d07baae2e9cac606668683ddb3759c.  The org-clock-clocking-in
variable needs to be set when we are clocking out - in case the clock
out hook clocks-in again.  This fixes a bug that creates dangling
clock entries.
---
lisp/org-clock.el |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 5b4b39c..c6f05fc 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -975,7 +975,8 @@ the clocking selection, associated with the  
letter `d'."

(move-marker org-clock-interrupted-task
 (marker-position org-clock-marker)
 (marker-buffer org-clock-marker))
-   (org-clock-out t))
+   (let ((org-clock-clocking-in t))
+ (org-clock-out t)))

  (when (equal select '(16))
;; Mark as default clocking task
--
1.7.3.1.50.g1e633


___
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: Testing --- again...

2010-10-03 Thread Sebastian Rose
"Eric Schulte"  writes:
> "Eric Schulte"  writes:
> To illustrate my suggestions, I've thrown together a couple simple Babel
> tests roughly following this outline, currently up in the
> `schulte-testing' branch of the Org-mode repo.
>
> To try it out
> 1) load the testing/org-test.el file
> 2) run `org-load-tests' to load up the entire org-mode test suite
> 3) run `ert' to run the test suite.
> 4) or jump to the definition of `org-babel-get-src-block-info' and run
>`org-test-current-function' to just run the tests for that function
>
> Best -- Eric

Yes.  I know how running tests looks like:  It looks good :)

Hahaa, I like that code.  It looks so simple :)


To load all files below testing/  is a good suggestion probably.  The
unloading and loading as I implemented it is simply superfluous, if we
suggest that testers no how to eval a buffer or defun (and if they can
change it, they can eval it).



* Question:

  (defun org-test-current-function ()
"Test the current function."
(interactive)
(ert (car (which-function
  
  `org-test-test-current-defun' in the ert-testing branch does that, too.
  (But with that superfluous loading/unloading stuff though :-/) But it
  encloses each test inside save-excursion and Co.
  
  What does which-func.el that this function does not:
  
  <#part type="application/emacs-lisp" disposition=inline>
  (defun org-test-which-func ()
"Return the name of the current defun."
(save-excursion
  (save-match-data
(end-of-line)
(beginning-of-defun)
(if (looking-at "(defun[[:space:]]+\\([^([:space:]]*\\)[[:space:]]*(")
  (match-string-no-properties 1)
  (error "No defun found around point.")
  <#/part>
  
  ??



* Keymap

  We should add keys to the org-mode-map.
  
   C-c t
  
  is still free here.  Or is it in you use it for babel somehow?
  
   C-c t f org-test-test-current-function
   C-c t b org-test-test-current-buffer-file




* ERT Selectors

  I see a little namespace problem coming up.  Imagine testing org.el.
  Which ert selector would we use?
  
  "^org" ???  :-/

  Should we create hashes of filenames as selectors (just kidding)?
  Or use the entire filename "^org.el"?  The relative path
  "^lisp/org.el"? 






* About the directory structure:

  It does not burden the user, as tests are loaded and executed
  automatically (per function, per file or all, depending on the command
  used).  But imagine the entire thing grows and someone would add tests
  for all the stuff in emacs/lisp/.  Or add tests files for single
  functions simply because there is so much to test that one file would
  be hard to handle.
  This could cause a lot of clutter.

  Is this too hypothetical?  Hmmm - it might be...

  If you checkout ert-testing, eval testing/org-test.el and do

 M-x org-test-edit-buffer-file-tests

  you're in your test file in the correct directory (which is created if
  it doesn't exist).

 M-x org-test-edit-current-defuns-tests

  creates a file named after the defun you're in.  You'll need to be in
  an elisp file of course.  The testing/ directory will resemble the
  directory structure of the project.

  Every one who saw that directory structure simply asked "don't you
  think it's overkill?" :D  I'll probably drop that.

  

  We could go on on two rails for a while.  I'll need this week to dig
  deeper into ERT and come to conclusions.

  It would be a good thing if we could agree about the keys and the
  selectors (again: "^org"), so that it's painless to switch branches ;)






  Sebastian

___
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] How to modify org-export-latex-emphasis-alist

2010-10-03 Thread Sebastian Rose
"Thomas S. Dye"  writes:
> Aloha all,
>
> I use this patch locally to let the LaTeX url package typeset and break lines 
> in
> long path names.  Is there a way to make this change  from my .emacs, so I can
> continue to use the Org-mode master branch  and not my url branch?  Or, is 
> there
> a better way to implement this  without changing the Org-mode core?


Put this in your configuration file (.emacs probably):

(setq org-export-latex-emphasis-alist
  '(("*" "\\textbf{%s}" nil)
("/" "\\emph{%s}" nil)
("_" "\\underline{%s}" nil)
("+" "\\st{%s}" nil)
("=" "\\url{%s}" nil)
("~" "\\verb" t)))


HTH

   Sebastian


> Changes from master to url
>   Modified lisp/org-latex.el
> diff --git a/lisp/org-latex.el b/lisp/org-latex.el
> index 9a62457..920591a 100644
> --- a/lisp/org-latex.el
> +++ b/lisp/org-latex.el
> @@ -230,7 +230,7 @@ are written as utf8 files."
>  ("/" "\\emph{%s}" nil)
>  ("_" "\\underline{%s}" nil)
>  ("+" "\\st{%s}" nil)
> -("=" "\\verb" t)
> +("=" "\\url{%s}" nil)
>  ("~" "\\verb" t))
>"Alist of LaTeX expressions to convert emphasis fontifiers.
>  Each element of the list is a list of three elements.
>
> All the best,
> Tom
>

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


Re: [Orgmode] [PATCH] Fix dangling clocks created by org-clock-out-hook clocking in again

2010-10-03 Thread Bernt Hansen
Hi Carsten,

Sure - although I think my patch is already against origin/master that
is up to date.

It's available at git://git.norang.ca/org-mode.git fixup-dangling-clock

Let me know if you want the patch reposted to the mailing list.

Regards,
Bernt


Carsten Dominik  writes:

> Hi Bernt,
>
> I am having some problem here with the patches - could you please make
> me a new patch against the current master?
>
> Thanks!
>
> - Carsten
>
> On Oct 3, 2010, at 5:52 PM, Bernt Hansen wrote:
>
>> This is a fixup patch to commit
>> 17c71a40c6d07baae2e9cac606668683ddb3759c.  The org-clock-clocking-in
>> variable needs to be set when we are clocking out - in case the clock
>> out hook clocks-in again.  This fixes a bug that creates dangling
>> clock entries.
>> ---
>> lisp/org-clock.el |3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/lisp/org-clock.el b/lisp/org-clock.el
>> index 5b4b39c..c6f05fc 100644
>> --- a/lisp/org-clock.el
>> +++ b/lisp/org-clock.el
>> @@ -975,7 +975,8 @@ the clocking selection, associated with the
>> letter `d'."
>>  (move-marker org-clock-interrupted-task
>>   (marker-position org-clock-marker)
>>   (marker-buffer org-clock-marker))
>> -(org-clock-out t))
>> +(let ((org-clock-clocking-in t))
>> +  (org-clock-out t)))
>>
>>   (when (equal select '(16))
>>  ;; Mark as default clocking task
>> --
>> 1.7.3.1.50.g1e633
>>
>>
>> ___
>> 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] Latex exporter bug or feature?

2010-10-03 Thread Scot Becker
This is, if I remember right, a feature.  Or at least a known
limitation, a deliberate attempt to respect document structure.  Can
you perhaps get what you want by customizing org-export-latex-classes
to start the numbering already on heading level 4?  For example one of
it's 'stanzas' looks like this:

("article" "\\documentclass[11pt, a4paper]{article}"
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
  ("\\paragraph{%s}" . "\\paragraph*{%s}")
  ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))

So make a custom one that looks like this:

("myarticle" "\\documentclass[11pt, a4paper]{article}"
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))

... and make sure it gets added into the existing list of classes
properly.  i.e  correctly enclosed in parentheses.  This is untested.

Org-mode seems to hold pretty tightly to proper tree structure.  I
think you'll have to achieve what you want by some means other than
skipping a heading level


Scot

On Sun, Oct 3, 2010 at 11:55 AM, Indraneel Majumdar
 wrote:
>  Or am I doing something wrong?
>
> With
> #+OPTIONS H:5
>
> paragraphs are not exported if subsubsection is missing.
>
> eg. my orgfile:
>
> * Section
> ** Sub section
> 
>        My paragraph starts here...
>
>
> The paragraph is not exported. The reason I want H:5 is that this is the
> simplest way to obtain numbered paragraphs (I do not have to put
> \paragraph{} in front of every paragraph).
>
> Please help,
>
> Indraneel
>
> ___
> 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] non-frame text in beamer export

2010-10-03 Thread Neil Hepburn
Greetings

I have recently started using org-mode to generate Beamer presentations for 
lecture notes. I always create lecture note printouts for my students using the 
beamerarticle package. I like to put additional explanatory material into these 
notes that don't show up on the slide show. The way I do this is to put the 
extra material outside of a frame environment and then use the option 
[ignorenonframetext] in the latex header, i.e.,
\documentclass[ignorenonframetext]{beamer}

Is there a way to add extra material in an org file that it won't get put into 
a frame environment when I export the file?

Cheers,
Neil

=
Neil Hepburn, Lecturer in Economics
Department of Social Sciences, Augustana Faculty
University of Alberta
4901-46 Avenue
Camrose, Alberta  T4V 2R3

Phone (780) 679-1588
email nhepb...@ualberta.ca

No trees were harmed in creating this message. (However, millions of electrons 
were terribly disturbed.)


___
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] non-frame text in beamer export

2010-10-03 Thread Sebastian Rose
Neil Hepburn  writes:
> Greetings
>
> I have recently started using org-mode to generate Beamer
> presentations for lecture notes. I always create lecture note
> printouts for my students using the beamerarticle package. I like to
> put additional explanatory material into these notes that don't show
> up on the slide show. The way I do this is to put the extra material
> outside of a frame environment and then use the option
> [ignorenonframetext] in the latex header, i.e., 
> \documentclass[ignorenonframetext]{beamer}
>
> Is there a way to add extra material in an org file that it won't get
> put into a frame environment when I export the file? 


I never tried the beamer package.  But there is a workaround.  There are
the export options based on tags:

  #+EXPORT_SELECT_TAGS: export
  #+EXPORT_EXCLUDE_TAGS: noexport


You could just use the second one and toggle as needed:


 --8<---cut here---start->8--
#+EXPORT_EXCLUDE_TAGS: ignore

* This will be exported

**  This here not  :ignore:
This section is not exported because of the ignore tag.
 --8<---cut here---end--->8--



To create the print version, comment out the exclude tags line:


 --8<---cut here---start->8--
#  #+EXPORT_EXCLUDE_TAGS: ignore

* This will be exported

**  This here not  :ignore:
This section _is_ exported in spite of the ignore tag.
 --8<---cut here---end--->8--
 


Does that work?


  Sebastian

___
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] Latex exporter bug or feature?

2010-10-03 Thread Indraneel Majumdar
 Thanks, but it looks complex. Anyway, my problem is solved. I wrote a 
custom hook to strip out all the subsubsections during export. Latex 
doesn't care if subsubsections exist or not and neither do I if they 
have some unique name like "STRIP" that is easy to regexp. It also takes 
care of preventing accidental shifting of the first paragraph to some 
other heading level if I unknowingly press TAB.


Indraneel

On 2010-10-04 4:04, Scot Becker wrote:

This is, if I remember right, a feature.  Or at least a known
limitation, a deliberate attempt to respect document structure.  Can
you perhaps get what you want by customizing org-export-latex-classes
to start the numbering already on heading level 4?  For example one of
it's 'stanzas' looks like this:

("article" "\\documentclass[11pt, a4paper]{article}"
   ("\\section{%s}" . "\\section*{%s}")
   ("\\subsection{%s}" . "\\subsection*{%s}")
   ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
   ("\\paragraph{%s}" . "\\paragraph*{%s}")
   ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))

So make a custom one that looks like this:

("myarticle" "\\documentclass[11pt, a4paper]{article}"
   ("\\section{%s}" . "\\section*{%s}")
   ("\\subsection{%s}" . "\\subsection*{%s}")
   ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))

... and make sure it gets added into the existing list of classes
properly.  i.e  correctly enclosed in parentheses.  This is untested.

Org-mode seems to hold pretty tightly to proper tree structure.  I
think you'll have to achieve what you want by some means other than
skipping a heading level


Scot

On Sun, Oct 3, 2010 at 11:55 AM, Indraneel Majumdar
  wrote:

  Or am I doing something wrong?

With
#+OPTIONS H:5

paragraphs are not exported if subsubsection is missing.

eg. my orgfile:

* Section
** Sub section

My paragraph starts here...


The paragraph is not exported. The reason I want H:5 is that this is the
simplest way to obtain numbered paragraphs (I do not have to put
\paragraph{} in front of every paragraph).

Please help,

Indraneel

___
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



___
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] Best way to embed an svg file in an exported xhtml page?

2010-10-03 Thread Bryan Emrys
Hello all,

I'm exporting an org page to xhtml and I'm trying to show an svg file in an
xhtml page the same way that a png file can be shown. So far, my efforts
have only succeeded in getting a link to the svg file on the page.

I can hand input  and have it appear (at least in firefox,
opera and chromium. (Don't have a copy of IE to test), but obviously I'd
rather just have org-mode export it directly.

Suggestions?

Bryan
___
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] arranging and publishing music with Org-mode and lilypond

2010-10-03 Thread T.F. Torrey
Hello,

> From: Stefan Vollmar 
> Date: Sun, 03 Oct 2010 00:26:39 +0200
> To: emacs org-mode mailing list 
> X-Mailer: Apple Mail (2.1081)
> X-detected-operating-system: by eggs.gnu.org: Solaris 9
> Subject: [Orgmode] arranging and publishing music with Org-mode and lilypond
> Sender: emacs-orgmode-bounces+tftorrey=tftorrey@gnu.org
> 
> Dear all,
> 
> I believe that many members of this list with an interest in music 
> (notation/composition) might find the http://lilypond.org project "addictive" 
> (in the nicest possible manner): the concept is rather similar to writing 
> TeX, there is very good Emacs support (if you know where to look), it is all 
> OpenSource, there is extensive documentation (in LaTeX format with embedded 
> lilypond snippets), the print quality is excellent.
> 
> I mention this because while arranging some piece of music recently, I 
> noticed that Org-mode might be helpful in this context - it is probably 
> already possible by tweaking org-babel a bit: lilypond encourages the user to 
> structure music in a way that lends itself rather naturally to processing 
> with Org-mode - you can assign a theme, a few bar with notes or even whole 
> voices to variables and use them repeatedly. And imagine using Org-mode's 
> outline capabilities to structure a piece of music. Exporting an org-file 
> with lilypond-snippets in it to PDF or HTML might also be an interesting 
> option.
> 
> I have not yet put any effort into it and just wanted to find out if anybody 
> apart from me finds the combination of Org-mode and lilypond (potentially) 
> exciting.

I think this is very exciting.

Best regards,
Terry

> Warm regards,
>  Stefan
> -- 
> Dr. Stefan Vollmar, Dipl.-Phys.
> Head of IT group
> Max-Planck-Institut für neurologische Forschung
> Gleuelerstr. 50, 50931 Köln, Germany
> Tel.: +49-221-4726-213  FAX +49-221-4726-298
> Tel.: +49-221-478-5713  Mobile: 0160-93874279
> Email: voll...@nf.mpg.de   http://www.nf.mpg.de
> 
> 
> 
> 
> 
> 
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

___
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: Testing --- again...

2010-10-03 Thread Eric Schulte
Hi,

I've taken the liberty of merging our two testing branches into the new
"combined-testing" branch.  This now includes both ert and jump.el as
git submodules, which can be installed with

  git submodule init
  git submodule update

after checking out the branch.  In merging the two org-test.el files, I
was able to remove much of the existing code through using which-func,
jump.el.  The new navigation functionality will work regardless of the
directory structure, so tests for file

  lisp/org-foo.el

can be located in either of the following

  testing/lisp/test-org-foo.el
  testing/lisp/org-foo.el/test.el

Additionally the navigation functions defined in jump.el should be
easily extensible to accommodate new naming schemas, so ideally every
test author for a particular file can use whatever naming system they
prefer.  Note that the navigation function `org-test-jump' when called
with a prefix argument uses your code from
`org-test-edit-buffer-file-tests' to create the test file if it is not
already present.

I think I retained most of the functionality from your version of
org-test.el in the merge but please let me know if I broke something.
In my mind this merged version should be small clean and maintainable
and hopefully flexible enough to handle whatever needs we identify
during the course of writing the tests.  How would you feel about using
this as the new base of test development?

Best -- Eric

also I have some inline comments below

Sebastian Rose  writes:

> "Eric Schulte"  writes:
>> "Eric Schulte"  writes:
>> To illustrate my suggestions, I've thrown together a couple simple Babel
>> tests roughly following this outline, currently up in the
>> `schulte-testing' branch of the Org-mode repo.
>>
>> To try it out
>> 1) load the testing/org-test.el file
>> 2) run `org-load-tests' to load up the entire org-mode test suite
>> 3) run `ert' to run the test suite.
>> 4) or jump to the definition of `org-babel-get-src-block-info' and run
>>`org-test-current-function' to just run the tests for that function
>>
>> Best -- Eric
>
> Yes.  I know how running tests looks like:  It looks good :)
>
> Hahaa, I like that code.  It looks so simple :)
>
>
> To load all files below testing/  is a good suggestion probably.  The
> unloading and loading as I implemented it is simply superfluous, if we
> suggest that testers no how to eval a buffer or defun (and if they can
> change it, they can eval it).
>
>
>
> * Question:
>
>   (defun org-test-current-function ()
> "Test the current function."
> (interactive)
> (ert (car (which-function
>   
>   `org-test-test-current-defun' in the ert-testing branch does that, too.
>   (But with that superfluous loading/unloading stuff though :-/) But it
>   encloses each test inside save-excursion and Co.
>   

I believe ert takes care of the save-excursion stuff

>   
>   What does which-func.el that this function does not:
>   
>   <#part type="application/emacs-lisp" disposition=inline>
>   (defun org-test-which-func ()
> "Return the name of the current defun."
> (save-excursion
>   (save-match-data
> (end-of-line)
> (beginning-of-defun)
> (if (looking-at "(defun[[:space:]]+\\([^([:space:]]*\\)[[:space:]]*(")
>   (match-string-no-properties 1)
>   (error "No defun found around point.")
>   <#/part>
>   
>   ??
>

I'm not sure that it does include anything new, but it's nice to re-use
existing packages.

>
>
>
> * Keymap
>
>   We should add keys to the org-mode-map.
>   
>C-c t
>   
>   is still free here.  Or is it in you use it for babel somehow?
>   
>C-c t f org-test-test-current-function
>C-c t b org-test-test-current-buffer-file
>
>

Wouldn't we want the keys in the elisp-mode key map, since we'll be
doing the testing work from elisp?  Although I guess we may want to run
tests from within Org-mode files, but then we could do that with a Babel
block and dump the results to a table. :)

>
>
>
> * ERT Selectors
>
>   I see a little namespace problem coming up.  Imagine testing org.el.
>   Which ert selector would we use?
>   
>   "^org" ???  :-/
>
>   Should we create hashes of filenames as selectors (just kidding)?
>   Or use the entire filename "^org.el"?  The relative path
>   "^lisp/org.el"? 
>

oh, good point, maybe we'd need to use the "eql" or "tag" ert selectors
in this case.

>
>
>
> * About the directory structure:
>
>   It does not burden the user, as tests are loaded and executed
>   automatically (per function, per file or all, depending on the command
>   used).  But imagine the entire thing grows and someone would add tests
>   for all the stuff in emacs/lisp/.  Or add tests files for single
>   functions simply because there is so much to test that one file would
>   be hard to handle.
>   This could cause a lot of clutter.
>
>   Is this too hypothetical?  Hmmm - it might be...
>
>   If you checkout ert-testing, eval testing/org-test.el and do
>
>  M-x org-test-ed

Re: [Orgmode] ELPA Howto

2010-10-03 Thread Eric Schulte
Hi Jambunathan,

Jambunathan K  writes:

> Hello Eric
>
> "Eric Schulte"  writes:
>> Jambunathan K  writes:
>>
[...]
>>>
>>> ELPA Server-side setup:
>>>
>>
>> I think we can ignore the server-side setup, since that should be
>> handled by the elpa server at tromney or gnu.org.  Is this correct?
>>
>> [...]
>>
>
> One could host packages on http://orgmode.org, In that case my notes
> will serve as a good starting point.
>
> Btw hosting the packages (also) on orgmode would give better control and
> distribution.
>

Oh, that's a great point.  How would the maintainers of orgmode.org feel
about using it to host packages through ELPA?

-- Eric

___
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] Best way to embed an svg file in an exported xhtml page?

2010-10-03 Thread Eric Schulte
Hi Bryan,

I have the following in my config which works for me

  (add-to-list 'org-export-html-inline-image-extensions "svg")

Best -- Eric

Bryan Emrys  writes:

> Hello all,
>
> I'm exporting an org page to xhtml and I'm trying to show an svg file in an
> xhtml page the same way that a png file can be shown. So far, my efforts
> have only succeeded in getting a link to the svg file on the page.
>
> I can hand input   width="300" height="300"> and have it appear (at least in firefox,
> opera and chromium. (Don't have a copy of IE to test), but obviously I'd
> rather just have org-mode export it directly.
>
> Suggestions?
>
> Bryan
> ___
> 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] arranging and publishing music with Org-mode and lilypond

2010-10-03 Thread John Hendy
On Sun, Oct 3, 2010 at 8:24 PM, T.F. Torrey  wrote:

> Hello,
>
> > From: Stefan Vollmar 
> > Date: Sun, 03 Oct 2010 00:26:39 +0200
> > To: emacs org-mode mailing list 
> > X-Mailer: Apple Mail (2.1081)
> > X-detected-operating-system: by eggs.gnu.org: Solaris 9
> > Subject: [Orgmode] arranging and publishing music with Org-mode and
> lilypond
> > Sender: emacs-orgmode-bounces+tftorrey=tftorrey@gnu.org
> >
> > Dear all,
> >
> > I believe that many members of this list with an interest in music
> (notation/composition) might find the http://lilypond.org project
> "addictive" (in the nicest possible manner): the concept is rather similar
> to writing TeX, there is very good Emacs support (if you know where to
> look), it is all OpenSource, there is extensive documentation (in LaTeX
> format with embedded lilypond snippets), the print quality is excellent.
> >
> > I mention this because while arranging some piece of music recently, I
> noticed that Org-mode might be helpful in this context - it is probably
> already possible by tweaking org-babel a bit: lilypond encourages the user
> to structure music in a way that lends itself rather naturally to processing
> with Org-mode - you can assign a theme, a few bar with notes or even whole
> voices to variables and use them repeatedly. And imagine using Org-mode's
> outline capabilities to structure a piece of music. Exporting an org-file
> with lilypond-snippets in it to PDF or HTML might also be an interesting
> option.
> >
> > I have not yet put any effort into it and just wanted to find out if
> anybody apart from me finds the combination of Org-mode and lilypond
> (potentially) exciting.
>
> I think this is very exciting.
>

Agreed! I've used Lilypond before and it's *awesome.* It's pretty much as
cool as LaTeX in my opinion. Write some text, export and holy crap you've
got magically beautiful sheet music! I had not thought of Org-mode
integration, but that would indeed be quite nifty.

John


>
> Best regards,
> Terry
>
> > Warm regards,
> >  Stefan
> > --
> > Dr. Stefan Vollmar, Dipl.-Phys.
> > Head of IT group
> > Max-Planck-Institut für neurologische Forschung
> > Gleuelerstr. 50, 50931 Köln, Germany
> > Tel.: +49-221-4726-213  FAX +49-221-4726-298
> > Tel.: +49-221-478-5713  Mobile: 0160-93874279
> > Email: voll...@nf.mpg.de   http://www.nf.mpg.de
> >
> >
> >
> >
> >
> >
> > ___
> > Emacs-orgmode mailing list
> > Please use `Reply All' to send replies to the list.
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> ___
> 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: Bug: subtree export fails with src block

2010-10-03 Thread Giovanni Moretti
I'm just starting with Babel and have been puzzled about why one file
worked and another didn't.

I have been playing in a new file without any headers at all (no lines
starting with '*') and while I could execute the code in the buffer,
exporting to HTML always failed with:

   No such file: c:/org/babel-python-test.org::

When searching, I found this thread and wondered if the heading were
important. It turns out they are. In the block below, exporting to HTML
fails if the first line isn't a heading.

This seems like a clue ...

Cheers and thanks
Giovanni

PS: the BOTH option for :export is hard to find - only :export none is in
the intro page.

===
* Python Babel test

Now let's see what happens:

#+begin_src python :results output :exports both
print "Babel"
limits = [1,2,3,4,5,6,7,8,9,10]

for i in limits:
  print "Hello" * i
#+end_src python



___
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: Testing --- again...

2010-10-03 Thread Sebastian Rose
"Eric Schulte"  writes:
> Hi,
>
> I've taken the liberty of merging our two testing branches into the new
> "combined-testing" branch.  This now includes both ert and jump.el as
> git submodules, which can be installed with
>
>   git submodule init
>   git submodule update
>
> after checking out the branch.  In merging the two org-test.el files, I
> was able to remove much of the existing code through using which-func,
> jump.el.  The new navigation functionality will work regardless of the
> directory structure, so tests for file
>
>   lisp/org-foo.el
>
> can be located in either of the following
>
>   testing/lisp/test-org-foo.el
>   testing/lisp/org-foo.el/test.el
>
> Additionally the navigation functions defined in jump.el should be
> easily extensible to accommodate new naming schemas, so ideally every
> test author for a particular file can use whatever naming system they
> prefer.  Note that the navigation function `org-test-jump' when called
> with a prefix argument uses your code from
> `org-test-edit-buffer-file-tests' to create the test file if it is not
> already present.
>
> I think I retained most of the functionality from your version of
> org-test.el in the merge but please let me know if I broke something.
> In my mind this merged version should be small clean and maintainable
> and hopefully flexible enough to handle whatever needs we identify
> during the course of writing the tests.  How would you feel about using
> this as the new base of test development?
>
> Best -- Eric
>
> also I have some inline comments below


Hi Eric,


that's good news!


> Sebastian Rose  writes:
>>   What does which-func.el that this function does not:
>>   
>>   <#part type="application/emacs-lisp" disposition=inline>
>>   (defun org-test-which-func ()
>> "Return the name of the current defun."
>> (save-excursion
>>   (save-match-data
>> (end-of-line)
>> (beginning-of-defun)
>> (if (looking-at 
>> "(defun[[:space:]]+\\([^([:space:]]*\\)[[:space:]]*(")
>>   (match-string-no-properties 1)
>>   (error "No defun found around point.")
>>   <#/part>
>>   
>>   ??
>>
>
> I'm not sure that it does include anything new, but it's nice to re-use
> existing packages.


And a dependency.


>
>> * Keymap
>>
>>   We should add keys to the org-mode-map.
>>   
>>C-c t
>>   
>>   is still free here.  Or is it in you use it for babel somehow?
>>   
>>C-c t f org-test-test-current-function
>>C-c t b org-test-test-current-buffer-file
>>
>>
>
> Wouldn't we want the keys in the elisp-mode key map, since we'll be
> doing the testing work from elisp?

Errrmmm, yes, we definetively want the keys in the emacs-lisp key map :)


>  Although I guess we may want to run
> tests from within Org-mode files, but then we could do that with a Babel
> block and dump the results to a table. :)

Ho ho ho ho ho!



>> * ERT Selectors
>>
>>   I see a little namespace problem coming up.  Imagine testing org.el.
>>   Which ert selector would we use?
>>   
>>   "^org" ???  :-/
>>
>>   Should we create hashes of filenames as selectors (just kidding)?
>>   Or use the entire filename "^org.el"?  The relative path
>>   "^lisp/org.el"? 
>>
>
> oh, good point, maybe we'd need to use the "eql" or "tag" ert selectors
> in this case.



It's a flaw in Org's namespace actually.  A defun's name in org.el could
clash with the name of a defun in another file in org-mode/lisp/.
The defun `org-imenu-get-tree' in org.el could clash with a defun with
that very name in a new file "org-imenu.el".

I guess we'll have to handle org.el in a special way.



>>   If you checkout ert-testing, eval testing/org-test.el and do
>>
>>  M-x org-test-edit-buffer-file-tests
>>
>
> In the combined-testing branch you'd do this by calling org-test-jump
> with a prefix argument.


Perfect.



>>   Every one who saw that directory structure simply asked "don't you
>>   think it's overkill?" :D  I'll probably drop that.
>>
>
> heh, yea I'd lean towards getting into the writing of tests and then
> leaving our implementation flexible enough so that we can adopt this
> more fine-grained directory structure when/if it becomes necessary.


Eric, so just let's skip the directory structure.  We could always
enforce something like that once we feel it's necessary.

We just want some reliable way to load the sensible tests (for a defun,
file, module or whatever) and execute them with just a key stroke.

Adding new tests for an existing elisp file should be just as easy.

As jump.el and which-func.el do part of that job reliably it's perfectly
fine to go that way.




  Sebastian

___
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] Removed unecessary invocations of org-agenda-show.

2010-10-03 Thread Carsten Dominik


On Sep 16, 2010, at 6:22 AM, Matthew Lundin wrote:


Hi Carsten,

Carsten Dominik  writes:


On Sep 13, 2010, at 6:48 PM, Matt Lundin wrote:



lisp/org-agenda.el (org-agenda-set-tags): Remove org-agenda-show to
prevent
disrupting windows and changing point in original buffer.
(org-agenda-set-property): Same
(org-agenda-set-effort): Same
(org-agenda-toggle-archive-tag): Same

When setting a tag in the agenda, org-mode displays the  
corresponding
entry in the original org buffer by calling org-agenda-show. This  
has
the unwelcome side-effect of disrupting the current window  
arrangement

and changing the position of the point in the original buffer. This
behavior is inconsistent with the that of org-agenda-todo, which  
makes

all its changes "silently."


I agree, but I am sure I used to have problems with something
which is why this was added.
Have you been running this patch for some time already?
Without any problems like the agenda jumping to a wrong place in a  
org

file or so?


I haven't yet encountered any deleterious side effects, but I agree  
that

this patch needs further consideration. I will do some additional
research/testing and return with a report. :)


Hi Matt,

any new about this patch?

Thanks

- 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] Fix dangling clocks created by org-clock-out-hook clocking in again

2010-10-03 Thread Carsten Dominik


On Oct 3, 2010, at 11:53 PM, Bernt Hansen wrote:


Hi Carsten,

Sure - although I think my patch is already against origin/master that
is up to date.

It's available at git://git.norang.ca/org-mode.git fixup-dangling- 
clock


Ok, this worked without problems.  Thanks!



Let me know if you want the patch reposted to the mailing list.


No, this is OK  now.

Kind regards

- Carsten




Regards,
Bernt


Carsten Dominik  writes:


Hi Bernt,

I am having some problem here with the patches - could you please  
make

me a new patch against the current master?

Thanks!

- Carsten

On Oct 3, 2010, at 5:52 PM, Bernt Hansen wrote:


This is a fixup patch to commit
17c71a40c6d07baae2e9cac606668683ddb3759c.  The org-clock-clocking-in
variable needs to be set when we are clocking out - in case the  
clock

out hook clocks-in again.  This fixes a bug that creates dangling
clock entries.
---
lisp/org-clock.el |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 5b4b39c..c6f05fc 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -975,7 +975,8 @@ the clocking selection, associated with the
letter `d'."
(move-marker org-clock-interrupted-task
 (marker-position org-clock-marker)
 (marker-buffer org-clock-marker))
-   (org-clock-out t))
+   (let ((org-clock-clocking-in t))
+ (org-clock-out t)))

 (when (equal select '(16))
;; Mark as default clocking task
--
1.7.3.1.50.g1e633


___
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