Re: [Orgmode] possible single-quote bug in PDF docs (was: trouble with Imenu integration)

2010-07-18 Thread Carsten Dominik

Hi David,

On Jul 17, 2010, at 8:34 AM, David Maus wrote:


Carsten Dominik wrote:


Yes.  Unfortunately I don't know a way to fix this.


This is a known problem and texinfo provides the options

,
| @set txicodequoteundirected
| causes the output for the ' character to be the undirected  
single quote, like this:

|
| '.
| @set txicodequotebacktick
| Cause the output for the ` character to be the standalone  
grave accent, like this:

|
| `.
`
http://www.gnu.org/software/hello/manual/texinfo/Inserting-Quote-Characters.html

To make these options work the file texinfo.tex in doc has to replaced
by a recent version.  Here it is located at

/usr/share/texmf/tex/texinfo/texinfo.tex

Compiling the manual with this texinfo.tex works fine and the quotes


Great!  Could you please submit a patch which fixes this in the manual  
and also replaces

texinfo.tex?

Thanks you for squashing an old and annoying bug.

- Carsten



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


Re: [Orgmode] [BUG][Babel] Exporting text before heading

2010-07-18 Thread Carsten Dominik

Hi Eric,

have you applied this patch?  If yes, please mark it so on the  
patchwork server.


Thanks!

- Carsten



On Jul 17, 2010, at 12:32 AM, Eric Schulte wrote:


Hi Nicolas,

I'll apply this patch now.  Thanks for catching this -- Eric

Nicolas Goaziou n.goaz...@gmail.com writes:


Hello,


Eric Schulte writes:



Hi Nicolas,


I was able to export your example to html without any problems,  
however

I did receive the same error you mentioned when exporting to LaTeX.


HTML problem was indeed from my side.

The attached patch fixes the LaTeX export on my system, please  
give it a
try and let me know if it works for you.  I'm going to look into  
this a
little bit more, as it seems that for LaTeX export the # 
+begin_src org
block is being processed /twice/ by org-exp (probably due to the  
LaTeX

exports mechanism for first exporting the header of a file and then
exporting the body), which is not desirable and could be the root  
issue

which this patch may just paper over.


It works again with your patch.

Thanks.

-- Nicolas


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


- Carsten




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


Re: [Orgmode] Re: auto-fill in a body often insert a space?

2010-07-18 Thread Carsten Dominik

Hi Sun,

I don't know what is happening here, and I would think this has  
nothing to do

with Org-mode.

- Carsten

On Jul 18, 2010, at 8:21 AM, Sun Yongke wrote:




2010/7/18 Carsten Dominik carsten.domi...@gmail.com
Hi Sun,

there were no attatchments in this mail.

Also, please write to the mailing list and not privately to me.

- Carsten


On Jul 17, 2010, at 4:32 PM, Sun Yongke wrote:

hi,Carsten Dominik:

  I write the org files in Chinese character. The attachement 1th is  
a framgment of file,and the generated file is attachment 2th.


  Can you help me removed the space that generated by auto-fill?


2010/5/18 sun yongke sunyon...@gmail.com



when I use the command 'org-export-as-html',there are some spaces in  
where the auto-fill is.


Where exactly?  What kind of spaces, show us!


  It will insert a nbsp;in the auto-fill position.



--
sunyongke
孙永科
Tel: 15808796485



--
Sun Yongke
孙永科
Tel: 15808796485

- Carsten






--
Sun Yongke
孙永科
Tel: 15808796485
org1.pngorg2.png___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


- Carsten




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


[Orgmode] [PATCH] Use proper quote and backtick in PDF output

2010-07-18 Thread David Maus
 Great!  Could you please submit a patch which fixes this in the manual  
 and also replaces
 texinfo.tex?

Here we go.  Added texinfo options to org.texi and orgguide.texi +
update texinfo.tex to 4.13, shipped on Debian testing.

HTH,
 -- David


David Maus (1):
  Use proper quote and backtick in PDF output

 doc/org.texi  |5 +
 doc/orgguide.texi |5 +
 doc/texinfo.tex   | 8271 ++---
 3 files changed, 5300 insertions(+), 2981 deletions(-)


___
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: auto-fill in a body often insert a space?

2010-07-18 Thread Sébastien Vauban
Hi Sun and Carsten,

Carsten Dominik wrote:
 2010/7/18 Carsten Dominik carsten.domi...@gmail.com

   Can you help me removed the space that generated by auto-fill?

 I don't know what is happening here, and I would think this has nothing to
 do with Org-mode.

Isn't it a non-breaking space character?  Type `C-u C-x =' with point place on
that character.

If that's such a character, you should have to see how it has been generated
or inserted there. Maybe automatic rules?  I do have such, in French, for
replacing automatically a normal space with a non-breaking one. So, in my
case, it is in my `.emacs' file that such a rule is located.

Best regards,
  Seb

-- 
Sébastien Vauban


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


Re: [Orgmode] possible single-quote bug in PDF docs (was: trouble with Imenu integration)

2010-07-18 Thread David Maus
Carsten Dominik wrote:
Great!  Could you please submit a patch which fixes this in the manual
and also replaces
texinfo.tex?

Looks like the message with the patch is to large for the mailing list
(returns to sender).  So there is

git://github.com/dmj/dmj-org-mode.git fix/doc-texinfo-template

to pull from.

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


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


Re: [Orgmode] [PATCH] Use proper quote and backtick in PDF output

2010-07-18 Thread Carsten Dominik

Hi David,

look like you forgot to attach the patch?

Thanks!

- Carsten

On Jul 18, 2010, at 9:45 AM, David Maus wrote:

Great!  Could you please submit a patch which fixes this in the  
manual

and also replaces
texinfo.tex?


Here we go.  Added texinfo options to org.texi and orgguide.texi +
update texinfo.tex to 4.13, shipped on Debian testing.

HTH,
-- David


David Maus (1):
 Use proper quote and backtick in PDF output

doc/org.texi  |5 +
doc/orgguide.texi |5 +
doc/texinfo.tex   | 8271 + 
+---

3 files changed, 5300 insertions(+), 2981 deletions(-)


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


- Carsten




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


Re: [Orgmode] possible single-quote bug in PDF docs (was: trouble with Imenu integration)

2010-07-18 Thread Carsten Dominik


On Jul 18, 2010, at 11:05 AM, David Maus wrote:


Carsten Dominik wrote:
Great!  Could you please submit a patch which fixes this in the  
manual

and also replaces
texinfo.tex?


Looks like the message with the patch is to large for the mailing list
(returns to sender).  So there is

git://github.com/dmj/dmj-org-mode.git fix/doc-texinfo-template

to pull from.


Great, thanks.


- Carsten




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


Re: [Orgmode] [BUG] org remember broken

2010-07-18 Thread Carsten Dominik

Applied, thanks.

- Carsten

On Jul 16, 2010, at 5:25 PM, David Maus wrote:


Carsten Dominik wrote:

Hi Thierry,




I cannot easily see why org-decrypt-entry is being called, and if it
is being called in
the remember buffer or where?



Anyway, most of us are moving to org-capture, so I would be more
inclined to look into this if this is still an issue in
org-capture


Looks like this is not a problem of org-remember.  After archiving
DONE items (C-u C-c C-x C-s) I get a similar error:

,
| Debugger entered--Lisp error: (error Before first headline at  
position 1 in buffer projects.org)
|   signal(error (Before first headline at position 1 in buffer  
projects.org))
|   error(Before first headline at position %d in buffer %s 1  
#buffer projects.org)
|   byte-code(\300\301`p#\207 [error Before first headline at  
position %d in buffer %s] 4)

