[O] [PATCH] add support for configurable nested lists in org-export-generic

2011-11-29 Thread Rob Giardina
diff --git a/contrib/lisp/org-export-generic.el
b/contrib/lisp/org-export-generic.el
index 12bbcdb..97b9134 100644
--- a/contrib/lisp/org-export-generic.el
+++ b/contrib/lisp/org-export-generic.el
@@ -475,9 +475,6 @@ in this way, it will be wrapped."

 (setq org-generic-export-type "demo")

-(defvar org-export-generic-section-type "")
-(defvar org-export-generic-section-suffix "")
-
 ;;;###autoload
 (defun org-set-generic-type (type definition)
   "Adds a TYPE and DEFINITION to the existing list of defined generic
@@ -515,37 +512,63 @@ is \"\\n\".  Should typically be combined with a value for
 (def-org-export-generic-keyword :code-format)
 (def-org-export-generic-keyword :verbatim-format)

+(defvar org-export-generic-section-stack nil)
+;;overridden for specific importers
+(defvar org-export-generic-list-indents '(("numliststart" . "  ")
("liststart" . "  ")))

+(defun org-export-generic-section-indent (stack listindents)
+  (loop for level in stack
+ collect (assoc-default (nth 0 level) listindents) into l
+ finally return (mapconcat 'identity l "")))

-
-(defun org-export-generic-remember-section (type suffix &optional prefix)
-  (setq org-export-generic-section-type type)
-  (setq org-export-generic-section-suffix suffix)
-  (if prefix
-  (insert prefix))
-)
-
-(defun org-export-generic-check-section (type &optional prefix suffix)
-  "checks to see if type is already in use, or we're switching parts
+(defun org-export-generic-check-section (type &optional prefix suffix nest)
+  "Checks to see if type is already in use, or we're switching parts
 If we're switching, then insert a potentially previously remembered
 suffix, and insert the current prefix immediately and then save the
 suffix a later change time."
-
-  (when (not (equal type org-export-generic-section-type))
-(if org-export-generic-section-suffix
-  (insert org-export-generic-section-suffix))
-(setq org-export-generic-section-type type)
-(setq org-export-generic-section-suffix suffix)
-(if prefix
-   (insert prefix
+  (flet ((push-section (type suffix nest) (push (list type suffix
nest) org-export-generic-section-stack)))
+(let* ((prev (car-safe org-export-generic-section-stack))
+  (prev-type   (nth 0 prev))
+  (prev-suffix (nth 1 prev))
+  (prev-nest   (nth 2 prev)))
+  (setq nest (or nest 0) prev-nest (or prev-nest 0)) ;;convert
nil nesting to 0 (wrong?)
+  (if (not prev)
+   (push-section type suffix nest) ;;no prior
+   ;;else, diff't context, three possiblities: deeper nesting, un-nest,
start new type
+   (unless (and (string= type prev-type) (= nest prev-nest))
+ (cond
+  ;;nest deeper
+  ((> nest prev-nest)
+   (push-section type suffix nest)
+   (if prefix (insert prefix)))
+  ;;un-nest
+  ((< nest prev-nest)
+   (pop org-export-generic-section-stack) ;;done with prev nested
+   (if prev-suffix (insert prev-suffix))
+   (unless ;;is there a prior list we're re-joining of this type and 
nest
+   (loop with prior-type and prior-nest
+  for prior in org-export-generic-section-stack
+  do (setq prior-type (nth 0 prior))
+  do (setq prior-nest (nth 2 prior))
+  if (and (string= type prior-type) (= nest prior-nest)) 
return t
+  else do (pop org-export-generic-section-stack)) ;;jump over 
this one
+ ;;didn't find a list to rejoin, this is a new one
+ (push-section type suffix nest)
+ (if prefix (insert prefix
+  (t ;;change type, same indent
+   (pop org-export-generic-section-stack)
+   (push-section type suffix nest)
+   (if prev-suffix (insert prev-suffix))
+   (if prefix (insert prefix)

 ;;;###autoload
-(defun org-export-generic (arg)
+(defun org-export-generic (arg &optional export-plist)
   "Export the outline as generic output.
 If there is an active region, export only the region.
 The prefix ARG specifies how many levels of the outline should become
 underlined headlines.  The default is 3."
   (interactive "P")
+  (setq org-export-generic-section-stack nil)
   (setq-default org-todo-line-regexp org-todo-line-regexp)
   (let* ((opt-plist (org-combine-plists (org-default-export-plist)
(org-infile-export-plist)))
@@ -597,6 +620,7 @@ underlined headlines.  The default is 3."

 ;; read in the type to use
 (export-plist
+ (or export-plist
  (progn
(save-excursion
  (save-window-excursion
@@ -613,7 +637,7 @@ underlined headlines.  The default is 3."

(cdr (assoc
  (if (equal ass "default") org-generic-export-type ass)
- org-generic-alist
+ org-generic-alist)

 (custom-times org-display-custom-times)
 (org-generic

[O] [PATCH] fix quoting in org-agenda-with-point-at-orig-entry (apparently unused except in my CLOSED prop sorting code)

2011-11-29 Thread Rob Giardina
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 0a98fbe..5a7614c 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -1741,8 +1741,8 @@ If STRING is non-nil, the text property will be
fetched from position 0
 in that string.  If STRING is nil, it will be fetched from the beginning
 of the current line."
   (org-with-gensyms (marker)
-`(let ((,marker (get-text-property (if string 0 (point-at-bol))
-  'org-hd-marker string)))
+`(let ((,marker (get-text-property (if ,string 0 (point-at-bol))
+  'org-hd-marker ,string)))
(with-current-buffer (marker-buffer ,marker)
 (save-excursion
   (goto-char ,marker)



Re: [O] [Orgmode] Feature request: IDs on anything

2011-11-29 Thread Samuel Wales
Hi sindikat,

On 2011-11-27, sindikat  wrote:
> I really love this idea of ID markers. It would open so
> many opportunities for semantic extensions of org-mode and
> not only. Using ID markers we can
...
> management could be made out of that. Every ID marker will
> effectively become a graph vertice.

Yes, you got it.  Wherever an ID marker is, that place is a
graph vertex.

Because it uses Org IDs, it is pretty unbreakable and can be
linked to across files.  If you move it, you don't have to
change anything that points to it.

You can change how an ID marker looks by adding a keyword
argument (like :label or :face) to the marker.

===

As you suggest, the arguments can let you point to other
markers to create arbitrary graph structures.

Among other things, this allows =unbreakable bidirectional
links=.  IMO these potentially solve a few unaddressed
aspects of the =tree problem= (my term for the fact that
ideas and tasks naturally form a graph but outlines form a
tree).  Especially with the right label code.  RET bounces
between the ends.

Of course, this is vaporware as.  It's been discussed in a
bunch of threads.  Perhaps you would be willing to try
implementing it.


Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
===
Bigotry against people with serious diseases is still bigotry.



[O] Use depend.el for Cyclic Triggering

2011-11-29 Thread Daya Atapattu
Hello all:

I am new to org-mode and have been trying to get the following to work.

I have:

TODO Item1
TODO Item 2
TODO Item 3
TODO Item 4

I want to schedule Item 1 for today and when I change it to DONE Item 2
should be scheduled for tomorrow.
When I set Item 2 to DONE Item 3 should be scheduled for next day and so on.

All this happens (they get scheduled for the same day, but that I can live
with)  in the first cycle.
But when all four are showing DONE it won't get any further.

I want this to go on for ever.

I tried adding .+4 to schedule and inserting :STYLE: habit as a property.
I was hoping that way the item will not get marked DONE, but just advance
the scheduled date with TODO.  But that does not happen.

So I am looking for a method to either an Item will pass on the trigger
without marking itself "DONE" (but advancing the scheduled date)
or
passing trigger to next sibling even if it is marked "DONE" and change DONE
to TODO.

Is there any way to do that with the current structure?

Thanks.

- Daya


[O] Capture mode fails until "reload org uncompiled" is used

2011-11-29 Thread Felix
When I fire up emacs and use C-c c t to enter a task (see .emacs below), I get
the message "Capture template `t': org-called-interactively-p" and nothing
happens. However, if I use the menu option "Org->Refresh/Reload->Reload Org
Uncompiled", then C-c c t works correctly every time. I have provided a
backtrace below (without "reload org uncompiled", since that fixes the problem).

Any suggestions to fix this so that I don't have to "reload org uncompiled"
every time I start emacs? Thanks.

--
.EMACS:
;;; org-mode
(require 'org-install)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(define-key global-map "\C-cc" 'org-capture)

(setq org-log-done nil); to not log the time for an completed task.
(setq org-directory "~/")
(setq org-agenda-files (list "~/todo.org"))
(setq org-agenda-start-on-weekday nil); start agenda from the current day.
(setq org-agenda-start-with-follow-mode t)

(setq org-capture-templates
  (quote 
  (("t" "Todo" entry (file+headline "~/todo.org" "Tasks")
 "* TODO %?\n  %i\n  %a")
("j" "Journal" entry (file+datetree "~/journal.org")
 "* %?\nEntered on %U\n  %i\n  %a"
--
BACKTRACE (Without "reload org uncompiled"):
Debugger entered--Lisp error: (error "Capture template `t':
org-called-interactively-p")
  signal(error ("Capture template `t': org-called-interactively-p"))
  error("Capture template `%s': %s" "t" org-called-interactively-p)
  byte-code("..." [error buffer-base-buffer string-match "\\`CAPTURE-"
buffer-name kill-buffer set-window-configuration org-capture-get
:return-to-wconf "Capture template `%s': %s" :key] 4)
  org-capture(nil)
  call-interactively(org-capture nil nil)
---





Re: [O] [ERROR] if: Agenda file s not in `org-mode'

2011-11-29 Thread Marcelo de Moraes Serpa
Thank you all,

The problem was that this file shouldn't actually be part of the agenda. If
I really wanted to, I'd have to add the mode to it, like Carnsten and Bernt
suggested.

Cheers,

Marcelo.

On Tue, Nov 29, 2011 at 12:36 PM, Carsten Dominik  wrote:

>
> On 29.11.2011, at 18:39, Marcelo de Moraes Serpa wrote:
>
> > Hi guys,
> >
> > I added my gtd.org_archive to the agenda as a mean of getting a timelog
> of tasks I complete. Recently, and I don't know why, it started to throw
> the following error when I try to access any of the agenda views:
> >
> > if: Agenda file ~/org/gtd.org_archive is not in `org-mode'
> >
> > Does anyone know why this happens?
>
> The first line of that file should look like
>
>-*- mode: org -*-
>
>
> does it?
>
> - Carsten


Re: [O] [ERROR] if: Agenda file s not in `org-mode'

2011-11-29 Thread Carsten Dominik

On 29.11.2011, at 18:39, Marcelo de Moraes Serpa wrote:

> Hi guys,
> 
> I added my gtd.org_archive to the agenda as a mean of getting a timelog of 
> tasks I complete. Recently, and I don't know why, it started to throw the 
> following error when I try to access any of the agenda views:
> 
> if: Agenda file ~/org/gtd.org_archive is not in `org-mode'
> 
> Does anyone know why this happens?

The first line of that file should look like

-*- mode: org -*-


does it?

- Carsten


Re: [O] [ERROR] if: Agenda file s not in `org-mode'

2011-11-29 Thread Nick Dokos
Marcelo de Moraes Serpa  wrote:


> I added my gtd.org_archive to the agenda as a mean of getting a
> timelog of tasks I complete. Recently, and I don't know why, it
> started to throw the following error when I try to access any of the
> agenda views:
> 
> if: Agenda file ~/org/gtd.org_archive is not in `org-mode'
> 
> Does anyone know why this happens?
> 

You probably changed something (a typo of some sort: deleting or adding a quote,
or a paren) - who knows? A backtrace might help to narrow it down.

Nick



Re: [O] MobileOrg staging not working correctly

2011-11-29 Thread Cameron Seader
Well for a test I changed the org-agenda-files setting for emacs to the
following.

(setq org-agenda-files "~/Documents/Notes/org/.org")

So its set to a single file, but... it still does not work.

*messages*
OVERVIEW
Creating agendas...done
Saving all Org-mode buffers...
(No files need saving)
Saving all Org-mode buffers... done
Copying files...
OVERVIEW
(No changes need to be saved)
Writing index file...
OVERVIEW [12 times]
Writing checksums...
Files for mobile viewer staged

says it created the agendas, but it didn't

I am stumped...

On 11/29/2011 10:50 AM, Cameron Seader wrote:
> I think this has something to do with my .emacs settings.
> 
> ;;; Org-mode settings
> (require 'org-install)
> (require 'org-mobile)
> (require 'package)
> (package-initialize)
> (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
> (global-set-key "\C-cl" 'org-store-link)
> (global-set-key "\C-ca" 'org-agenda)
> (global-set-key "\C-cb" 'org-iswitchb)
> (global-font-lock-mode 1)
> (setq org-directory "~/Documents/Notes/org")
> (setq org-agenda-files (file-expand-wildcards
> "~/Documents/Notes/org/*.org"))
> 
> ;;; MobileOrg Settings
> (setq org-mobile-files (file-expand-wildcards
> "~/Documents/Notes/org/*.org"))
> (setq org-mobile-directory "~/Dropbox/MobileOrg")
> (setq org-mobile-inbox-for-pull "~/Documents/Notes/org/inbox.org")
> 
> Would having a wildcard for org-agenda-files mess up the creation of the
> agendas.org file when I execute C-c C-x RET p
> 
> Please someone let me know.
> Thanks,
> Cameron
> 
> On 11/29/2011 10:07 AM, Cameron Seader wrote:
>> I am using the latest version of orgmode and its still not working.
>>
>> Here are my *messages* from the buffer
>>
>> Creating agendas...done
>> Saving all Org-mode buffers...
>> (No files need saving)
>> Saving all Org-mode buffers... done
>> Copying files...
>> (New file)
>> OVERVIEW
>> Saving file /home/xx/Dropbox/MobileOrg/mobileorg.org...
>> Wrote /home/xx/Dropbox/MobileOrg/mobileorg.org
>> Writing index file...
>> Writing checksums...
>> Files for mobile viewer staged
>>
>> It says that it created the agendas...
>>
>> Here is my index.org
>>
>> :~/Dropbox/MobileOrg> cat index.org
>> #+READONLY
>> #+TODO: TODO DONE
>> #+TODO:  | DONE
>> #+TAGS:
>> #+DRAWERS: PROPERTIES CLOCK LOGBOOK
>> #+ALLPRIORITIES: A B C
>> * [[file:agendas.org][Agenda Views]]
>> ...removing the rest for privacy...
>>
>> It created a link to the agendas.org file...
>>
>> Why didn't the agendas.org file get created? Do i have to create it
>> myself?  Do I have to export my agenda view myself? How do I get this to
>> work?
>> TIA,
> 

-- 
Cameron Seader
SUSE Sales Engineer

Phone: 208-572-0095
c...@suse.com
SUSE http://www.suse.com



Re: [O] [ERROR] if: Agenda file s not in `org-mode'

2011-11-29 Thread Bernt Hansen
Marcelo de Moraes Serpa  writes:

> Hi guys,
>
> I added my gtd.org_archive to the agenda as a mean of getting a
> timelog of tasks I complete. Recently, and I don't know why, it
> started to throw the following error when I try to access any of the
> agenda views:
>
> if: Agenda file ~/org/gtd.org_archive is not in `org-mode'
>
> Does anyone know why this happens?
>
> Thanks,
>
> Marcelo.

I'm not sure why you are getting that but adding the archive to your
agenda should _not_ be necessary.  You can instruct the agenda to
include archived files using 'V A' in the agenda.

Does your auto-mode-alist specify .org_archive files for org-mode?

I have the following:

(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\)$"
. org-mode))

HTH,
Bernt



Re: [O] MobileOrg staging not working correctly

2011-11-29 Thread Cameron Seader
I think this has something to do with my .emacs settings.

;;; Org-mode settings
(require 'org-install)
(require 'org-mobile)
(require 'package)
(package-initialize)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(global-font-lock-mode 1)
(setq org-directory "~/Documents/Notes/org")
(setq org-agenda-files (file-expand-wildcards
"~/Documents/Notes/org/*.org"))

;;; MobileOrg Settings
(setq org-mobile-files (file-expand-wildcards
"~/Documents/Notes/org/*.org"))
(setq org-mobile-directory "~/Dropbox/MobileOrg")
(setq org-mobile-inbox-for-pull "~/Documents/Notes/org/inbox.org")

Would having a wildcard for org-agenda-files mess up the creation of the
agendas.org file when I execute C-c C-x RET p

Please someone let me know.
Thanks,
Cameron

On 11/29/2011 10:07 AM, Cameron Seader wrote:
> I am using the latest version of orgmode and its still not working.
> 
> Here are my *messages* from the buffer
> 
> Creating agendas...done
> Saving all Org-mode buffers...
> (No files need saving)
> Saving all Org-mode buffers... done
> Copying files...
> (New file)
> OVERVIEW
> Saving file /home/xx/Dropbox/MobileOrg/mobileorg.org...
> Wrote /home/xx/Dropbox/MobileOrg/mobileorg.org
> Writing index file...
> Writing checksums...
> Files for mobile viewer staged
> 
> It says that it created the agendas...
> 
> Here is my index.org
> 
> :~/Dropbox/MobileOrg> cat index.org
> #+READONLY
> #+TODO: TODO DONE
> #+TODO:  | DONE
> #+TAGS:
> #+DRAWERS: PROPERTIES CLOCK LOGBOOK
> #+ALLPRIORITIES: A B C
> * [[file:agendas.org][Agenda Views]]
> ...removing the rest for privacy...
> 
> It created a link to the agendas.org file...
> 
> Why didn't the agendas.org file get created? Do i have to create it
> myself?  Do I have to export my agenda view myself? How do I get this to
> work?
> TIA,

-- 
Cameron Seader
SUSE Sales Engineer

Phone: 208-572-0095
c...@suse.com
SUSE http://www.suse.com



Re: [O] [PATCH] customize latex table export

2011-11-29 Thread Christophe Rhodes
Carsten Dominik  writes, a long time ago:

> On May 19, 2011, at 2:34 PM, Christophe Rhodes wrote:
>
>> To produce documents in something approaching my organization's house
>> style, I need to be able to style the headers of tables.  It's nice that
>> orgtbl has the functionality for this, but the call to orgtbl-to-latex
>> has a hard-coded list of parameters with no possibility for extension.
>> With the attached patch, I am able to put e.g.
>> 
>> #+BIND: org-export-latex-tables-orgtbl-extra-parameters (:hfmt 
>> "\\multicolumn{1}{c}{\\bf\\color{white}\\cellcolor{blue}%s}")
>> 
>> in the header of my document, and tables throughout the document all
>> pick up this style.
>> 
>> I daresay that this is not the optimal way of doing things; while this
>> solves my immediate problem there is likely to be a more general way of
>> doing things.
>
> would it be better to be able to set these parameters on a per-table basis 
> with ATTR_LaTeX ?
> Would you like to try to prepare a patch to this effect?

Find attached a patch to this effect.  It is the combination of two
changes which I consider tiny: one is the support for hfmt itself as an
ATTR_LaTeX attribute; the other is the consolidation of the
word-matching on the attributes into local macros, which I needed
because my use case (as above) includes the string "multicolumn", which
was otherwise confusing the attribute parser into thinking that I needed
a table* LaTeX environment.

Please let me know if this suits better.

>From aba08346276e558fd7f6aa635e6f1e5081a2d3c3 Mon Sep 17 00:00:00 2001
From: Christophe Rhodes 
Date: Tue, 29 Nov 2011 17:30:14 +
Subject: [PATCH] hfmt table attribute in LaTeX export

* org-latex.el (org-export-latex-tables):
  - new word-match and attr-match local macros to reduce
boilerplate.  (This is a tiny, mechanical change)
  - support hfmt LaTeX_ATTR attribute, and if given pass
it through to orgtbl-to-latex.  (This is a tiny change)
---
 lisp/org-latex.el |   28 ++--
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 2ec347a..aebfda5 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -1891,7 +1891,10 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
 "\\end{verbatim}\n")))
   (apply 'delete-region (list beg end))
   (insert (org-export-latex-protect-string tbl)))
-  (progn
+  (macrolet ((word-match (string haystack)
+		   `(string-match ,(format "\\(?:\\`\\|\\s-\\)%s\\(?:\\'\\|\\s-\\)" string) ,haystack))
+		 (attr-match (string)
+		   `(and attr (stringp attr) (word-match ,string attr
 (setq caption (org-find-text-property-in-string
'org-caption raw-table)
 		  shortn (org-find-text-property-in-string
@@ -1901,26 +1904,22 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
   label (org-find-text-property-in-string
  'org-label raw-table)
   longtblp (and attr (stringp attr)
-(string-match "\\" attr))
-		  tblenv (if (and attr (stringp attr)
-  (or (string-match (regexp-quote "table*") attr)
-  (string-match "\\" attr)))
+(word-match "longtable" attr))
+		  tblenv (if (or (attr-match (regexp-quote "table*"))
+ (attr-match "multicolumn"))
 			 "table*" "table")
 		  tabular-env
-		  (if (and attr (stringp attr)
-			   (string-match "\\(tabular.\\)" attr))
+		  (if (attr-match "\\(tabular.\\)")
 		  (match-string 1 attr)
 		org-export-latex-tabular-environment)
-		  width (and attr (stringp attr)
- (string-match "\\
Christophe


[O] [ERROR] if: Agenda file s not in `org-mode'

2011-11-29 Thread Marcelo de Moraes Serpa
Hi guys,

I added my gtd.org_archive to the agenda as a mean of getting a timelog of
tasks I complete. Recently, and I don't know why, it started to throw the
following error when I try to access any of the agenda views:

if: Agenda file ~/org/gtd.org_archive is not in `org-mode'

Does anyone know why this happens?

Thanks,

Marcelo.


[O] MobileOrg staging not working correctly

2011-11-29 Thread Cameron Seader
I am using the latest version of orgmode and its still not working.

Here are my *messages* from the buffer

Creating agendas...done
Saving all Org-mode buffers...
(No files need saving)
Saving all Org-mode buffers... done
Copying files...
(New file)
OVERVIEW
Saving file /home/xx/Dropbox/MobileOrg/mobileorg.org...
Wrote /home/xx/Dropbox/MobileOrg/mobileorg.org
Writing index file...
Writing checksums...
Files for mobile viewer staged

It says that it created the agendas...

Here is my index.org

:~/Dropbox/MobileOrg> cat index.org
#+READONLY
#+TODO: TODO DONE
#+TODO:  | DONE
#+TAGS:
#+DRAWERS: PROPERTIES CLOCK LOGBOOK
#+ALLPRIORITIES: A B C
* [[file:agendas.org][Agenda Views]]
...removing the rest for privacy...

It created a link to the agendas.org file...

Why didn't the agendas.org file get created? Do i have to create it
myself?  Do I have to export my agenda view myself? How do I get this to
work?
TIA,
-- 
Cameron



Re: [O] org-bibtex does not work

2011-11-29 Thread Eric Schulte
Hi Torsten,

I've had a similar problem which I believe is due to an error in
bibtex.el.  In my case it was fixed by explicitly loading the bibtex.el
file which comes with Emacs.

Best -- Eric

Torsten Wagner  writes:

> Hi all,
>
> I finally converted all my BibTex references into a org file.
> Now I face the problem that I can't generate a BibTeX file.
> org-bibtex ask me for the filename and then it seems to be stuck in a
> infinite loop.
> Only way to get out of this is using C-g.
> The BibTeX file never appeared.
> setting the debugger to start on quit (setq debug-on-quit) results in
>
> Debugger entered--Lisp error: (quit)
>   bibtex-realign()
>   bibtex-reformat()
>   (progn (insert entry) (when tags (bibtex-beginning-of-entry) (if
> (re-search-forward "keywords.*=.*{\\(.*\\)}" nil t) (progn (goto-char
> (match-end 1)) (insert ", ")) (bibtex-make-field "keywords" t t))
> (insert (mapconcat (function identity) tags ", "))) (bibtex-reformat)
> (buffer-string))
>   (unwind-protect (progn (insert entry) (when tags
> (bibtex-beginning-of-entry) (if (re-search-forward
> "keywords.*=.*{\\(.*\\)}" nil t) (progn (goto-char (match-end 1))
> (insert ", ")) (bibtex-make-field "keywords" t t)) (insert (mapconcat
> (function identity) tags ", "))) (bibtex-reformat) (buffer-string))
> (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
>   (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
> (insert entry) (when tags (bibtex-beginning-of-entry) (if
> (re-search-forward "keywords.*=.*{\\(.*\\)}" nil t) (progn (goto-char
> (match-end 1)) (insert ", ")) (bibtex-make-field "keywords" t t))
> (insert (mapconcat (function identity) tags ", "))) (bibtex-reformat)
> (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer
> temp-buffer
>
> followed by many many more lines.
> I tried to export a single entry in a own buffer as well without
> success. I skipped my entire emacs settings and used a bare-bone emacs
> with exactly the same result.
> As from the debugger it seems to be a problem of the internal bibtex
> mode. However, I hope someone here is capable to help. I updated both
> emacs and org-mode without luck
>
> org-mode 7.7 (git build from today)
> emacs GNU Emacs 24.0.91.1 (bzr build from today)
>
> Would be helpfull already if someone could confirm whether it works at
> the moment or whether it seems broken
> Thanks
>
> Torsten



Re: [O] org-bibtex does not work

2011-11-29 Thread Eric Schulte
Hi Torsten,

I've had a similar problem which I believe is due to an error in
bibtex.el.  In my case it was fixed by explicitly loading the bibtex.el
file which comes with Emacs.

Best -- Eric

Torsten Wagner  writes:

> Hi all,
>
> I finally converted all my BibTex references into a org file.
> Now I face the problem that I can't generate a BibTeX file.
> org-bibtex ask me for the filename and then it seems to be stuck in a
> infinite loop.
> Only way to get out of this is using C-g.
> The BibTeX file never appeared.
> setting the debugger to start on quit (setq debug-on-quit) results in
>
> Debugger entered--Lisp error: (quit)
>   bibtex-realign()
>   bibtex-reformat()
>   (progn (insert entry) (when tags (bibtex-beginning-of-entry) (if
> (re-search-forward "keywords.*=.*{\\(.*\\)}" nil t) (progn (goto-char
> (match-end 1)) (insert ", ")) (bibtex-make-field "keywords" t t))
> (insert (mapconcat (function identity) tags ", "))) (bibtex-reformat)
> (buffer-string))
>   (unwind-protect (progn (insert entry) (when tags
> (bibtex-beginning-of-entry) (if (re-search-forward
> "keywords.*=.*{\\(.*\\)}" nil t) (progn (goto-char (match-end 1))
> (insert ", ")) (bibtex-make-field "keywords" t t)) (insert (mapconcat
> (function identity) tags ", "))) (bibtex-reformat) (buffer-string))
> (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
>   (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
> (insert entry) (when tags (bibtex-beginning-of-entry) (if
> (re-search-forward "keywords.*=.*{\\(.*\\)}" nil t) (progn (goto-char
> (match-end 1)) (insert ", ")) (bibtex-make-field "keywords" t t))
> (insert (mapconcat (function identity) tags ", "))) (bibtex-reformat)
> (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer
> temp-buffer
>
> followed by many many more lines.
> I tried to export a single entry in a own buffer as well without
> success. I skipped my entire emacs settings and used a bare-bone emacs
> with exactly the same result.
> As from the debugger it seems to be a problem of the internal bibtex
> mode. However, I hope someone here is capable to help. I updated both
> emacs and org-mode without luck
>
> org-mode 7.7 (git build from today)
> emacs GNU Emacs 24.0.91.1 (bzr build from today)
>
> Would be helpfull already if someone could confirm whether it works at
> the moment or whether it seems broken
> Thanks
>
> Torsten



[O] IMPORTANT: Worg migration planned tomorrow (Wed. Nov. 30th) - please resend your public key

2011-11-29 Thread Bastien
Dear all,

tomorrow, Jason will be working on migrating Worg from the 
repo.or.gz server to the orgmode.org server.

The reason for this change is that we want to be able to publish
changes on the website each time a modification is being pushed 
to Worg: a clever mechanism will handle simultaneous changes.

The repo.or.cz server will still host a clone of Worg.git, just
as it hosts a clone of org-mode.git right now.  This clone will
be updated every hour.

I prevented any modification to be pushed to the current Worg
repository for the time being.  

Worgers, please take a minute and send your public key to Jason
or to me, so that we can add you to the new server.

We expect the migration to start tomorrow morning and to be done 
by thursday afternoon -- Jason will send an email when it's ready,
along with instructions on how to clone Worg and to push changes.

Special thanks to Jason for taking care of this, and to all of 
you for your patience!

Best,

-- 
 Bastien



Re: [O] [PATCH] Lilypond: added PDF output

2011-11-29 Thread Martyn Jago
Hi Torsten

Torsten Anders  writes:

> Dear all,
>
> The current implementation how org-babel calls Lilypond hard-wires the
> supported output file formats to EPS and PNG. Attached is a very
> simple patch that adds support for PDF as well, so that resulting PDF
> files can be directly integrated in the PDF files generated by Latex
> and Latex Beamer support.
>
> Thanks!  
>
> Best wishes,
> Torsten

Doesn't :cmdline " --pdf " work for you?

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

#+begin_src lilypond :file ionian.pdf :noweb yes :cmdline " --pdf "

  <>
  \relative c' { 
c d e f g a b c b a g f e d c d  
e f g a b c b a g f e d c1
}

#+end_src

--8<---cut here---end--->8---

If you have an example of how you are exporting we could maybe add it to the 
examples in
Worg? It is not a use-case I have considered.

Best, Martyn