Re: [O] [bug] Captured item inserted in the wrong subtree

2011-08-13 Thread John Wiegley
David Maus  writes:

> Does this problem still persist after commit 
> 3771185caefc6d35c4ff0523bdbae878f3e92203?

It's all fixed now, thanks David!

John



Re: [O] Keeping an eye on byte-compilation warnings

2011-08-13 Thread David Maus
At Sat, 13 Aug 2011 16:49:50 -0500,
John Wiegley wrote:
>
> Maybe we're all using different versions of Emacs, but I find that
> byte-compilation warnings keep increasing as time goes by.  I'd like to ask
> people to compile their code before committing, to keep the build log clean.
> It looks messy when there are lots of unnecessary warnings.

+1

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


pgpS8wnCKnrLn.pgp
Description: PGP signature


Re: [O] [bug] Captured item inserted in the wrong subtree

2011-08-13 Thread David Maus
At Sat, 13 Aug 2011 16:26:25 -0500,
John Wiegley wrote:
>
> "Sebastien Vauban" 
> writes:
>
> > Since this morning's update -- though I think I did not update yesterday --,
> > I've a weird problem when capture some text through the standard template I
> > use for months.
>
> I'm having a similar problem, except that the capturing process now deletes
> the first heading after my * Inbox group, and inserts part of the following
> headline into my capture buffer, in addition to the new capture template.

Does this problem still persist after commit 
3771185caefc6d35c4ff0523bdbae878f3e92203?

,
| commit 3771185caefc6d35c4ff0523bdbae878f3e92203
| Author: David Maus 
| Date:   Sat Aug 13 15:02:03 2011 +0200
|
| Fix wrong order of lines to move before pasting
|
| * org.el (org-paste-subtree): Fix wrong order of lines to move before
| pasting.
`

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


pgpKIHxanmecb.pgp
Description: PGP signature


[O] Keeping an eye on byte-compilation warnings

2011-08-13 Thread John Wiegley
Maybe we're all using different versions of Emacs, but I find that
byte-compilation warnings keep increasing as time goes by.  I'd like to ask
people to compile their code before committing, to keep the build log clean.
It looks messy when there are lots of unnecessary warnings.

Here's what I'm seeing now:

--8<---cut here---start->8---
lisp/org.el:

  In end of data:
  org.el:20575:1:Warning: the following functions are not known to be defined:
  org-agenda-todo, org-find-invisible, org-find-visible
--8<---cut here---end--->8---

These represent a cyclic dependency.  Should org.el contain some autoload
forms during compilation?
  
--8<---cut here---start->8---
lisp/org-footnote.el:

  In org-footnote-in-valid-context-p:
  org-footnote.el:185:37:Warning: reference to free variable
  `message-cite-prefix-regexp'
  
  In end of data:
  org-footnote.el:869:1:Warning: the following functions are not known to be
  defined: message-point-in-header-p, org-icompleting-read
--8<---cut here---end--->8---

Is there a reason org-footnote doesn't just require org?

--8<---cut here---start->8---
lisp/org-list.el:

  In org-list-send-item:
  org-list.el:1456:56:Warning: Function `sort*' from cl package called at
  runtime
--8<---cut here---end--->8---

I've fixed this one in d24a141.  There was no reason to use sort* instead of
sort.

--8<---cut here---start->8---
lisp/org-table.el:

  In org-table-eval-formula:
  org-table.el:2437:23:Warning: assignment to free variable
  `duration-output-format'
  org-table.el:2557:34:Warning: reference to free variable
  `duration-output-format'
  
  In org-table-time-string-to-seconds:
  org-table.el:3252:11:Warning: assignment to free variable `minus'
  org-table.el:3257:13:Warning: reference to free variable `minus'
--8<---cut here---end--->8---

I think an empty defvar during compilation is in order here, and that minus is
simply missing from the `let'.

Thanks,
  John



Re: [O] [bug] Captured item inserted in the wrong subtree

2011-08-13 Thread John Wiegley
"Sebastien Vauban" 
writes:

> Since this morning's update -- though I think I did not update yesterday --,
> I've a weird problem when capture some text through the standard template I
> use for months.

I'm having a similar problem, except that the capturing process now deletes
the first heading after my * Inbox group, and inserts part of the following
headline into my capture buffer, in addition to the new capture template.

John



Re: [O] how to change the headline starter *

2011-08-13 Thread Matt Lundin
Matt Lundin  writes:

