[O] [PATCH] Fix regexps in org-clock.el

2011-12-30 Thread Joe Vornehm Jr.

I have been seeing persistent errors of "Cannot restart clock because task does not contain unfinished 
clock" when auto-resuming a saved (persistent) clock.  I believe I've tracked the error down to an 
extraneous space in a regexp ("^[ \t]* " when it should be "^[ \t]*").

This patch fixes the issue for me (in `org-clock-in'), and it makes the same 
change in `org-clock-find-position'.  I've tested this briefly and it works for 
me; nothing about clocking-in behavior seems to break, and persistent clocks 
work now.

I've also wrapped `regexp-quote' around instances where org-clock-string is 
used to build a regexp, in case someone puts funny characters in their 
org-clock-string.

Hopefully, the patch is attached correctly and Thunderbird didn't mangle it.

Cheers!
Joe V.


From c9d76b191d665e51aa3cea42b86befdc2fe4390c Mon Sep 17 00:00:00 2001
From: Joe Vornehm Jr 
Date: Sat, 31 Dec 2011 02:05:55 -0500
Subject: [PATCH] Fix regexps in org-clock.el

* org-clock.el (org-clock-in): Remove extraneous space from regexp
used to find dangling clock lines when resuming a clock.  Also apply
`regexp-quote' where org-clock-string is used in a regexp.
(org-clock-find-position): Remove extraneous space from regexp used to
find dangling clock lines when resuming a clock.  Also apply
`regexp-quote' where org-clock-string is used in a regexp.

I have been seeing errors of "Cannot restart clock because task does
not contain unfinished clock" when auto-resuming a saved (persistent)
clock.  Deleting the extra space (in `org-clock-in' at least) puts an
end to these errors.

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

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index b29f47b..7ad76d5 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1115,7 +1115,7 @@ the clocking selection, associated with the letter `d'."
(cond
 ((and org-clock-in-resume
   (looking-at
-   (concat "^[ \t]* " org-clock-string
+   (concat "^[ \t]*" (regexp-quote org-clock-string)
" \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}"
" *\\sw+\.? +[012][0-9]:[0-5][0-9]\\)\\][ \t]*$")))
  (message "Matched %s" (match-string 1))
@@ -1239,7 +1239,7 @@ line and position cursor in that line."
  (or (bolp) (newline))
  (point)))
   (end (progn (outline-next-heading) (point)))
-  (re (concat "^[ \t]*" org-clock-string))
+  (re (concat "^[ \t]*" (regexp-quote org-clock-string)))
   (cnt 0)
   (drawer (if (stringp org-clock-into-drawer)
   org-clock-into-drawer "LOGBOOK"))
@@ -1247,7 +1247,7 @@ line and position cursor in that line."
   (goto-char beg)
   (when (and find-unclosed
 (re-search-forward
- (concat "^[ \t]* " org-clock-string
+ (concat "^[ \t]*" (regexp-quote org-clock-string)
  " \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}"
  " *\\sw+ +[012][0-9]:[0-5][0-9]\\)\\][ \t]*$")
  end t))
-- 
1.7.5.1



Re: [O] ca47d10e commit broke the build

2011-12-30 Thread Jambunathan K
Martyn

The probelmatic commit could actually be this:
commit - 07f006e4fd9a7b66643cd7b404c8994665ba8300
which touches the Makefile.

I am unable to reproduce this locally. Ulrich - the intended consumer of
[1]the above commit - also hasn't noted any build failures with his setup [1].

Would it be possible for you (or anyone else) to isolate this further
and identify the root cause.

Thanks for reporting this,
Jambunathan K.

Footnotes: 

[1]  See the last para of this post:
http://lists.gnu.org/archive/html/emacs-orgmode/2011-12/msg00857.html

Martyn Jago  writes:
> Frankly I'm not sure why, but my build is broken against emacs 22,23,24
>
> Ref:
> http://martynjago.co.uk:/builds/Org-mode_on_Emacs_24/ca47d10e1f0070f5c6461ff763486b693ff77209
>
> Best, Martyn
>
>
>
>



-- 



[O] book: "checklist Manifesto: How To Get It Right"

2011-12-30 Thread Jude DaShiell
Has anyone else read this book?  The approach the author advocates for 
complex situations is to use both a simple check list along with what the 
construction industry calls a submittal list.  The simple check lists get 
used to cover normal circumstances and the submittal list gets used when 
exceptional exceptional circumstances arise.  I don't know how much of 
this has already been implemented in org-mode, and if all of it isn't yet 
available time permiting, doing so might get org-mode to be used by the 
World Health Organization since they've already got this approach in use 
already according to the author who helped them set it up.


Jude 





[O] Generating burndown charts using org mode

2011-12-30 Thread Marco Craveiro
Hi Org-Moders,

I've been using Org-Mode quite a bit, but I'm afraid I'm not an advanced
user. I'm trying to generate burndown charts [1] which basically follow
coding progress over a bounded period of time (an iteration).

I started by generating a file for each iteration:


* Tasks in iteration
- [[file:list_1.org]]
- [[file:list_2.org]]

#+tblname: test_chart
| Day | Expected | Actual |
|-+--+|
|   0 |4 |  4 |
|   1 |3 |  4 |
|   2 |2 |  1 |
|   3 |1 |  0 |
|   4 |0 |  0 |


list_1.org and list_2.org contain a total of 4 tasks for this time
period (tagged with :iteration1:). The table is updated manually at
present. "Day" is an index to the days in the time period, with work
always starting on day 1; "Expected" is the number of tasks expected to
be remaining on that day; "Actual" is the number of tasks actually
remaining. I then use org-babel/gnuplot to plot the chart as explained
on a previous post [2].

It seemed logical to try to generate the table automatically. I can use
org-mode's spreadsheet's facilities for generating all the days in the
table and I can even use date arithmetic to get dates for a day index.
As you can imagine, the bit I'm really stuck with is how to populate the
"Actual" and "Expected" columns. 

I've read a little bit about agenda views, and they seem to do a lot of
what I want, but unfortunately the lisp is not entirely obvious for a
newbie such as me. My questions are:

- is there an org-mode function that computes the total number of tasks
marked with a given tag in this file and any other files it includes?
- is there an org-mode function that computes the total number of tasks
marked with a given tag and marked as CLOSED on a given day in this file
and any other files it includes?

I was wondering if you could give me some pointers on how to go about
finding or even creating these functions as I failed to find anything
obvious. Even a "give up, its not trivial" would do, so I can at least
stop searching.

Many thanks for your time.

Marco

[1] http://en.wikipedia.org/wiki/Burn_down_chart
[2]
http://lists.gnu.org/archive/html/emacs-orgmode/2011-12/msg00813.html




Re: [O] just made org-mode.8.4.02

2011-12-30 Thread Jude DaShiell
Here's my .emacs file
Cut here.
(setq emacspeak-play-emacspeak-startup-icon t)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(add-hook 'mail-setup-hook 'spook)
(add-hook 'mail-setup-hook 'fortune-to-signature)
(setq mh-send-uses-spost-flag t)
 (setq mail-user-agent 'mh-e-user-agent)
 (setq browse-url-browser-function 'w3m-browse-url)
 (require 'w3m-load)
(require 'org-install)
 (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
  (global-set-key "\C-cl" 'org-store-link)
   (global-set-key "\C-ca" 'org-agenda)
(setq org-log-done t)
   (global-font-lock-mode 1)
   (add-to-list 'load-path "~/elisp/muse/lisp")
(add-to-list 'load-path "~/elisp/planner")
 (add-to-list 'load-path "~/elisp/remember")
 (setq planner-project "WikiPlanner")
  (setq muse-project-alist
 '(("WikiPlanner"
  ("~/plans"   ;; Or 
wherever you want your planner files to be
   :default 
"index"

:major-mode planner-mode

 :visit-link planner-visit-link

  (require 'planner)
  (add-hook 'text-mode-hook

(lambda ()

(when (y-or-n-p "Auto Fill 
mode? ")

  
(turn-on-auto-fill
;;  
  
(global-set-key (kbd "C-c q") 'refill-mode)

  (add-to-list 
'load-path "~/elisp/bbdb-2.35/lisp");; (1)

  (require 
'bbdb)

  
(bbdb-initialize 'gnus 'message)

  (setq 
bbdb-north-american-phone-numbers-p nil)

  (add-hook 
'gnus-startup-hook 'bbdb-insinuate-gnus)

  (add-hook 
'mh-folder-mode-hook 'bbdb-insinuate-mh)

  (add-hook 
'rmail-mode-hook 'bbdb-insinuate-rmail)

  (add-hook 
'mail-setup-hook 'bbdb-insinuate-sendmail)
(require 'org-habit)
(add-to-list 'load-path (expand-file-name "~/org-mode/lisp"))
(add-to-list 'auto-mode-alist '("\\.\\(org\\  |org_archive\\|txt\\)$" . 
org-mode))
(setq org-agenda-files '("/tmp/test.org"))
(global-set-key "\C-cb" 'org-iswitchb)
(blink-cursor-mode -1)
(setq require-final-newline t)
(setq case-fold-search t)
(global-set-key [(meta g)] 'goto-line)

Here's a typescript file of what happened when I erased the ~/org-mode 
directory and ran the git clone command for org-mode again.
Cut here.
Script started on Fri 30 Dec 2011 07:45:52 PM EST
jude@stmarys:~$ git clone git://orgmode.org/org-mode.git
Initialized empty Git repository in /home/jude/org-mode/.git/
remote: Counting objects: 10016   
remote: Counting objects: 10283   
remote: Counting objects: 20401   
remote: Counting objects: 55138, done.
remote: Compressing objects:   0% (1/11997)   
remote: Compressing objects:   1% (120/11997)   
remote: Compressing objects:   2% (240/11997)   
remote: Compressing objects:   3% (360/11997)   
remote: Compressing objects:   4% (480/11997)   
remote: Compressing objects:   5% (600/11997)   
remote: Compressing objects:   6% (720/11997)   
remote: C

[O] LaTeX export

2011-12-30 Thread York Zhao
Hi there,

I'm wondering if there is a way to export ONLY the LaTeX code within
"#+begin_latex" and "#+end_latex". I want the exact literal export without
adding anything before and after my code. The result should be exactly the same
as if I have copied the block between "#+begin_latex" and "#+end_latex" and
pasted to a new buffer.

Thanks,


York



[O] ca47d10e commit broke the build

2011-12-30 Thread Martyn Jago

Frankly I'm not sure why, but my build is broken against emacs 22,23,24

Ref: 
http://martynjago.co.uk:/builds/Org-mode_on_Emacs_24/ca47d10e1f0070f5c6461ff763486b693ff77209

Best, Martyn





Re: [O] Location of OpenDocument style files should be configurable

2011-12-30 Thread Ulrich Mueller
> On Sat, 31 Dec 2011, Jambunathan K wrote:

> I have pushed a fix so that "make install" will do the right
> thing. Package maintainers have to modify just the $(lispdir) and
> $(datadir) vars in the Makefile. (Hopefully) They don't have to do
> anything special at all.

Hi Jambunathan,
So you're defining org-odt-data-dir at byte-compile time with
BATCH_EXTRA, and its value will be embedded in the .elc file? Clever.

Nevertheless, I've added another setq for org-odt-data-dir to our
site-init file. Just to be on the safe side, in case a user will
decide to load the uncompiled elisp file (for debugging, or whatever).

> You may also want to read the comments under
> DATAFILES to have an idea of what is available for packaging.

So do I get this right:
contrib/odt/BasicODConverter/BasicODConverter*.oxt should go to
${datadir} directly, and contrib/odt/etc/schema/* should go to
${datadir}/schema?

> Let know how things go.

Looks like the current git head is working fine.

Thanks,
Ulrich



Re: [O] Export visible part of tree to latex

2011-12-30 Thread John MacCallum
Thanks for the response, Nick.

It looks like you have the variable org-show-hierarchy-above set to 't'---if I 
set it to 't' on my machine, I get output that looks like yours.  Would you 
mind setting it to 'nil' and trying again?

Thanks,
JM


On Dec 30, 2011, at 1:02 PM, Nick Dokos wrote:

> John MacCallum  wrote:
> 
>> Hi everyone,
>> 
>> I just wanted to make sure my original questions / problems were
>> clearly stated since no one responded to my original email.
>> 
>> 1.  I think there is a bug when exporting the visible part of the
>> outline tree to a latex file (C-c C-e v l).  Html export of the
>> visible part works fine, but the behavior of the latex export is not
>> the same (please see my original message below).
>> 
>> ...
>>> \section{head}
>>> \label{sec-1}
>>> 
>>> \end{document}
> 
> I can't reproduce it (Org-mode version 7.8.02 (release_7.8.02.57.g5cd52)).
> With your input file:
> 
> --8<---cut here---start->8---
> * head
> ** topic 1:topic:
> *** foo
>  some foo :foo:
> *** bar
>  some bar :bar:
> ** topic 2
> *** foo
>  some other foo   :foo:
> *** bar
>  some other bar   :bar:
> --8<---cut here---end--->8---
> 
> after C-c \ foo RET and C-c C-e v l, I get this in the .tex file:
> 
> ,
> | ...
> | \section{head}
> | \label{sec-1}
> | \subsection{topic 1 \textbf{:topic:}}
> | \label{sec-1-1}
> | \subsubsection{foo}
> | \label{sec-1-1-1}
> | \begin{itemize}
> | 
> | \item some foo \textbf{:foo:}\\
> | \label{sec-1-1-1-1}%
> | \end{itemize} % ends low level
> | \subsection{topic 2}
> | \label{sec-1-2}
> | \subsubsection{foo}
> | \label{sec-1-2-1}
> | \begin{itemize}
> | 
> | \item some other foo \textbf{:foo:}\\
> | \label{sec-1-2-1-1}%
> | \end{itemize} % ends low level
> | ...
> `
> 
> Nick




Re: [O] Clock time implied as 00:00

2011-12-30 Thread Nick Dokos
François Pinard  wrote:

> Hi, Org people.
> 
> This morning, I just noticed this line:
> 
> CLOCK: [2011-12-29 jeu 9:30]--[2011-12-29 jeu 11:44] => 11:44
> 
> because of the strange 11:44 total.  My error is clear, as I wrote 9:30
> instead of 09:30.  Correcting it gives a move reasonable total:
> 
> CLOCK: [2011-12-29 jeu 09:30]--[2011-12-29 jeu 11:44] =>  2:14
> 
> Yet, forgetting a leading 0 is an easy mistake (I know I should not make
> mistakes!), and then, maybe (I'm not sure) Org mode could deliver
> unexpected or misleading statistics out of a silent error.  Not such a
> problem for me, yet it could have become one if I missed it.
> 
> Would it be reasonable to suggest that Org mode be more lenient about
> missing leading zeroes?
> 

There are two regexps that match timestamps, org-ts-regexp0 and
org-ts-regexp1 (and two more, derived from the first two). In each case
the part that matches the HH:MM part is as follows:

"... \\([0-9]\\{2\\}\\):\\([0-9]\\{2\\}\\)..."

in words: "exactly two digits, followed by a colon, followed by exactly
two digits".  Modifying them so that the HH part can be "one or two
digits" seems to make org-parse-time-string work correctly with the above
input:

"... \\([0-9]\\{1,2\\}\\):\\([0-9]\\{2\\}\\)..."

Whether this has undesirable consequences[fn:1], I don't know. Actually
it's only regexp0 that is used in org-parse-time-string, so strictly
speaking, only it needs to be modified.

Nick

Footnotes:

[fn:1] In particular, org-ts-regexp0 is explicitly used in org-odt.el, so at 
least that part
   needs to be checked for breakage, something that I have not done.



Re: [O] [BUG] org-agenda-switch-to fails with void function org-pop-to-buffer-same-window

2011-12-30 Thread Jeff Horn
Manually loading `org-mode/lisp/org-compat.el` loads the missing
function. Is it weird to have so much functionality depend on a
compatibility library? (I don't do software for a living, this is an
innocent question.)

Also, does anyone have a clue as to why org-compat.el isn't being
loaded automatically?

On Fri, Dec 30, 2011 at 16:14, Jeff Horn  wrote:
> It looks like git org-mode is at the front of my load-path
> already. I'm assuming that emacs' load-path works similar to a shell
> load-path, with lower-indexed directories being searched (and used)
> before higher-indexed ones.
>
> This bug is really messing with my workflow. Anything else I should
> try?
>
> ,[ load-path ]
> | ("~/.emacs.d/elpa/color-theme-6.6.1/themes" "~/completion" "~/test"
> | "/Users/jrhorn424/.emacs.d/src"
> | "/Users/jrhorn424/.emacs.d/src/ado-mode"
> | "/Users/jrhorn424/.emacs.d/src/deft"
> | "/Users/jrhorn424/.emacs.d/src/markdown-mode"
> | "/Users/jrhorn424/.emacs.d/src/org-mode"
> | "/Users/jrhorn424/.emacs.d/src/w3m"
> | "/Users/jrhorn424/.emacs.d/src/ado-mode/info"
> | "/Users/jrhorn424/.emacs.d/src/ado-mode/lisp"
> | "/Users/jrhorn424/.emacs.d/src/ado-mode/plan for highlighting.oo3"
> | "/Users/jrhorn424/.emacs.d/src/ado-mode/scripts"
> | "/Users/jrhorn424/.emacs.d/src/ado-mode/templates"
> | "/Users/jrhorn424/.emacs.d/src/org-mode/BUGFIXING"
> | "/Users/jrhorn424/.emacs.d/src/org-mode/EXPERIMENTAL"
> | "/Users/jrhorn424/.emacs.d/src/org-mode/UTILITIES"
> | "/Users/jrhorn424/.emacs.d/src/org-mode/contrib"
> | "/Users/jrhorn424/.emacs.d/src/org-mode/etc"
> | "/Users/jrhorn424/.emacs.d/src/org-mode/lisp"
> | "/Users/jrhorn424/.emacs.d/src/org-mode/testing"
> `
>
> On Sun, Dec 18, 2011 at 13:55, Jeff Horn  wrote:
>> I'll have to look into that. I'm using Eric Schulte's starter kit, so
>> I doubt initialization is a problem. I haven't changed anything in my
>> initialization other than a color theme in quite some time.
>>
>> On Thu, Dec 15, 2011 at 11:58, Sean O'Halpin  wrote:
>>> On Thu, Dec 15, 2011 at 1:26 AM, Jeff Horn  wrote:
 Recently did a fresh pull, which seems to have broken org-agenda-switch-to.

 To reproduce, open an agenda buffer, navigate to a line you want to
 inspect, press [RET]. On my machine, this calls autopair, then falls
 back to org-agenda-switch-to. Autopair doesn't seem to be causing the
 problem, since it persists even if I call =M-x org-agenda-switch-to=
 instead of pressing [RET].

 Org-mode version 7.8.02 (release_7.8.02.3.gfb8c)
 GNU Emacs 24.0.90.3 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
 of 2011-12-14 on braeburn.aquamacs.org - Aquamacs Distribution 3.xdev

 Can anyone reproduce?

>>>
>>> I recently had a similar problem with =org-pop-to-buffer-same-window=
>>> . It turned out that after switching to using =org-babel-load-file= to
>>> load my init file, emacs was then using the org-mode installed in
>>> site-lisp rather than my local git copy.
>>>
>>> I fixed this by setting =load-path= to point to my local git copy of
>>> org-mode before calling =org-babel-load-file=.
>>>
>>> HTH.
>>>
>>> Regards,
>>> Sean
>>
>>
>>
>> --
>> Jeffrey Horn
>> http://www.failuretorefrain.com/jeff/
>
>
>
> --
> Jeffrey Horn
> http://www.failuretorefrain.com/jeff/



-- 
Jeffrey Horn
http://www.failuretorefrain.com/jeff/



Re: [O] [BUG] org-agenda-switch-to fails with void function org-pop-to-buffer-same-window

2011-12-30 Thread Jeff Horn
It looks like git org-mode is at the front of my load-path
already. I'm assuming that emacs' load-path works similar to a shell
load-path, with lower-indexed directories being searched (and used)
before higher-indexed ones.

This bug is really messing with my workflow. Anything else I should
try?

,[ load-path ]
| ("~/.emacs.d/elpa/color-theme-6.6.1/themes" "~/completion" "~/test"
| "/Users/jrhorn424/.emacs.d/src"
| "/Users/jrhorn424/.emacs.d/src/ado-mode"
| "/Users/jrhorn424/.emacs.d/src/deft"
| "/Users/jrhorn424/.emacs.d/src/markdown-mode"
| "/Users/jrhorn424/.emacs.d/src/org-mode"
| "/Users/jrhorn424/.emacs.d/src/w3m"
| "/Users/jrhorn424/.emacs.d/src/ado-mode/info"
| "/Users/jrhorn424/.emacs.d/src/ado-mode/lisp"
| "/Users/jrhorn424/.emacs.d/src/ado-mode/plan for highlighting.oo3"
| "/Users/jrhorn424/.emacs.d/src/ado-mode/scripts"
| "/Users/jrhorn424/.emacs.d/src/ado-mode/templates"
| "/Users/jrhorn424/.emacs.d/src/org-mode/BUGFIXING"
| "/Users/jrhorn424/.emacs.d/src/org-mode/EXPERIMENTAL"
| "/Users/jrhorn424/.emacs.d/src/org-mode/UTILITIES"
| "/Users/jrhorn424/.emacs.d/src/org-mode/contrib"
| "/Users/jrhorn424/.emacs.d/src/org-mode/etc"
| "/Users/jrhorn424/.emacs.d/src/org-mode/lisp"
| "/Users/jrhorn424/.emacs.d/src/org-mode/testing"
`

On Sun, Dec 18, 2011 at 13:55, Jeff Horn  wrote:
> I'll have to look into that. I'm using Eric Schulte's starter kit, so
> I doubt initialization is a problem. I haven't changed anything in my
> initialization other than a color theme in quite some time.
>
> On Thu, Dec 15, 2011 at 11:58, Sean O'Halpin  wrote:
>> On Thu, Dec 15, 2011 at 1:26 AM, Jeff Horn  wrote:
>>> Recently did a fresh pull, which seems to have broken org-agenda-switch-to.
>>>
>>> To reproduce, open an agenda buffer, navigate to a line you want to
>>> inspect, press [RET]. On my machine, this calls autopair, then falls
>>> back to org-agenda-switch-to. Autopair doesn't seem to be causing the
>>> problem, since it persists even if I call =M-x org-agenda-switch-to=
>>> instead of pressing [RET].
>>>
>>> Org-mode version 7.8.02 (release_7.8.02.3.gfb8c)
>>> GNU Emacs 24.0.90.3 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
>>> of 2011-12-14 on braeburn.aquamacs.org - Aquamacs Distribution 3.xdev
>>>
>>> Can anyone reproduce?
>>>
>>
>> I recently had a similar problem with =org-pop-to-buffer-same-window=
>> . It turned out that after switching to using =org-babel-load-file= to
>> load my init file, emacs was then using the org-mode installed in
>> site-lisp rather than my local git copy.
>>
>> I fixed this by setting =load-path= to point to my local git copy of
>> org-mode before calling =org-babel-load-file=.
>>
>> HTH.
>>
>> Regards,
>> Sean
>
>
>
> --
> Jeffrey Horn
> http://www.failuretorefrain.com/jeff/



-- 
Jeffrey Horn
http://www.failuretorefrain.com/jeff/



Re: [O] DAG structure / hard links / shared subtrees

2011-12-30 Thread Jan Kybic
>> I have a feature request. The structure of the org file is a tree. 
>> I wondered if it could be made a directed acyclic graph (DAG) instead. 

Thanks for the reaction. 

>or simply refile the notes?  I always go through the notes I have taken
>at a meeting after the meeting, in my case to define tasks etc.  You
>could refile all the notes into the proper places in the hierarchy at
>this point.  org has very nice refile support.

Yes, I am using a combination of refiling, tags, links and searches, and
it works. However, it looks fragile and ad hoc. As far as I see it, some things
just naturally can be classified using several hierarchies, like
something that concerns project A, was first discussed at meeting B and should
be consulted with person C. Where should I put it? I would like to be
able to find it in all three places. Moreover, I would like to prepare a
meeting with person C, make notes on the subject while we talk and then
have the notes available also when browsing the hierarchy of project A. 
I have to choose one of the three trees and use tags or whatever
other means to make it visible in the other two trees. If I forget to
tag it, it is lost, very difficult to find again.

>> c) I can create the meeting agenda dynamically, by assigning tags to
>>projects and creating a sparse tree, e.g. from the Agenda
>>buffer. However, this requires me to mark every issue to be discussed
>>with a meeting-specific tag. I do not have much control over the order
>>in which the issues appear. I cannot structure them. The generation
>>takes time. And it is not straightforward to add new items to the
>>meeting.
>
>I am not sure how the hard links mechanism you suggest above would help
>in this case?  Preparing an agenda can be difficult.  What you could do
>is have special TODO labels for issues that need to be discussed at the
>next meeting?
>

Even with such TODO labels, how do I sort them into the order I want?
With links, it is easy, I just link all the issues I want to discuss to
the meeting subtree, in the order I want.

Thanks for your help.

Jan

-- 
-
Jan Kybictel. +420 2 2435 5721 or 5877
http://cmp.felk.cvut.cz/~kybic  ICQ 200569450



Re: [O] Export visible part of tree to latex

2011-12-30 Thread Nick Dokos
John MacCallum  wrote:

> Hi everyone,
> 
> I just wanted to make sure my original questions / problems were
> clearly stated since no one responded to my original email.
> 
> 1.  I think there is a bug when exporting the visible part of the
> outline tree to a latex file (C-c C-e v l).  Html export of the
> visible part works fine, but the behavior of the latex export is not
> the same (please see my original message below).
> 
> ...
> > \section{head}
> > \label{sec-1}
> > 
> > \end{document}

I can't reproduce it (Org-mode version 7.8.02 (release_7.8.02.57.g5cd52)).
With your input file:

--8<---cut here---start->8---
* head
** topic 1  :topic:
*** foo
 some foo   :foo:
*** bar
 some bar   :bar:
** topic 2
*** foo
 some other foo :foo:
*** bar
 some other bar :bar:
--8<---cut here---end--->8---

after C-c \ foo RET and C-c C-e v l, I get this in the .tex file:

,
| ...
| \section{head}
| \label{sec-1}
| \subsection{topic 1 \textbf{:topic:}}
| \label{sec-1-1}
| \subsubsection{foo}
| \label{sec-1-1-1}
| \begin{itemize}
| 
| \item some foo \textbf{:foo:}\\
| \label{sec-1-1-1-1}%
| \end{itemize} % ends low level
| \subsection{topic 2}
| \label{sec-1-2}
| \subsubsection{foo}
| \label{sec-1-2-1}
| \begin{itemize}
| 
| \item some other foo \textbf{:foo:}\\
| \label{sec-1-2-1-1}%
| \end{itemize} % ends low level
| ...
`

Nick



Re: [O] Location of OpenDocument style files should be configurable

2011-12-30 Thread Jambunathan K
Ulrich

I have pushed a fix so that "make install" will do the right
thing. Package maintainers have to modify just the $(lispdir) and
$(datadir) vars in the Makefile. (Hopefully) They don't have to do
anything special at all. You may also want to read the comments under
DATAFILES to have an idea of what is available for packaging.

You can download a snapshot from the current HEAD:
http://orgmode.org/w/?p=org-mode.git;a=summary

Let know how things go.

Thanks,
Jambunathan K.


Here is a summary of change:

--8<---cut here---start->8---

>From 07f006e4fd9a7b66643cd7b404c8994665ba8300 Mon Sep 17 00:00:00 2001
From: Jambunathan K 
Date: Sat, 31 Dec 2011 01:00:56 +0530
Subject: [PATCH 1/2] Fix packaging of ODT exporter (org-7.8.02) in Gentoo

* org-odt.el (org-odt-lib-dir): Add docstring.
(org-odt-data-dir): New variable.  Use this variable to
control the locations from which the ODT exporter picks the
OpenDocument styles and schema files from.  Set this variable
explicitly only if the in-built heuristics for locating the
above files fails.
(org-odt-styles-dir-list, org-odt-schema-dir-list): New
variables.  Pay specific attention to (eval-when-compile ...)
form through which Makefile's $(datadir) - contained in
`org-odt-data-dir' - gets compiled in as a "hard coded"
constant.
(org-odt-styles-dir, org-export-odt-schema-dir): Add messages
to aid debugging.

* Makefile (etcdir): Remove this.
(stylesdir): Rename to datadir.
(datadir): Was stylesdir.
(STYLESFILES): Rename to DATAFILES.
(DATAFILES): Was STYLESFILES.  Offer a menu of files that is
available.  Package maintainers can use this list and their
own discretion to cherry-pick what they are willing to install
in their distribution.
(CP): Add recursive flag so that directories listed in
DATAFILES can be copied enbloc.
(install-lisp): Use conditional flag BATCH_EXTRA
(BATCH_EXTRA): "Target-specific variable value" that plumbs
the value of $(datadir) in to org-odt.el via
`org-odt-data-dir'.  See ChangeLog entries for
`org-odt-styles-dir-list' and `org-odt-schema-dir-list'.
(BATCH): Add BATCH_EXTRA.
(lisp/org-odt.elc): Force re-generation of this target every
time so that $(datadir) gets plumbed in to org-odt.el through
`org-odt-data-dir'.
(org-odt-data-dir): "FORCE" target.  Also a variable defined
in org-odt.el.
(install-etc): Rename this target to install-data.
(install-data): Was install-etc.
--8<---cut here---end--->8---

Ulrich Mueller  writes:

> Hi,
> In Gentoo we have an issue with the location of the OpenDocument style
> files, reported to us in bug 396269 [1].
>
> When org-mode is installed as a separate Gentoo package, its lisp
> files are installed in /usr/share/emacs/site-lisp/org-mode/.
> According to our policy, non-lisp files would go to
> /usr/share/emacs/etc/org-mode/. We would pass this as the "etcdir"
> parameter to "make install", so the odt style files would be installed
> in stylesdir = /usr/share/emacs/etc/org-mode/styles/. 
>
> Now org-odt.el currently defines org-odt-styles-dir in a defconst,
> and it searches only in ../etc/styles/, ./etc/styles/, and ./etc/org/
> relative to lispdir. Obviously it cannot find the files in the Gentoo
> location.
>
> Now my question, could the defconst be changed to a defvar, so that we
> can specify the location in our site-start file? Or, preferably, could
> the etcdir specified in "make" command be honoured in the lisp code?
>
> Ulrich
>
> [1] 
>
>

-- 



Re: [O] Export visible part of tree to latex

2011-12-30 Thread John MacCallum
Hi everyone,

I just wanted to make sure my original questions / problems were clearly stated 
since no one responded to my original email.  

1.  I think there is a bug when exporting the visible part of the outline tree 
to a latex file (C-c C-e v l).  Html export of the visible part works fine, but 
the behavior of the latex export is not the same (please see my original 
message below).

2.  Is there a way to publish a project (C-c C-e X ) and have it 
respect the value of org-show-hierarchy-above?

Thanks,
JM
 
On Dec 29, 2011, at 1:02 PM, John MacCallum wrote:

> Hi all,
> 
> I have an org file with this structure:
> 
> * head
>  
> ** topic 1   :topic:  
>  
> *** foo   
>  
>  some foo   :foo: 
>  
> *** bar   
>  
>  some bar   :bar: 
>  
> ** topic 2
>  
> *** foo   
>  
>  some other foo :foo: 
>  
> *** bar   
>  
>  some other bar :bar:
> 
> and I would like to collect all entries with the tag foo and export them to a 
> latex file.  I have the variable org-show-hierarchy-above set to nil, so f I 
> run C-c \ "foo", I get this:
> 
> * head... 
>  
>  some foo   
> :foo:...   
>  some other foo 
> :foo:...  
> 
> which is exactly what I would like to export.  But when I go to export using 
> C-c C-e v l, the resulting latex file doesn't contain any of the entries 
> below the top ("head") level:
> 
> % Created 2011-12-29 Thu 12:47
>  
> \documentclass{article}   
>  
> \usepackage[utf8]{inputenc}   
>  
> \usepackage[T1]{fontenc}  
>  
> \usepackage{fixltx2e} 
>  
> \usepackage{graphicx} 
>  
> \usepackage{longtable}
>  
> \usepackage{float}
>  
> \usepackage{wrapfig}  
>  
> \usepackage{soul} 
>  
> \usepackage{textcomp} 
>  
> \usepackage{marvosym} 
>  
> \usepackage{wasysym}  
>  
> \usepackage{latexsym} 
>  
> \usepackage{amssymb}  
>  
> \usepackage{hyperref} 
>  
> \tolerance=1000   
>  
> \usepackage{fullpage} 
>  
> \providecommand{\alert}[1]{\textbf{#1}}   
>  
> 
> \title{org}

Re: [O] mailto link problem

2011-12-30 Thread Eric S Fraga
Scott Randby  writes:

> On 12/29/2011 05:42 PM, Nick Dokos wrote:
>
>>
>> and if that's the case for you as well, then org is off the
>> hook: you have to look downstream from browse-url to figure
>> out where it's going off the rails. In particular, check
>> if browse-url-mailto-function is set: if it is, try setting
>> it to nil and see if that gets things  back on track (not tested,
>> not guaranteed).
>>
>
> Setting browse-url-mailto-function to nil worked. That must be a new
> variable for Emacs 24. At least it isn't in the browse-url group of
> Emacs 23.3. Its default value is emacs-mail. Thanks a bunch, I only
> spent most of today trying to figure out this issue.
>
> Scott

For reference, from the Emacs News file (C-h n):

,
| * Changes in Specialized Modes and Packages in Emacs 24.1
| 
| +++
| ** Archive Mode has basic support for browsing and updating 7z archives.
| 
| ** browse-url has a new variable `browse-url-mailto-function'
| specifies how mailto: URLs are handled.  The default is `browse-url-mail'.
| 
`

even though we're not quite at 24.1 yet...  but that's Emacs for you!

There have been quite a few changes under the hood in Emacs lately.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.02 (release_7.8.02.55.g1870)



[O] inline src_R also in latex src block

2011-12-30 Thread Michael Bach
Hello,

I am using org-mode version 7.8.02

I can successfully do inline `src_R' e.g. via

--8<---cut here---start->8---
\begin{equation}
  src_R{4 + 4}
\end{equation}
--8<---cut here---end--->8---

where `8' is put into the equation environment on export.  Sadly, there
is no LaTeX font lock in the org file this way.  But when I do it inside
a latex src block providing font lock, e.g.

--8<---cut here---start->8---
#+name: test
#+begin_src latex
  \begin{equation}
src_R{4 + 4}
  \end{equation}
#+end_src
--8<---cut here---end--->8---

the `src_R' is put in literally on latex export.

Is there a way of preprocessing this latex src block with babel for R
prior to exporting?

Thanks in advance,
Michael




Re: [O] capture problem

2011-12-30 Thread Thomas S. Dye
"Sebastien Vauban"  writes:

> Hi Thomas,
>
> Thomas S. Dye wrote:
>> I'm sometimes running into this error message when I capture:
>>
>> condition-case: Capture abort: (quit pasteboard doesn't contain valid data)
>>
>> Unfortunately, this doesn't mean anything to me.  The problem arises
>> after I've been working for a while, but I haven't an idea why it
>> starts, or any clue to what might trigger it.
>>
>> I realize this isn't much to go on, and a long way from an ECM, but I
>> don't know what to do.  Any ideas on how to track this down will be
>> appreciated.
>>
>> I'm using Org-mode version 7.8.02 (release_7.8.02.13.g0c09a.dirty).
>
> Yesterday, with yesterday's update, I've as well have had something similar:
> capture refused to work, after well having worked previously -- in the same
> Emacs instance --, and launched me a cryptic reason.
>
> Though, the reason was not the same as yours. Maybe because I'm on Windows?
>
> Anyway, I should have noted down the message. I just restarted Emacs then, and
> did not experience any other problem with the capture process.
>
> I'll keep you posted otherwise.
>
> Best regards,
>   Seb
Hi Seb,

Yes, restarting emacs works for me too.  I typically leave emacs
running, though.  The last 3 or 4 times I've shutdown and restarted
emacs have been due to this capture problem.

I'll pay closer attention and see if I can figure what might trigger it.

All the best,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] latex command for org-preview-latex-fragment

2011-12-30 Thread Nick Dokos
Ista Zahn  wrote:

> I'm having troubel getting org-preview-latex-fragment to work when using 
> minted for exported code highlighting. Checking the log files in 
> /tmp/orgtex<...>.log I find that tex fails with the error message "Package 
> minted Error: You must invoke LaTeX with the -shell-escape flag". OK, that's 
> helpful, except that I can't figure out where/how to change the tex command 
> called by org-preview-latex-fragment. Is this configurable in org-mode 
> settings? Or does it depend on some option in the auctex or preview packages?
> 

You might have to do one more thing: if you are going through dvipng,
in org-create-formula-image, there is an explicit call to latex that
might be the one causing you problems. There is no way to deal with this
other than by modifying the function, so if that's indeed what causes your
problem, you should probably submit a bug report.

The call is around line 16927 in org.el and looks like this:

,
|   (condition-case nil
| (progn
|   (cd tmpdir)
|   (call-process "latex" nil nil nil texfile))
|   (error nil))
`

I think you'd need to modify it to say:

...
(call-process "latex" nil nil nil "-shell-escape" texfile))
...

instead.

Nick




Re: [O] latex command for org-preview-latex-fragment

2011-12-30 Thread Nick Dokos
Ista Zahn  wrote:

> Hello all,
> 
> I'm having troubel getting org-preview-latex-fragment to work when using 
> minted for exported code highlighting. Checking the log files in 
> /tmp/orgtex<...>.log I find that tex fails with the error message "Package 
> minted Error: You must invoke LaTeX with the -shell-escape flag". OK, that's 
> helpful, except that I can't figure out where/how to change the tex command 
> called by org-preview-latex-fragment. Is this configurable in org-mode 
> settings? Or does it depend on some option in the auctex or preview packages?
> 

I remember flailing about to get everything to work with minted and I
now find out that I did not take notes of what worked :-( However,
looking at my customizations, I find that I have included -shell-escape
in two places:

o org-mode specific: org-latex-to-pdf-process - my setting is the
  default of calling pdflatex three times, so I added the -shell-escape
  option to each of the three elements in that list. If you are using
  texi2dvi, you'll have to do something different: not sure whether you
  can pass it as an option, or whether you will need to modify the script
  itself.

o auctex specific: TeX-expand-list - I customized an entry in that list to read

,
|  ...
|  ("%(mode)"
|   (lambda nil
| (if TeX-interactive-mode "" " --shell-escape -interaction=nonstopmode")))
|  ...
`

AFAIK, those are the only changes needed.

Nick





Re: [O] How to make python files being found by the function "executable-find"?

2011-12-30 Thread Nick Dokos
Sheng Xue  wrote:


> I added ".py" to the exec-suffixed :
>  
> (setq exec-suffixes (cons ".py" exec-suffixes))
>  
> but the function "exectuable-find" still can't find *.py files.  Any idea?
>  
> I am running emacs on Windows 7. Thanks.
>  

Can't help with Windows, but when I tried it on Linux, it found a .py file:

(executable-find "ana")
"/home/nick/bin/ana.py"

Necessary prerequisites:

o my PATH included /home/nick/bin
o /home/nick/bin/ana.py is executable
o ".py" has been added to exec-suffixes as above.

In particular, executable-find will *not* find .py files (even
executable ones) in an arbitrary directory; it will also *not* find .py
files in a directory in your PATH if they are not marked executable (on
Linux, the mode of the file has to be set to something like 755 for it
to be executable).

Nick



[O] latex command for org-preview-latex-fragment

2011-12-30 Thread Ista Zahn
Hello all,

I'm having troubel getting org-preview-latex-fragment to work when using 
minted for exported code highlighting. Checking the log files in 
/tmp/orgtex<...>.log I find that tex fails with the error message "Package 
minted Error: You must invoke LaTeX with the -shell-escape flag". OK, that's 
helpful, except that I can't figure out where/how to change the tex command 
called by org-preview-latex-fragment. Is this configurable in org-mode 
settings? Or does it depend on some option in the auctex or preview packages?

Thanks for any help,
Ista



[O] Off-topic: *.gpg files and EasyPG

2011-12-30 Thread Ramon Diaz-Uriarte

Dear All,

Apologies if this is totally off-topic, but I think many people use
org-mode + EasyPG to encrypt *.org.gpg files, and I could not think of a
more knowledgeable list than this one ;-).



* Summary:

  If an encrypted buffer is killed right when it is being opened (when you
  just typed the password), the contents of the encrypted buffer are left,
  as plain text, in other buffer(s).



* Details:

  I routinely use org mode with EasyPG. Yesterday, after realizing that
  sometimes I leave a gpg buffer open for longer than I should, I figured
  I'd set a timer so that any buffers that end with *.gpg are killed
  periodically.


  This seems to work OK, except if the buffer is killed right at the
  moment when it is being visited; i.e., right after you have entered the
  password.


  If that happens, the contents of the encrypted file are left, as plain
  text, in one of the other buffers (often *Scratch* or *Messages*, if
  those exist, or some other buffer, and oftentimes one which is not
  currently visible).



** Reproducible example

1.I have the following code in my .emacs:
---
;; from 
;; 
http://stackoverflow.com/questions/5097561/killing-buffers-whose-names-start-with-a-particular-string

(require 'cl)

(defun is-killable-buffer (buffer)
  (let ((name (buffer-name buffer)))
(string-match ".*\\.gpg$" name)))

(defun kill-killable-buffers ()
  (loop for buffer being the buffers
do (and (is-killable-buffer buffer) (kill-buffer buffer

(run-at-time t 120 'kill-killable-buffers)
-

2. Now, create a *.gpg file, put something in there, and save it so symmetric 
encryption is used.


3. Change the interval when kill-killable-buffers runs. Set it at 1:

(run-at-time t 1 'kill-killable-buffers)

and evaluate the expression.


4. Try to visit the gpg file. As soon as you enter the password, the
buffer is killed. So you never see it being opened. You do see the message

Wrong type argument: stringp, nil

But the contents, as decrypted, plain text, will be left in one of your
other buffers; might be *Messages* or *Scratch* or *ESS* if you have it,
but it could also be any other buffer you are visiting. 

If the contents end in another buffer you are visiting (say, buffer
"abc.txt"), and you do not notice what happened, when you save abc.txt
all the contents of the encrypted file end up in a plain text file.



** Questions.

1. Is this the way it should be? In particular, dumping the unencrypted
content on another, "normal" buffer, seems worrisome.


2. Suppose the contents end up in *Scratch* or *Messages*. How serious a
problem is this? Of course, if anybody has physical access to the machine
while you are not there that is a problem. But I understand that the
content of those buffers is never saved? And it cannot be accessed
remotely?


The reason for question 2. is that if those are not worrisome, then it
might make sense to use the approach of having a timer to kill the gpg
buffers periodically, and have it run in an emacs process that is
dedicated, exclusively, to opening the gpg file(s).




Best,



-- 
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25.
Facultad de Medicina (UAM)
Arzobispo Morcillo, 4
28029 Madrid
Spain

Phone: +34-91-497-2412

Email: rdia...@gmail.com
   ramon.d...@iib.uam.es

http://ligarto.org/rdiaz




Re: [O] Orthogonality of blocks

2011-12-30 Thread Eric S Fraga
Charles Turner  writes:

> Problem: I have two code blocks (#+BEGIN_SRC .. #+END) and I want to
> display them side by side on the page, perhaps within an org table.
>
> Is this possible? It doesn't seem to be. I think it would be nice to
> shove collapsed blocks into org table cells and have them rendered in
> the usual fashion with the different exporters. "First-class blocks"
> :-)
>
> Thanks,
>   Charles.

I know you have received answers for both HTML and ODT.  This is also
possible with latex.  One possible solution is as follows:

#+begin_src org
* Source code blocks arranged horizontally

  #+latex: \newsavebox{\blockone}\begin{lrbox}{\blockone}
#+begin_src octave :exports code :results silent
function f(x)
  y = 2*x;
end
#+end_src
  #+latex: \end{lrbox}

  #+latex: \newsavebox{\blocktwo}\begin{lrbox}{\blocktwo}
#+begin_src octave :exports code :results silent
a = 10;
b = f(a);
disp(b)
#+end_src
  #+latex: \end{lrbox}

  | Function definition | Function use   |
  |-+|
  | \usebox{\blockone}  | \usebox{\blocktwo} |
  |-+|

#+end_src

I hope this makes sense but basically you save the output of the
formatting of the blocks into latex boxes which you later place wherever
you want.  The side benefit is you can use these blocks more than one...

HTH,
eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.02 (release_7.8.02.55.g1870)



Re: [O] Fw: [REQUEST] Microsecond timestamps

2011-12-30 Thread Eric S Fraga
Christian Moe  writes:

> I'm forwarding this to the list as it was sent only to my mailbox by
> mistake. -- Christian

:-)

Hope you all had a very merry Christmas and all the best for a very
happy new year!
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.02 (release_7.8.02.55.g1870)



Re: [O] DAG structure / hard links / shared subtrees

2011-12-30 Thread Eric S Fraga
Jan Kybic  writes:

> Dear org-mode users,
>
> this is my first post, so let me first state that I am using org-mode
> more and more for organizing my daily agenda and I find it really
> useful.
>
> I have a feature request. The structure of the org file is a tree. 

yes, due to the basis being an outline.

> I wondered if it could be made a directed acyclic graph (DAG) instead. 
> In other words, could a subtree be shared between two trees? In yet
> another words, a kind of Unix directory structure with hard links.

not possible unfortunately.  

> One possible use case is as follows: I am preparing a meeting that
> concerns several projects. I have my org file structured by projects. I
> want to prepare an agenda for this meeting, which would contain the
> issues to discuss from the projects. I want to be able choose the order
> the issues. During the meeting, I want to add notes. Right now, I see the 
> following
> options:
>
> a) I can copy the subtrees corresponding to issues from the projects. 
>However, if I later edit either of the copies, I would need to
>synchronize the changes manually.

or simply refile the notes?  I always go through the notes I have taken
at a meeting after the meeting, in my case to define tasks etc.  You
could refile all the notes into the proper places in the hierarchy at
this point.  org has very nice refile support.

> b) I can make an internal link from the agenda to the issues. However,
>the agenda would then not contain the full detail of the issues, just
>a short part of the headline. During the meeting I would have to jump
>there and back.

True but jumping is easy in org?

> c) I can create the meeting agenda dynamically, by assigning tags to
>projects and creating a sparse tree, e.g. from the Agenda
>buffer. However, this requires me to mark every issue to be discussed
>with a meeting-specific tag. I do not have much control over the order
>in which the issues appear. I cannot structure them. The generation
>takes time. And it is not straightforward to add new items to the
>meeting.

I am not sure how the hard links mechanism you suggest above would help
in this case?  Preparing an agenda can be difficult.  What you could do
is have special TODO labels for issues that need to be discussed at the
next meeting?

>
> I am not familiar with the internals of the org-mode but I can envision
> several possible implementations:
>
> a) Enhance existing links so that they can be expanded in-place to show the
>whole subtree, not just a start of the headline. Ideally, it should
>be possible to make changes there but a read-only access would also help.
>
> b) Physically copy "linked" trees to the new location. Make the copies
>share an Id but have a unique subId. Then when one of the copies is
>changed, the changes are propagated into other copies. I believe 
>a lot of the logic could be borrowed from org-mobile, which also
>performs synchronization.
>
> What do you think, does it sound feasible? Is there any other way to
> achieve what I want with org-mode? 

I think both of these would be very difficult to implement with the
latter being quite prone to conflicts...

I think a judicious combination of refiling, jumping and TODO
customisation could give you what you want?

HTH,
eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.02 (release_7.8.02.55.g1870)



Re: [O] [babel] noweb and results for ob-screen?

2011-12-30 Thread Eric S Fraga
Torsten Wagner  writes:

> Hi Eric,
>
> thanks for pushing this up :)
> Well as far as I understood, ob-sh is at the final end (after
> org-babel did its job) a shell script which will be executed.
> ob-screen is an interactive connection to a screen session. Everything
> inside the source cgode block will be sent to this session.
> This is not limited to terminal commands, but could e.g., be
> keystrokes for a ncurse based program, a serial terminal, etc.
> Furthermore all is send over "as-it-is"
> Thus you could have different code blocks and concatenate them to
> complex commands.

[...]

> Hope you get the idea :D

I do indeed!  Thanks.  Very helpful description of what could be
done.  I guess I was definitely stuck in the shell script mode.

eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.02 (release_7.8.02.55.g1870)



[O] How to make python files being found by the function "executable-find"?

2011-12-30 Thread Sheng Xue
Hi all,

I added ".py" to the exec-suffixed :

(setq exec-suffixes (cons ".py" exec-suffixes))

but the function "exectuable-find" still can't find *.py files.  Any idea?

I am running emacs on Windows 7. Thanks.

Best regards,
Sheng


[O] error "Capture abort: (void-function org-pop-to-buffer-same-window)"

2011-12-30 Thread Eric Belpaire

Hello

I'm trying to fix Lisp error: (error "Capture abort: (void-function 
org-pop-to-buffer-same-window)").


I'm using GNU Emacs 24.0.91.1 (i386-mingw-nt5.1.2600) of 2011-11-08 on 
MARVIN

started with the Emacs starter kit and using org-20111229.

I've done the following analysis:
- function org-pop-to-buffer-same-window found in org-20111229/org-compat.el
- autoload "org-compat.el" in 
~/.emacs.d/elpa/org-20111229/org-autoloads.el doesn't work

- (require 'org-autoloads) --> doesn't work
- verify load-path --> found "~/.emacs.d/elpa/org-20111229" before 
"c:/Usr/emacs/lisp/org"


What am I missing?
Can someone help me?

Thanks,
Eric




[O] [PATCH 3/3] Honour existing restrictions when visiting tasks from the agenda

2011-12-30 Thread Bernt Hansen
* lisp/org-agenda.el (org-agenda-switch-to): Widen org buffer only if point is
  outside the current restriction

Widen org buffer when visiting from agenda only if point is outside
current restriction.

Visiting a task with RET or TAB in the agenda should not affect the
org-mode buffer restriction unless the target task is not currently
visible due to the restriction.
---
 lisp/org-agenda.el |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index f240f5e..b009faf 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7033,7 +7033,9 @@ at the text of the entry itself."
   (pos (marker-position marker)))
   (org-pop-to-buffer-same-window buffer)
   (and delete-other-windows (delete-other-windows))
-  (widen)
+  (when (or (< pos (point-min))
+   (> pos (point-max)))
+   (widen))
   (goto-char pos)
   (when (eq major-mode 'org-mode)
(org-show-context 'agenda)
-- 
1.7.8.247.g10f4e




[O] [PATCH 2/3] Honour existing restrictions when clocking in from the agenda

2011-12-30 Thread Bernt Hansen
* lisp/org-agenda.el (org-agenda-clock-in): Save restriction when clocking in 
from the agenda

Narrowed org buffers are now retained when clocking in from the agenda.
We only widen the buffer when the task to clock in is outside the existing
restriction.
---
 lisp/org-agenda.el |   17 +
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 780794e..f240f5e 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7797,14 +7797,15 @@ The cursor may be at a date in the calendar, or in the 
Org agenda."
   newhead)
   (org-with-remote-undo (marker-buffer marker)
 (with-current-buffer (marker-buffer marker)
- (widen)
- (goto-char pos)
- (org-show-context 'agenda)
- (org-show-entry)
- (org-cycle-hide-drawers 'children)
- (org-clock-in arg)
- (setq newhead (org-get-heading)))
-   (org-agenda-change-all-lines newhead hdmarker)
+ (save-restriction
+   (widen)
+   (goto-char pos)
+   (org-show-context 'agenda)
+   (org-show-entry)
+   (org-cycle-hide-drawers 'children)
+   (org-clock-in arg)
+   (setq newhead (org-get-heading)))
+ (org-agenda-change-all-lines newhead hdmarker))
 
 (defun org-agenda-clock-out ()
   "Stop the currently running clock."
-- 
1.7.8.247.g10f4e




[O] [PATCH 1/3] Honour existing restrictions when regenerating the agenda

2011-12-30 Thread Bernt Hansen
* lisp/org.el: Honour existing restrictions when regenerating the agenda

Narrowed org buffers are now retained when regenerating the agenda
with org-agenda-redo
---
 lisp/org.el |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 14b182b..75e6527 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16431,13 +16431,13 @@ When a buffer is unmodified, it is just killed.  When 
modified, it is saved
(rea (concat ":" org-archive-tag ":"))
 bmp file re)
 (save-excursion
-  (save-restriction
-   (while (setq file (pop files))
- (catch 'nextfile
-   (if (bufferp file)
-   (set-buffer file)
- (org-check-agenda-file file)
- (set-buffer (org-get-agenda-file-buffer file)))
+  (while (setq file (pop files))
+   (catch 'nextfile
+ (if (bufferp file)
+ (set-buffer file)
+   (org-check-agenda-file file)
+   (set-buffer (org-get-agenda-file-buffer file)))
+ (save-restriction
(widen)
(setq bmp (buffer-modified-p))
(org-refresh-category-properties)
-- 
1.7.8.247.g10f4e




[O] Honour existing restrictions if possible when visiting tasks from the agenda

2011-12-30 Thread Bernt Hansen
The following short patch series fixes org file restriction
handling for me.  I'm regularly narrowing to subtrees for a
project from the agenda and then using the agenda to visit tasks
in the subtree.  Each time I visit a task, clock in, or
regenerate the agenda my restriction is removed in the org file.
The following patch series fixes this behaviour.



Re: [O] capture problem

2011-12-30 Thread Sebastien Vauban
Hi Thomas,

Thomas S. Dye wrote:
> I'm sometimes running into this error message when I capture:
>
> condition-case: Capture abort: (quit pasteboard doesn't contain valid data)
>
> Unfortunately, this doesn't mean anything to me.  The problem arises
> after I've been working for a while, but I haven't an idea why it
> starts, or any clue to what might trigger it.
>
> I realize this isn't much to go on, and a long way from an ECM, but I
> don't know what to do.  Any ideas on how to track this down will be
> appreciated.
>
> I'm using Org-mode version 7.8.02 (release_7.8.02.13.g0c09a.dirty).

Yesterday, with yesterday's update, I've as well have had something similar:
capture refused to work, after well having worked previously -- in the same
Emacs instance --, and launched me a cryptic reason.

Though, the reason was not the same as yours. Maybe because I'm on Windows?

Anyway, I should have noted down the message. I just restarted Emacs then, and
did not experience any other problem with the capture process.

I'll keep you posted otherwise.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Location of OpenDocument style files should be configurable

2011-12-30 Thread Achim Gratz

Am 29.12.2011 17:06, schrieb Jambunathan K:

Side Note: I am little bit hesitant to make org-odt-styles-dir a
defcustom. Already there are defcustoms for org-export-odt-styles-file
and org-export-odt-content-template-file and making org-odt-styles-dir
will add needless confusion to the users.


That should be OK for the bundled styles that are installed together 
with org mode.  The question remains whether you want to allow users to 
have their own style files.  If one can have per-user style files, there 
probably needs to be a configurable location for them to be stored and a 
way to decide if the standard styles should be visible or not (maybe 
like load-path).


--
Achim.

(on the road :-)




Re: [O] capture problem

2011-12-30 Thread Nick Dokos
Thomas S. Dye  wrote:

> Aloha all,
> 
> I'm sometimes running into this error message when I capture:
> 
> condition-case: Capture abort: (quit pasteboard doesn't contain valid data)
> 
> Unfortunately, this doesn't mean anything to me.  The problem arises
> after I've been working for a while, but I haven't an idea why it
> starts, or any clue to what might trigger it.
> 
> I realize this isn't much to go on, and a long way from an ECM, but I
> don't know what to do.  Any ideas on how to track this down will be
> appreciated.
> 
> I'm using Org-mode version 7.8.02 (release_7.8.02.13.g0c09a.dirty).
> 

It's fairly certain that the message comes from org-capture:

,
|   ...
|   (condition-case error
|   (org-capture-put :template (org-capture-fill-template))
| ((error quit)
|  (if (get-buffer "*Capture*") (kill-buffer "*Capture*"))
|  (error "Capture abort: %s" error)))
|   ...
`

and presumably from the call to org-capture-fill-template. The latter
part of the error message comes from the emacs selection processing 
in the file src/nsselect.m which says:

/* NeXT/Open/GNUstep / MacOSX Cocoa selection processing for emacs.

in the function

,
| ns_string_from_pasteboard (id pb)
| {
|...
|   Fsignal (Qquit,
|   Fcons (build_string ("pasteboard doesn't contain valid 
data"),
| Qnil));
|   return Qnil;
|...
| }
`

So it's MacOSX specific and in emacs C code. But I have no idea what
causes it.

I'm afraid that's about as far as I can go. If you can edebug the
org-capture-fill-template function, maybe you can single-step it and
figure out where it croaks and what values it passes to the function
that causes the error and then proceed further down the call chain.

Nick