Re: [O] Represent *everything* in Org-mode

2011-07-18 Thread Rainer Stengele
Hi Karl,

nice idea!
My first thoughts are a warning about big org files which can be quite slow to 
be processed as agenda files.
Please check this thread: http://article.gmane.org/gmane.emacs.orgmode/44286

Best regards,
- Rainer

Am 18.07.2011 01:54, schrieb Karl Voit:
 Hi!
 
 I need your thoughts and feedback on this idea:
 
 I am thinking of letting student(s) implement a (Python[1]) script
 that imports[2] all kinds of data sources to generate simple (and
 reduced) Org-mode heading entries and links to the original
 information in order to represent the users digital life as complete
 as possible.
 
 Imagine, you have got one (additional) «archive.org» (or
 «mylife.org_archive»[8]) which contains lots of small entries that
 represent many things you are doing on your computer:
 
   * emails you send and receive
   * tweets you write
   * weblog entries you write
   * usenet postings you send
   * files you are creating (with a datestamp in its filename)
   * bookmarks you save (in delicious?)
   * SVN/git commits you are committing
   * SMS you send and receive (via smartphone)
   * ... and much more 
 
 With this system, you can visit any day in the past to see, what
 happened in your (digital) life that time. You can reconstruct
 pretty much anything you were thinking, working, ... that day.
 
 If you happen to know MyLifeBits[3] from MS Research, the papers
 from Gemmell et al or the book «Total Recall»[4] you already know
 what I am writing about: researchers implemented a (MS Windows only)
 system to capture your digital life even with digital cameras and
 screenshots of your desktop.
 
 With Org-mode and a bunch of «connectors» this should be a fairly
 easy job to do. Nothing proprietary here, the amount of data is not
 that much as with those binary information from MyLifeBits.
 
 I am thinking about a central management tool that writes the
 Org-mode file(s), lets you add tags to specific sources and correct
 time zone deltas caused by timestamps of services out of sync with
 the time zone you are living at.
 
 Then there are those «connectors»: one will parse through my
 maildir[5] to collect sent (and received?) emails in order to
 generate something like:
 
 * [[file:/my/maildir/the_email][Urgend: Server just died]]  :email:work:
 2010-01-17 Tue 08:12
 :PROPERTIES:
 :FROM: b...@company.example.com
 :END:
 
 Another «connector» parses my monthly backup of tweets[6] in order
 to generate entries like:
 
 * [[http://twitter.com/status/0815][I hate dying hardware]]  :tweet:
 2010-01-17 Tue 08:15
 
 Parsing a source like «locate» I can filter out files I am putting
 an ISO datestamp into and generate:
 
 * [[file:/albums/2010-01-17T08:21_rat.jpg][The rat that ate the \
 server cable]]  :file:
 2010-01-17 Tue 08:21
 
 With another «connector» I am parsing my weekly delicious[7] backup
 and generate entries like following for all my bookmarks:
 
 * [[http://killrats.com][How to kill rodents]]  :delicious:animals:
 2010-01-17 Tue 09:35
 
 Without such a combined agenda view, you would possible never know
 which different things you were «using» that day when a rat was the
 source of a hardware downtime.
 
 This is not a new idea but as far as I know, it was never
 implemented that complete outside of MyLifeBits.
 
 
 So: is there something similar out there? Probably using Org-mode
 already?
 
 And: what do *you* think of this idea?
 
 
 I'd like to have a central tool that manages the connectors as
 mentioned above and small and easy to implement connectors for each
 data source.
 
 
   1. I know that you guys would like to see that in ELISP but here
  at my side is sadly no ELISP knowledge available :-(
   2. Currently, only one-side-import (and no two-side sync) is
  planned.
   3. http://en.wikipedia.org/wiki/MyLifeBitso
   4. http://totalrecallbook.com/ (I'll have to read it soon)
   5. http://en.wikipedia.org/wiki/Maildir
   6. I am using http://grabeeter.tugraz.at/
   7. http://delicious.com
   8. In order to keep daily agenda small/fast and only «Archive mode» complete




[O] Creating a SCHEDULED entry with C-c C-s seems to add a trailing whitespace after the timestamp

2011-07-18 Thread Rainer Stengele
Hi!

Creating a SCHEDULED entry with C-c C-s seems to add a trailing whitespace 
after the timestamp:

*** TODO [#A] simple to do
SCHEDULED: 2011-07-18 Mo

This - my thought was - is probably not intended!?
Same is true for DEADLINE entries created by C-c C-d.

- Rainer




Re: [O] Creating a SCHEDULED entry with C-c C-s seems to add a trailing whitespace after the timestamp

2011-07-18 Thread Bastien
Hi Rainer,

Rainer Stengele rainer.steng...@diplan.de writes:

 Creating a SCHEDULED entry with C-c C-s seems to add a trailing
 whitespace after the timestamp:

This has been fixed a few days ago.

Can you test against latest git?

-- 
 Bastien



Re: [O] error writing agenda view to html file

2011-07-18 Thread Bastien
Rainer Stengele rainer.steng...@online.de writes:

 git checkout c6b22d


 How can I go back to the current development?

Go back to the master branch with this command

  ~$ git checkout master

then 

  ~$ git pull 

to get latest commits.

HTH,

-- 
 Bastien



Re: [O] error writing agenda view to html file

2011-07-18 Thread Rainer Stengele
Am 16.07.2011 19:03, schrieb Bastien:
 Hi Rainer,
 
 Rainer Stengele rainer.steng...@diplan.de writes:
 
 In agenda view doing a C-x C-w produces a face related error.
 
 I cannot reproduce this.  C-x C-w works fine in the agenda views 
 I could test.  
 
 Can somebody help me out finding the issue in this debug message?
 
 Please send a small file.org with the agenda config to reproduce 
 this problem with latest Org.
 
 Thanks!
 
Hi Bastien,

attached please find a simple smal org file.
Bein gin the file I enter

C-c a y a

and get the error (see dump). I am quite sure it is some misconfiguration in my 
settings but I just don't know how to find it.
Org-mode version 7.6 (release_7.6.88.gd1c9)


Debugger entered--Lisp error: (error Invalid face)
  internal-get-lisp-face-attribute(nil :height nil)
  face-attribute(nil :height)
  (setq h (face-attribute f :height))
  (while (progn (setq f (if --cl-var-- face (face-attribute f :inherit))) (not 
(eq f (quote unspecified (setq h (face-attribute f :height)) (push (if (eq 
h (quote unspecified)) nil h) --cl-var--) (setq --cl-var-- nil))
  (let* ((f nil) (h nil) (--cl-var-- nil) (--cl-var-- t)) (while (progn (setq f 
(if --cl-var-- face (face-attribute f :inherit))) (not (eq f (quote 
unspecified (setq h (face-attribute f :height)) (push (if (eq h (quote 
unspecified)) nil
h) --cl-var--) (setq --cl-var-- nil)) (nreverse --cl-var--))
  (catch (quote --cl-block-nil--) (let* ((f nil) (h nil) (--cl-var-- nil) 
(--cl-var-- t)) (while (progn (setq f (if --cl-var-- face (face-attribute f 
:inherit))) (not (eq f (quote unspecified (setq h (face-attribute f 
:height)) (push
(if (eq h (quote unspecified)) nil h) --cl-var--) (setq --cl-var-- nil)) 
(nreverse --cl-var--)))
  (cl-block-wrapper (catch (quote --cl-block-nil--) (let* ((f nil) (h nil) 
(--cl-var-- nil) (--cl-var-- t)) (while (progn (setq f (if --cl-var-- face 
(face-attribute f :inherit))) (not (eq f (quote unspecified (setq h 
(face-attribute f
:height)) (push (if (eq h (quote unspecified)) nil h) --cl-var--) (setq 
--cl-var-- nil)) (nreverse --cl-var--
  (block nil (let* ((f nil) (h nil) (--cl-var-- nil) (--cl-var-- t)) (while 
(progn (setq f (if --cl-var-- face (face-attribute f :inherit))) (not (eq f 
(quote unspecified (setq h (face-attribute f :height)) (push (if (eq h 
(quote
unspecified)) nil h) --cl-var--) (setq --cl-var-- nil)) (nreverse --cl-var--)))
  (loop for f = face then (face-attribute f :inherit) until (eq f (quote 
unspecified)) for h = (face-attribute f :height) collect (if (eq h (quote 
unspecified)) nil h))
  (let ((size-list (loop for f = face then (face-attribute f :inherit) until 
(eq f (quote unspecified)) for h = (face-attribute f :height) collect (if (eq h 
(quote unspecified)) nil h (reduce (quote htmlize-merge-size) (cons nil
size-list)))
  htmlize-face-size(default)
  (let ((size (htmlize-face-size face))) (unless (eql size 1.0) (setf 
(htmlize-fstruct-size fstruct) size)))
  (cond (htmlize-running-xemacs (let* ((font-instance (face-font-instance 
face)) (props (font-instance-properties font-instance))) (when (equalp (cdr 
(assq (quote WEIGHT_NAME) props)) bold) (setf (htmlize-fstruct-boldp fstruct) 
t)) (when
(or (equalp (cdr (assq ... props)) i) (equalp (cdr (assq ... props)) o)) 
(setf (htmlize-fstruct-italicp fstruct) t)) (setf (htmlize-fstruct-strikep 
fstruct) (face-strikethru-p face)) (setf (htmlize-fstruct-underlinep fstruct)
(face-underline-p face ((fboundp (quote face-attribute)) (dolist (attr 
(quote (:weight :slant :underline :overline :strike-through))) (let ((value (if 
(= emacs-major-version 22) (face-attribute face attr nil t) (let ... ... 
...
(when (and value (not (eq value ...))) (htmlize-face-emacs21-attr fstruct attr 
value (let ((size (htmlize-face-size face))) (unless (eql size 1.0) (setf 
(htmlize-fstruct-size fstruct) size (t (when (fboundp (quote face-bold-p))
(setf (htmlize-fstruct-boldp fstruct) (face-bold-p face))) (when (fboundp 
(quote face-italic-p)) (setf (htmlize-fstruct-italicp fstruct) (face-italic-p 
face))) (setf (htmlize-fstruct-underlinep fstruct) (face-underline-p face
  (let ((fstruct (make-htmlize-fstruct :foreground (htmlize-color-to-rgb 
(htmlize-face-foreground face)) :background (htmlize-color-to-rgb 
(htmlize-face-background face) (cond (htmlize-running-xemacs (let* 
((font-instance
(face-font-instance face)) (props (font-instance-properties font-instance))) 
(when (equalp (cdr (assq ... props)) bold) (setf (htmlize-fstruct-boldp 
fstruct) t)) (when (or (equalp (cdr ...) i) (equalp (cdr ...) o)) (setf
(htmlize-fstruct-italicp fstruct) t)) (setf (htmlize-fstruct-strikep fstruct) 
(face-strikethru-p face)) (setf (htmlize-fstruct-underlinep fstruct) 
(face-underline-p face ((fboundp (quote face-attribute)) (dolist (attr 
(quote (:weight
:slant :underline :overline :strike-through))) (let ((value (if ... ... ...))) 
(when (and value (not ...)) (htmlize-face-emacs21-attr fstruct attr 

Re: [O] Exporting to wiki syntax from org mode

2011-07-18 Thread Puneeth Chaganti
On Sun, Jul 17, 2011 at 1:21 PM, damitr dam...@gnowledge.org wrote:
 Hi,

 Is there any option for exporting .org file to a wiki syntax?
 If there is none, are there any people working on it?

There's an experimental generic exporter written by Bastien. It comes
along with an experimental exporter to Mediawiki format[1]. It can be
easily ported to any other wiki system. I have something that works
for MoinMoin syntax [2].

Thanks,
Puneeth

[1] - 
http://orgmode.org/w/?p=org-mode.git;a=tree;f=EXPERIMENTAL;h=9403cfb0871d25c64c4aa9704ebaeacfcd42498c;hb=HEAD
[2] - https://github.com/punchagan/omnium-gatherum/blob/master/org-moinmoin.el



Re: [O] Represent *everything* in Org-mode

2011-07-18 Thread Rasmus
Hi,

It sounds very interesting. I would use something like that if it did
not require to much hassle after initial setup.

It would for example be interesting to use with one's old agenda. What
did I do on June 7th? and it pops up whatever you did.  The key is
probably easy access to the data using some preferred method,
e.g. search, a plain list for day or a calendar-like view.

Python is a nice language, and I too feel more comfortable writing it
than Emacs Lisp. The latter is more eloquent though.

Lets us know how it goes.
–Rasmus

-- 
Sent from my Emacs




[O] [BABEL,PATCH] ob-fortran

2011-07-18 Thread Litvinov Sergey
Please consider an implementation of fortran support for
org-babel. The patch adds contrib/babel/langs/ob-fortran.el
(modification of lisp/ob-C.el) and
testing/examples/ob-fortran-test.org with tests.

From 2ac9b86a6387cae1472e3ed288a3a133be72318c Mon Sep 17 00:00:00 2001
From: Litvinov Sergey slitvi...@gmail.com
Date: Mon, 18 Jul 2011 09:44:07 +0200
Subject: [PATCH] Add fortran to babel

---
 contrib/babel/langs/ob-fortran.el|  191 ++
 testing/examples/ob-fortran-test.org |   76 ++
 2 files changed, 267 insertions(+), 0 deletions(-)
 create mode 100644 contrib/babel/langs/ob-fortran.el
 create mode 100644 testing/examples/ob-fortran-test.org

diff --git a/contrib/babel/langs/ob-fortran.el b/contrib/babel/langs/ob-fortran.el
new file mode 100644
index 000..6fdf416
--- /dev/null
+++ b/contrib/babel/langs/ob-fortran.el
@@ -0,0 +1,191 @@
+;;; ob-fortran.el --- org-babel functions for fortran
+;; Copyright (C) 2010  Free Software Foundation, Inc.
+
+;; Author: Sergey Litvinov (based on ob-C.el by Eric Schulte)
+;; Keywords: literate programming, reproducible research, fortran
+;; Homepage: http://orgmode.org
+;; Version: 7.6
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see http://www.gnu.org/licenses/.
+
+;;; Commentary:
+
+;; Org-Babel support for evaluating fortran code.
+;;
+
+;;; Code:
+
+;; Org-Babel support for evaluating fortran code.
+;;
+
+(require 'ob)
+(require 'ob-eval)
+(require 'cc-mode)
+
+(declare-function org-entry-get org
+		  (pom property optional inherit literal-nil))
+
+(defvar org-babel-tangle-lang-exts)
+(add-to-list 'org-babel-tangle-lang-exts '(fortran . F90))
+
+(defvar org-babel-default-header-args:fortran '())
+
+(defvar org-babel-fortran-compiler gfortran
+  fortran command used to compile a fortran source code file into an
+  executable.)
+
+(defun org-babel-execute:fortran (body params)
+  Execute BODY according to PARAMS.  This function calls
+`org-babel-execute:fortran'.
+  (org-babel-execute:fortran body params))
+
+(defun org-babel-execute:fortran (body params)
+Execute a block of fortran code with org-babel.  This function is
+called by `org-babel-execute-src-block'.
+  (org-babel-fortran-execute body params))
+
+(defun org-babel-expand-body:fortran (body params)
+  Expand a block of fortran code with org-babel according to it's
+header arguments (calls `org-babel-fortran-expand').
+  (org-babel-fortran-expand body params))
+
+(defun org-babel-execute:fortran (body params)
+  Execute a block of fortran code with org-babel.  This function is
+called by `org-babel-execute-src-block'.
+  (org-babel-fortran-execute body params))
+
+(defun org-babel-expand-body:fortran (body params)
+  Expand a block of fortran code with org-babel according to it's
+header arguments (calls `org-babel-fortran-expand').
+  (org-babel-fortran-expand body params))
+
+(defun org-babel-fortran-execute (body params)
+  This function should only be called by `org-babel-execute:fortran'
+  (let* ((tmp-src-file (org-babel-temp-file
+			fortran-src-
+			.F90))
+ (tmp-bin-file (org-babel-temp-file fortran-bin-))
+ (cmdline (cdr (assoc :cmdline params)))
+ (flags (cdr (assoc :flags params)))
+ (full-body (org-babel-fortran-expand body params))
+ (compile
+	  (progn
+	(with-temp-file tmp-src-file (insert full-body))
+	(org-babel-eval
+	 (format %s -o %s %s %s
+		 org-babel-fortran-compiler
+		 (org-babel-process-file-name tmp-bin-file)
+		 (mapconcat 'identity
+(if (listp flags) flags (list flags))  )
+		 (org-babel-process-file-name tmp-src-file)) 
+((lambda (results)
+   (org-babel-reassemble-table
+	(if (member vector (cdr (assoc :result-params params)))
+	(let ((tmp-file (org-babel-temp-file f-)))
+	  (with-temp-file tmp-file (insert results))
+	  (org-babel-import-elisp-from-file tmp-file))
+	  (org-babel-read results))
+	(org-babel-pick-name
+	 (cdr (assoc :colname-names params)) (cdr (assoc :colnames params)))
+	(org-babel-pick-name
+	 (cdr (assoc :rowname-names params)) (cdr (assoc :rownames params)
+ (org-babel-trim
+   (org-babel-eval
+	(concat tmp-bin-file (if cmdline (concat   cmdline) )) )
+
+(defun org-babel-fortran-expand (body params)
+  Expand a block of fortran or fortran code with org-babel according to
+it's header arguments.
+  

Re: [O] Exporting to wiki syntax from org mode

2011-07-18 Thread Bastien
Hi Damitr and Puneeth,

Puneeth Chaganti puncha...@gmail.com writes:

 There's an experimental generic exporter written by Bastien. It comes
 along with an experimental exporter to Mediawiki format[1]. 

Yes -- please Damitr check org-mw.el and report any problem.

 It can be easily ported to any other wiki system.

That's the main advantage of this EXPERIMENTAL/org-export.el.

 I have something that works for MoinMoin syntax [2].

Looks great, looking forward an official release :)

PS: Maybe you can just fix s/Bastien G./Puneeth Chaganti in this 
file, so that I will not be credited for this piece of code? :)

-- 
 Bastien



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

2011-07-18 Thread Bastien
Hi Achim,

Achim Gratz strom...@nexgo.de writes:

 Looks good, except that Git complains about two whitespace errors — but
 that is easily taken care of by M-x delete-trailing-whitespace.

Thanks for confirming -- I've now applied the patch.

There is still some work to be done to completely remove hardcoded 
\\* sequences...  I'm on it this week.

-- 
 Bastien



Re: [O] Possibly new function to view your notes in chronological order

2011-07-18 Thread Bastien
Hi Marc-Oliver,

Marc-Oliver Ihm i...@online.de writes:

 I would like to submit the new function org-find-timestamps for
 disussion. 

Thanks for this piece of code and for this idea!

I've tested it a bit and I encourage others to test it.

I was able to create a sparse tree with inactive timestamps, 
but I was not able to display a buffer with ordered items.
I will test more carefully and give feedback/debugging.

My main reaction is: your idea/code could partially sneak into
`org-sparse-tree' by adding a new ran[g]e option, asking the 
starting and ending dates, and creating the sparse tree.

What do you think?

-- 
 Bastien



Re: [O] Custom agenda view for properties

2011-07-18 Thread Bastien
Hi Memnon,

Memnon Anon gegendosenflei...@googlemail.com writes:

 The manual is great, but its always a good idea to also check out
 Worg. In this case, have a look at:

 http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.html#sec-3

((tags +REVIEW=weekly) ;; this does not work...

  (tags +REVIEW=\weekly\) ;; not tested, but should do

 Should such an example be in the manual (node (org) Storing searches )
 ?

Surely -- if you can take the time, a patch would be great.

Thanks,

-- 
 Bastien



[O] New feature: loop over siblings for some commands

2011-07-18 Thread Bastien
Dear all,

from latest git repo: 

  (setq org-loop-over-siblings-within-active-region-p t)

will allow you to run some commands on several siblings in 
the active region.  

For example:

start active region
* Item 1
* Item 2
* Item 3
end active region

Then `C-c C-s' (org-schedule) will ask for a schedule date
for each of the item in the active region.  See the commit
log for more details:

  
http://orgmode.org/w/?p=org-mode.git;a=commit;h=366254217ac6faea20a5d43fae065bd028806eab

I'm interested in allowing this for org-todo as well, but I
would first like some feedback on the current feature and its
scope wrt actual needs.

Thanks a lot!

-- 
 Bastien



Re: [O] Creating a SCHEDULED entry with C-c C-s seems to add a trailing whitespace after the timestamp

2011-07-18 Thread Rainer Stengele

Hi Bastien.

works! Sorry for not checking the git log

- Rainer

Am 18.07.2011 08:50, schrieb Bastien:

Hi Rainer,

Rainer Stengelerainer.steng...@diplan.de  writes:


Creating a SCHEDULED entry with C-c C-s seems to add a trailing
whitespace after the timestamp:

This has been fixed a few days ago.

Can you test against latest git?





Re: [O] Broken link on Worg

2011-07-18 Thread Bastien
Hello Tom,

t...@tsdye.com (Thomas S. Dye) writes:

 A link in the An Babel Demo section of
 http://orgmode.org/worg/org-contrib/babel/uses.html appears to have
 broken.  I'm not sure why and don't know how to fix it.

Mmhh... I confirm the HTML exporter (and the LaTeX one, btw) are
confused by this link.  Not sure how to fix this right now, I will
investigate further.

Thanks for reporting this,

-- 
 Bastien



Re: [O] breaking URLs

2011-07-18 Thread Bastien
Hi Henri-Paul,

Henri-Paul Indiogine hindiog...@gmail.com writes:

 My goal is to export an orgmode file to LaTeX and then compile to PDF.

 My orgmode file contains many URLs. What is the best way to have them
 break?   A simple URL in the orgmode file will not break.  if I place
 the URL in  \url{my url}  it is exported as

 \url{[[my url]] [[my url]]}   however the URL is nicely split to the
 next line in the pdf.

I would welcome ideas/code to have more flexibility wrt the way urls 
are handled by the LaTeX exporter.

 if I use \href{my url} then the LaTeX file does not compile and gives
 the following error message:


 ERROR: pdfTeX error (ext1): \pdfendlink cannot be used in vertical
 mode.

This looks like a LaTeX related problem, and I'm not export enough to
help here.  I hope someone will be able to give you further advice.

Thanks,

-- 
 Bastien



Re: [O] error writing agenda view to html file

2011-07-18 Thread Bastien
Hi Rainer,

Rainer Stengele rainer.steng...@diplan.de writes:

 I am quite sure it is some misconfiguration
 in my settings but I just don't know how to find it.

If you changed some faces through M-x customize-face RET, 
then you will have a (custom-set-faces ...) somewhere in 
your configuration files (either in .emacs.el or some
other value of the variable custom-file, which see.

Can you send this part of the configuration?

Is anybody else able to reproduce this problem?

Thanks,

-- 
 Bastien



Re: [O] ODT Charset/Encoding issues (was question about ODT export behavior)

2011-07-18 Thread Bastien
Hi Jambunathan,

Jambunathan K kjambunat...@gmail.com writes:

 The attached patch ensures that component xml files created by the odt
 exporter are always utf-8 encoded.

This looks like a reasonable change to me.

Please feel free to commit this patch.

Thanks,

-- 
 Bastien



Re: [O] disable org-decrypt: auto-save-mode may cause leakage

2011-07-18 Thread Sebastien Vauban
Hi Pieter,

Pieter Praet wrote:
 On Thu, 14 Jul 2011 16:42:58 +0200, Sebastien Vauban 
 wxhgmqzgw...@spammotel.com wrote:
 Pieter Praet wrote:
 On Thu, 14 Jul 2011 15:37:34 +0200, Sebastien Vauban 
 wxhgmqzgw...@spammotel.com wrote:
 Shouldn't its default value better be set to 'encrypt?

 I don't think so.

 It only re-encrypts entries which are tagged :crypt: (or whatever you
 have `org-crypt-tag-matcher' set to), so I'd prefer users to be forced
 to at least read the docstring so as not to be using it with a false
 sense of security.

 Though this could be easily solved by automatically tagging entries upon
 encryption, I think it's more considerate to simply (ask to) disable
 `auto-save-mode' for the current buffer, as it's quite annoying to have
 an entry get re-encrypted while you're in the middle of typing something.

 This is more clear to me, and makes a lot of sense.

 Though, what I find annoying, and the OP as well, is to be asked that
 question for buffers which do not contain any encrypted entry. Would it be
 possible to scan the buffer for such entries, and only ask the user when
 the buffer is potentially exposed?

 AFAIK, that should already be the case.

 Even when running with the following config...

   #+BEGIN_SRC emacs-lisp
 (add-hook 'find-file-hook 'org-decrypt-entries)
   #+END_SRC

 ... the user shouldn't get prompted needlessly, because
 `org-decrypt-entries' applies `org-decrypt-entry' (which does the
 `auto-save-mode' check) *only* to entries with a tag matching
 `org-crypt-tag-matcher' [1].

 So prompting should only occur for buffers for which `auto-save-mode' is
 enabled AND which contain one or more entries tagged with `crypt'
 (regardless of whether the entry is actually encrypted, but that's beside
 the point) UNLESS running `org-decrypt-entry' (auto-)manually for each
 buffer.

 I suspect it's a user config issue.

The problem I encounter is difficult to narrow, but I can tell you now that,
in my case, the question is asked for buffers which do not contain any tagged
entry with crypt (neither the string crypt as word or subword of that
buffer):

I simply call C-c C-x C-j to jump to the current clocking entry, and the
question org-decrypt: auto-save-mode may cause leakage. Disable it for
current buffer? (y or n) pops up -- while the current buffer has nothing
special, as said above.

This is reproducible for me, with Git version of this morning.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Calendar-like view of the org-agenda

2011-07-18 Thread Bastien
Hi Masashi,

SAKURAI Masashi m.saku...@kiwanami.net writes:

 I will continue to improve calfw and org integration.

Thanks a lot for this effort!

 Please check it and let me know any ideas.

I suggest everyone to use [calfw] as a tag in the subject of the 
emails sent to the list, it will help filter through these requests.

Thanks,

-- 
 Bastien



Re: [O] Tbl: addition of two times results in error

2011-07-18 Thread Bastien
Hi Karl,

Karl Voit devn...@karl-voit.at writes:

 ,[ http://orgmode.org/org.html#Durations-and-time-values ]
 |  | Task 1 | Task 2 |   Total |
 |  |++-|
 |  |  35:00 |  35:00 | 1:10:00 |
 |  #+TBLFM: @2$3=$1+$2;T
 `

 ... results in #ERROR at @2$3 on my system with current Org-mode (I
 did «git pull» right now):

Er... I cannot reproduce this error.  Anyone else?

Thanks,

-- 
 Bastien



Re: [O] Formal description of Org files

2011-07-18 Thread Christopher Witte
On 18 July 2011 01:14, Eric Schulte schulte.e...@gmail.com wrote:


 As I mentioned earlier in this thread, I think any formal expression
 would be more useful if could be fed to existing parser-generation tools
 to automatically write Org-mode parsers, or perhaps automatically
 convert between Org-mode and other document formats.  I'm not sure
 however to what degree that is just wishful thinking..


Perhaps Pandoc (http://johnmacfarlane.net/pandoc/) would meet those
requirements.  It uses a great parsing library with a syntax that greatly
resembles a BNF grammar.  An output module is already written for org-mode,
so writing an input module would allow us to convert from org-mode to any
other of the existing Pandoc output formats (including plain text,
markdownhttp://daringfireball.net/projects/markdown/,
reStructuredTexthttp://docutils.sourceforge.net/docs/ref/rst/introduction.html,
HTML http://www.w3.org/TR/html40/, LaTeX http://www.latex-project.org/,
ConTeXt http://www.pragma-ade.nl/,
PDFhttp://en.wikipedia.org/wiki/Portable_Document_Format,
RTF http://en.wikipedia.org/wiki/Rich_Text_Format, DocBook
XMLhttp://www.docbook.org/,
OpenDocument XML http://opendocument.xml.org/,
ODThttp://en.wikipedia.org/wiki/OpenDocument,
GNU Texinfo http://www.gnu.org/software/texinfo/, MediaWiki
markuphttp://www.mediawiki.org/wiki/Help:Formatting,
textile http://redcloth.org/textile, groff
manhttp://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPapages,
Emacs
org-mode http://orgmode.org/, EPUB
http://en.wikipedia.org/wiki/EPUBebooks, and
S5 http://meyerweb.com/eric/tools/s5/ and
Slidyhttp://www.w3.org/Talks/Tools/SlidyHTML slide shows).  I've
been thinking of doing this for sometime now, as
an exercise in learning Haskell, but realistically I just don't have the
time.  does anyone else have the time?

Chris.


Re: [O] error writing agenda view to html file = SOLVED.

2011-07-18 Thread Rainer Stengele
Am 18.07.2011 10:51, schrieb Bastien:
 Hi Rainer,

 Rainer Stengele rainer.steng...@diplan.de writes:

 I am quite sure it is some misconfiguration
 in my settings but I just don't know how to find it.
 If you changed some faces through M-x customize-face RET, 
 then you will have a (custom-set-faces ...) somewhere in 
 your configuration files (either in .emacs.el or some
 other value of the variable custom-file, which see.

 Can you send this part of the configuration?

 Is anybody else able to reproduce this problem?

 Thanks,


Hi Bastien,

after your hint about the

(custom-set-faces ...)

I could already imagine where the problem was:
The zenburn theme.
After updating it to the most recent version found here:
https://github.com/dbrock/zenburn-el
the export works, tested already for large agenda views.

Most excellent! Exported agenda looks perfect!

Thanks for helping me solve the problem!

Best,
- Rainer




Re: [O] Tbl: addition of two times results in error

2011-07-18 Thread Sebastien Vauban
Hi Bastien and Karl,

Bastien wrote:
 Karl Voit devn...@karl-voit.at writes:

 ,[ http://orgmode.org/org.html#Durations-and-time-values ]
 |  | Task 1 | Task 2 |   Total |
 |  |++-|
 |  |  35:00 |  35:00 | 1:10:00 |
 |  #+TBLFM: @2$3=$1+$2;T
 `

 ... results in #ERROR at @2$3 on my system with current Org-mode (I
 did «git pull» right now):

 Er... I cannot reproduce this error.  Anyone else?

Nope. Results is correctly computed[1].

Best regards,
  Seb

Footnotes:

[1] Using Org from this morning, at least.
-- 
Sebastien Vauban




Re: [O] Formal description of Org files

2011-07-18 Thread Nicolas Goaziou
Hello,

Marcelo de Moraes Serpa celose...@gmail.com writes:

 I'm creating a web app that interacts with orgmode files and allows you to
 edit orgmode files on the browser. The edit part is not done. I'm quite good
 at Javascript, and I wouldn't mind hacking something akin to orgmode elisp
 code and this will be what I'll do if everything else fails, but wouldn't
 using a grammar be a cleaner and more elegant solution?

I didn't follow closely the thread, but I think having a formal
description of Org files is unrealistic at the moment.

Org format is heavily dependant on user-configurable variables deeply
installed within emacs.  Some of these variables can drastically change
the grammar of the Org file. Example:

#+begin_src org
- item 1

- item a
#+end_src

Now, if org-empty-line-terminates-plain-lists is a non-nil value, any
parser should detect two lists of one item each, while keeping it to nil
will imply there is one list of two items.

Another example: (setq org-deadline-string ZORGLUB:). I let you
imagine what confusion it might introduce if the external tool you want
to use/implement isn't aware of this change.

Sure, it's all plain text, so Org files are accessible from outside
emacs. But, for now, only the plain-text structure is accessible from
the wild, not the Org one.

I can see three options here:

  - We remove every configurability concerning Org structure: we enforce
DEADLINE to stay DEADLINE, lists items to be separated by a blank
line, etc. But this isn't serious, is it?

  - We consider that Org format is a package containing the body _and_
every configuration variable. But it isn't plain-text nor a format
anymore.

  - We implement an intermediary real format (maybe in plain text, but
I'd favor a nested-lists construct) that would serve as the common
denominator for every exporter _and_ importer out there. I already
suggested something like this in a recent thread about
exporters. Obviously, I think this one is the only viable (and,
icing on the cake, this would also be very useful for Org
development).

Regards,

-- 
Nicolas Goaziou



[O] Memacs (was: Represent *everything* in Org-mode)

2011-07-18 Thread Karl Voit
* Karl Voit devn...@karl-voit.at wrote:

[...]
 Imagine, you have got one (additional) «archive.org» (or
 «mylife.org_archive»[8]) which contains lots of small entries that
 represent many things you are doing on your computer:
[...]
 If you happen to know MyLifeBits[3] from MS Research, the papers
 from Gemmell et al or the book «Total Recall»[4] you already know
 what I am writing about: researchers implemented a (MS Windows only)
 system to capture your digital life even with digital cameras and
 screenshots of your desktop.

In 1945, Vannevar Bush wrote a very famous essay «As we may think»
in which he proposed a system he called «Memex»[9] which described
the basic features of MyLifeBits, the web, and many more things.

So I propose the name «Memacs» for this tool which is going to be
developed soon.

This could be epic :-)

  9. http://en.wikipedia.org/wiki/Memex
-- 
Karl Voit




[O] Memacs - effort and language (was: Represent *everything* in Org-mode)

2011-07-18 Thread Karl Voit
* Rasmus ras...@gmx.us wrote:
 Hi,

Hi!

 It sounds very interesting. I would use something like that if it did
 not require to much hassle after initial setup.

My goal is that after the initial setup of one «connector» (I am
sill searching for a cool name for this) the additional effort is
nothing (or almost nothing) as long as nothing changes (APIs, cron
jobs, ...).

 Python is a nice language, and I too feel more comfortable writing it
 than Emacs Lisp. The latter is more eloquent though.

I am much more confident with Python since I did not learn (E)LISP
yet.

 Lets us know how it goes.

Of course since I am interested in lots of people using (and
improving) Memacs and its «connectors» :-)

-- 
Karl Voit




[O] Memacs - speed issues (was: Represent *everything* in Org-mode)

2011-07-18 Thread Karl Voit
* Rainer Stengele rainer.steng...@diplan.de wrote:
 Hi Karl,

Hi!

 nice idea!

Thanks :-)

 My first thoughts are a warning about big org files which can be
 quite slow to be processed as agenda files.

Sure.

That is why I am thinking of putting all this stuff into an archive
Org-mode file. That way your day to day work keeps its speed. If you
want to access Memacs entries, you can press «v A» in your agenda
view to add the items from all archive files to your view which
might take longer.

Is there someone who thinks that this approach still has issues?

 Please check this thread:
 http://article.gmane.org/gmane.emacs.orgmode/44286

Thanks for the link. I'll read it.

-- 
Karl Voit




Re: [O] Tbl: addition of two times results in error

2011-07-18 Thread Karl Voit
* Sebastien Vauban wxhgmqzgw...@spammotel.com wrote:
 Hi Bastien and Karl,

 Bastien wrote:
 Karl Voit devn...@karl-voit.at writes:

 ,[ http://orgmode.org/org.html#Durations-and-time-values ]
 |  | Task 1 | Task 2 |   Total |
 |  |++-|
 |  |  35:00 |  35:00 | 1:10:00 |
 |  #+TBLFM: @2$3=$1+$2;T
 `

 ... results in #ERROR at @2$3 on my system with current Org-mode (I
 did «git pull» right now):

 Er... I cannot reproduce this error.  Anyone else?

 Nope. Results is correctly computed[1].
 [1] Using Org from this morning, at least.

Hm. I just pulled newest Org-mode (again) and created an Org-mode
file with only the table from above and still it does not work :-(

Maybe I am trying to triage the problem by selectively disabling
parts of my .emacs configuration. I'll let you know, if I find
anything related to this problem.

-- 
Karl Voit




Re: [O] error writing agenda view to html file = SOLVED.

2011-07-18 Thread Bastien
Hi Rainer,

Rainer Stengele rainer.steng...@diplan.de writes:

 Thanks for helping me solve the problem!

Glad my directions were useful :)

Best,

-- 
 Bastien



Re: [O] Tbl: addition of two times results in error

2011-07-18 Thread Bastien
Hi Karl,

Karl Voit devn...@karl-voit.at writes:

 Hm. I just pulled newest Org-mode (again) and created an Org-mode
 file with only the table from above and still it does not work :-(

Please try the table alone in single file.

 Maybe I am trying to triage the problem by selectively disabling
 parts of my .emacs configuration. I'll let you know, if I find
 anything related to this problem.

Thanks for hunting this bug!

-- 
 Bastien



Re: [O] Bulk cut in agenda view

2011-07-18 Thread Bernt Hansen
Julien Cubizolles j.cubizol...@free.fr writes:

 I often need to purge DONE items from my org files. I have set up a
 special agenda view for checking those items and cutting some subtrees
 from it using bulk commands. I'm using a function adapted from the
 example in the manual (I've no idea if it's the best way to do it
 however) : 

Hi Julien,

Could you describe your use-case for this bulk cut function?

Is this bulk cut function destructive (ie. it deletes content from your
org files permanently) - wouldn't archiving (to another file) give you
the same end result for your org file but also allow searching for the
old content alter in case you archive (cut) too early or find you need
to dig into some old history for a project.

Regards,
-- 
Bernt



Re: [O] Using org-mode for Research and Notetaking

2011-07-18 Thread Matt Lundin
Bastien b...@altern.org writes:

 Sebastien Vauban wxhgmqzgw...@spammotel.com writes:

 * !TODO This would be an inline task, not a headline

 I've no clear cut opinion on this right now. Maybe yes, maybe not.
 Though, there are differences between inline tasks and headlines:

 I'm talking about the way they _look_.  So many asterisks looks
 cumbersome to mee, and I'd favor a non-intrusive syntax like the 
 one proposed above.

In my experience, most of the asterisks are made invisible by
org-hide-face. E.g.,

--8---cut here---start-8---
*** TODO A task
Some notes about the task that are not part of the text.
*** END
--8---cut here---end---8---

 My question was: what is the rationale behind using so many asterisks?

 I can think of three things:

 1. people want inline tasks with possibly no TODO keyword

This is often how I use them --- to insert a drawer of notes that is
visible but will not be exported.

Best,
Matt



Re: [O] Using org-mode for Research and Notetaking

2011-07-18 Thread Sebastien Vauban
Hi Matt,

Matt Lundin wrote:
 Bastien b...@altern.org writes:
 Sebastien Vauban wxhgmqzgw...@spammotel.com writes:

 * !TODO This would be an inline task, not a headline

 I've no clear cut opinion on this right now. Maybe yes, maybe not.
 Though, there are differences between inline tasks and headlines:

 I'm talking about the way they _look_. So many asterisks looks cumbersome
 to mee, and I'd favor a non-intrusive syntax like the one proposed above.

 In my experience, most of the asterisks are made invisible by
 org-hide-face. E.g.,

 *** TODO A task
   Some notes about the task that are not part of the text.
 *** END

 My question was: what is the rationale behind using so many asterisks?

 I can think of three things:

 1. people want inline tasks with possibly no TODO keyword

 This is often how I use them --- to insert a drawer of notes that is
 visible but will not be exported.

Why do you say it wouldn't be exported just because it has no TODO keyword?
At least, not in the default settings of the export, right?

Best regards,
  Seb

-- 
Sebastien Vauban




[O] [bug?] not: Symbol's value as variable is void: org-outline-regexp-bol

2011-07-18 Thread Sebastien Vauban
Hello,

Since update of 5 mins ago, when `C-c a a':

--8---cut here---start-8---
Debugger entered--Lisp error: (void-variable org-outline-regexp-bol)
  (re-search-backward org-outline-regexp-bol nil t)
  (not (re-search-backward org-outline-regexp-bol nil t))
  (if (not (re-search-backward org-outline-regexp-bol nil t)) (setq txt 
org-agenda-no-heading-message) (goto-char (match-beginning 0)) (setq hdmarker 
(org-agenda-new-marker ...)) (setq tags (org-get-tags-at)) (looking-at \\*+[   
  ]+\\([^
\n]+\\)) (setq head (match-string 1)) (let (...) (setq txt ...)))
  (save-excursion (setq todo-state (org-get-todo-state)) (setq donep (member 
todo-state org-done-keywords)) (if (and donep 
org-agenda-skip-timestamp-if-done) (throw :skip t)) (setq marker 
(org-agenda-new-marker ...)) (setq category (org-get-category)) (if (not ...) 
(setq txt org-agenda-no-heading-message) (goto-char ...) (setq hdmarker ...) 
(setq tags ...) (looking-at \\*+[   ]+\\([^
\n]+\\)) (setq head ...) (let ... ...)) (org-add-props txt props (quote 
org-marker) marker (quote org-hd-marker) hdmarker (quote type) block (quote 
date) date (quote todo-state) todo-state (quote priority) (org-get-priority 
txt) (quote org-category) category) (push txt ee))
  (if (and ( ... -1) ( ... -1)) (save-excursion (setq todo-state ...) (setq 
donep ...) (if ... ...) (setq marker ...) (setq category ...) (if ... ... ... 
... ... ... ... ...) (org-add-props txt props ... marker ... hdmarker ... 
block ... date ... todo-state ... ... ... category) (push txt ee)))
  (let ((start-time ...) (end-time ...)) (setq s1 (match-string 1) s2 
(match-string 2) d1 (time-to-days ...) d2 (time-to-days ...)) (if (and ... ...) 
(save-excursion ... ... ... ... ... ... ... ...)))
  (catch :skip (org-agenda-skip) (setq pos (point)) (let (... ...) (setq s1 ... 
s2 ... d1 ... d2 ...) (if ... ...)) (goto-char pos))
  (while (re-search-forward regexp nil t) (catch :skip (org-agenda-skip) (setq 
pos ...) (let ... ... ...) (goto-char pos)))
  (let* ((props ...) (regexp org-tr-regexp) (d0 ...) marker hdmarker ee txt d1 
d2 s1 s2 category todo-state tags pos head donep) (goto-char (point-min)) 
(while (re-search-forward regexp nil t) (catch :skip ... ... ... ...)) 
(nreverse ee))
  org-agenda-get-blocks()
  (setq rtn (org-agenda-get-blocks))
  (cond ((and ... ...) (setq rtn ...) (setq results ...)) ((eq arg :timestamp) 
(setq rtn ...) (setq results ...) (setq rtn ...) (setq results ...)) ((eq arg 
:sexp) (setq rtn ...) (setq results ...)) ((eq arg :scheduled) (setq rtn ...) 
(setq results ...)) ((eq arg :closed) (setq rtn ...) (setq results ...)) ((eq 
arg :deadline) (setq rtn ...) (setq deadline-results ...) (setq results ...)))
  (while (setq arg (pop args)) (cond (... ... ...) (... ... ... ... ...) (... 
... ...) (... ... ...) (... ... ...) (... ... ... ...)))
  (save-restriction (if org-agenda-restrict (narrow-to-region 
org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (while (setq arg 
...) (cond ... ... ... ... ... ...)))
  (save-excursion (save-restriction (if org-agenda-restrict ... ...) (while ... 
...)))
  (let ((case-fold-search nil)) (save-excursion (save-restriction ... ...)))
  (save-current-buffer (set-buffer buffer) (unless (org-mode-p) (error Agenda 
file %s is not in `org-mode' file)) (let (...) (save-excursion ...)) results)
  (with-current-buffer buffer (unless (org-mode-p) (error Agenda file %s is 
not in `org-mode' file)) (let (...) (save-excursion ...)) results)
  (if (not buffer) (list (format ORG-AGENDA-ERROR: No such org-file %s file)) 
(with-current-buffer buffer (unless ... ...) (let ... ...) results))
  (let* ((org-startup-folded nil) (org-startup-align-all-tables nil) (buffer 
...) arg results rtn deadline-results) (if (not buffer) (list ...) 
(with-current-buffer buffer ... ... results)))
  org-agenda-get-day-entries(~/Personal/Scorpios.org (7 18 2011) :timestamp 
:scheduled :deadline)
  (append entries (org-agenda-get-day-entries file today :timestamp :scheduled 
:deadline))
  (setq entries (append entries (org-agenda-get-day-entries file today 
:timestamp :scheduled :deadline)))
  (while (setq file (pop files)) (setq entries (append entries ...)))
  (let* ((cnt 0) (org-agenda-new-buffers nil) (org-deadline-warning-days 0) 
(today ...) (org-agenda-restrict nil) (files ...) entries file) 
(org-prepare-agenda-buffers files) (while (setq file ...) (setq entries ...)) 
(setq entries (delq nil entries)) (mapc (lambda ... ...) entries) 
(org-release-buffers org-agenda-new-buffers) (if (eq cnt 0) (message No event 
to add) (message Added %d event%s for today cnt ...)))
  org-agenda-to-appt()
  (lambda nil (setq appt-time-msg-list nil) (org-agenda-to-appt))()
  run-hooks(org-agenda-mode-hook)
  apply(run-hooks org-agenda-mode-hook)
  run-mode-hooks(org-agenda-mode-hook)
  apply(run-mode-hooks org-agenda-mode-hook)
  org-agenda-mode()
  (if org-agenda-multi (progn (setq buffer-read-only nil) (goto-char ...) 

Re: [O] Using org-mode for Research and Notetaking

2011-07-18 Thread Sebastien Vauban
Hi Matt,

Matt Lundin wrote:
 In my experience, most of the asterisks are made invisible by
 org-hide-face. E.g.,

 *** TODO A task
   Some notes about the task that are not part of the text.
 *** END

Any idea about the reason to make the first asterisk shine with face
`org-warning'? Could it be `org-hide' face as well?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Creating a SCHEDULED entry with C-c C-s seems to add a trailing whitespace after the timestamp

2011-07-18 Thread Sebastien Vauban
Hi Bastien,

Bastien wrote:
 Rainer Stengele rainer.steng...@diplan.de writes:

 Creating a SCHEDULED entry with C-c C-s seems to add a trailing
 whitespace after the timestamp:

 This has been fixed a few days ago.

 Can you test against latest git?

Just pulled. I still get the space added, for example when being in the source
Org file, on a sched. timestamp, and choosing another date thru `C-c C-s'.

** TODO Dossier nr. : 10029/00  :mail:
   SCHEDULED: 2011-07-25 Mon
^ place cursor here
   [2011-06-07 Tue 10:44]

After the date selection, a space gets added after the right angle bracket.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Exporting to wiki syntax from org mode

2011-07-18 Thread Puneeth Chaganti
Hi Bastien,

On 7/18/11, Bastien b...@altern.org wrote:
[..]

 I have something that works for MoinMoin syntax [2].

 Looks great, looking forward an official release :)

I'm not sure, what you mean by an official release.  I'm attaching
the org-mm.el file here.  Please add it to the EXPERIMENTAL directory,
if you think that's the right way to go about it. Otherwise, tell me
what would be the best way to officially release it.


 PS: Maybe you can just fix s/Bastien G./Puneeth Chaganti in this
 file, so that I will not be credited for this piece of code? :)

:)

Sorry for leaving your name, against code that you didn't write.  I
had been using this exporter for a particular task I had been doing,
during a period of time.  Didn't really bother about minor details and
making the code public.

--
Puneeth
;;; org-mm.el --- MoinMoin backend for org-export.el
;;
;; Copyright 2010, 2011 Puneeth Chaganti
;;
;; Emacs Lisp Archive Entry
;; Filename: org-mm.el
;; Version: 0.2
;; Author: Puneeth Chaganti punchagan [at] gmail [dot] com
;; Keywords: MoinMoin Org export
;; Description: MoinMoin exporter for Org
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;;
;; A portion of this code is based on org-mw.el by Bastien Guerry.
;;
;;; Commentary:
;;
;; org-mm.el lets you convert Org files to MoinMoin files using
;; the org-export.el experimental engine.
;;
;; Put this file into your load-path and the following into your ~/.emacs:
;;   (require 'org-mm)
;;
;; You also need to fetch Org's git repository and add the EXPERIMENTAL/
;; directory in your load path.
;; 
;; Fetch Org's git repository:
;; 
;; ~$ cd ~/install/git/
;; ~$ git clone git://repo.or.cz/org-mode.git
;;
;; Put this in your .emacs.el:
;; 
;; (add-to-list 'load-path ~/install/git/org-mode/EXPERIMENTAL/)
;;
;; Export Org files to MoinMoin: M-x org-mm-export RET
;;
;;; Todo:
;; 
;; - handle radio links
;; - support caption and attributes in tables
;; - better handline of source code and examples
;; - handle inline HTML
;;
;;; Code:

(require 'org-export)

(defvar org-mm-emphasis-alist
  '((* '''%s''' nil)
(/ ''%s'' nil)
(_ __%s__ nil)
(+ --%s-- nil)
(= `%s` nil))
  The list of fontification expressions for MoinMoin.)

(defvar org-mm-export-table-table-style )
(defvar org-mm-export-table-header-style )
(defvar org-mm-export-table-cell-style )

(defun org-mm-export ()
  Export the current buffer to MoinMoin.
  (interactive)
  (setq org-export-current-backend 'mm)
  (org-export-set-backend mm)
  ;; FIXME see the problem `org-mm-export-footnotes'
  ;; (add-hook 'org-export-preprocess-final-hook 'org-mm-export-footnotes)
  (add-hook 'org-export-preprocess-before-backend-specifics-hook
'org-mm-export-src-example)
  (org-export-render)
  ;; (remove-hook 'org-export-preprocess-final-hook 'org-mm-export-footnotes)
  (remove-hook 'org-export-preprocess-before-backend-specifics-hook 
   'org-mm-export-src-example))

(defun org-mm-export-header ()
  Export the header part.
  (let* ((p (org-combine-plists (org-infile-export-plist)
org-export-properties))
	 (title (plist-get p :title))
	 (author (plist-get p :author))
	 (date (plist-get p :date))
 (level (plist-get p :headline-levels)))
(insert (format = %s by %s =\n\n title author))
(if (plist-get p :table-of-contents)
(insert (format TableOfContents(%s)\n level)

(defun org-mm-export-first-lines (first-lines)
  Export first lines.
  (insert (org-export-render-content first-lines) \n)
  (goto-char (point-max)))

(defun org-mm-export-heading (section-properties)
  Export MoinMoin heading
  (let* ((p section-properties)
	 (h (plist-get p :heading))
	 (s (make-string (1+ (plist-get p :level)) ?=)))
(insert (format %s %s %s\n s h s

(defun org-mm-export-quote-verse-center ()
  Export #+BEGIN_QUOTE/VERSE/CENTER environments.
  (let (rpl e)
(while (re-search-forward ^[ \t]*ORG-\\([A-Z]+\\)-\\(START\\|END\\).*$ nil t)
  (setq e (if (equal (match-string 2) END) / )) 
  (setq rpl 
	(cond ((equal (match-string 1) BLOCKQUOTE) blockquote)
		  ((equal (match-string 1) VERSE) pre)
		  ((equal (match-string 1) CENTER) center)))
  (replace-match (concat  e rpl) t

(defun org-mm-export-fonts ()
  Export fontification.
  (while (re-search-forward org-emph-re nil t)
(let* ((emph 

[O] [bug] Lists get appended with / when using EXPERIMENTAL/org-mw.el

2011-07-18 Thread Puneeth Chaganti
Hi Bastien,

Exporting an org-file using org-mw-export appends a / at the end of
lists (both ordered and unordered).

-- 
Puneeth



[O] IDs

2011-07-18 Thread Ido Magal
Is it possible to suppress the creation of IDs? And what might be the
consequences of doing so?

Org-mode tends to add IDs and it makes files less readable outside of Emacs.



Re: [O] Using org-mode for Research and Notetaking

2011-07-18 Thread Matt Lundin
Sebastien Vauban
wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes:


 1. people want inline tasks with possibly no TODO keyword

 This is often how I use them --- to insert a drawer of notes that is
 visible but will not be exported.

 Why do you say it wouldn't be exported just because it has no TODO keyword?
 At least, not in the default settings of the export, right?

Thanks for the clarification. I do indeed have set org-inlinetask-export
to nil. 

While most of my inline tasks have a TODO, some are used merely for
notes. I prefer not to export them in either case.

Best,
Matt



Re: [O] IDs

2011-07-18 Thread Bastien
Dear Ido,

Ido Magal ido.ma...@gmail.com writes:

 Is it possible to suppress the creation of IDs? And what might be the
 consequences of doing so?

Please give more context:

- when do IDs get created?
- what is your configuration relevant to this?
- what did you try to turn off the creation of IDs?

Help us replicate the problem to see how we can help you.

Best regards,

-- 
 Bastien



Re: [O] [bug?] not: Symbol's value as variable is void: org-outline-regexp-bol

2011-07-18 Thread Bastien
Sebastien Vauban wxhgmqzgw...@spammotel.com writes:

 Since update of 5 mins ago, when `C-c a a':

Make sure you reload Org with M-x org-reload.

`org-outline-regexp-bol' is a new defconst in org.el.

HTH,

-- 
 Bastien



Re: [O] [bug] Lists get appended with / when using EXPERIMENTAL/org-mw.el

2011-07-18 Thread Bastien
Puneeth Chaganti puncha...@gmail.com writes:

 Exporting an org-file using org-mw-export appends a / at the end of
 lists (both ordered and unordered).

Bug confirmed, that's why it's in EXPERIMENTAL :)  

Thanks for reporting though, I hope to make progress on this soon.

-- 
 Bastien



[O] include no longer working in (ledger) code blocks

2011-07-18 Thread Viktor Rosenfeld
Hi,

I have the following code block in my org file:

#+begin_src ledger :results raw :cmdline ...
!include /Users/he-sk/org/files/finanzen/2011.ledger
#+end_src

If I evaluate this code block I get an error message: Code block
produced no output.

This used to work as of 6 weeks ago.  The specified file exists, I
double-checked with ls. If I paste the contents of the file into the
code block, everything works as expected.

Does anybody know why this isn't working anymore?

Thanks,
Viktor

PS: Sorry, if this has been asked recently, search.gmane.org appears to
be down.



Re: [O] Creating a SCHEDULED entry with C-c C-s seems to add a trailing whitespace after the timestamp

2011-07-18 Thread Bastien
Sebastien Vauban wxhgmqzgw...@spammotel.com writes:

 Just pulled. I still get the space added, for example when being in the source
 Org file, on a sched. timestamp, and choosing another date thru `C-c C-s'.

Please recompile and/or reload.

-- 
 Bastien



Re: [O] Using org-mode for Research and Notetaking

2011-07-18 Thread Bastien
Hi Sébastien,

Sebastien Vauban wxhgmqzgw...@spammotel.com writes:

 Any idea about the reason to make the first asterisk shine with face
 `org-warning'? Could it be `org-hide' face as well?

I guess using the `org-warning' face for the first asterisk of an inline
task helps distinguishing it from normal task.

I'd say it's a feature -- but I'm not an inline-task guru, feel free to
convince me otherwise.

:)

-- 
 Bastien



Re: [O] [BABEL,PATCH] ob-fortran

2011-07-18 Thread Bastien
Hi Sergey,

Litvinov Sergey slitvi...@gmail.com writes:

 Please consider an implementation of fortran support for
 org-babel. The patch adds contrib/babel/langs/ob-fortran.el
 (modification of lisp/ob-C.el) and
 testing/examples/ob-fortran-test.org with tests.

Great -- thanks a lot for this!

I let Eric (cc'ed) decide about integrating this in the contrib/ dir.

 diff --git a/contrib/babel/langs/ob-fortran.el 
 b/contrib/babel/langs/ob-fortran.el
 new file mode 100644
 index 000..6fdf416
 --- /dev/null
 +++ b/contrib/babel/langs/ob-fortran.el
 @@ -0,0 +1,191 @@
 +;;; ob-fortran.el --- org-babel functions for fortran
 +;; Copyright (C) 2010  Free Software Foundation, Inc.
 +
 +;; Author: Sergey Litvinov (based on ob-C.el by Eric Schulte)
 +;; Keywords: literate programming, reproducible research, fortran
 +;; Homepage: http://orgmode.org
 +;; Version: 7.6
 +
 +;; This file is part of GNU Emacs.

(Nitpicking: files in Org's contrib/ directory are *not* part of GNU
Emacs, only those in lisp/.)

Best,

-- 
 Bastien



Re: [O] Creating a SCHEDULED entry with C-c C-s seems to add a trailing whitespace after the timestamp

2011-07-18 Thread Sebastien Vauban
Hi Bastien,

Bastien wrote:
 Sebastien Vauban wxhgmqzgw...@spammotel.com writes:

 Just pulled. I still get the space added, for example when being in the
 source Org file, on a sched. timestamp, and choosing another date thru `C-c
 C-s'.

 Please recompile and/or reload.

I don't use `elc' files, and I always restart Emacs after updating.

Though, you're right: I don't know how it arrived there, but I had one .elc
file in Org (org.elc). Certainly typing once a bad key binding in dired?

Anyway, once deleted, everything is OK. Thanks, and sorry.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] entering a date through C-c ! or C-c . in edit mode of column view does not work

2011-07-18 Thread Giovanni Ridolfi
Jean Wallemacq jean.wallem...@skynet.be writes:

Hi, Jean,
 I get the message: C-c ! is undefined

 Actually, I need to record a date for each item, and I would like to
 enter the date using the column mode.  Any idea on how to do it?


would you please 
1. specify Org-version and Emacs version
2. send us a file as a minimal example of the file you're working on and
   a description of what you're trying to achieve.

cheers,
Giovanni
 
Perhaps you should have a property :Date: [2011-06-14 mar] then you
could modify its value with e in column view



Re: [O] [bug?] not: Symbol's value as variable is void: org-outline-regexp-bol

2011-07-18 Thread Sebastien Vauban
Hi Bastien,

Bastien wrote:
 Sebastien Vauban wxhgmqzgw...@spammotel.com writes:

 Since update of 5 mins ago, when `C-c a a':

 Make sure you reload Org with M-x org-reload.

 `org-outline-regexp-bol' is a new defconst in org.el.

Problem came from org.elc on my disk. Once deleted, I confirm that you've
fixed the problem. Thanks, and sorry.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] IDs

2011-07-18 Thread Ido Magal
Hrmm. By your response I takeit that it's not as obvious as I was
expecting. I assumed that ID additions were normal. I'll
reinvestigate.

Thanks.

On Jul 18, 2011, at 7:54, Bastien b...@altern.org wrote:

 Dear Ido,

 Ido Magal ido.ma...@gmail.com writes:

 Is it possible to suppress the creation of IDs? And what might be the
 consequences of doing so?

 Please give more context:

 - when do IDs get created?
 - what is your configuration relevant to this?
 - what did you try to turn off the creation of IDs?

 Help us replicate the problem to see how we can help you.

 Best regards,

 --
 Bastien



[O] generalize %F in capture to dired buffers

2011-07-18 Thread Nicolas Goaziou
Hello,

After an interesting discussion with chu_ on #org-mode, I've written the
following patch, which makes %F in a capture template return the full
path of the directory if the capture process was called from a dired
buffer.

Any interest in applying it?

Regards,

-- 
Nicolas Goaziou
From ac5ad0078527ba4efcf12e091f048b82d6559422 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou n.goaz...@gmail.com
Date: Mon, 18 Jul 2011 17:42:01 +0200
Subject: [PATCH] org-capture: %F is directory when capture starts in a dired
 buffer

* lisp/org-capture.el (org-capture): if no file is associated to
  current buffer, check dired buffer and try to retreive a possibly
  directory associated.
---
 lisp/org-capture.el |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index aeb04f2..8da12df 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -447,7 +447,8 @@ bypassed.
 	(org-capture-set-plist entry)
 	(org-capture-get-template)
 	(org-capture-put :original-buffer orig-buf
-			 :original-file (buffer-file-name orig-buf)
+			 :original-file (or (buffer-file-name orig-buf)
+	(car (rassq orig-buf dired-buffers)))
 			 :original-file-nondirectory
 			 (and (buffer-file-name orig-buf)
 			  (file-name-nondirectory
-- 
1.7.6



Re: [O] How-to evaluate Java-snippets in org-mode/org-babel?

2011-07-18 Thread Eric Schulte
Torsten Wagner torsten.wag...@gmail.com writes:

 Sorry took me a while to test it.
 It works great 
 Many many thanks for your help.
 I found two minor things.
 My snippets contain the definition of a package, which in turn end to be a
 folder. The tangle function could create folders on demand. Would be useful
 for your code too. It works already by creating the folder manually and
 simply write...

 #+begin_src java classname packagename/classname


OK, I've changed this code so that missing package directories will be
created automatically.


 in the next step, people might use sessions as equivalent to a package. This
 would allow to define multiple classes and the usage of them within a single
 execution.


From earlier discussion in this thread, it sounds as though java session
integration is difficult and cumbersome, so for now I would lean towards
simply not including session support.


 However for now its perfect already. Why not putting it into ob-java.el and
 see how its develope.

Sounds good, I have just added a small ob-java.el to the Org-mode core.

Thanks for the feedback -- Eric

 
 Totti
 On Jul 16, 2011 12:37 AM, Eric Schulte schulte.e...@gmail.com wrote:
 Hi Torsten,

 I've just written the included emacs-lisp function [1], which when added
 to your config should provide for minimal evaluation functionality for
 java code blocks.

 This function drops the body of a code block to a file named after the
 value of the :classname header argument (since java cares about file
 names), it then compiles the file with javac, and executes the resulting
 executable returning the results. See the attached Org-mode file [2]
 which evaluates successfully on my system (after I installed javac).

 I copied the code example and compilation process from [3].

 Please let me know how this works for you, hopefully once we iron out
 the kinks in this function it can serve as the seed for a full java
 mode.

 Cheers -- Eric

 Torsten Wagner torsten.wag...@gmail.com writes:

 Hi Eric,

 You probably don't want to pass the body of a code block to a lisp
 function as quoting will become a nightmare, however passing the name to
 a lisp block may be reasonable.

 I would suggest that rather than implementing this behavior in a code
 block you take a look at starting a ob-java.el file. A partial
 implementation (e.g., only external evaluation, no session evaluation)
 would be a useful contribution, and given the many helper functions and
 examples present in the other ob-* files this would most likely be
 easier than a custom lisp-block implementation.

 o.k. the first round of evaluations is over and it worked out
 o.k. However, there was still rather much handwork to do.
 I tried to get a ob-java.el file together using the template and
 mainly by looking at ob-c.el which I guess comes close what would have
 to be done for java.
 However, my lisp-skills (which are close to zero) are not enough to
 get it working. The main problem was that ob-c.el is working for both
 C and C++ and all this if then else troubles me a bit.

 Basically, I want only tangle the actual code block into a temp
 file. Well temp is not really right, since java demand its file
 structure and file naming. Finally execute it externally by your
 proposed code

 javac -cp . mypackage/myclass.java
 java -cp . mypackage.myclass

 and return the results

 Hmm maybe better to give a real world example (stripped down to make
 it shorter)
 I use now the following way
 /---/
 #+BABEL: :mkdirp t

 * Coursework 1
 ** StudentID1
 #+BEGIN_SRC java
 package foo;
 public class Bar
 {
 private double ans = 0
 public void set(double d){
 ans = d;
 }
 public void print(){
 System.out.println(ans);
 }
 public static void main(String[] argv){
 Bar c = new Bar();
 c.set(100);
 c.print();
 }
 }
 #+end_src

 ** StudentID2
 #+BEGIN_SRC java
 package foo;
 public class Bar
 {
 private double x = 0
 public void set(double in){
 x = in;
 }
 public void print(){
 System.out.println(x);
 }
 public static void main(String[] argv){
 Bar myclass = new Bar();
 myclass.set(100);
 myclass.print();
 }
 }
 #+end_src

 ** Result
 #+srcname: result
 #+begin_src sh :results output
 javac -cp . foo/Bar.java
 java -cp . foo.Bar
 #+end_src

 //


 For now I only added the tangle command to a single code block and
 created the file via C-c C-v t.

 #+BEGIN_SRC java tangle: foo/Bar.java

 Then I rushed down to a shell block result which executed the the
 above commands. I checked the results and started to remove the tangle
 object from one block and added it to the next block. Kind of tiring
 if you have several dozen of blocks.
 Guess you can see from the above example the trouble of having several
 dozen of them and then tangeling them one by one and execute the
 result block ;)

 I tried to make it more easy by giving the shell block a name and call
 it under each java code block. 

Re: [O] Web bookmarks in ORG?

2011-07-18 Thread joakim
Angel de Vicente ang...@iac.es writes:

 Hi,

 Is there anyone using ORG for keeping web bookmarks? Basically I'm
 looking at Delicious-like functionality, where I just put tags to web
 addresses and I can search the bookmarks either for their name or with
 tags. 

 I have looked at webjump and w3m but they seem to keep old-fashioned
 ways for organizing the bookmark file. I just thought that perhaps this
 could be done with Org. Any ideas?

 Thanks,

Im also interested in this for my webkit embedded in emacs project.
(bzr co bzr+ssh://j...@bzr.savannah.gnu.org/emacs/xwidget/)

Currently I just use urls in org files and open them with c-o. It works
well for links you seldomly use because its easier to find them by
context than by name.

-- 
Joakim Verona




Re: [O] Bug: Org-Babel Mode R Plot Output to LaTeX File [Babel] [7.5]

2011-07-18 Thread Feiming Chen
Hi Eric: 

Thanks a lot!   It would be nice if Org-Babel model could automatically add the 
#+ATTR_LaTeX lines (from the hint in the R code header line) during LaTeX 
export.

Somehow I failed to compile the file on my system.  It seems the line: 

#+ATTR_LaTeX: width=5px

has corrupted the PDF file generated in R.   Because after C-c C-e d,  I get 
the following error:

!pdfTeX error: pdflatex (file ./a3.pdf): PDF inclusion: required page does not 
exist 0

 == Fatal error occurred, no output PDF file produced!


and  I could not open the PDF file of the R plot any more (the error message is 
Cannot display this page! Maybe because of a conversion failure).   

Attached is the simplified org file that failed on LaTeX transport on my 
computer.  

Thanks!  

Sincerely, 

Feiming Chen

--- On Fri, 7/15/11, Eric Schulte schulte.e...@gmail.com wrote:

From: Eric Schulte schulte.e...@gmail.com
Subject: Re: [O] Bug: Org-Babel Mode R Plot Output to LaTeX File [Babel] [7.5]
To: Feiming Chen feimingc...@yahoo.com
Cc: emacs-orgmode@gnu.org
Date: Friday, July 15, 2011, 9:32 AM

Hi Feiming,

The width and height header arguments are passed to R to affect the
size of the generated file e.g.,

  png(filename=a1.png,width=500,height=500)

however they do not affect the generated latex code.  Luckily Org-mode
does support passing information like image width to latex figures.  See
my attached version of your test file which uses #+ATTR_LaTeX lines to
specify the width during LaTeX
 export.

Best -- Eric


-Inline Attachment Follows-


Feiming Chen feimingc...@yahoo.com writes:

 Hi, I like org-mode and org-babel mode very much, but recently I am  having 
 problems outputting R graphics to LaTeX report with
 Org-Babel mode.  Attached is my test file, where I am generating 4
 simple plots of different sizes and format (.png or .pdf).  The HTML
 export is satisfactory, however, the LaTeX export (C-c C-e l) presents two 
 problems: 

     1.  All 4 plots have the same size (10em) which is different from the
     header specification and is too small.

 \includegraphics[width=10em]{a1.png} ...
 \includegraphics[width=10em]{a2.png} ...

 \includegraphics[width=10em]{a3.pdf} ...
 \includegraphics[width=10em]{a4.pdf} ...

     2. While exporting to PDF file, the R code is mysteriously lost in
     the R execution for the PDF output of the plots and the compilation 
 failed correspondingly: 

 pdf(file=a3.pdf,width=5,height=5)
 
 dev.off()
 pdf(file=a4.pdf,width=10,height=10)

 dev.off()


 Hopefully you can replicate my errors and help me on this.  Thanks a
 lot!

 Best regards, 
 Feiming Chen

 


 Emacs  : GNU Emacs 23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.21.4)
  of 2010-07-08 on x86-05.phx2.fedoraproject.org
 Package: Org-mode version 7.5

 current state:

 ==
 (setq
  org-file-apps '((auto-mode . emacs) (\\.mm\\' . default)
      (\\.x?html?\\' . firefox %s) (\\.pdf\\' . evince %s))
  org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
  org-hide-block-startup t
  org-speed-command-hook '(org-speed-command-default-hook
           org-babel-speed-command-hook)
  org-src-fontify-natively t
  org-babel-load-languages '((emacs-lisp . t) (R . t))
  org-metaup-hook '(org-babel-load-in-session-maybe)
  org-after-todo-state-change-hook '(org-clock-out-if-current)
  org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
  org-export-latex-format-toc-function 'org-export-latex-format-toc-default
  org-tab-first-hook
 '(org-hide-block-toggle-maybe
       org-src-native-tab-command-maybe
       org-babel-hide-result-toggle-maybe)
  outline-regexp \\*+ 
  org-src-mode-hook '(org-src-babel-configure-edit-buffer
      org-src-mode-configure-edit-buffer)
  org-confirm-shell-link-function 'yes-or-no-p
  org-reveal-start-hook '(org-decrypt-entry)
  org-export-first-hook '(org-beamer-initialize-open-trackers)
  org-format-latex-header
 \\documentclass{article}\n\\usepackage[usenames]{color}\n\\usepackage{amsmath}\n\\usepackage[mathscr]{eucal}\n%
 Feiming's Customization
 BEGIN\n\\usepackage[colorlinks=true]{hyperref}\n\\input{/home/chen/lib/math.tex}\n%
 Feiming's
 Customization END\n\\pagestyle{empty} % do not
 remove\n[PACKAGES]\n[DEFAULT-PACKAGES]\n% The settings below are
 copied from
 fullpage.sty\n\\setlength{\\textwidth}{\\paperwidth}\n\\addtolength{\\textwidth}{-3cm}\n\\setlength{\\oddsidemargin}{1.5cm}\n\\addtolength{\\oddsidemargin}{-2.54cm}\n\\setlength{\\evensidemargin}{\\oddsidemargin}\n\\setlength{\\textheight}{\\paperheight}\n\\addtolength{\\textheight}{-\\headheight}\n\\addtolength{\\textheight}{-\\headsep}\n\\addtolength{\\textheight}{-\\footskip}\n\\addtolength{\\textheight}{-3cm}\n\\setlength{\\topmargin}{1.5cm}\n\\addtolength{\\topmargin}{-2.54cm}
  org-startup-indented t
  org-agenda-before-write-hook '(org-agenda-add-entry-text)
  org-babel-pre-tangle-hook 

Re: [O] Tbl: addition of two times results in error

2011-07-18 Thread Karl Voit
* Bastien b...@altern.org wrote:
 Hi Karl,

 Karl Voit devn...@karl-voit.at writes:

 Hm. I just pulled newest Org-mode (again) and created an Org-mode
 file with only the table from above and still it does not work :-(

 Please try the table alone in single file.

I already did so for the last posting/email here.

 Maybe I am trying to triage the problem by selectively disabling
 parts of my .emacs configuration. I'll let you know, if I find
 anything related to this problem.

 Thanks for hunting this bug!

Well, lets see if I can find anything :-)

-- 
Karl Voit




[O] 7.6 Parsing error with footnotes?

2011-07-18 Thread Ken.Williams
Hi, 

I noticed a problem in a great-big-huge org-mode file of mine after I
upgraded to version 7.6, and I whittled it down to the following org-mode
file:

-
#+TITLE: My title here
#+AUTHOR:Ken Williams

#+BEGIN_SRC R
[1] 173
#+END_SRC

#+begin_example
: [1] 12151
#+end_example

#+begin_example
[1] 8935
#+end_example
-


When I do C-c C-e b to export to HTML, I get the error:

-

ad-Orig-error: unbalanced begin/end_src blocks with #(#+BEGIN_SRC R
 0 13 (fontified t font-lock-fontified t) 13 14 (fontified t
font-lock-fontified t))
-



If I remove any of those [1] thingies, an export will complete without
error (this is true for both this small sample, and my original big file).

I *suspect* that the problem might be an overzealous footnote-finder,
because I also (after the 7.6 upgrade) have a bunch of number
DEFINITION NOT FOUND errors appearing at the bottom of my exported HTML
file now.

Anyone able to reproduce this?

(yes, I know [1] 173 isn't valid R code.  Still the export probably
shouldn't bomb out though.)

--
Ken Williams
Senior Research Scientist
Thomson Reuters
http://labs.thomsonreuters.com




Re: [O] [BABEL,PATCH] ob-fortran

2011-07-18 Thread Eric Schulte
Hi Sergey,

Thank you for sharing ob-fortran.  After a quick scan it looks great,
and I would like to include it into the Org-mode core.

However a contribution of this size does require assignment of copyright
to the FSF.  See http://orgmode.org/worg/org-contribute.html#sec-2 for
information and instructions on the FSF assignment process.  Please let
me know if you will be able to assign copyright, I should be able to
include this into the core as soon as the process has begun.

Also, it is comforting to see a suite of test cases.  You may want to
consider wrapping these test cases up into ERT function so that they
could be folded into the remainder of the Org-mode test suite, I could
certainly help with this process.

Thanks! -- Eric

Litvinov Sergey slitvi...@gmail.com writes:

 Please consider an implementation of fortran support for
 org-babel. The patch adds contrib/babel/langs/ob-fortran.el
 (modification of lisp/ob-C.el) and
 testing/examples/ob-fortran-test.org with tests.


 From 2ac9b86a6387cae1472e3ed288a3a133be72318c Mon Sep 17 00:00:00 2001
 From: Litvinov Sergey slitvi...@gmail.com
 Date: Mon, 18 Jul 2011 09:44:07 +0200
 Subject: [PATCH] Add fortran to babel

 ---
  contrib/babel/langs/ob-fortran.el|  191 
 ++
  testing/examples/ob-fortran-test.org |   76 ++
  2 files changed, 267 insertions(+), 0 deletions(-)
  create mode 100644 contrib/babel/langs/ob-fortran.el
  create mode 100644 testing/examples/ob-fortran-test.org

 diff --git a/contrib/babel/langs/ob-fortran.el 
 b/contrib/babel/langs/ob-fortran.el
 new file mode 100644
 index 000..6fdf416
 --- /dev/null
 +++ b/contrib/babel/langs/ob-fortran.el
 @@ -0,0 +1,191 @@
 +;;; ob-fortran.el --- org-babel functions for fortran
 +;; Copyright (C) 2010  Free Software Foundation, Inc.
 +
 +;; Author: Sergey Litvinov (based on ob-C.el by Eric Schulte)
 +;; Keywords: literate programming, reproducible research, fortran
 +;; Homepage: http://orgmode.org
 +;; Version: 7.6
 +
 +;; This file is part of GNU Emacs.
 +
 +;; GNU Emacs is free software: you can redistribute it and/or modify
 +;; it under the terms of the GNU General Public License as published by
 +;; the Free Software Foundation, either version 3 of the License, or
 +;; (at your option) any later version.
 +
 +;; GNU Emacs is distributed in the hope that it will be useful,
 +;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 +;; GNU General Public License for more details.
 +
 +;; You should have received a copy of the GNU General Public License
 +;; along with GNU Emacs.  If not, see http://www.gnu.org/licenses/.
 +
 +;;; Commentary:
 +
 +;; Org-Babel support for evaluating fortran code.
 +;;
 +
 +;;; Code:
 +
 +;; Org-Babel support for evaluating fortran code.
 +;;
 +
 +(require 'ob)
 +(require 'ob-eval)
 +(require 'cc-mode)
 +
 +(declare-function org-entry-get org
 +   (pom property optional inherit literal-nil))
 +
 +(defvar org-babel-tangle-lang-exts)
 +(add-to-list 'org-babel-tangle-lang-exts '(fortran . F90))
 +
 +(defvar org-babel-default-header-args:fortran '())
 +
 +(defvar org-babel-fortran-compiler gfortran
 +  fortran command used to compile a fortran source code file into an
 +  executable.)
 +
 +(defun org-babel-execute:fortran (body params)
 +  Execute BODY according to PARAMS.  This function calls
 +`org-babel-execute:fortran'.
 +  (org-babel-execute:fortran body params))
 +
 +(defun org-babel-execute:fortran (body params)
 +Execute a block of fortran code with org-babel.  This function is
 +called by `org-babel-execute-src-block'.
 +  (org-babel-fortran-execute body params))
 +
 +(defun org-babel-expand-body:fortran (body params)
 +  Expand a block of fortran code with org-babel according to it's
 +header arguments (calls `org-babel-fortran-expand').
 +  (org-babel-fortran-expand body params))
 +
 +(defun org-babel-execute:fortran (body params)
 +  Execute a block of fortran code with org-babel.  This function is
 +called by `org-babel-execute-src-block'.
 +  (org-babel-fortran-execute body params))
 +
 +(defun org-babel-expand-body:fortran (body params)
 +  Expand a block of fortran code with org-babel according to it's
 +header arguments (calls `org-babel-fortran-expand').
 +  (org-babel-fortran-expand body params))
 +
 +(defun org-babel-fortran-execute (body params)
 +  This function should only be called by `org-babel-execute:fortran'
 +  (let* ((tmp-src-file (org-babel-temp-file
 + fortran-src-
 + .F90))
 + (tmp-bin-file (org-babel-temp-file fortran-bin-))
 + (cmdline (cdr (assoc :cmdline params)))
 + (flags (cdr (assoc :flags params)))
 + (full-body (org-babel-fortran-expand body params))
 + (compile
 +   (progn
 + (with-temp-file tmp-src-file (insert full-body))
 + (org-babel-eval
 +  (format %s -o %s %s %s
 

Re: [O] org-bibtex

2011-07-18 Thread Matt Lundin
Hi Eric,

Eric Schulte schulte.e...@gmail.com writes:

 I just pushed up a fix for this issue.

 Thanks for suggesting this change. -- Eric

This fix broke org-bibtex-fleshout, since org-babel-trim converts nil to
. As a result, org-bibtex-fleshout believes that there are values for
all the required fields even though those fields are not defined.

Best,
Matt



Re: [O] breaking URLs

2011-07-18 Thread Henri-Paul Indiogine
Hi Bastien!

2011/7/18 Bastien b...@altern.org:
 the URL in  \url{my url}  it is exported as

 \url{[[my url]] [[my url]]}   however the URL is nicely split to the
 next line in the pdf.

 I would welcome ideas/code to have more flexibility wrt the way urls
 are handled by the LaTeX exporter.

If there would be a way of having the URL in orgmode be exported to
LaTeX as \url{my url} without the square brackets and the repetition
that would be all that is necessary for me.  I have no idea why the
LaTeX exporter add the brackets and duplicates the link.


 ERROR: pdfTeX error (ext1): \pdfendlink cannot be used in vertical
 mode.

 This looks like a LaTeX related problem, and I'm not export enough to
 help here.  I hope someone will be able to give you further advice.

Yes, that is a LaTeX issue.  I do not know the hyperref package well
enough to understand that problem.

Thanks,
Henri-Paul



-- 
Henri-Paul Indiogine

Curriculum  Instruction
Texas AM University
TutorFind Learning Centre

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



Re: [O] Bug: Org-Babel Mode R Plot Output to LaTeX File [Babel] [7.5]

2011-07-18 Thread Feiming Chen
Hi Eric:

Thanks a lot for your quick response!  The problem is solved by adding a 
headline.  I can now successfully generated the PDF file from LaTeX export. 

I agree with your point about complexity vs. convenience.

Thanks again, and have a good week! 

Sincerely,
Feiming Chen

--- On Mon, 7/18/11, Eric Schulte schulte.e...@gmail.com wrote:

From: Eric Schulte schulte.e...@gmail.com
Subject: Re: [O] Bug: Org-Babel Mode R Plot Output to LaTeX File [Babel] [7.5]
To: Feiming Chen feimingc...@yahoo.com
Cc: Eric Schulte schulte.e...@gmail.com, emacs-orgmode@gnu.org
Date: Monday, July 18, 2011, 11:36 AM

Feiming Chen feimingc...@yahoo.com writes:

 Hi Eric: 

 Thanks a lot!   It would be nice if Org-Babel model could
 automatically add the #+ATTR_LaTeX lines (from the hint in the R
 code header line) during LaTeX export.


I don't think this will happen at least in the near term, as searching
out and creating/changing org export directives would be a major change
to the current behavior which inserts code results, and would cross some
semantic lines separating parts of Org-mode.

In this case I don't think the relatively limited convenience justifies
the added complexity.


 Somehow I failed to compile the file on my system.  It seems the line:

 #+ATTR_LaTeX: width=5px

 has corrupted the PDF file generated in R.   Because after C-c C-e d,  I 
 get the following error:

 !pdfTeX error: pdflatex (file ./a3.pdf): PDF inclusion: required page does 
 not exist 0

  == Fatal error occurred, no output PDF file produced!


 and  I could not open the PDF file of the R plot any more (the error
 message is Cannot display this page! Maybe because of a conversion
 failure).  

 Attached is the simplified org file that failed on LaTeX transport on my 
 computer.  


I believe in this case the problem is caused by the lack of any headline
levels.  The LaTeX exporter can be weird about headline levels, try
adding a line like

* top

to the org file before the code block.  That fixes the problem on my
system.

Also, there is no way that an #+attr_latex line could affect the
execution of a code block, precisely because of the simplifying
separation of distinct components mentioned earlier.

Best -- Eric


 Thanks! 

 Sincerely, 

 Feiming Chen

 --- On Fri, 7/15/11, Eric Schulte schulte.e...@gmail.com wrote:

 From: Eric Schulte schulte.e...@gmail.com
 Subject: Re: [O] Bug: Org-Babel Mode R Plot Output to LaTeX File [Babel] [7.5]
 To: Feiming Chen feimingc...@yahoo.com
 Cc: emacs-orgmode@gnu.org
 Date: Friday, July 15, 2011, 9:32 AM

 Hi Feiming,

 The width and height header arguments are passed to R to affect the
 size of the generated file e.g.,

   png(filename=a1.png,width=500,height=500)

 however they do not affect the generated latex code.  Luckily Org-mode
 does support passing information like image width to latex figures.  See
 my attached version of your test file which uses #+ATTR_LaTeX lines to
 specify the width during LaTeX
  export.

 Best -- Eric


 -Inline Attachment Follows-


 Feiming Chen feimingc...@yahoo.com writes:

 Hi, I like org-mode and org-babel mode very much, but recently I am  having 
 problems outputting R graphics to LaTeX report with
 Org-Babel mode.  Attached is my test file, where I am generating 4
 simple plots of different sizes and format (.png or .pdf).  The HTML
 export is satisfactory, however, the LaTeX export (C-c C-e l) presents two 
 problems: 

     1.  All 4 plots have the same size (10em) which is different from the
     header specification and is too small.

 \includegraphics[width=10em]{a1.png} ...
 \includegraphics[width=10em]{a2.png} ...

  \includegraphics[width=10em]{a3.pdf} ...
 \includegraphics[width=10em]{a4.pdf} ...

     2. While exporting to PDF file, the R code is mysteriously lost in
     the R execution for the PDF output of the plots and the compilation 
 failed correspondingly: 

 pdf(file=a3.pdf,width=5,height=5)
 
 dev.off()
 pdf(file=a4.pdf,width=10,height=10)

 dev.off()


 Hopefully you can replicate my errors and help me on this.  Thanks a
 lot!

 Best regards, 
 Feiming Chen

 


 Emacs  : GNU Emacs 23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.21.4)
  of 2010-07-08 on x86-05.phx2.fedoraproject.org
 Package: Org-mode version 7.5

 current state:

  ==
 (setq
  org-file-apps '((auto-mode . emacs) (\\.mm\\' . default)
      (\\.x?html?\\' . firefox %s) (\\.pdf\\' . evince %s))
  org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
  org-hide-block-startup t
  org-speed-command-hook '(org-speed-command-default-hook
           org-babel-speed-command-hook)
  org-src-fontify-natively t
  org-babel-load-languages '((emacs-lisp . t) (R . t))
  org-metaup-hook '(org-babel-load-in-session-maybe)
  org-after-todo-state-change-hook '(org-clock-out-if-current)
  org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
  

Re: [O] org-bibtex

2011-07-18 Thread Eric Schulte
Matt Lundin m...@imapmail.org writes:

 Hi Eric,

 Eric Schulte schulte.e...@gmail.com writes:

 I just pushed up a fix for this issue.

 Thanks for suggesting this change. -- Eric

 This fix broke org-bibtex-fleshout, since org-babel-trim converts nil to
 . As a result, org-bibtex-fleshout believes that there are values for
 all the required fields even though those fields are not defined.


Oh, thanks for catching this Matt, I've just pushed up a fix.

-- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] Bug: Org-Babel Mode R Plot Output to LaTeX File [Babel] [7.5]

2011-07-18 Thread Eric Schulte
Feiming Chen feimingc...@yahoo.com writes:

 Hi Eric: 

 Thanks a lot!   It would be nice if Org-Babel model could
 automatically add the #+ATTR_LaTeX lines (from the hint in the R
 code header line) during LaTeX export.


I don't think this will happen at least in the near term, as searching
out and creating/changing org export directives would be a major change
to the current behavior which inserts code results, and would cross some
semantic lines separating parts of Org-mode.

In this case I don't think the relatively limited convenience justifies
the added complexity.


 Somehow I failed to compile the file on my system.  It seems the line:

 #+ATTR_LaTeX: width=5px

 has corrupted the PDF file generated in R.   Because after C-c C-e d,  I 
 get the following error:

 !pdfTeX error: pdflatex (file ./a3.pdf): PDF inclusion: required page does 
 not exist 0

  == Fatal error occurred, no output PDF file produced!


 and  I could not open the PDF file of the R plot any more (the error
 message is Cannot display this page! Maybe because of a conversion
 failure).  

 Attached is the simplified org file that failed on LaTeX transport on my 
 computer.  


I believe in this case the problem is caused by the lack of any headline
levels.  The LaTeX exporter can be weird about headline levels, try
adding a line like

* top

to the org file before the code block.  That fixes the problem on my
system.

Also, there is no way that an #+attr_latex line could affect the
execution of a code block, precisely because of the simplifying
separation of distinct components mentioned earlier.

Best -- Eric


 Thanks! 

 Sincerely, 

 Feiming Chen

 --- On Fri, 7/15/11, Eric Schulte schulte.e...@gmail.com wrote:

 From: Eric Schulte schulte.e...@gmail.com
 Subject: Re: [O] Bug: Org-Babel Mode R Plot Output to LaTeX File [Babel] [7.5]
 To: Feiming Chen feimingc...@yahoo.com
 Cc: emacs-orgmode@gnu.org
 Date: Friday, July 15, 2011, 9:32 AM

 Hi Feiming,

 The width and height header arguments are passed to R to affect the
 size of the generated file e.g.,

   png(filename=a1.png,width=500,height=500)

 however they do not affect the generated latex code.  Luckily Org-mode
 does support passing information like image width to latex figures.  See
 my attached version of your test file which uses #+ATTR_LaTeX lines to
 specify the width during LaTeX
  export.

 Best -- Eric


 -Inline Attachment Follows-


 Feiming Chen feimingc...@yahoo.com writes:

 Hi, I like org-mode and org-babel mode very much, but recently I am  having 
 problems outputting R graphics to LaTeX report with
 Org-Babel mode.  Attached is my test file, where I am generating 4
 simple plots of different sizes and format (.png or .pdf).  The HTML
 export is satisfactory, however, the LaTeX export (C-c C-e l) presents two 
 problems: 

     1.  All 4 plots have the same size (10em) which is different from the
     header specification and is too small.

 \includegraphics[width=10em]{a1.png} ...
 \includegraphics[width=10em]{a2.png} ...

  \includegraphics[width=10em]{a3.pdf} ...
 \includegraphics[width=10em]{a4.pdf} ...

     2. While exporting to PDF file, the R code is mysteriously lost in
     the R execution for the PDF output of the plots and the compilation 
 failed correspondingly: 

 pdf(file=a3.pdf,width=5,height=5)
 
 dev.off()
 pdf(file=a4.pdf,width=10,height=10)

 dev.off()


 Hopefully you can replicate my errors and help me on this.  Thanks a
 lot!

 Best regards, 
 Feiming Chen

 


 Emacs  : GNU Emacs 23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.21.4)
  of 2010-07-08 on x86-05.phx2.fedoraproject.org
 Package: Org-mode version 7.5

 current state:

  ==
 (setq
  org-file-apps '((auto-mode . emacs) (\\.mm\\' . default)
      (\\.x?html?\\' . firefox %s) (\\.pdf\\' . evince %s))
  org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
  org-hide-block-startup t
  org-speed-command-hook '(org-speed-command-default-hook
           org-babel-speed-command-hook)
  org-src-fontify-natively t
  org-babel-load-languages '((emacs-lisp . t) (R . t))
  org-metaup-hook '(org-babel-load-in-session-maybe)
  org-after-todo-state-change-hook '(org-clock-out-if-current)
  org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
  org-export-latex-format-toc-function 'org-export-latex-format-toc-default
  org-tab-first-hook
  '(org-hide-block-toggle-maybe
       org-src-native-tab-command-maybe
       org-babel-hide-result-toggle-maybe)
  outline-regexp \\*+ 
  org-src-mode-hook '(org-src-babel-configure-edit-buffer
      org-src-mode-configure-edit-buffer)
  org-confirm-shell-link-function 'yes-or-no-p
  org-reveal-start-hook '(org-decrypt-entry)
  org-export-first-hook '(org-beamer-initialize-open-trackers)
  org-format-latex-header
 

Re: [O] 7.6 Parsing error with footnotes?

2011-07-18 Thread Nicolas Goaziou
Hello,

ken.willi...@thomsonreuters.com writes:

 I noticed a problem in a great-big-huge org-mode file of mine after I
 upgraded to version 7.6, and I whittled it down to the following org-mode
 file:

 -
 #+TITLE: My title here
 #+AUTHOR:Ken Williams
 #+BEGIN_SRC R
 [1] 173
 #+END_SRC
 #+begin_example
 : [1] 12151
 #+end_example
 #+begin_example
 [1] 8935
 #+end_example
 -

This has been fixed since 7.6 release. footone-finder was indeed
overzealous back then.

Regards,


Footnotes:

[1] DEFINITION NOT FOUND: 1


-- 
Nicolas Goaziou



Re: [O] org-bibtex

2011-07-18 Thread Matt Lundin
Eric Schulte schulte.e...@gmail.com writes:

 Matt Lundin m...@imapmail.org writes:

 Hi Eric,

 Eric Schulte schulte.e...@gmail.com writes:

 I just pushed up a fix for this issue.

 Thanks for suggesting this change. -- Eric

 This fix broke org-bibtex-fleshout, since org-babel-trim converts nil to
 . As a result, org-bibtex-fleshout believes that there are values for
 all the required fields even though those fields are not defined.


 Oh, thanks for catching this Matt, I've just pushed up a fix.

Thanks!

While we're on the subject of org-bibtex, I'm attaching a patch to fix
the tagging functionality I added a while back.

Best,
Matt

From c935b2afcd7cf673fff15efd9766f2d081289358 Mon Sep 17 00:00:00 2001
From: Matt Lundin m...@imapmail.org
Date: Mon, 18 Jul 2011 12:37:20 -0500
Subject: [PATCH] Fix argument to org-toggle-tag.

* lisp/org-bibtex.el: (org-bibtex-create, org-bibtex-write): Change
  argument of org-toggle-tag to 'on. (Other arguments, e.g., t, have
  no effect).
---
 lisp/org-bibtex.el |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el
index 6536917..165e96f 100644
--- a/lisp/org-bibtex.el
+++ b/lisp/org-bibtex.el
@@ -555,7 +555,7 @@ If nonew is t, add data to the headline of the entry at point.
 	(org-bibtex-put TITLE title)))
 (org-bibtex-put TYPE (substring (symbol-name type) 1))
 (org-bibtex-fleshout type arg)
-(mapc (lambda (tag) (org-toggle-tag tag t)) org-bibtex-tags)))
+(mapc (lambda (tag) (org-toggle-tag tag 'on)) org-bibtex-tags)))
 
 (defun org-bibtex-create-in-current-entry (optional arg)
   Add bibliographical data to the current entry.
@@ -594,7 +594,7 @@ This uses `bibtex-parse-entry'.
   (let ((entry (pop *org-bibtex-entries*))
 	(org-special-properties nil)) ; avoids errors with `org-entry-put'
 (flet ((val (field) (cdr (assoc field entry)))
-	   (togtag (tag) (org-toggle-tag tag t)))
+	   (togtag (tag) (org-toggle-tag tag 'on)))
   (org-insert-heading)
   (insert (val :title))
   (org-bibtex-put TITLE (val :title))
-- 
1.7.6



Re: [O] org-bibtex

2011-07-18 Thread Eric Schulte
Matt Lundin m...@imapmail.org writes:

 Eric Schulte schulte.e...@gmail.com writes:

 Matt Lundin m...@imapmail.org writes:

 Hi Eric,

 Eric Schulte schulte.e...@gmail.com writes:

 I just pushed up a fix for this issue.

 Thanks for suggesting this change. -- Eric

 This fix broke org-bibtex-fleshout, since org-babel-trim converts nil to
 . As a result, org-bibtex-fleshout believes that there are values for
 all the required fields even though those fields are not defined.


 Oh, thanks for catching this Matt, I've just pushed up a fix.

 Thanks!

 While we're on the subject of org-bibtex, I'm attaching a patch to fix
 the tagging functionality I added a while back.


Applied, Thanks -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] 7.6 Parsing error with footnotes?

2011-07-18 Thread Ken.Williams


On 7/18/11 12:35 PM, Nicolas Goaziou n.goaz...@gmail.com wrote:

This has been fixed since 7.6 release. footone-finder was indeed
overzealous back then.


Great, thanks for your help.  I've upgraded to the latest snapshot  the
problem goes away.

--
Ken Williams
Senior Research Scientist
Thomson Reuters
http://labs.thomsonreuters.com




[O] [bug] (:cache yes) not respected for the second nameless code block during html export

2011-07-18 Thread Robert McIntyre
M-x org-version yields:
release_7.6-105-gbfed5
Org-mode version 7.6 (release_7.6.105.gbfed5)

When I try to export this file to html, org re-evaulates the second code
block, even though it has :cache yes

https://gist.github.com/1090173

sincerely,
--Robert McIntyre


[O] DONE all subtasks recursively

2011-07-18 Thread Marcelo de Moraes Serpa
Hey guys

If I have a headline with children, like this:

* Project
** TODO Task
** TODO Task
** SubProject
*** TODO Task
*** TODO Task

Does org have any functionality that allows me to automatically close
(Change TODO-DONE, put DONE when TODO is not available (in the case of
Projects)) automatically and recursively for each child if I close the main
parent headline?

Thanks in advance,

- Marcelo.


Re: [O] Possibly new function to view your notes in chronological order

2011-07-18 Thread Marc-Oliver Ihm

Hello Bastien !

Thanx for testing !

Currently I think, that this function is most useful, if applied to all 
org-buffers.
So I personally prefer the mulit-occur option, which gives me a list for all of 
my org-buffers.

Therefore I feel a bit ashamed, that this does not work for you :-/
Did you get any errors ? Anything within the *Messages* Buffer ?
Is at least an *Occur*-Buffer created ?

A guess about a possible cause:
I assume that you alread use emacs 24, whereas I still cling to emacs 23.
Maybe some details of the contents of the created *Occur*-buffer has changed,
which might have broken my code (I found that I need to rely on the contents of 
the *Occur*-buffer).
If you find that such an *Occur*-Buffer is created, when you run my function, 
would it be possible to
send it to me ?

Thanx a lot !

with kind regards, Marc-Oliver Ihm



Am 18.07.2011 10:20, schrieb Bastien:

Hi Marc-Oliver,

Marc-Oliver Ihmi...@online.de  writes:


I would like to submit the new function org-find-timestamps for
disussion.


Thanks for this piece of code and for this idea!

I've tested it a bit and I encourage others to test it.

I was able to create a sparse tree with inactive timestamps,
but I was not able to display a buffer with ordered items.
I will test more carefully and give feedback/debugging.

My main reaction is: your idea/code could partially sneak into
`org-sparse-tree' by adding a new ran[g]e option, asking the
starting and ending dates, and creating the sparse tree.

What do you think?







Re: [O] [bug] (:cache yes) not respected for the second nameless code block during html export

2011-07-18 Thread Jambunathan K
Robert McIntyre r...@mit.edu writes:

 M-x org-version yields:
 release_7.6-105-gbfed5
 Org-mode version 7.6 (release_7.6.105.gbfed5)

 When I try to export this file to html, org re-evaulates the second
 code block, even though it has :cache yes

 https://gist.github.com/1090173

I encourage you to post auxiliary files for reproducing the bug right
within the mail. The advantage is that the message would remain archived
in it's entirety forever and the whole context is available for future
references. 

Posting all the relevant files inline or as attachment has the following
other advantages:

1. less taxing on the owner of the bug
2. quicker response or even a resolution

ps: I don't mean to hijack this thread. Posting this as a
lurker/moderator on this list


 sincerely,
 --Robert McIntyre




-- 



Re: [O] (org-display-inline-images)

2011-07-18 Thread Marcus Klemm
Bastien bastien.guerry at wikimedia.fr writes:

 Jonathan BISSON bissonjonathan at gmail.com writes:
 
  I'm using inline images a lot in my org-files, but sometimes, the inline
  image disappears and I need to do a  (org-display-inline-images) again.
  I need to look in more details when does this really happen.
 
 Ok, let us know.

I've got the same problem and it seems like rebuilding the agenda buffer
makes the inline images disappear.

Ciao, Marcus




Re: [O] Remove current heading from refile targets?

2011-07-18 Thread Bastien
Hi Jason,

Jason Dunsmore emacs-orgm...@dunsmor.com writes:

 I noticed that when I go to refile a heading, the heading that I'm
 refiling is listed in the refile targets.  If I choose to refile the
 heading to itself, the following error is displayed:

 org-refile: Cannot refile to position inside the tree or region

 When I'm choosing a refile target, the current heading gets in the way.
 Would it make sense to remove the current heading from the refile
 targets?  

Indeed.

I've just pushed a fix for this.

 I have org-completion-use-ido set to `t', so I'm using the ido
 interface to refile.

I don't use `org-completion-use-ido' so I cannot test, but it should
work okay -- please let me know if there is any problem.

Thanks,

-- 
 Bastien



Re: [O] Formal description of Org files

2011-07-18 Thread Marcelo de Moraes Serpa
Hey Bastien!

Can you tell more about what you mean by grammar?

I think Nick pretty much nailed down the description of what a grammar would
be. I'm not well-versed in compiler-theory and my real world experience with
parsers are limited - I made some pretty hackish parsers in the past but
none used a grammar or parser-generator, though.

If having a grammer is so hard, then I think I will just use the elisp
regexp-based parsing implementation as a reference :)

@Eric: I would only need some basic syntax highlighting and tab / space
handling, as well as folding. I don't mean to implement an online version of
the org, since the best place to use org will always be emacs ... or not.
Let's see how it goes, I will keep you guys posted.

On Sat, Jul 16, 2011 at 11:56 AM, Bastien b...@altern.org wrote:

 Hi Marcelo,

 Marcelo de Moraes Serpa celose...@gmail.com writes:

  I'm creating a web app that interacts with orgmode files and allows
  you to edit orgmode files on the browser. The edit part is not done.

 Wow, this would be a really useful tool.  Can't wait to test this!

  I'm quite good at Javascript, and I wouldn't mind hacking something
  akin to orgmode elisp code and this will be what I'll do if
  everything else fails, but wouldn't using a grammar be a cleaner and
  more elegant solution?

 Can you tell more about what you mean by grammar?

 Back in february, at FOSDEM, someone asked for a description of the
 org-mode format specification.  This is still something that needs to be
 done.  Any stab at this (on Worg) would be really nice.  You can start
 anywhere (headlines, TODO keywords, etc.)

 If the grammar needs to be described in a specific format (more than
 just a formal description of the various syntactic elements of an Org
 file), let us know.

 Thanks,

 --
  Bastien



Re: [O] Memacs - effort and language

2011-07-18 Thread Bastien
Hi Karl,

nice idea.  Maybe there are already log my life tools in the *nix
land.  I have not digged, though.  If there is such a tool, the work 
is only to convert from its log format to Org format.

Karl Voit devn...@karl-voit.at writes:

 My goal is that after the initial setup of one «connector» (I am
 sill searching for a cool name for this) 

Nexus?
Memexus?

 Of course since I am interested in lots of people using (and
 improving) Memacs and its «connectors» :-)

If some connectors start to be useful, no doubt other will come along. 

My 2 cents,

-- 
 Bastien



Re: [O] Formal description of Org files

2011-07-18 Thread Marcelo de Moraes Serpa

 If having a grammer is so hard, then I think I will just use the elisp
 regexp-based parsing implementation as a reference :)


By the way, that's what this guy did in this Ruby gem:

https://github.com/bdewey/org-ruby

Cheers,

- Marcelo.

On Mon, Jul 18, 2011 at 4:02 PM, Marcelo de Moraes Serpa 
celose...@gmail.com wrote:

 Hey Bastien!

 Can you tell more about what you mean by grammar?

 I think Nick pretty much nailed down the description of what a grammar
 would be. I'm not well-versed in compiler-theory and my real world
 experience with parsers are limited - I made some pretty hackish parsers in
 the past but none used a grammar or parser-generator, though.

 If having a grammer is so hard, then I think I will just use the elisp
 regexp-based parsing implementation as a reference :)

 @Eric: I would only need some basic syntax highlighting and tab / space
 handling, as well as folding. I don't mean to implement an online version of
 the org, since the best place to use org will always be emacs ... or not.
 Let's see how it goes, I will keep you guys posted.


 On Sat, Jul 16, 2011 at 11:56 AM, Bastien b...@altern.org wrote:

 Hi Marcelo,

 Marcelo de Moraes Serpa celose...@gmail.com writes:

  I'm creating a web app that interacts with orgmode files and allows
  you to edit orgmode files on the browser. The edit part is not done.

 Wow, this would be a really useful tool.  Can't wait to test this!

  I'm quite good at Javascript, and I wouldn't mind hacking something
  akin to orgmode elisp code and this will be what I'll do if
  everything else fails, but wouldn't using a grammar be a cleaner and
  more elegant solution?

 Can you tell more about what you mean by grammar?

 Back in february, at FOSDEM, someone asked for a description of the
 org-mode format specification.  This is still something that needs to be
 done.  Any stab at this (on Worg) would be really nice.  You can start
 anywhere (headlines, TODO keywords, etc.)

 If the grammar needs to be described in a specific format (more than
 just a formal description of the various syntactic elements of an Org
 file), let us know.

 Thanks,

 --
  Bastien





[O] org-publish: Best practice to generate a html header on a per-file basis ?

2011-07-18 Thread Sander Boer

Hi all,

I've been investigating a viable way to generate for every exported html file 
in an org-publish project a list of links to all the other html files in the 
directory-tree and I'm stuck.
I want this list to be inserted as a header, nicely css-ed into a navigation 
bar.

The idea is to graft a function that is either passed to :html-preamble or is 
added as a hook to org-export-html-final-hook.
Incidently, it took a long time to figure out that one cannot pass mere 
functions to html-preamble like this:
:html-preamble 'my-cool-function-that-returns-a-string
nor like this:
:html-preamble 'my-cool-function-that-*inserts*-a-string

instead it needs to be:
:html-preamble (lambda(x) (insert (my-cool-function-that-returns-a-string x)))
or,
:html-preamble (lambda(x) (my-cool-function-that-inserts-a-string x))


Anyway, with that out of the way, now I am left with the challenge of figuring 
out how to determine the position of this file with regard to the other files 
in the project, file-relative-name really comes in handy here. The issue for me 
is that the html-preamble and the -final-hook are called in the html 
buffer. It is easier to graft a link list based on the original org-tree than 
on the exported html-tree, as path-changes would cause issues.
So the idea is now to find the path to the original org-file and construct a 
link list based on the original org-publish tree (cunningly renaming .org into 
.html)
Alternatively, how about extending the sitemap generator to generate a 
link-list for every file like so:
file.org- file.inc file.html
file.inc would only consist of:
div id=linklist
a href=../projects/randomproject.htmlcool project/a
a href=../contact/about.htmlall me/a
a href=../../index.htmlhome/a
/div
(hmm bad example, it also needs some form of ul/li grouping based on 
subdirectory, but you get the idea)

Any and all tips and pointers are appreciated.

sndr


[O] elnode: emacs webserver exposes org files ...... !

2011-07-18 Thread Sander Boer
Hi all,

I just read this:
http://nic.ferrier.me.uk/blog/2010_10/elnode

it is an asynchronous webserver in emacs that can take anything in emacs (like 
org files) and serve it up...
I haven't played with it yet, but it sound awesome !


sndr


[O] feature request

2011-07-18 Thread Jude DaShiell
A little data destruction protection.  I put together a table and had to 
destroy all copies of it after having tried to set up averages for a 
couple columns.  The averages didn't work and data got zeroed out and I 
lost an entire column of data that way.  One of my problems I'm sure was 
caused because I tried data gathering first then tried modifying the 
original table and adding the formulas later.  Next time I attempt 
anything with org and mathematics, I'll write my data set down in braille 
and ought to have done that with this data set as well.  What might have 
helped here a little is if a column is going to be put into existing 
columns the column inserts rather than overwrites any column that might be 
there.  The broken table I ended up with had six columns and two of those 
were single space columns out to the right with nothing in them.  There 
ought to have been before I did anything with formulas at most four 
columns in the table.  I did enter time stamps in as two separated date 
and time fields originally then when I read what all could be put into 
time stamps, I consolidated those first two columns into a single time 
stamp column.  I don''t know if that consolidation did further damage or 
not.




Re: [O] Remove current heading from refile targets?

2011-07-18 Thread Jason Dunsmore
Bastien b...@altern.org writes:

 Hi Jason,

 Jason Dunsmore emacs-orgm...@dunsmor.com writes:

 I noticed that when I go to refile a heading, the heading that I'm
 refiling is listed in the refile targets.  If I choose to refile the
 heading to itself, the following error is displayed:

 org-refile: Cannot refile to position inside the tree or region

 When I'm choosing a refile target, the current heading gets in the way.
 Would it make sense to remove the current heading from the refile
 targets?  

 Indeed.

 I've just pushed a fix for this.

 I have org-completion-use-ido set to `t', so I'm using the ido
 interface to refile.

 I don't use `org-completion-use-ido' so I cannot test, but it should
 work okay -- please let me know if there is any problem.

Hm, I don't see any change with or without org-completion-use-ido set.
The current heading still shows up in the refile targets.  Here are my
org-refile related configs:

(setq org-refile-targets '((nil . (:maxlevel . 2
(setq org-refile-allow-creating-parent-nodes t)
(setq org-refile-use-outline-path t)
(setq org-refile-use-cache nil)

Regards,
Jason



[O] [HELP} trying to figure out how to figure out?

2011-07-18 Thread Matthew Sauer
I just pulled and upon making noticed several compiler errors.  None
of them appear to be fatal but as I am learning elisp it might be
helpful for me to be able to see what is being done (and also for
maybe me to be able to learn what is being worked on so I can test
it?) and then maybe I can also help more with patches and I think
possibly I am going to try to design an org-startup.el file and I
really want to try to learn before I just jump blindly into that
project.

So, can someone email me (on or off list) some commands that would be
helpful (I think bisect, maybe) or a website to reference to learn the
commands to start digging into those situations?  I don't know what
has changed each time I do a git pull and I don't know if that is the
best time to look for it either?

The points that grabbed my attention are listed here, didn't know
exactly how one would go about finding other than going to the line in
the  files noted? :


In org-cycle:
org.el:5932:47:Warning: attempt to let-bind constant `org-outline-regexp'

In org-promote-subtree:
org.el:7088:4:Warning: attempt to let-bind constant `org-outline-regexp'

In org-demote-subtree:
org.el:7096:4:Warning: attempt to let-bind constant `org-outline-regexp'

In org-current-level:
org.el:7135:8:Warning: attempt to let-bind constant `org-outline-regexp'

In org-narrow-to-subtree:
org.el:7660:4:Warning: attempt to let-bind constant `org-outline-regexp'

In org-store-link:
org.el:8450:30:Warning: attempt to let-bind constant `org-outline-regexp'

In org-metaleft:
org.el:17333:6:Warning: attempt to let-bind constant `org-outline-regexp'

In org-metaright:
org.el:17354:43:Warning: attempt to let-bind constant `org-outline-regexp'

In org-toggle-item:
org.el:17956:28:Warning: attempt to let-bind constant `org-outline-regexp'

In org-toggle-heading:
org.el:18064:26:Warning: attempt to let-bind constant `org-outline-regexp'

In org-mark-subtree:
org.el:19282:28:Warning: attempt to let-bind constant `org-outline-regexp'


Thanks for the help, trying to give back to a wonderful community.

--
Matt



Re: [O] Memacs

2011-07-18 Thread Bastien
Karl Voit devn...@karl-voit.at writes:

 In 1945, Vannevar Bush wrote a very famous essay «As we may think»
 in which he proposed a system he called «Memex»[9] which described
 the basic features of MyLifeBits, the web, and many more things.

Nice read, thanks a lot!

-- 
 Bastien



Re: [O] Using org-mode for Research and Notetaking

2011-07-18 Thread Bastien
Hi Florian,

Florian Beck abstrakt...@t-online.de writes:

 Actually, I meant »tags« in the HTML sense. For boxedexample/boxed
 would call a function during export, which returns, say, its LaTeX
 interpretation, another function would be called by font lock (or
 whatever you use) to determine its on screen display. 

Well, I'm not in favor of introducing tag -- they can be convenient,
but they degrade readability IMO.

-- 
 Bastien



Re: [O] Remove current heading from refile targets?

2011-07-18 Thread Bastien
Jason Dunsmore ja...@dunsmor.com writes:

 Hm, I don't see any change with or without org-completion-use-ido set.
 The current heading still shows up in the refile targets.

Weird.  I double-check and have the current heading filtered out of the
refile targets.  Can you check again and/or send a small test file?

-- 
 Bastien



Re: [O] New backend for org-agenda: (Was Calendar-like view of the org-agenda)

2011-07-18 Thread Bastien
Hi Masashi,

SAKURAI Masashi m.saku...@kiwanami.net writes:

 I'm sure that the caching mechanism is useful, but I'm not sure that
 we should do it with paying the large cost of rewrite whole codes.

FWIW, this is a two separate steps process: 1) write a usable cache, 
then 2) re-implement (parts of) the agenda by using it.

I think (1) could be interesting /per-se/ and if it helps calfw, then
it's even more interesting.

2 cents,

-- 
 Bastien



Re: [O] calculation question

2011-07-18 Thread Bastien
Hi Jude,

Please type C-c } on a table -- it displays coordinates of the 
cells so that you can more easily refer to the right one.

HTH,

-- 
 Bastien



Re: [O] [bug] (:cache yes) not respected for the second nameless code block during html export

2011-07-18 Thread Eric Schulte
Robert McIntyre r...@mit.edu writes:

 M-x org-version yields:
 release_7.6-105-gbfed5
 Org-mode version 7.6 (release_7.6.105.gbfed5)

 When I try to export this file to html, org re-evaulates the second code
 block, even though it has :cache yes

 https://gist.github.com/1090173


I just pushed up a patch for this issue.  Thanks for reporting -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] disable org-decrypt: auto-save-mode may cause leakage

2011-07-18 Thread Bastien
Hi Sébastien,

Sebastien Vauban wxhgmqzgw...@spammotel.com writes:

 I simply call C-c C-x C-j to jump to the current clocking entry, and the
 question org-decrypt: auto-save-mode may cause leakage. Disable it for
 current buffer? (y or n) pops up -- while the current buffer has nothing
 special, as said above.

Weird.

Maybe you have some hook in `org-clock-goto-hook' that makes Org visit
some buffer containing encrypted entries?

-- 
 Bastien



Re: [O] feature request

2011-07-18 Thread Bastien
Hi Jude,

when deleting data with just one keystroke (like in the case you
describe), there is always the possibility to _undo_ with C-/

Is there something more we can do?

Best,

-- 
 Bastien



Re: [O] New backend for org-agenda: (Was Calendar-like view of the org-agenda)

2011-07-18 Thread Matthew Sauer
Bastien,

What I am hearing is that an API that allows caching could be built
that could benefit extensions and then once that is deemed stable
enough an optional or separate track would be rebuilding the Agenda as
it is today into that API?

Matt

On Mon, Jul 18, 2011 at 6:06 PM, Bastien b...@altern.org wrote:
 Hi Masashi,

 SAKURAI Masashi m.saku...@kiwanami.net writes:

 I'm sure that the caching mechanism is useful, but I'm not sure that
 we should do it with paying the large cost of rewrite whole codes.

 FWIW, this is a two separate steps process: 1) write a usable cache,
 then 2) re-implement (parts of) the agenda by using it.

 I think (1) could be interesting /per-se/ and if it helps calfw, then
 it's even more interesting.

 2 cents,

 --
  Bastien





Re: [O] generalize %F in capture to dired buffers

2011-07-18 Thread Bastien
Hi Nicolas,

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

 Any interest in applying it?

Looks fine to me, feel free to apply it.

Thanks,

-- 
 Bastien



Re: [O] Exporting to wiki syntax from org mode

2011-07-18 Thread Bastien
Dear Puneeth,

Puneeth Chaganti puncha...@gmail.com writes:

 I'm attaching the org-mm.el file here.  Please add it to the
 EXPERIMENTAL directory, if you think that's the right way to go about
 it. 

Done, thanks a lot.

EXPERIMENTAL is a place with no strong inclusion policy: I'll add
anything that deserves attention *and* might evolve into something 
that can go to contrib/ or Org's core.

 Sorry for leaving your name, against code that you didn't write.  

No problem at all!

Best,

-- 
 Bastien




Re: [O] Formal description of Org files

2011-07-18 Thread Bastien
Hi Eric,

Eric Schulte schulte.e...@gmail.com writes:

 Another option for serving Org-mode files could be an Emacs-based
 web-server, for example elnode [1], which I just ran across today.

Elnode looks nice.

I've just tested it for 10 seconds and displayed the Hello! in
http://localhost:8010 -- already exciting :)

Still I don't really see how it could help collaboration on Org
files.  

Did you have any particular idea in mind?

-- 
 Bastien



Re: [O] Formal description of Org files

2011-07-18 Thread Bastien
Hi Nicolas,

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

 I didn't follow closely the thread, but I think having a formal
 description of Org files is unrealistic at the moment.

Still it would be useful to *try* to describe Org's various elements as
formally as possible.

 Org format is heavily dependant on user-configurable variables deeply
 installed within emacs.  Some of these variables can drastically change
 the grammar of the Org file. Example:

 #+begin_src org
 - item 1

 - item a
 #+end_src

 Now, if org-empty-line-terminates-plain-lists is a non-nil value, any
 parser should detect two lists of one item each, while keeping it to nil
 will imply there is one list of two items.

 Another example: (setq org-deadline-string ZORGLUB:). I let you
 imagine what confusion it might introduce if the external tool you want
 to use/implement isn't aware of this change.

 Sure, it's all plain text, so Org files are accessible from outside
 emacs. But, for now, only the plain-text structure is accessible from
 the wild, not the Org one.

 I can see three options here:

   - We remove every configurability concerning Org structure: we enforce
 DEADLINE to stay DEADLINE, lists items to be separated by a blank
 line, etc. But this isn't serious, is it?

Nope :)

   - We consider that Org format is a package containing the body _and_
 every configuration variable. But it isn't plain-text nor a format
 anymore.

Not really useful -- the purpose of better defining the format is to
make it parsable outside Emacs.

   - We implement an intermediary real format (maybe in plain text, but
 I'd favor a nested-lists construct) that would serve as the common
 denominator for every exporter _and_ importer out there. I already
 suggested something like this in a recent thread about
 exporters. Obviously, I think this one is the only viable (and,
 icing on the cake, this would also be very useful for Org
 development).

I see yet another option:

Describe a plain text format with the _default_ config options.  
Meaning DEADLINE will be DEADLINE -- and nothing else.  

-- 
 Bastien



Re: [O] Thesaurus terms as org tags -- feature request

2011-07-18 Thread Bastien
Hi John,

thanks for your input.

What I'm thinking about is this simple idea:

#+TAGGROUP: :colour: :red:green:

in such a way that:

1. searches for :red: will continue to display entries with :red:
2. searches for :colour: will display entries with :red: and/or :green:

Would this be useful already?  

Would this go into the right direction for solving your problem?

Thanks,

-- 
 Bastien



Re: [O] calculation question

2011-07-18 Thread Bart Bunting
Hi Bastien,

I presume Jude is using emacspeak with org-mode.

I also use emacspeak.

I have noticed that emacspeak does not read anything done using
overlays.  I am presuming the column and row labels are done this way.

It also means that we can't use column view either as far as I know.

This as I understand it is not really an issue for org-mode but a
current emacspeak limitation.

I'm sure like all things emacs that this can be fixed given enough elisp
knowledge.  Perhaps it's worth Jude or I asking on the emacspeak list
for some advice as to how to solve this problem.


Kind regards

Bart

 

On Tue, 19 Jul 2011 01:10:09 +0200, Bastien b...@altern.org wrote:
 Hi Jude,
 
 Please type C-c } on a table -- it displays coordinates of the 
 cells so that you can more easily refer to the right one.
 
 HTH,
 
 -- 
  Bastien
 



Re: [O] Compile warnings on Win7/Emacs24.0.50

2011-07-18 Thread Bastien
Andy Moreton andrewjmore...@gmail.com writes:

 On Wed 13 Jul 2011, Achim Gratz wrote:

 I've tested some things on Win7 and happen to have an Emacs24 installed
 there, so I compiled the latest org-mode.  I got quite a few warnings
 that I've never seen before with Emacs23, so I assume this is Emacs24
 tightening the screws on some loseness.  I don't remember the exact
 warning text, but it was something about top-level forms and global
 variables not having a prefix (presumably to keep them in their own
 namespace and not step on the toes of other packages).

 AFAIK this is because emacs-24 now supports lexical scope. The use of
 name prefixes is used to manage namespace as you mention, but also as
 convention used by the byte compiler to help distinguish between uses of
 lexically and dynamicly scoped variable bindings.

Yes, there is lots of (boring) work to do in this area to get rid of
those warnings.  

Thanks for bringing this up,

-- 
 Bastien



Re: [O] New backend for org-agenda: (Was Calendar-like view of the org-agenda)

2011-07-18 Thread Bastien
Hi Matthew,

Matthew Sauer improv.philoso...@gmail.com writes:

 What I am hearing is that an API that allows caching could be built
 that could benefit extensions and then once that is deemed stable
 enough 

Yes, stable and, moreover, *fast* enough...

 [...] an optional or separate track would be rebuilding the Agenda as
 it is today into that API?

Yes -- we can dream :)

-- 
 Bastien



Re: [O] Using org-mode for Research and Notetaking

2011-07-18 Thread Thomas S. Dye
Bastien b...@altern.org writes:

 Hi Florian,

 Florian Beck abstrakt...@t-online.de writes:

 Actually, I meant »tags« in the HTML sense. For boxedexample/boxed
 would call a function during export, which returns, say, its LaTeX
 interpretation, another function would be called by font lock (or
 whatever you use) to determine its on screen display. 

 Well, I'm not in favor of introducing tag -- they can be convenient,
 but they degrade readability IMO.

Aloha all,

Perhaps they are [[tag:boxed][already]] here with org-add-link-type?  It
seems to me that all that's missing is a way to specify a function to
determine on screen display.  But, I might be missing something.

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



  1   2   >