> Bastien  writes:
>
>> Attached is a patch that replaces instances of outline-regexp 
>> by org-outline-regexp.  It also introduces more harmonization.
>>
>> I'd be interesed in hearing about feedback.
>
> What is the primary reason to use a hard-coded org-outline-regexp and
> org-outline-regexp-bol instead of the buffer local outline-regexp? Is it
> to clear up any confusion about whether the header regexp can be
> customized? One of the negative effects is (as reported in another post)
> that one can no longer use org-global-cycle in other modes (e.g.,
> Auctex).

On further investigation, I can see very easily how much this cleans up
the code. Sorry for the noise!

> Perhaps for the relevant functions (e.g., org-overview) we could
> construct org-outline-regexp-bol from the a bound version of
> org-outline-regexp (i.e., one that uses the buffer local value of
> outline-regexp). 

> At the moment, this FAQ is obsolete:

> http://orgmode.org/worg/org-faq.html#use-visibility-cycling-in-outline-mode

I think the best approach here is to hard-code org-outline-regexp and
org-outline-regexp-bol (as you have done) but to make it more flexible
in the *few* instances where one would like to use visibility functions
in outline-mode. I've attached a simple patch that restores global
cycling in outline-mode buffers. 

I hope had a wonderful vacation!

Best,
Matt

>From 2361624ba5b6fb9a49ebfa55f0cfc7245488437e Mon Sep 17 00:00:00 2001
From: Matt Lundin 
Date: Sat, 13 Aug 2011 09:10:58 -0500
Subject: [PATCH] Allow org-cycle to work in outline buffers.

* lisp/org.el: (org-overview): Bind value of org-outline-regexp-bol
  locally, so as to use the value of org-outline-regexp, which is in
  turn locally bound to outline-regexp.
---
 lisp/org.el |   13 +++--
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index e407e81..ee5397c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6234,12 +6234,13 @@ of the first headline in the buffer.  This is important, because if the
 first headline is not level one, then (hide-sublevels 1) gives confusing
 results."
   (interactive)
