From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Kiertscher Subject: manipulating org-tables as matrices - operations on org-table in diagonal direction for columns and rows Date: Wed, 14 May 2014 00:23:55 +0200 Message-ID: <53729B7B.7030505@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkL7H-0004Zj-E6 for emacs-orgmode@gnu.org; Tue, 13 May 2014 18:24:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkL79-0002M8-Dc for emacs-orgmode@gnu.org; Tue, 13 May 2014 18:24:07 -0400 Received: from mout.gmx.net ([212.227.15.18]:52764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkL79-0002Lw-2l for emacs-orgmode@gnu.org; Tue, 13 May 2014 18:23:59 -0400 Received: from [192.168.178.41] ([77.184.82.37]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MNIAz-1WiO6G1JzF-006y6X for ; Wed, 14 May 2014 00:23:57 +0200 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: emacs-orgmode@gnu.org Hello, org-tables already support very helpful operations for manipulating the order of rows and columns. But we could implement some operations based on the concept of matrices, making org-tables even more usefull for drafting ideas using matrix layouts. Maybe you are interested in the operations I am suggesting and can help me to implement them. Maybe you have some questions or suggestions, improving or generalising this approach? Here are the first sketches of a part of the functions on org-table which I am missing for quite a while now. I am not very familiar with development in elisp though. ;; move field in org-table in diagonal direction (defun org-table-move-field-upleft () "Move Point one line up and one char left." (interactive) (org-table-move-row-up) (org-table-move-column-left)) (global-set-key (kbd "C-") 'org-table-move-field-upleft) (defun org-table-move-field-downright () "Move Point one line up and one char left." (interactive) (org-table-move-row-down) (org-table-move-column-right)) (global-set-key (kbd "C-") 'org-table-move-field-downright) (defun org-table-insert-field-with-row-and-column-upleft () "Insert a field with row and column at the uper left corner of the field at point." (interactive) (org-table-insert-column) (org-table-insert-row)) (global-set-key (kbd "C-") 'org-table-insert-field-with-row-and-column-upleft) (defun org-table-duplicate-field-with-row-and-column-upleft () "Duplicate a field with row and column at the uper left corner of the field at point." (interactive) (org-table-insert-column) (org-table-insert-row)) (global-set-key (kbd "C-") 'org-table-duplicate-field-with-row-and-column-upleft) (defun org-table-delete-field-with-row-and-column () "Delete a field with row and column." (interactive) (org-table-delete-column) (org-table-kill-row)) (global-set-key (kbd "C-") 'org-table-delete-field-with-row-and-column) ;; move point in org-table in diagonal direction ;; The functions org-table-move-point-.. are note working yet. (defun org-table-move-point-upleft () "Move Point one line up and one char left." (interactive) (previous-line) (org-table-previous-field)) ;how to stop if in a corner? (global-set-key (kbd "C-") 'org-table-move-point-upleft) (defun org-table-move-point-downright () "Move Point one line up and one char left." (interactive) (next-line) (org-table-next-field)) ;how to stop if in a corner? (global-set-key (kbd "C-") 'org-table-move-point-downright) ;; more transformations on org-table as matrix ; (defun org-table-pivot-table) ; ... ; (defun org-table-sort-columns) ; ...