|   org-back-to-heading(t)
|   org-decrypt-entry()
|   run-hooks(org-reveal-start-hook)
|   org-reveal()
|   org-advertized-archive-subtree((4))
|   call-interactively(org-advertized-archive-subtree nil nil)
`

Attached patch fixes this by modifying `org-decrypt-entry' to silently
do nothing if point is before first heading.

HTH
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de
0001-Don-t-throw-error-when-not-inside-a-subtree.patch


- Carsten




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


[Orgmode] ms-exchange invitation -- org-mode appointment

2010-07-18 Thread Dirk-Jan C . Binnema
Hi all,

At work we have the typical MS-Exchange setup for mail and agenda. Only
Outlook as a client is a first-class citizen in this setup, but since there
are many non-Outlook users, mail can also be accessed using IMAP, and
appointments are turned into emails with hyperlinks to access them in
Outlook-WebAccess in a web browser.

Personally, I like to use org-mode for my planning, and I needed to manually
make org-TODO's for the corresponding Outlook events. However, attached find
an attempt at automating this. The idea is that it extracts the information
from the Exchange-emails I get and turn that into an org-TODO, using
org-capture. It's quite trivial, but I've found it useful for me - hopefully
it's useful for others as well.

Note, the code makes the assumption there's a line like:
 When: 09 July, 2010 10:00-11:00 (GMT+02:00) Helsinki, ...
I'm not sure what varieties exist in the wild, I'd be happy to update the
regexps. (Maybe there are translations of 'When'? Or am/pm clocks?)

Anyway, it works like this: you select (mark) the parts of the email you want
to add to your org-todo item, and then invoke:
   M-x org-exchange-capture-invitation
after that, 'org-capture' should handle the rest, provided you have something
like 
  (E ExchangeInvite entry
  (file+headline todo.org Invites)
   * TODO %c\n)

in your org-capture-templates (something that has 'E' as the key, and takes a
%c)

Note, this is in the early at-least-it-works-for-me stages, the elisp is a bit
ugly, it requires org-capture etc.; suggestions/improvements are very welcome;
see the notes in the source file. 

Best wishes,
Dirk.

;; org-exchange-capture.el, v0.0.1
;; written by: Dirk-Jan C. Binnema d...@djcbsoftware.nl
;; License: GPLv3+

