diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2009-08-04 17:14:32 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2009-08-04 17:15:40 +0200 |
commit | 22cb84f74d131f0b9d1673948d810c99ef6e09fb (patch) | |
tree | 98e9a941cf2770e403d52d453f72b0a6f84b5613 | |
parent | f3222067087dc60413bbe879d6c7774ba294f59b (diff) | |
download | org-mode-22cb84f74d131f0b9d1673948d810c99ef6e09fb.tar.gz |
Allow normal lists completion also when using ido.el
Gregory Grubbs writes:
> When exporting a table with ido-mode active, an error is
> raised in org-ido-completing-read. I think
> ido-completing-read is being called with incorrect
> arguments, but the fix is beyond me.
>
> Steps to reproduce the error:
> Org-mode version: 6.28trans
> Emacs version: GNU Emacs 23.0.91.1 (i486-pc-linux-gnu, GTK+ Version
> 2.16.0) of 2009-04-05 on palmer, modified by Debian
>
>
> Turn on ido-mode: M-x ido-mode RET
> visit a file using C-x C-f /tmp/test.org RET
> Create a simple table:
> |column a|column b|
> |-
> |one|two|
> |three|four|
>
> Org-magic-tabelize it by hitting TAB somewhere in a column
>
> M-x org-table-export RET /tmp/test.csv
>
> Here's the backtrace I get:
>
> Debugger entered--Lisp error: (wrong-type-argument listp "orgtbl-to-tsv")
This error is due to the fact that org-ido-completing-read does
convert alists to flat lists for completion. Now we check if the list
really is an alist before converting it.
-rwxr-xr-x | lisp/ChangeLog | 3 | ||||
-rw-r--r-- | lisp/org.el | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8248fb0..46589a6 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-08-04 Carsten Dominik <carsten.dominik@gmail.com> + * org.el (org-ido-completing-read): Accept straight lists for + completion as well as alists. + * org-html.el (org-export-as-html): Fix parenthesis error in footnore code. diff --git a/lisp/org.el b/lisp/org.el index fc67304..3b3a6ba 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7637,7 +7637,9 @@ Use TAB to complete link prefixes, then RET for type-specific completion support (listp (second args))) (let ((ido-enter-matching-directory nil)) (apply 'ido-completing-read (concat (car args)) - (mapcar (lambda (x) (car x)) (nth 1 args)) + (if (consp (car (nth 1 args))) + (mapcar (lambda (x) (car x)) (nth 1 args)) + (nth 1 args)) (cddr args))) (apply 'completing-read args))) |