From: Daniel Kiertscher <D.Kiertscher@gmx.de>
To: emacs-orgmode@gnu.org
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 [thread overview]
Message-ID: <53729B7B.7030505@gmx.de> (raw)
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-<f5>") '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-<f8>") '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-<f9>")
'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-<f10>")
'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-<f11>") '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-<f6>") '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-<f7>") 'org-table-move-point-downright)
;; more transformations on org-table as matrix
; (defun org-table-pivot-table)
; ...
; (defun org-table-sort-columns)
; ...
next reply other threads:[~2014-05-13 22:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 22:23 Daniel Kiertscher [this message]
2014-05-21 13:47 ` manipulating org-tables as matrices - operations on org-table in diagonal direction for columns and rows Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53729B7B.7030505@gmx.de \
--to=d.kiertscher@gmx.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).