emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Table conversion problem


From: Carsten Dominik
Subject: Re: [Orgmode] Table conversion problem
Date: Thu, 3 Jan 2008 18:44:41 +0100

Hi Bernt,

On Jan 3, 2008, at 6:02 PM, Bernt Hansen wrote:

Hi Carsten,

I needed to convert a bunch of tab delimited data into a table today for an email and I knew there was a function to do this so I went to the PDF
documentation for Org-mode version 5.17a

It says I can select the region to be converted into a table and then
hit C-c | to convert it to a table but I get this error instead of the
expected behaviour:

orgtbl-error: This key is has no function outside tables

Now I'm actually trying to do this outside of regular org-mode - when
composing a mail message using orgstruct-mode and orgtbl-mode as minor
modes.  In my *.org buffers C-c | works great.

Is there a way to do this without converting the data to a table in org
mode and then cutting and pasting it back to the email I'm composing?

orgtbl-mode commands only work if there is already a table context,
and this is not the case for your application.  However, you can bind
the command `org-table-convert-region' to a key and use it directly.

If this is your only use of C-c | in orgtbl-mode, you can use to
orgtbl-mode hook and overwrite the standard (context-sensitive) binding:

(add-hook 'orgtbl-mode-hook
  (lambda ()
    (define-key orgtbl-mode-map 'org-table-convert-region "\C-c|")))

Thanks for the patch, I have applied it.

- Carsten



Bernt

PS - here's a patch for the error message text above:

---

diff --git a/org.el b/org.el
index 9d99e98..4e2e4f9 100644
--- a/org.el
+++ b/org.el
@@ -7476,7 +7476,7 @@ off orgstruct-mode will *not* remove these additonal settings."
(defun orgstruct-error ()
  "Error when there is no default binding for a structure key."
  (interactive)
-  (error "This key is has no function outside structure elements"))
+  (error "This key has no function outside structure elements"))

(defun orgstruct-setup ()
  "Setup orgstruct keymaps."
@@ -11064,7 +11064,7 @@ to execute outside of tables."
(defun orgtbl-error ()
  "Error when there is no default binding for a table key."
  (interactive)
-  (error "This key is has no function outside tables"))
+  (error "This key has no function outside tables"))

(defun orgtbl-setup ()
  "Setup orgtbl keymaps."
diff --git a/org_xemacs.el b/org_xemacs.el
index ceb6eb4..67ddc00 100644
--- a/org_xemacs.el
+++ b/org_xemacs.el
@@ -9338,7 +9338,7 @@ to execute outside of tables."
(defun orgtbl-error ()
  "Error when there is no default binding for a table key."
  (interactive)
-  (error "This key is has no function outside tables"))
+  (error "This key has no function outside tables"))

(defun orgtbl-setup ()
  "Setup orgtbl keymaps."




_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode





reply via email to

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