[Orgmode] Emacs 24.0.50.1 & problem to export to HTML

2010-08-22 Thread Emmanuel Di Pretoro
Hi,

I've compiled my own emacs based on the git repository, but with this
version of emacs, I can't export anymore to HTML. The error message is
« face-attribute: Invalid face: off ». So the problem is related to
htmlize.el (so my excuses for this non strictly orgmode post). Anybody has
faced this problem? Is there a solution?

Thanks in advance

Emmanuel Di Pretoro
___
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] Emacs 24.0.50.1 & problem to export to HTML

2010-08-22 Thread Carsten Dominik


On Aug 22, 2010, at 11:00 AM, Emmanuel Di Pretoro wrote:


Hi,

I've compiled my own emacs based on the git repository, but with  
this version of emacs, I can't export anymore to HTML. The error  
message is « face-attribute: Invalid face: off ». So the problem is  
related to htmlize.el (so my excuses for this non strictly orgmode  
post). Anybody has faced this problem? Is there a solution?


Org-mode comes with a patches version of htmlize.el, have you tried to  
make sure this is the one you use?


- Carsten



Thanks in advance

Emmanuel Di Pretoro
___
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] [Bug] : org-agenda-time-grid (was: Setting org-agenda-time-grid: My day starts at midnight)

2010-08-22 Thread Memnon Anon
Okay, resend in a more concise way.

! Problem:
,
| (setq org-agenda-time-grid (quote 
|   ((daily weekly today require-timed) "" 
|   ( 000 200 400 600 800 1000 1200 1400 1600 1800 2000 2200 2359
`
-> args-out-of-range!

! Reason:
,[ org-agenda-add-time-grid-maybe ]
|   (while (setq time (pop gridtimes))
|   (unless (and remove (member time have))
| =>  (setq time (int-to-string time))
| (push (org-format-agenda-item
|nil string "" nil
| => (concat (substring time 0 -2) ":" (substring time -2)))
|   new)
| (put-text-property
|  1 (length (car new)) 'face 'org-time-grid (car new
`

,[ Analysis ]
| (setq time (int-to-string time)) => time= "0", so
| (substring time 0 -2) => args-out-of-range.
`

! Possible Fix:
,
|   (unless (and remove (member time have))
| (setq time (int-to-string time))
| ;;MAN make sure time is at least 3 characters long or substring will fail
+ =>  (when (< (length time) 3) (setq time (concat "00" time)))  
| (push (org-format-agenda-item
`

! Questions:
,
| a) Will this break anything I am not aware of yet?
| b) Is there a better way to achieve this?
`

Memnon Anon

___
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


AW: [Orgmode] Emacs 24.0.50.1 & problem to export to HTML

2010-08-22 Thread Martin Stemplinger
I can’t reproduce this with emacs 24.0.50.1 from last week on Windows. I use
the org-version that comes with it.

Regards
Martin

Von: emacs-orgmode-bounces+mstemplinger=gmx...@gnu.org
[mailto:emacs-orgmode-bounces+mstemplinger=gmx...@gnu.org] Im Auftrag von
Emmanuel Di Pretoro
Gesendet: Sonntag, 22. August 2010 11:01
An: emacs-orgmode@gnu.org
Betreff: [Orgmode] Emacs 24.0.50.1 & problem to export to HTML

Hi,

I've compiled my own emacs based on the git repository, but with this
version of emacs, I can't export anymore to HTML. The error message is
« face-attribute: Invalid face: off ». So the problem is related to
htmlize.el (so my excuses for this non strictly orgmode post). Anybody has
faced this problem? Is there a solution? 

Thanks in advance

Emmanuel Di Pretoro


___
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] Mark your Calendars: Carsten will be on the FLOSS Weekly

2010-08-22 Thread Anupam Sengupta

Hello fellow Org-mode users,

Carsten is going to be the guest on the FLOSS weekly podcast on 22nd
September.  Link to the show:

http://www.twit.tv/floss

Carsten, Looking forward to the show!

Best Regards,
-- 
Anupam


___
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: [SOLVED] [org-babel] References Not Expanding

2010-08-22 Thread aditya siram
The function that loads the code block into the interpreter
org-babel-load-in-session does not do noweb reference expansion.

I have included a git patch that adds that functionality.

-deech

On Sat, Aug 21, 2010 at 4:42 PM, aditya siram wrote:

> Hi all,
> I have the development version of org-mode and org-babel noweb style
> references are not expanding during evaluation, they are instead copied
> literally into the temp file. They seem to expand fine when tangling. Here
> is file that is failing:
> * Root
> #+begin_src haskell :noweb yes :tangle Main.hs
>   <>
>   <>
>   main = print $ test [1,2,3]
> #+end_src
>
> * Imports
> #+srcname: Imports
> #+begin_src haskell
>   import Control.Monad.State
> #+end_src
>
> * Append Function
> #+srcname: Test
> #+begin_src haskell
>   test = length
> #+end_src
>
> I have tried unsuccessfully to make "Imports" and "Append Function"
> children of "Root".
>
> Thanks!
> -deech
>
From ce26be443438325bb985488bddc784432e97 Mon Sep 17 00:00:00 2001
From: Aditya Siram 
Date: Sun, 22 Aug 2010 16:12:17 -0500
Subject: [PATCH] Noweb style references are now expanded with loading a code block in a session.

---
 lisp/ob.el |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/lisp/ob.el b/lisp/ob.el
index 8557f09..2ecc1db 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -421,8 +421,12 @@ session."
   (interactive)
   (let* ((info (or info (org-babel-get-src-block-info)))
  (lang (nth 0 info))
- (body (nth 1 info))
  (params (nth 2 info))
+ (body (setf (nth 1 info)
+		 (if (and (cdr (assoc :noweb params))
+  (string= "yes" (cdr (assoc :noweb params
+ (org-babel-expand-noweb-references info)
+		   (nth 1 info
  (session (cdr (assoc :session params)))
 	 (dir (cdr (assoc :dir params)))
 	 (default-directory
-- 
1.7.0.4

___
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: [SOLVED] [org-babel] References Not Expanding

2010-08-22 Thread aditya siram
The last patch is formatted for email. Here's the correct one. Sorry.
-deech

On Sun, Aug 22, 2010 at 4:21 PM, aditya siram wrote:

> The function that loads the code block into the interpreter
> org-babel-load-in-session does not do noweb reference expansion.
>
> I have included a git patch that adds that functionality.
>
> -deech
>
>
> On Sat, Aug 21, 2010 at 4:42 PM, aditya siram wrote:
>
>> Hi all,
>> I have the development version of org-mode and org-babel noweb style
>> references are not expanding during evaluation, they are instead copied
>> literally into the temp file. They seem to expand fine when tangling. Here
>> is file that is failing:
>> * Root
>> #+begin_src haskell :noweb yes :tangle Main.hs
>>   <>
>>   <>
>>   main = print $ test [1,2,3]
>> #+end_src
>>
>> * Imports
>> #+srcname: Imports
>> #+begin_src haskell
>>   import Control.Monad.State
>> #+end_src
>>
>> * Append Function
>> #+srcname: Test
>> #+begin_src haskell
>>   test = length
>> #+end_src
>>
>> I have tried unsuccessfully to make "Imports" and "Append Function"
>> children of "Root".
>>
>> Thanks!
>> -deech
>>
>
>
commit ce26be443438325bb985488bddc784432e97
Author: Aditya Siram 
Date:   Sun Aug 22 16:12:17 2010 -0500

Noweb style references are now expanded with loading a code block in a session.

diff --git a/lisp/ob.el b/lisp/ob.el
index 8557f09..2ecc1db 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -421,8 +421,12 @@ session."
   (interactive)
   (let* ((info (or info (org-babel-get-src-block-info)))
  (lang (nth 0 info))
- (body (nth 1 info))
  (params (nth 2 info))
+ (body (setf (nth 1 info)
+		 (if (and (cdr (assoc :noweb params))
+  (string= "yes" (cdr (assoc :noweb params
+ (org-babel-expand-noweb-references info)
+		   (nth 1 info
  (session (cdr (assoc :session params)))
 	 (dir (cdr (assoc :dir params)))
 	 (default-directory
___
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] org-store-link: Return link when invoked from within agenda buffer

2010-08-22 Thread Jambunathan K

Summary: 

When I trigger a org-capture, with the cursor positioned on a line in
the agenda buffer, I want the link to the agenda entry to be available
as an annotation (%a) to the capture process. Currently this is broken.

The enclosed patch fixes this.

Setup:

# file todo.org
* TODO Talk to someone
   SCHEDULED: <2010-08-23 Mon>

# org-capture-templates
 ("z" "Conversation" entry
  (file+headline "~/conversation.org" "Conversations")
  "** Note taken on %U\n   %a\n   %?" :prepend t :empty-lines 1)

Steps for reporduction:

1. Restrict agenda to todo.org
2. Do org-agenda
3. Place the cursor on the above todo line
4. Trigger an org-capture for the above capture entry

Examine the entries in conversation.org before/after the patch is
applied. Note the absence/presence of the link to the parent todo entry.

* Conversations

** Note taken on [2010-08-23 Mon 03:58]
   [[file:~/todo.org::*Talk%20to%20someone][Talk to someone]]

** Note taken on [2010-08-23 Mon 03:42]

Jambunathan K.


<#part type="text/plain" 
buffer=0001-org-store-link-Return-link-when-invoked-from-within-.patch 
disposition=inline>
<#/part>


___
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] org-store-link: Fix storing of links to headlines in indirect buffers

2010-08-22 Thread Jambunathan K

Summary: 

When org-store-link is invoked on a headline in indirect buffer (as in a
capture buffer), hyperlink gets created to the file and NOT the
headline. This is a bug.

The attached patch fixes this.

Setup:

# ~/.emacs

(defun my-conversation-id ()
  (interactive)

  (remove-hook 'org-capture-before-finalize-hook 'my-conversation-id)

  (let ((org-link-to-org-use-id t))
(call-interactively 'org-store-link)
)
  )


# org-capture-templates

 ("x" "Conversations" entry
  (file+headline "~/conversation.org" "Conversations")
  "%(progn (add-hook 'org-capture-before-finalize-hook 'my-conversation-id) 
\"\")** Note taken on %U\n   %?  " :prepend t :empty-lines 1)

Steps for reproduction:

Trigger org-capture for the above capture entry.

Examine conversation.org before/after the patch is applied. Note the
absence/presence of IDs for the captured entry. 

Check for the stored links using C-c C-l. Note the file/headline links.

# file conversation.org before and after the patch

* Conversations

** Note taken on [2010-08-23 Mon 04:33]
   :PROPERTIES:
   :ID:   7e1974a6-8fa1-43cf-bef3-2adf37d99130
   :END:

** Note taken on [2010-08-23 Mon 04:32]

# (org-insert-link) showing stored links before and after the patch

file:~/conversation.org (file:~/conversation.org)
id:7e1974a6-8fa1-43cf-bef3-2adf37d99130 (Note taken on [2010-08-23 Mon 04:33])


Jambunathan K.

>From 90628b45ee4d270b32f8a56618ca75ceb4a16b21 Mon Sep 17 00:00:00 2001
From: Jambunathan K 
Date: Mon, 23 Aug 2010 02:32:15 +0530
Subject: [PATCH 2/2] org-store-link: Fix storing of links to headlines in 
indirect buffers

* org.el (org-store-link): Storing of links to headlines in indirect
buffers was broken.  Fix it.

TINYCHANGE
---
 lisp/org.el |   11 +++
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 5db7aab..15379ef 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8301,13 +8301,14 @@ For file links, arg negates 
`org-context-in-file-links'."
(setq cpltxt (concat "file:" file)
  link (org-make-link cpltxt
 
- ((and buffer-file-name (org-mode-p))
+ ((and (buffer-file-name (buffer-base-buffer)) (org-mode-p))
   (setq custom-id (ignore-errors (org-entry-get nil "CUSTOM_ID")))
   (cond
((org-in-regexp "<<\\(.*?\\)>>")
(setq cpltxt
  (concat "file:"
- (abbreviate-file-name buffer-file-name)
+ (abbreviate-file-name
+  (buffer-file-name (buffer-base-buffer)))
  "::" (match-string 1))
  link (org-make-link cpltxt)))
((and (featurep 'org-id)
@@ -8329,11 +8330,13 @@ For file links, arg negates 
`org-context-in-file-links'."
 (error
  ;; probably before first headline, link to file only
  (concat "file:"
- (abbreviate-file-name buffer-file-name))
+ (abbreviate-file-name
+  (buffer-file-name (buffer-base-buffer
(t
;; Just link to current headline
(setq cpltxt (concat "file:"
-(abbreviate-file-name buffer-file-name)))
+(abbreviate-file-name
+ (buffer-file-name (buffer-base-buffer)
;; Add a context search string
(when (org-xor org-context-in-file-links arg)
  (setq txt (cond
-- 
1.7.0.4

___
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] org-store-link: Return link when invoked from within agenda buffer

2010-08-22 Thread Jambunathan K

Summary: 

When I trigger a org-capture, with the cursor positioned on a line in
the agenda buffer, I want the link to the agenda entry to be available
as an annotation (%a) to the capture process. Currently this is broken.

The enclosed patch fixes this.

Setup:

# file todo.org
* TODO Talk to someone
   SCHEDULED: <2010-08-23 Mon>

# org-capture-templates
 ("z" "Conversation" entry
  (file+headline "~/conversation.org" "Conversations")
  "** Note taken on %U\n   %a\n   %?" :prepend t :empty-lines 1)

Steps for reporduction:

1. Restrict agenda to todo.org
2. Do org-agenda
3. Place the cursor on the above todo line
4. Trigger an org-capture for the above capture entry

Examine the entries in conversation.org before/after the patch is
applied. Note the absence/presence of the link to the parent todo entry.

* Conversations

** Note taken on [2010-08-23 Mon 03:58]
   [[file:~/todo.org::*Talk%20to%20someone][Talk to someone]]

** Note taken on [2010-08-23 Mon 03:42]

Jambunathan K.


<#part type="text/plain" 
buffer=0001-org-store-link-Return-link-when-invoked-from-within-.patch 
disposition=inline>
<#/part>


___
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] org-store-link: Return link when invoked from within agenda buffer

2010-08-22 Thread Jambunathan K

Carsten, 

Sorry about multiple drops. This post *should* contain the patch.

Summary: 

When I trigger a org-capture, with the cursor positioned on a line in
the agenda buffer, I want the link to the agenda entry to be available
as an annotation (%a) to the capture process. Currently this is broken.

The enclosed patch fixes this.

Setup:

# file todo.org
* TODO Talk to someone
   SCHEDULED: <2010-08-23 Mon>

# org-capture-templates
 ("z" "Conversation" entry
  (file+headline "~/conversation.org" "Conversations")
  "** Note taken on %U\n   %a\n   %?" :prepend t :empty-lines 1)

Steps for reporduction:

1. Restrict agenda to todo.org
2. Do org-agenda
3. Place the cursor on the above todo line
4. Trigger an org-capture for the above capture entry

Examine the entries in conversation.org before/after the patch is
applied. Note the absence/presence of the link to the parent todo entry.

* Conversations

** Note taken on [2010-08-23 Mon 03:58]
   [[file:~/todo.org::*Talk%20to%20someone][Talk to someone]]

** Note taken on [2010-08-23 Mon 03:42]

Jambunathan K.

>From bcceabe70968416fb4540e32c68bfbda76820f9b Mon Sep 17 00:00:00 2001
From: Jambunathan K 
Date: Sun, 22 Aug 2010 23:36:52 +0530
Subject: [PATCH 1/2] org-store-link: Return link when invoked from within 
agenda buffer.

* org.el (org-store-link): Return link when invoked non-interactively from
an agenda buffer.

TINYCHANGE
---
 lisp/org.el |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 366c8dd..5db7aab 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8218,7 +8218,7 @@ For file links, arg negates `org-context-in-file-links'."
   (org-load-modules-maybe)
   (setq org-store-link-plist nil)  ; reset
   (let ((outline-regexp (org-get-limited-outline-regexp))
-   link cpltxt desc description search txt custom-id)
+   link cpltxt desc description search txt custom-id agenda-link)
 (cond
 
  ((run-hook-with-args-until-success 'org-store-link-functions)
@@ -8250,9 +8250,10 @@ For file links, arg negates `org-context-in-file-links'."
   (get-text-property (point) 'org-marker
(when m
  (org-with-point-at m
-   (if (interactive-p)
-   (call-interactively 'org-store-link)
- (org-store-link nil))
+   (setq agenda-link
+ (if (interactive-p)
+ (call-interactively 'org-store-link)
+   (org-store-link nil)))
 
  ((eq major-mode 'calendar-mode)
   (let ((cd (calendar-cursor-to-date)))
@@ -8389,7 +8390,7 @@ For file links, arg negates `org-context-in-file-links'."
   "::#" custom-id))
(setq org-stored-links
  (cons (list link desc) org-stored-links
-  (and link (org-make-link-string link desc)
+  (or agenda-link (and link (org-make-link-string link desc))
 
 (defun org-store-link-props (&rest plist)
   "Store link properties, extract names and addresses."
-- 
1.7.0.4

___
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] Emacs 24.0.50.1 & problem to export to HTML

2010-08-22 Thread Sebastian Rose
Emmanuel Di Pretoro  writes:
> Hi,
>
> I've compiled my own emacs based on the git repository, but with this
> version of emacs, I can't export anymore to HTML. The error message is
> « face-attribute: Invalid face: off ». So the problem is related to
> htmlize.el (so my excuses for this non strictly orgmode post). Anybody has
> faced this problem? Is there a solution?



I guess you should check your face definitions.  Something about faces
changed this summer in emacs-24, but I can't recall what it was.



I cannot reproduce this problem.

My emacs-24 is eight days old.


  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


[Orgmode] org-capture templates with file+olp target

2010-08-22 Thread Erik Iverson

Hello,

Using latest org-mode from git.

I'm trying to set up a simple org-capture template, to write
to a file test.org.  The first two lines below simply
define a path to some org mode file.

My confusion with the template is when I invoke org-capture --
I have it set to C-c c --, and then hit `t`, everything works
as I'd hope. (the file+headline target)

But when I hit `b`, (the file+olp target), I get an error,
which I can avoid by hardcoding the filename instead of using
the org-test-file variable in that case.  I get the error:

find-file-noselect: Wrong type argument: stringp, org-test-file

from the org-find-olp function in org.el.

I tried to debug, and it looks like that variable is not getting
evaluated for some reason.  I'm sure it's obvious to someone,
but is there a way around this?

Hardcoding the path is actually problematic, since my org
files are passed around various machines using git/Dropbox,
and therefore the path is different depending on where I
am located.

Below is the simplest example I could come up with, just
create a ~/test.org file and try it out.

  ;; a path to some org-files
  (setq org-test-path "/tmp")
  ;; a specific org-file
  (setq org-test-file (concat org-test-path "/test.org"))

  (setq org-capture-templates
'(("t" "Todo" entry (file+headline org-test-file "Tasks")
   "* TODO %?\n  %i\n  %a")
  ("b" "Buy" item (file+olp org-test-file "Stuff to Buy" "House")
   "")))

___
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-capture templates with file+olp target

2010-08-22 Thread Erik Iverson



Below is the simplest example I could come up with, just
create a ~/test.org file and try it out.


Oops, /tmp/test.org I suppose.

___
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