(require 'org-capture)

;; turn the e-mails sent MS-Exchange about invitation/appointments into 
org-TODOs
;; using 'org-capture'.

;; The idea is that you select (mark) the parts of the email you want to add to
;; your org-todo item, and then invoke M-x djcb-capture-exchange-invite; 

;; Some caveats:

;;  - obviously, this is just a one-way copy, it won't make you 'accept' an
;;invitation, nor does it get any updates

;;  - it seems to work with the emails I get from Exchange (I've encountered two
;;different kinds). But there may be more; at least the ones I get are in
;;English, there are probably other versions as well. I'd be interested in
;;extending the regexps with more cases.

;;  - it requires org-capture, which is fairly new; it should be easy to support
;;org-remember as well though. Also, I only tested with Wanderlust as e-mail
;;client; it *should* work with others as well though... 

;; Note that that the message buffer must be the active buffer;
;; ie. it won't work in the 'Summary' (Wanderlust)

(defun djcb-exchange-invite-time-to-org-date()
  try to to find the Time/Date from an Exchange-invitation
e-mail in the current buffer, and convert it into an org-mode
date, or `nil' if it's not found.
  get the time/date of an Outlook invite in org-mode notation
  (let ((date) (time-begin) (time-end))
(save-excursion
  (save-match-data
(beginning-of-buffer)
(if (re-search-forward
  (concat ^When: \\([0-9]+ [a-z]+,? [0-9]\\{4\\}\\) 
  \\([0-9]+:[0-9]+\\)-\\([0-9]+:[0-9]+\\)) nil t 1)
  (progn
(setq
  date (parse-time-string (match-string-no-properties 1))
  time-begin (match-string-no-properties 2)
  time-end (match-string-no-properties 3))
(format %d-%02d-%02d %s--%s
  (elt date 5) (elt date 4) (elt date 3)
time-begin time-end))
  (message No match)
  nil)

(defun djcb-exchange-invite-subject()
  get the subject of an MS-Exchange invite e-mail in the current
buffer
  (save-excursion
(save-match-data
  (beginning-of-buffer)
  (when (re-search-forward ^Subject: \\(.*\\) nil t 1)
(match-string-no-properties 1)

(defun org-exchange-capture-invitation ()
  capture the MS-Exchange invite e-mail in buffer into an
org-mode agenda item using the org-capture system. For this to
work, you'll need to add to your `org-capture-templates' an item
with a shortcut key of 'E', e.g.

 (\E\ \ExchangeInvite\ entry
   (file+headline \todo.org\ \Meetings\)
   \* TODO %c\\n\)

any text you select (mark) in the buffer will be added to to
captured TODO; thus you can add the relevant details to the org TODO item.

  (interactive)
  (let( (time (djcb-exchange-invite-time-to-org-date))
(title (djcb-exchange-invite-subject))
(txt
   (if (use-region-p) (buffer-substring-no-properties (region-beginning)
(region-end)) )))
(when time
  (kill-new (concat title   time \n\t txt)) ;; hack: prepend to kill 
ring
  (org-capture nil E

(provide 'org-exchange-capture)


-- 
Dirk-Jan C. Binnema  Helsinki, Finland

[Orgmode] [PATCH] Docstring fixes

2010-07-18 Thread Philip Rooke
This is the sixth patch in a series that makes some straightforward
corrections to a number of docstrings.  Each change is normally to:

- correct a typo, or
- fix up hyperlinks to function or variable names, or
- ensure slightly better conformance with the documentation guidelines
  and tips given in the Elisp manual

No attempt is made to provide missing docstrings or document arguments.

---
I have just seen Bernt's very helpful email about formatting patches in
Git.  Hopefully this will be easier to use for you.  Please let me know
if I have messed this formatting up.

Phil

 lisp/org-timer.el |   10 +++---
 lisp/org-w3m.el   |6 --
 lisp/org-wl.el|6 +++---
 lisp/org-xoxo.el  |5 +++--
 4 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index e0817c8..d8e07d6 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -27,6 +27,8 @@

 ;; This file contains the relative timer code for Org-mode

+;;; Code:
+
 (require 'org)

 (declare-function org-show-notification org-clock (parameters))
@@ -110,7 +112,8 @@ the region 0:00:00.
   (run-hooks 'org-timer-start-hook

 (defun org-timer-pause-or-continue (optional stop)
-  Pause or continue the relative timer.  With prefix arg, stop it
entirely.
+  Pause or continue the relative timer.
+With prefix arg STOP, stop it entirely.
   (interactive P)
   (cond
(stop (org-timer-stop))
@@ -145,8 +148,9 @@ the region 0:00:00.
 (defun org-timer (optional restart)
   Insert a H:MM:SS string from the timer into the buffer.
 The first time this command is used, the timer is started.  When used with
-a `C-u' prefix, force restarting the timer.
-When used with a double prefix arg `C-u C-u', change all the timer string
+a \\[universal-argument] prefix, force restarting the timer.
+When used with a double prefix argument \
+\\[universal-argument] \\universal-argument], change all the timer string
 in the region by a fixed amount.  This can be used to recalibrate a timer
 that was not started at the correct moment.
   (interactive P)
diff --git a/lisp/org-w3m.el b/lisp/org-w3m.el
index 3f403c9..ce28729 100644
--- a/lisp/org-w3m.el
+++ b/lisp/org-w3m.el
@@ -28,11 +28,11 @@
 ;; This file implements copying HTML content from a w3m buffer and
 ;; transforming the text on the fly so that it can be pasted into
 ;; an org-mode buffer with hot links.  It will also work for regions
-;; in gnus buffers that have ben washed with w3m.
+;; in gnus buffers that have been washed with w3m.

 ;
 ;;
-;;; Acknowledgements:
+;;; Acknowledgments:

 ;; Richard Riley rileyrgdev at googlemail dot com
 ;;
@@ -40,6 +40,8 @@
 ;;  proposed by Richard, I'm just coding it.
 ;;

+;;; Code:
+
 (require 'org)

 (defun org-w3m-copy-for-org-mode ()
diff --git a/lisp/org-wl.el b/lisp/org-wl.el
index de6e919..9826a6f 100644
--- a/lisp/org-wl.el
+++ b/lisp/org-wl.el
@@ -105,7 +105,7 @@ googlegroups otherwise.
   '((% . imap) (- . nntp) (+ . mh) (= . spool)
 ($ . archive) ( . pop) (@ . shimbun) ([ . search)
 (* . multi) (/ . filter) (| . pipe) (' . internal))
-  List of folder indicators. See Wanderlust manual, section 3.)
+  List of folder indicators.  See Wanderlust manual, section 3.)

 ;; Install the link type
 (org-add-link-type wl 'org-wl-open)
@@ -114,8 +114,8 @@ googlegroups otherwise.
 ;; Implementation

 (defun org-wl-folder-type (folder)
-  Return symbol that indicicates the type of FOLDER.
-FOLDER is the wanderlust folder name. The first character of the
+  Return symbol that indicates the type of FOLDER.
+FOLDER is the wanderlust folder name.  The first character of the
 folder name determines the the folder type.
   (let* ((indicator (substring folder 0 1))
  (type (cdr (assoc indicator org-wl-folder-types
diff --git a/lisp/org-xoxo.el b/lisp/org-xoxo.el
index 2ed5ff4..c065a8c 100644
--- a/lisp/org-xoxo.el
+++ b/lisp/org-xoxo.el
@@ -25,10 +25,11 @@
 ;
 ;;
 ;;; Commentary:
+;; XOXO export

-(require 'org-exp)
+;;; Code:

-;;; XOXO export
+(require 'org-exp)

 (defvar org-export-xoxo-final-hook nil
   Hook run after XOXO export, in the new buffer.)
-- 
1.7.1.1
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: org-babel and OCaml - help?

2010-07-18 Thread Erik L. Arneson
Eric Schulte schulte.e...@gmail.com writes:
 Hi Erik,

Hi, Eric!

 I've just pushed up a commit with teaches Babel how to feed tables to
 ocaml, so your example above re-written as below should now work.

I already had half-a-patch (as you saw elsewhere on the list) that took
a slightly different approach than you did.  Because a row might
contain, say, both text, integers, and floating point numbers, I thought
that lists of tuples might be easier to use.  Arrays of tuples might
work even better, I would guess.  I'll play around with the options and
see what I can come up with.

 I'd love to have your help!  The relevant code is located in
 org/lisp/ob-ocaml.el, you can see in the most recent commit the changes
 that I've just made for integrating table handling into this file.

 You'll notice by comparing ob-ocaml to some of the more mature code
 files like ob-R, ob-python, ob-ruby that there are many areas in which
 ob-ocaml could grow in functionality.

Great, I will start hacking away at it.  What's the process I need to go
through to sign FSF papers?

-- 
Erik Arneson dyb...@lnouv.com
  GPG Key ID: 1024D/62DA1D25
  Office: +1.541.291.9776
  Skype: callto://pymander


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


[Orgmode] [PATCH] Fix a few references to the JavaScript name

2010-07-18 Thread Phil Rooke
Subject: [PATCH] Fix some trivial typos
People like Douglas Crockford (a member of the JavaScript 2.0 committee
at ECMA and author of JavaScript: The Good Parts) capitalize the J and
the S in JavaScript.  This patch fixes some references to follow this
standard.

---
 doc/org.texi |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index fc8236c..3002772 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -365,7 +365,7 @@ HTML export
 * Images in HTML export::  How to insert figures into HTML output
 * Text areas in HTML export::  An alternative way to show an example
 * CSS support::Changing the appearance of the output
-* Javascript support:: Info and Folding in a web browser
+* JavaScript support:: Info and Folding in a web browser
 
 l...@tex{} and PDF export
 
@@ -9334,7 +9334,7 @@ language, but with additional support for tables.
 * Images in HTML export::  How to insert figures into HTML output
 * Text areas in HTML export::  An alternative way to show an example
 * CSS support::Changing the appearance of the output
-* Javascript support:: Info and Folding in a web browser
+* JavaScript support:: Info and Folding in a web browser
 @end menu
 
 @node HTML Export commands, Quoting HTML tags, HTML export, HTML export
@@ -9526,7 +9526,7 @@ respectively.  For example
 @end example
 
 
-...@node CSS support, Javascript support, Text areas in HTML export, HTML 
export
+...@node CSS support, JavaScript support, Text areas in HTML export, HTML 
export
 @subsection CSS support
 @cindex CSS, for HTML export
 @cindex HTML export, CSS
@@ -9597,8 +9597,8 @@ referring to an external file.
 @c FIXME: More about header and footer styles
 @c FIXME: Talk about links and targets.
 
-...@node Javascript support,  , CSS support, HTML export
-...@subsection Javascript supported display of web pages
+...@node JavaScript support,  , CSS support, HTML export
+...@subsection JavaScript supported display of web pages
 
 @cindex Rose, Sebastian
 Sebastian Rose has written a JavaScript program especially designed to
-- 
1.7.1.1


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


Re: [Orgmode] [PATCH] Docstring fixes

2010-07-18 Thread Carsten Dominik

Hi Philip,

I had some problems with this patch, but I am not sure why.
git am did not work, but git apply did  Beats me why...

Anyway, it has been applied, thanks!

Tomorrow is release date... :)

- Carsten

On Jul 18, 2010, at 3:14 PM, Philip Rooke wrote:


This is the sixth patch in a series that makes some straightforward
corrections to a number of docstrings.  Each change is normally to:

- correct a typo, or
- fix up hyperlinks to function or variable names, or
- ensure slightly better conformance with the documentation guidelines
  and tips given in the Elisp manual

No attempt is made to provide missing docstrings or document  
arguments.


---
I have just seen Bernt's very helpful email about formatting patches  
in
Git.  Hopefully this will be easier to use for you.  Please let me  
know

if I have messed this formatting up.

Phil

 lisp/org-timer.el |   10 +++---
 lisp/org-w3m.el   |6 --
 lisp/org-wl.el|6 +++---
 lisp/org-xoxo.el  |5 +++--
 4 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index e0817c8..d8e07d6 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -27,6 +27,8 @@

 ;; This file contains the relative timer code for Org-mode

+;;; Code:
+
 (require 'org)

 (declare-function org-show-notification org-clock (parameters))
@@ -110,7 +112,8 @@ the region 0:00:00.
   (run-hooks 'org-timer-start-hook

 (defun org-timer-pause-or-continue (optional stop)
-  Pause or continue the relative timer.  With prefix arg, stop it  
entirely.

+  Pause or continue the relative timer.
+With prefix arg STOP, stop it entirely.
   (interactive P)
   (cond
(stop (org-timer-stop))
@@ -145,8 +148,9 @@ the region 0:00:00.
 (defun org-timer (optional restart)
   Insert a H:MM:SS string from the timer into the buffer.
 The first time this command is used, the timer is started.  When  
used with

-a `C-u' prefix, force restarting the timer.
-When used with a double prefix arg `C-u C-u', change all the timer  
string

+a \\[universal-argument] prefix, force restarting the timer.
+When used with a double prefix argument \
+\\[universal-argument] \\universal-argument], change all the timer  
string
 in the region by a fixed amount.  This can be used to recalibrate a  
timer

 that was not started at the correct moment.
   (interactive P)
diff --git a/lisp/org-w3m.el b/lisp/org-w3m.el
index 3f403c9..ce28729 100644
--- a/lisp/org-w3m.el
+++ b/lisp/org-w3m.el
@@ -28,11 +28,11 @@
 ;; This file implements copying HTML content from a w3m buffer and
 ;; transforming the text on the fly so that it can be pasted into
 ;; an org-mode buffer with hot links.  It will also work for regions
-;; in gnus buffers that have ben washed with w3m.
+;; in gnus buffers that have been washed with w3m.

 ;
 ;;
-;;; Acknowledgements:
+;;; Acknowledgments:

 ;; Richard Riley rileyrgdev at googlemail dot com
 ;;
@@ -40,6 +40,8 @@
 ;;  proposed by Richard, I'm just coding it.
 ;;

+;;; Code:
+
 (require 'org)

 (defun org-w3m-copy-for-org-mode ()
diff --git a/lisp/org-wl.el b/lisp/org-wl.el
index de6e919..9826a6f 100644
--- a/lisp/org-wl.el
+++ b/lisp/org-wl.el
@@ -105,7 +105,7 @@ googlegroups otherwise.
   '((% . imap) (- . nntp) (+ . mh) (= . spool)
 ($ . archive) ( . pop) (@ . shimbun) ([ . search)
 (* . multi) (/ . filter) (| . pipe) (' . internal))
-  List of folder indicators. See Wanderlust manual, section 3.)
+  List of folder indicators.  See Wanderlust manual, section 3.)

 ;; Install the link type
 (org-add-link-type wl 'org-wl-open)
@@ -114,8 +114,8 @@ googlegroups otherwise.
 ;; Implementation

 (defun org-wl-folder-type (folder)
-  Return symbol that indicicates the type of FOLDER.
-FOLDER is the wanderlust folder name. The first character of the
+  Return symbol that indicates the type of FOLDER.
+FOLDER is the wanderlust folder name.  The first character of the
 folder name determines the the folder type.
   (let* ((indicator (substring folder 0 1))
 (type (cdr (assoc indicator org-wl-folder-types
diff --git a/lisp/org-xoxo.el b/lisp/org-xoxo.el
index 2ed5ff4..c065a8c 100644
--- a/lisp/org-xoxo.el
+++ b/lisp/org-xoxo.el
@@ -25,10 +25,11 @@
 ;
 ;;
 ;;; Commentary:
+;; XOXO export

-(require 'org-exp)
+;;; Code:

-;;; XOXO export
+(require 'org-exp)

 (defvar org-export-xoxo-final-hook nil
   Hook run after XOXO export, in the new buffer.)
--
1.7.1.1

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


- Carsten




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org

[Orgmode] [PATCH] Docstring fixes

2010-07-18 Thread Phil Rooke
This is the eighth patch in a series that makes some straightforward
corrections to a number of docstrings.  Each change is normally to:

- correct a typo, or
- fix up hyperlinks to function or variable names, or
- ensure slightly better conformance with the documentation guidelines
  and tips given in the Elisp manual

---
This is a partial patch, mainly focused on fixing some typos.  Given the
pending release deadline I thought I may as well send this now,
hopefully it is useful in its own right.


diff --git a/lisp/org.el b/lisp/org.el
index e26c51b..acd7031 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -133,15 +133,16 @@
org-babel-load-languages))
 
 (defcustom org-babel-load-languages '((emacs-lisp . t))
-  Languages which can be evaluated in Org-mode buffers.  This
-list can be used to load support for any of the languages below,
-note that each language will depend on a different set of system
-executables and/or Emacs modes.  When a language is \loaded\,
-then code blocks in that language can be evaluated with
-`org-babel-execute-src-block' bound by default to C-c C-c (note
-the `org-babel-no-eval-on-ctrl-c-ctrl-c' variable can be set to
-remove code block evaluation from the C-c C-c keybinding.  By
-default only Emacs Lisp (which has no requirements) is loaded.
+  Languages which can be evaluated in Org-mode buffers.
+This list can be used to load support for any of the languages
+below, note that each language will depend on a different set of
+system executables and/or Emacs modes.  When a language is
+\loaded\, then code blocks in that language can be evaluated
+with `org-babel-execute-src-block' bound by default to C-c
+C-c (note the `org-babel-no-eval-on-ctrl-c-ctrl-c' variable can
+be set to remove code block evaluation from the C-c C-c
+keybinding.  By default only Emacs Lisp (which has no
+requirements) is loaded.
   :group 'org-babel
   :set 'org-babel-do-load-languages
   :type '(alist :tag Babel Languages
@@ -334,7 +335,7 @@ to add the symbol `xyz', and the package must have a call to
   Non-nil means make shift-cursor commands select text when possible.
 
 In Emacs 23, when `shift-select-mode' is on, shifted cursor keys start
-selecting a region, or enlarge thusly regions started in this way.
+selecting a region, or enlarge  regions started in this way.
 In Org-mode, in special contexts, these same keys are used for other
 purposes, important enough to compete with shift selection.  Org tries
 to balance these needs by supporting `shift-select-mode' outside these
@@ -494,10 +495,10 @@ become effective.
   :type 'boolean)
 
 (defcustom org-use-extra-keys nil
-  Non-nil means use extra key sequence definitions for certain
-commands.  This happens automatically if you run XEmacs or if
-window-system is nil.  This variable lets you do the same
-manually.  You must set it before loading org.
+  Non-nil means use extra key sequence definitions for certain commands.
+This happens automatically if you run XEmacs or if `window-system'
+is nil.  This variable lets you do the same manually.  You must
+set it before loading org.
 
 Example: on Carbon Emacs 22 running graphically, with an external
 keyboard on a Powerbook, the default way of setting M-left might
@@ -529,7 +530,7 @@ therefore you'll have to restart Emacs to apply it after 
changing.
 (defun org-key (key)
   Select key according to `org-replace-disputed-keys' and `org-disputed-keys'.
 Or return the original if not disputed.
-Also apply the trnaslations defined in `org-xemacs-key-equivalents'.
+Also apply the translations defined in `org-xemacs-key-equivalents'.
   (when org-replace-disputed-keys
 (let* ((nkey (key-description key))
   (x (org-find-if (lambda (x)
@@ -751,7 +752,7 @@ The cdr is either a command to be called interactively, a 
function
 to be called, or a form to be evaluated.
 An entry that is just a list with a single string will be interpreted
 as a descriptive headline that will be added when listing the speed
-copmmands in the Help buffer using the `?' speed command.
+commands in the Help buffer using the `?' speed command.
 :group 'org-structure
 :type '(repeat :value (k . ignore)
(choice :value (k . ignore)
@@ -831,7 +832,7 @@ of the buffer.
 
 When the cursor is at the end of an empty headline, i.e with only stars
 and maybe a TODO keyword, TAB will then switch the entry to become a child,
-and then all possible anchestor states, before returning to the original state.
+and then all possible ancestor states, before returning to the original state.
 This makes data entry extremely fast:  M-RET to create a new headline,
 on TAB to make it a child, two or more tabs to make it a (grand-)uncle.
 
@@ -1089,9 +1090,8 @@ See also the QUOTE keyword.
   :group 'org-edit-structure
   :type 'boolean)
 
-
 (defcustom org-goto-auto-isearch t
-  Non-nil means typing characters in org-goto starts incremental search.
+  Non-nil means typing characters in `org-goto' starts incremental 

[Orgmode] [PATCH] Docstring fixes

2010-07-18 Thread Phil Rooke

This is the ninth patch in a series that makes some straightforward
corrections to a number of docstrings.  Each change is normally to:

- correct a typo, or
- fix up hyperlinks to function or variable names, or
- ensure slightly better conformance with the documentation guidelines
  and tips given in the Elisp manual

---
This is a partial patch, mainly focused on fixing some references to
C-u.  Given the pending release deadline I thought I may as well send
this now, hopefully it is useful in its own right.


diff --git a/lisp/org.el b/lisp/org.el
index acd7031..f8c2026 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -818,7 +818,8 @@ This can also be set in on a per-file basis with
 (defcustom org-cycle-global-at-bob nil
   Cycle globally if cursor is at beginning of buffer and not at a headline.
 This makes it possible to do global cycling without having to use S-TAB or
-C-u TAB.  For this special case to work, the first line of the buffer
+\\[universal-argument] TAB.  For this special case to work, the first line \
+of the buffer
 must not be a headline - it may be empty or some other text.  When used in
 this way, `org-cycle-hook' is disables temporarily, to make sure the
 cursor stays at the beginning of the buffer.
@@ -1640,7 +1641,6 @@ file identifier are
  that does not use any of the group matches, this case is
  handled identically to the second one (i.e. match against
  file name only).
-
  In a custom lisp form, you can access the group matches with
  (match-string n link).
 
@@ -1660,7 +1660,7 @@ file identifier are
  `system'  The system command to open files, like `open' on Windows
and Mac OS X, and mailcap under GNU/Linux.  This is the command
that will be selected if you call `C-c C-o' with a double
-   `C-u C-u' prefix.
+   \\[universal-argument] \\[universal-argument] prefix.
 
 Possible values for the command are:
  `emacs'   The file will be visited by the current Emacs process.
@@ -5925,7 +5925,7 @@ in special contexts.
 ;;;###autoload
 (defun org-global-cycle (optional arg)
   Cycle the global visibility.  For details see `org-cycle'.
-With C-u prefix arg, switch to startup visibility.
+With \\[universal-argument] prefix arg, switch to startup visibility.
 With a numeric prefix, show all headlines up to that level.
   (interactive P)
   (let ((org-cycle-include-plain-lists
@@ -6259,7 +6259,7 @@ point nowhere.
 (make-variable-buffer-local 'org-hide-block-overlays)
 
 (defun org-block-map (function optional start end)
-  Call function at the head of all source blocks in the current buffer.
+  Call FUNCTION at the head of all source blocks in the current buffer.
 Optional arguments START and END can be used to limit the range.
   (let ((start (or start (point-min)))
 (end (or end (point-max
@@ -6548,10 +6548,12 @@ With numerical prefix ARG, go up to this level and then 
take that tree.
 If ARG is negative, go up that many levels.
 If `org-indirect-buffer-display' is not `new-frame', the command removes the
 indirect buffer previously made with this command, to avoid proliferation of
-indirect buffers.  However, when you call the command with a `C-u' prefix, or
+indirect buffers.  However, when you call the command with a \
+\\[universal-argument] prefix, or
 when `org-indirect-buffer-display' is `new-frame', the last buffer
 is kept so that you can work with several indirect buffers at the same time.
-If `org-indirect-buffer-display' is `dedicated-frame', the C-u prefix also
+If `org-indirect-buffer-display' is `dedicated-frame', the \
+\\[universal-argument] prefix also
 requests that a new frame be made for the new buffer, so that the dedicated
 frame is not changed.
   (interactive P)
@@ -9554,7 +9556,8 @@ entry for this file type, and if yes, the corresponding 
command is launched.
 If no application is found, Emacs simply visits the file.
 
 With optional prefix argument IN-EMACS, Emacs will visit the file.
-With a double C-c C-u prefix arg, Org tries to avoid opening in Emacs
+With a double \\[universal-argument] \\[universal-argument] \
+prefix arg, Org tries to avoid opening in Emacs
 and to use an external application to visit the file.
 
 Optional LINE specifies a line to go to, optional SEARCH a string
@@ -10039,7 +10042,8 @@ below it are allowed.
 
 With prefix arg GOTO, the command will only visit the target location,
 not actually move anything.
-With a double prefix `C-u C-u', go to the location where the last refiling
+With a double prefix arg \\[universal-argument] \\[universal-argument], \
+go to the location where the last refiling
 operation has put the subtree.
 With a prefix argument of `2', refile to the running clock.
 
@@ -12002,7 +12006,8 @@ not t for the search context.
 With optional argument SIBLINGS, on each level of the hierarchy all
 siblings are shown.  This repairs the tree structure to what it 

[Orgmode] [PATCH] Typo

2010-07-18 Thread Philip Rooke
Fix single typo

---
 doc/org.texi |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 3002772..ab5f10f 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -1,4 +1,5 @@
 
+
 \input texinfo
 @c %**start of header
 @setfilename info/org
@@ -472,7 +473,7 @@ Interaction with other packages
 
 Hacking
 
-* Hooks::  Who to reach into Org's internals
+* Hooks::  How to reach into Org's internals
 * Add-on packages::Available extensions
 * Adding hyperlink types:: New custom link types
 * Context-sensitive commands:: How to add functionality to such commands
-- 
1.7.1.1


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


Re: [Orgmode] Re: org-babel and OCaml - help?

2010-07-18 Thread Eric Schulte
dyb...@lnouv.com (Erik L. Arneson) writes:

 Eric Schulte schulte.e...@gmail.com writes:
 Hi Erik,

 Hi, Eric!

 I've just pushed up a commit with teaches Babel how to feed tables to
 ocaml, so your example above re-written as below should now work.

 I already had half-a-patch (as you saw elsewhere on the list) that took
 a slightly different approach than you did.  Because a row might
 contain, say, both text, integers, and floating point numbers, I thought
 that lists of tuples might be easier to use.  Arrays of tuples might
 work even better, I would guess.  I'll play around with the options and
 see what I can come up with.

 I'd love to have your help!  The relevant code is located in
 org/lisp/ob-ocaml.el, you can see in the most recent commit the changes
 that I've just made for integrating table handling into this file.

 You'll notice by comparing ob-ocaml to some of the more mature code
 files like ob-R, ob-python, ob-ruby that there are many areas in which
 ob-ocaml could grow in functionality.

 Great, I will start hacking away at it.  What's the process I need to go
 through to sign FSF papers?

Hi Erik,

See http://orgmode.org/worg/org-contribute.php#sec-2 for information on
FSF copyright assignment.

Cheers -- Eric

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


Re: [Orgmode] [BUG][Babel] Exporting text before heading

2010-07-18 Thread Eric Schulte
Done -- Eric

Carsten Dominik carsten.domi...@gmail.com writes:

 Hi Eric,

 have you applied this patch?  If yes, please mark it so on the
 patchwork server.

 Thanks!

 - Carsten



 On Jul 17, 2010, at 12:32 AM, Eric Schulte wrote:

 Hi Nicolas,

 I'll apply this patch now.  Thanks for catching this -- Eric

 Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Eric Schulte writes:

 Hi Nicolas,

 I was able to export your example to html without any problems,
 however
 I did receive the same error you mentioned when exporting to LaTeX.

 HTML problem was indeed from my side.

 The attached patch fixes the LaTeX export on my system, please
 give it a
 try and let me know if it works for you.  I'm going to look into
 this a
 little bit more, as it seems that for LaTeX export the #
 +begin_src org
 block is being processed /twice/ by org-exp (probably due to the
 LaTeX
 exports mechanism for first exporting the header of a file and then
 exporting the body), which is not desirable and could be the root
 issue
 which this patch may just paper over.

 It works again with your patch.

 Thanks.

 -- Nicolas

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

 - Carsten

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


Re: [Orgmode] inline image display not working when org-indent-mode active

2010-07-18 Thread David Maus
Erik Iverson wrote:
Hello!

Just pulled the latest org-mode from git.

I've upgraded to Emacs 23.2 so that org-indent-mode works properly.

However, when org-indent-mode is active, it seems that inline images (C-c C-x
C-v) do not work properly.

They show up for a brief time ( 1 second) and then promptly return to showing
just the file link.

Turning off org-indent-mode and re-toggling image display shows the image 
properly.

If it matters, these files were created in org-babel source blocks.

Can anyone reproduce this?

Yes, I can reproduce this with

Org-mode version 6.36trans

on

GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
 of 2010-05-16 on raven, modified by Debian

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


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


[Orgmode] footnotes in LaTeX export

2010-07-18 Thread Henri-Paul Indiogine
I run the latest git version of org-mode in the Ubuntu 10.04 snapshot
version of Emacs.

I have footnotes in my org document.  When I export my org file to LaTeX
they are placed, correctly, inline as \footnote{blah blah}.  However,
they are still present at the bottom of the tex file as [fn:xx] blah
blah just as in the original org file.

So far I have just deleted this block of text before compiling the tex
file to pdf.  However, I am probably missing something here and there
should not be that section of [fn:xx] at the bottom of my text file.

Thanks,
Henri-Paul


-- 
Henri-Paul Indiogine
Email: hindiog...@gmail.com
Skype: hindiogine
Website: http://www.coe.tamu.edu/~enrico


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


Re: [Orgmode] [PATCH] Docstring fixes

2010-07-18 Thread Carsten Dominik

Hi Phil,

I cannot get this patch to apply cleanly.  Could you update it, please?

Thanks!

- Carsten

On Jul 18, 2010, at 6:28 PM, Phil Rooke wrote:



This is the ninth patch in a series that makes some straightforward
corrections to a number of docstrings.  Each change is normally to:

- correct a typo, or
- fix up hyperlinks to function or variable names, or
- ensure slightly better conformance with the documentation guidelines
 and tips given in the Elisp manual

---
This is a partial patch, mainly focused on fixing some references to
C-u.  Given the pending release deadline I thought I may as well send
this now, hopefully it is useful in its own right.


diff --git a/lisp/org.el b/lisp/org.el
index acd7031..f8c2026 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -818,7 +818,8 @@ This can also be set in on a per-file basis with
(defcustom org-cycle-global-at-bob nil
  Cycle globally if cursor is at beginning of buffer and not at a  
headline.
This makes it possible to do global cycling without having to use S- 
TAB or

-C-u TAB.  For this special case to work, the first line of the buffer
+\\[universal-argument] TAB.  For this special case to work, the  
first line \

+of the buffer
must not be a headline - it may be empty or some other text.  When  
used in

this way, `org-cycle-hook' is disables temporarily, to make sure the
cursor stays at the beginning of the buffer.
@@ -1640,7 +1641,6 @@ file identifier are
 that does not use any of the group matches, this  
case is
 handled identically to the second one (i.e. match  
against

 file name only).
-
 In a custom lisp form, you can access the group  
matches with

 (match-string n link).

@@ -1660,7 +1660,7 @@ file identifier are
 `system'  The system command to open files, like `open' on  
Windows
   and Mac OS X, and mailcap under GNU/Linux.  This is  
the command
   that will be selected if you call `C-c C-o' with a  
double

-   `C-u C-u' prefix.
+   \\[universal-argument] \\[universal-argument] prefix.

Possible values for the command are:
 `emacs'   The file will be visited by the current Emacs process.
@@ -5925,7 +5925,7 @@ in special contexts.
;;;###autoload
(defun org-global-cycle (optional arg)
  Cycle the global visibility.  For details see `org-cycle'.
-With C-u prefix arg, switch to startup visibility.
+With \\[universal-argument] prefix arg, switch to startup visibility.
With a numeric prefix, show all headlines up to that level.
  (interactive P)
  (let ((org-cycle-include-plain-lists
@@ -6259,7 +6259,7 @@ point nowhere.
(make-variable-buffer-local 'org-hide-block-overlays)

(defun org-block-map (function optional start end)
-  Call function at the head of all source blocks in the current  
buffer.
+  Call FUNCTION at the head of all source blocks in the current  
buffer.

Optional arguments START and END can be used to limit the range.
  (let ((start (or start (point-min)))
(end (or end (point-max
@@ -6548,10 +6548,12 @@ With numerical prefix ARG, go up to this  
level and then take that tree.

If ARG is negative, go up that many levels.
If `org-indirect-buffer-display' is not `new-frame', the command  
removes the
indirect buffer previously made with this command, to avoid  
proliferation of
-indirect buffers.  However, when you call the command with a `C-u'  
prefix, or

+indirect buffers.  However, when you call the command with a \
+\\[universal-argument] prefix, or
when `org-indirect-buffer-display' is `new-frame', the last buffer
is kept so that you can work with several indirect buffers at the  
same time.
-If `org-indirect-buffer-display' is `dedicated-frame', the C-u  
prefix also

+If `org-indirect-buffer-display' is `dedicated-frame', the \
+\\[universal-argument] prefix also
requests that a new frame be made for the new buffer, so that the  
dedicated

frame is not changed.
  (interactive P)
@@ -9554,7 +9556,8 @@ entry for this file type, and if yes, the  
corresponding command is launched.

If no application is found, Emacs simply visits the file.

With optional prefix argument IN-EMACS, Emacs will visit the file.
-With a double C-c C-u prefix arg, Org tries to avoid opening in Emacs
+With a double \\[universal-argument] \\[universal-argument] \
+prefix arg, Org tries to avoid opening in Emacs
and to use an external application to visit the file.

Optional LINE specifies a line to go to, optional SEARCH a string
@@ -10039,7 +10042,8 @@ below it are allowed.

With prefix arg GOTO, the command will only visit the target location,
not actually move anything.
-With a double prefix `C-u C-u', go to the location where the last  
refiling
+With a double prefix arg \\[universal-argument] \\[universal- 
argument], \

+go to the location where the last refiling
operation has put the subtree.
With a prefix argument of `2', refile to the running clock.

@@ -12002,7 +12006,8 @@ not t for 

[Orgmode] [PATCH] agenda-view and custom sort

2010-07-18 Thread Jambunathan K

BUG: Agenda view invokes custom sort routine even if not configured to
do so.

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
old mode 100644
new mode 100755
index 1314eb2..f34f45d
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5312,8 +5312,9 @@ HH:MM.
 (alpha-up(and (org-em 'alpha-up 'alpha-down ss)
   (org-cmp-alpha a b)))
 (alpha-down  (if alpha-up (- alpha-up) nil))
+   (need-user-cmp   (org-em 'user-defined-up 'user-defined-down ss))
 user-defined-up user-defined-down)
-(if (and org-agenda-cmp-user-defined
+(if (and need-user-cmp org-agenda-cmp-user-defined
 (functionp org-agenda-cmp-user-defined))
(setq user-defined-up
  (funcall org-agenda-cmp-user-defined a b)


;; Sample agenda file

* Tasks
** Task1
   2010-07-19 Mon

** Task2
   2010-07-19 Mon

;; turn on custom comparison
(org-agenda-cmp-user-defined (quote my-org-cmp-category))

;; only todo-view requests custom comparison of categories.

;; agenda-view does *NOT* request custom compare function. Despite
;; this custom sort function is triggered on C-c a a.

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


;; user-defined routine for sorting of categories.  prints a message
;; to the console on being invoked. Rest of the details not relevant.

(defun my-org-cmp-category (a b)
  Compare the string values of categories of strings A and B.
  (let (
(uncategorized 0)
(ca (or (get-text-property 1 'org-category a) ))
(cb (or (get-text-property 1 'org-category b) ))
)

(message my-org-cmp-category)

(setq ca  (cdr (assoc ca org-CATEGORY-sort-order)))
(setq cb  (cdr (assoc cb org-CATEGORY-sort-order)))

(unless ca
  (setq ca uncategorized)
  )

(unless cb
  (setq cb uncategorized)
  )

(cond (( ca cb) -1)
  (( cb ca) +1)
  (t nil))
)
  )

;; information down below is only for the sake of completion.
;; not relevant to the bug per se.

;; category to priority mappings
(defcustom org-CATEGORY-sort-order nil
  Map CATEGORY to Sort Order
  :group 'org-jambu
  :type '(repeat
  (cons
   (string :tag CATEGORY)
   (integer :tag VALUE)
   )))

;; example categories
(org-CATEGORY-sort-order
 (quote (
 (PHONE . 50)
 (EMAIL . 60)
 (MISC . 80)
 )
)
 )
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
old mode 100644
new mode 100755
index 1314eb2..f34f45d
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5312,8 +5312,9 @@ HH:MM.
 (alpha-up(and (org-em 'alpha-up 'alpha-down ss)
   (org-cmp-alpha a b)))
 (alpha-down  (if alpha-up (- alpha-up) nil))
+   (need-user-cmp   (org-em 'user-defined-up 'user-defined-down ss))
 user-defined-up user-defined-down)
-(if (and org-agenda-cmp-user-defined
+(if (and need-user-cmp org-agenda-cmp-user-defined
 (functionp org-agenda-cmp-user-defined))
(setq user-defined-up
  (funcall org-agenda-cmp-user-defined a b)
___
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] org-capture with LISP function template

2010-07-18 Thread Juan Pechiar
Hi Carsten + crowd,

Below is a patch for org-capture when the template is given by a LISP
function.

Problem was that the function is inside a string (not a LISP form), so
the string has to be evaluated explicitly.

Now it's working for me. I use it to get a template formed by
URL/title and selected text from Opera browser (on Mac OSX). I´ll
publish this after polishing the code.

I've also been testing exotic org-capture templates and I've found no
other errors yet.

Best regards,
.j.

8

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 2a3a1b8..409427f 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -440,8 +440,8 @@ bypassed.
  (setq txt (org-file-contents file))
(setq txt (format * Template file %s not found (nth 1
txt)
  ((and (listp txt) (eq (car txt) 'function))
-  (if (fboundp (nth 1 txt))
- (setq txt (funcall (nth 1 txt)))
+  (if (eval (concat fboundp  (nth 1 txt)))
+ (setq txt (eval (read (nth 1 txt
(setq txt (format * Template function %s not found (nth 1
txt)
  ((not txt) (setq txt ))
  ((stringp txt))

___
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