[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] agenda csv export: three problems (batch, koi8-r and commas)

From: Ruslan Kosolapov
Subject: [Orgmode] agenda csv export: three problems (batch, koi8-r and commas)
Date: Thu, 31 May 2007 16:23:33 +0700
User-agent: No Gnus v0.6 on Emacs/ (i486-pc-linux-gnu)

org-mode 4.75, emacs-snapshot (latest from debian sid)

--[ 1. Problems with -batch ]--

$ emacs -batch -l ~/.emacs -eval '(org-batch-agenda-csv "t")'
fails with 
Debugger entered--Lisp error: (void-function org-batch-agenda-csv)
  (org-batch-agenda-csv "t")
  eval((org-batch-agenda-csv "t"))
  command-line-1(("-l" "/home/rk/.emacs" "-eval" "(org-batch-agenda-csv 

It's look like problem with autoload (unfortunatelly I dont know how
emacs works, so, maybe I wrong).

$ emacs -batch -l ~/.emacs -eval '(load-library "org") (org-batch-agenda-csv 
returns nothing useful.  And I don't know why :)

Only command 
emacs -batch -l ~/.emacs -eval '(my-make-csv)'
returns agenda in csv format.

Maybe fix of this issue is a documentation fix - maybe I do something
wrong :)

--[ 2. Problems with koi8-r ]--

I use koi8-r for my org-file, its works well in most cases.

But in csv I got junk instead koi8-r symbols.  As far as I understand,
html export works the same way, and in html I see html-entities
instead koi8-r.  In browser its look good, but not in terminal and

I tried to use utf-8, and fail too.

Of course, I execute emacs in the same locale as my org-file.

This issue is critical for me.

--[ 3. Problems with , and "" ]--

As far as I know, strings in csv should be quoted, else there will be
problems if string contains comma.

Now I see than "head" field placed in csv without quotes.  So, if I
use comma in heading text, csv-parsing script fails.

It is not problem for me because I do not use comma in heading text,
but this is a bug.

At other side, using types and quotation in csv output mean more
complex parser for it.  So, maybe better do not fix it by quotation

In MS Excel I can specify delimiter symbol for csv export, sometimes
it very useful.  I attach patch which implements this feature in

Changeable delimiter can be used as fix of "comma in heading" issue.

Patch (oh, no, it's so small :(  ;)  ):

Attachment: org-mode-patch-for-csv-delimiter
Description: Binary data

--[ Additional info ]--


(setq my-work-agenda-dir "/home/rk/work/doc/tasks/")
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(defun maf (filename)
  (concat my-work-agenda-dir filename))
(defun gtd ()
  (find-file (maf "work.org"))
(defun my-make-csv ()
  (org-batch-agenda-csv "t"))
(setq org-agenda-files (list (maf "work.org")))

org-file (with koi8-r symbols, I hope mail does not corrupt them :) ):

#+STARTUP: lognotestate
#+STARTUP: showall
#+TAGS: { rk(r) sveta(s) kir(k) zalomlenkov(z) ilnar(i) sgunkin(g) const(c) 
max(m) ikryak(v) } ATT MS
#+LINK: wiki http://trac.qa.plesk.ru:8080/wiki/
#+TITLE:     QAA Tasks
#+AUTHOR:    rk
#+EMAIL:     address@hidden
#+OPTIONS:   H:4 num:t toc:t \n:nil @:t ::t |:t ^:t *:t TeX:t LaTeX:nil skip:t

#+CATEGORY: Incoming
* Incoming

#+CATEGORY: WorkFlow
* WorkFlow
** NEW Changelog для продуктов via RSS          :rk:kir:

#+CATEGORY: General
* General
** NEXT разобраться с backup failed на psaqa    :rk:
** NEW сделать нормальным репозиторий файлов для AD
** NEW проблема с именами preconditions         :rk:

Ruslan Kosolapov
Plesk QA Department Second Manager
SWsoft, Inc.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]