From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Automagically send all org table Date: Mon, 14 Jan 2013 19:28:32 +0530 Message-ID: <87pq1750jb.fsf@gmail.com> References: <50F3DD17.5070705@gmail.com> <20130114122456.GC19255@kuru.dyndns-at-home.com> <87sj63vruz.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TukYz-0001t2-Cb for emacs-orgmode@gnu.org; Mon, 14 Jan 2013 08:59:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TukYt-0003uq-7x for emacs-orgmode@gnu.org; Mon, 14 Jan 2013 08:58:57 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:33062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TukYt-0003ue-0S for emacs-orgmode@gnu.org; Mon, 14 Jan 2013 08:58:51 -0500 Received: by mail-pa0-f49.google.com with SMTP id bi1so2251316pad.36 for ; Mon, 14 Jan 2013 05:58:50 -0800 (PST) In-Reply-To: <87sj63vruz.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 14 Jan 2013 18:33:48 +0530") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Xavier Garrido Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Jambunathan K writes: > Suvayu Ali writes: > >> On Mon, Jan 14, 2013 at 11:25:27AM +0100, Xavier Garrido wrote: >>> Hi orgmoders, >>> >>> I am looking for a simple way to SEND all org tables in a given document to >>> their RECEIVER counterparts. Of course, I can go through the whole document >>> and do `org-table-send` one-by-one but I would like to do it without opening >>> the document and for all tables at the same time. Is there a way ? >>> >>> Thanks for your help and advices, >> >> I do not see any other way > > There is a way > >> but writing some elisp code of your own. > > Why not have Emacs write it for you? You dictate and Emacs will type > out the elisp code. > >> It should be simple to do, I think. > > Not simpler than resorting to macros. > > Here is how. Just hints. OP should help himself. Here is what I (or rather Emacs) came up with. The Elisp snippet has control characters, so see the attachment. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=send-table.el Content-Transfer-Encoding: quoted-printable Content-Description: send-table.el (fset 'send-table (lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ("=13#+ORGTBL=0D=01=03=03" 0 "%d")) arg))) --=-=-= Content-Type: text/plain Put that in to your .emacs or C-x C-e it. Then, if you know that your file has no more than N (say 100) tables, do C-x C-f myfile.html C-u 100 M-x send-table RET You are done. > > ---------------------------------------------------------------------- > > Begin macro, do stuff, end macro, > > C-x (, do stuff, C-x ) > > Execute macro > C-x e > > Or provide a local, on-the-move binding and execute it. > C-x C-k b > > Name the macro and store it as a command in your .emacs. > C-x C-k n, M-x insert-kbd-macro > > Run the stored macro from batch script (Hint: C-h v org-export-as-html-batch) > emacs --batch --load=~/MyInitStuff.el --visit=MyFile --funcall MyNamedMacro" > > ---------------------------------------------------------------------- > > For help with jumping to relevant Info portions, do > > C-h K C-x ( > C-h K C-x C-k n > > (Note the CAPITAL `K' above) > > ---------------------------------------------------------------------- -- --=-=-=--