From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Table conversion problem Date: Thu, 3 Jan 2008 18:44:41 +0100 Message-ID: <2F46226A-E136-4FF8-985D-88632CD0DD3A@gmail.com> References: <87tzlux2p9.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 (Apple Message framework v915) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JAU7r-0005jQ-W7 for emacs-orgmode@gnu.org; Thu, 03 Jan 2008 12:45:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JAU7l-0005g8-4l for emacs-orgmode@gnu.org; Thu, 03 Jan 2008 12:45:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JAU7k-0005fp-Ub for emacs-orgmode@gnu.org; Thu, 03 Jan 2008 12:44:57 -0500 Received: from nf-out-0910.google.com ([64.233.182.185]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JAU7j-0008N8-IF for emacs-orgmode@gnu.org; Thu, 03 Jan 2008 12:44:56 -0500 Received: by nf-out-0910.google.com with SMTP id f5so437751nfh.26 for ; Thu, 03 Jan 2008 09:44:47 -0800 (PST) In-Reply-To: <87tzlux2p9.fsf@gollum.intra.norang.ca> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bernt Hansen Cc: emacs-orgmode@gnu.org 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. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode