From 655c5eaeee44d1dfafcd4ae73e30544c58b8334b Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Thu, 29 Oct 2009 14:47:22 +0100 Subject: [PATCH] Fix bug in radio list export Daniel Hackney writes: > When attempting to use radio lists for exporting in LaTeX, I > found that they didn't work. I am using the example file shown > below: > > ---BEGIN_EXAMPLE--- > > #+LaTeX: % BEGIN RECEIVE ORGLST programs > #+LaTeX: % END RECEIVE ORGLST programs > > #+ORGLST: SEND programs org-list-to-latex > - Emacs text editor > - Ubuntu Linux > - Git version control system > - Firefox web browser > - Drupal content management system > - Subversion version control system > - Eclipse integrated development environment > > ---END_EXAMPLE--- > > I eventually ran `org-list-send-list' manually on the list, and > got the following error: > > funcall: Wrong type argument: number-or-marker-p, (unordered > #("Emacs text editor" [snip...] > > I started debugging `org-list-send-list' and found that the error > occurred when calling (funcall transform list). Looking back, I > saw that `transform' was assigned (in the let*) after > `item-beginning'. Stepping through the execution, I saw that > `transform' was being assigned a value of `-'. It turns out when > assigning to `item-beginning', (org-list-item-beginning) is > called, which runs a regular expression with a capture group, > overwriting the previously matched capture group. > > Luckily, the fix is simple; all that needs be done is to switch > the assignment to `transform' with `item-beginning' so the regex > in (org-list-item-beginning) doesn't override the match-string > data. I tried this fix out and it worked perfectly. --- lisp/ChangeLog | 3 +++ lisp/org-list.el | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f24bba987..83e051cce 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-10-29 Carsten Dominik + * org-list.el (org-list-send-list): Fix bug related to match + data. + * org-latex.el (org-export-latex-fontify): Apply verbatim emphasis. (org-export-latex-make-header): Insert \obeylines if line breaks diff --git a/lisp/org-list.el b/lisp/org-list.el index 3e9df2f4f..3a332e60f 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -1186,8 +1186,8 @@ this list." (throw 'exit nil) (error "Don't know how to transform this list")))) (let* ((name (match-string 1)) - (item-beginning (org-list-item-beginning)) (transform (intern (match-string 2))) + (item-beginning (org-list-item-beginning)) (txt (buffer-substring-no-properties (car item-beginning) (org-list-end (cdr item-beginning))))