-  (let ((level (save-excursion
-		 (goto-char (point-min))
-		 (if (re-search-forward org-outline-regexp-bol nil t)
-		 (progn
-		   (goto-char (match-beginning 0))
-		   (funcall outline-level))
+  (let* ((org-outline-regexp-bol (concat "^" org-outline-regexp))
+	 (level (save-excursion
+		  (goto-char (point-min))
+		  (if (re-search-forward org-outline-regexp-bol nil t)
+		  (progn
+			(goto-char (match-beginning 0))
+			(funcall outline-level))
 (and level (hide-sublevels level
 
 (defun org-content (&optional arg)
-- 
1.7.6



Re: [O] org-paste-subtree and org-refile broken

2011-08-13 Thread Matt Lundin
David Maus  writes:

> At Sat, 13 Aug 2011 09:25:19 +0200,
> David Maus wrote:
>>
>> Hi Matt,
>> Hi Sebastien,
>>
>> I pushed a temporary workaround to master that should fix the problem
>> with refile and capture. Both depend on a buggy behavior of
>> org-paste-subtree, i.e. pasting a subtree *above* the target headline
>> when called with point at the beginning of the target headline.
>
> If you have already pulled, please pull again. Had confused something,
> fixed now.

Thanks for fixing this! Refiling is working well now. Could you explain
what you mean by a "buggy behavior of org-paste-subtree." AFAIK,
org-paste-subtree has always pasted the subtree above the current tree
if the point is at the beginning of the headline. Is there something in
the documentation that suggests that this should not be the case? I
believe this behavior is consistent with
org-insert-heading-respect-content, which inserts a new heading above
the current heading if called at the beginning of a headline. For
instance, in the following example...

--8<---cut here---start->8---
* One
  Text in one
* Two
  Text in two
** Subpoint two
   Text in subpoint two.
* Three
  Text in three
* Four
  Text in four
--8<---cut here---end--->8---

If I kill headline four, move the point to the beginning of headline
three, and yank (i.e., call org-paste-subtree), I get the following,
which seems to me correct:

--8<---cut here---start->8---
* One
  Text in one
* Two
  Text in two
** Subpoint two
   Text in subpoint two.
* Four
  Text in four

* Three
  Text in three
--8<---cut here---end--->8---

Similarly, if I place the cursor on three and call
org-insert-heading-respect-content (M-RET), the new headline is inserted
above the headline:

--8<---cut here---start->8---
* One
  Text in one
* Two
  Text in two
** Subpoint two
   Text in subpoint two.
* 
* Three
  Text in three
* Four
  Text in four
--8<---cut here---end--->8---

Best,
Matt



Re: [O] how to change the headline starter *

2011-08-13 Thread Matt Lundin
Hi Bastien,

Bastien  writes:

> Attached is a patch that replaces instances of outline-regexp 
> by org-outline-regexp.  It also introduces more harmonization.
>
> I'd be interesed in hearing about feedback.

What is the primary reason to use a hard-coded org-outline-regexp and
org-outline-regexp-bol instead of the buffer local outline-regexp? Is it
to clear up any confusion about whether the header regexp can be
customized? One of the negative effects is (as reported in another post)
that one can no longer use org-global-cycle in other modes (e.g.,
Auctex).

Perhaps for the relevant functions (e.g., org-overview) we could
construct org-outline-regexp-bol from the a bound version of
org-outline-regexp (i.e., one that uses the buffer local value of
outline-regexp). 

At the moment, this FAQ is obsolete:

http://orgmode.org/worg/org-faq.html#use-visibility-cycling-in-outline-mode

Best,
Matt




Re: [O] org-paste-subtree and org-refile broken

2011-08-13 Thread David Maus
At Sat, 13 Aug 2011 09:25:19 +0200,
David Maus wrote:
>
> Hi Matt,
> Hi Sebastien,
>
> I pushed a temporary workaround to master that should fix the problem
> with refile and capture. Both depend on a buggy behavior of
> org-paste-subtree, i.e. pasting a subtree *above* the target headline
> when called with point at the beginning of the target headline.

If you have already pulled, please pull again. Had confused something,
fixed now.

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


pgpoiszCWxCHB.pgp
Description: PGP signature


Re: [O] TODO type problem on speedbar and imenu.

2011-08-13 Thread Nicolas Goaziou
Hello,

Bastien  writes:

> Yep.  When you have some free time (!), please suggest a patch and a
> small org test file so that we can test.

Here is an attempt to convert word boundaries into white spaces where it
matters.

I paste again the test file from Osamu Okano for reference.

#+begin_src org
#+TYP_TODO: SOMEDAY 
* someday/maybe 
* SOMEDAY/maybe 
* SOMEDAY maybe 
* someday maybe 
* read/review   
* READ/review   
* conf  
#+end_src


Regards,

-- 
Nicolas Goaziou
>From 95709480975155387121fdd18cea144145b47e5c Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Mon, 25 Jul 2011 17:50:28 +0200
Subject: [PATCH] Enforce white space after todo keywords

* lisp/org.el (org-set-regexps-and-options): enforce white space after
  todo keyword, as word boundary isn't sufficient (i.e. in matches * TODO/this)
---
 lisp/org.el |   28 +++-
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index a13730b..9fef2a8 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4537,38 +4537,40 @@ means to push this value onto the list in the variable.")
 	org-not-done-heading-regexp
 	(concat "^\\(\\*+\\)[ \t]+\\("
 		(mapconcat 'regexp-quote org-not-done-keywords "\\|")
-		"\\)\\>")
+		"\\)[ \t]+")
 	org-todo-line-regexp
 	(concat "^\\(\\*+\\)[ \t]+\\(?:\\("
 		(mapconcat 'regexp-quote org-todo-keywords-1 "\\|")
-		"\\)\\>\\)?[ \t]*\\(.*\\)")
+		"\\)[ \t]+\\)?\\(.*\\)")
 	org-complex-heading-regexp
 	(concat "^\\(\\*+\\)[ \t]+\\(?:\\("
 		(mapconcat 'regexp-quote org-todo-keywords-1 "\\|")
-		"\\)\\>\\)?\\(?:[ \t]*\\(\\[#.\\]\\)\\)?[ \t]*\\(.*?\\)"
+		"\\)[ \t]+\\)?"
+		"\\(?:\\(\\[#.\\]\\)[ \t]+\\)?"
+		"\\(.*?\\)"
 		"\\(?:[ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \t]*$")
 	org-complex-heading-regexp-format
 	(concat "^\\(\\*+\\)[ \t]+\\(?:\\("
 		(mapconcat 'regexp-quote org-todo-keywords-1 "\\|")
-		"\\)\\>\\)?"
-		"\\(?:[ \t]*\\(\\[#.\\]\\)\\)?"
-		"\\(?:[ \t]*\\(?:\\[[0-9%%/]+\\]\\)\\)?" ;; stats cookie
-		"[ \t]*\\(%s\\)"
-		"\\(?:[ \t]*\\(?:\\[[0-9%%/]+\\]\\)\\)?" ;; stats cookie
-		"\\(?:[ \t]+\\(:[[:alnum:]_@#%%:]+:\\)\\)?[ \t]*$")
+		"\\)[ \t]+\\)?"
+		"\\(?:\\(\\[#.\\]\\)[ \t]+\\)?"
+		"\\(?:\\(?:\\[[0-9%%/]+\\]\\)[ \t]+\\)?" ; stats cookie
+		"\\(%s\\)[ \t]*"
+		"\\(?:\\[[0-9%%/]+\\]\\)?" ; stats cookie
+		(org-re "\\(?:[ \t]+\\(:[[:alnum:]_@#%%:]+:\\)\\)?[ \t]*$"))
 	org-nl-done-regexp
 	(concat "\n\\*+[ \t]+"
 		"\\(?:" (mapconcat 'regexp-quote org-done-keywords "\\|")
-		"\\)" "\\>")
+		"\\)" "[ \t]+")
 	org-todo-line-tags-regexp
 	(concat "^\\(\\*+\\)[ \t]+\\(?:\\("
 		(mapconcat 'regexp-quote org-todo-keywords-1 "\\|")
-		(org-re
-		 "\\)\\>\\)? *\\(.*?\\([ \t]:[[:alnum:]:_@#%]+:[ \t]*\\)?$\\)"))
+		"\\)[ \t]+\\)"
+		(org-re "\\(.*?\\([ \t]:[[:alnum:]:_@#%]+:[ \t]*\\)?$\\)"))
 	org-looking-at-done-regexp
 	(concat "^" "\\(?:"
 		(mapconcat 'regexp-quote org-done-keywords "\\|") "\\)"
-		"\\>")
+		"[ \t]+")
 	org-deadline-regexp (concat "\\<" org-deadline-string)
 	org-deadline-time-regexp
 	(concat "\\<" org-deadline-string " *<\\([^>]+\\)>")
-- 
1.7.6



Re: [O] ditaa

2011-08-13 Thread Henri-Paul Indiogine
Greetings!

This is from my .emacs

(org-babel-do-load-languages
 'org-babel-load-languages
 '((R . t)
   (ditaa . t)
   .
   .
(defun my-org-confirm-babel-evaluate (lang body)
  (not (string= lang "ditaa")))  ; don't ask for ditaa
(setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)


This is what I obtain in the exported tex file:

\hyperref[home-henk-Dropbox-dissertation-work-flow.png]{file:/home/henk/Dropbox/dissertation/work-flow.png}


The ditaa code is between these lines:

#+CAPTION: Research work flow
#+LABEL: fig:workflow
#+begin_src ditaa :file /home/henk/Dropbox/dissertation/work-flow.png
:cmdline -r -s 1.0
..
#+end_src

If I execute the code (C-c C-c) I obtain the following:

ditaa version 0.9, Copyright (C) 2004--2009  Efstathios (Stathis) Sideris

Running with options:
round-corners
scale = 1.0
Reading file: /tmp/babel-4681Hni/ditaa-46811gs
Locale: en_CA
Dialog.bold
Rendering to file: /home/henk/Dropbox/dissertation/work-flow.png
Done in 5sec

The png file is created.  The only issue is the faulty tex code that
is generated.


I have also noticed that the editing of the org file sometimes slows
down considerably.  Maybe it has nothing to do with it, but it
happened after I started using ditaa.  I am wondering about using TikZ
instead.

Thanks,
Henri-Paul



-- 
Henri-Paul Indiogine

Curriculum & Instruction
Texas A&M University
TutorFind Learning Centre

Email: hindiog...@gmail.com
Skype: hindiogine
Website: http://people.cehd.tamu.edu/~sindiogine



Re: [O] org-paste-subtree and org-refile broken

2011-08-13 Thread David Maus
Hi Matt,
Hi Sebastien,

I pushed a temporary workaround to master that should fix the problem
with refile and capture. Both depend on a buggy behavior of
org-paste-subtree, i.e. pasting a subtree *above* the target headline
when called with point at the beginning of the target headline.

A fix for the second bug, mixing the content of two headlines

> If I kill subtree "Four" and call org-paste-subtree with the point on
> "Two" (or if I refile it to "Two"), I get the following:
>
> --8<---cut here---start->8---
> * One
>
> Text in one
>
> * Two
> * Four
>
> Text in four
>
> Text in two
>
> * Three
>
> Text in three
> --8<---cut here---end--->8---

is under development.

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


pgplmhMkKx748.pgp
Description: PGP signature