emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Revert orgtbl-create-or-convert-from-region [6.33x]
@ 2013-08-05  7:49 Daniel Hornung
  2013-08-05  9:16 ` Thorsten Jolitz
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Hornung @ 2013-08-05  7:49 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: Text/Plain, Size: 2091 bytes --]

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

[Feature request]

I think one great way to increase the usefulness of org-mode would be a
function which turns a table into a csv or tsv block of text again.

I assume that the functionality exists already in org-table-export, I
would just wish for this to be exposed as a function which converts the
table in place instead of writing it into a new file (org-table-export
does not allow overwriting the current file).

This would finally give a comfortable way to edit tsv or csv tables
without hassles in emacs.

-----------------------------------------------------------------------

Emacs  : GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.4)
 of 2011-04-04 on crested, modified by Debian
Package: Org-mode version 6.33x

current state:
==============
(setq
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-hide-block-toggle-maybe)
 org-src-mode-hook '(org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-
cycle-show-empty-lines
                  org-optimize-window-after-visibility-change)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-
mode-hook org-show-block-all append local] 5])
 org-confirm-elisp-link-function 'yes-or-no-p
 org-occur-hook '(org-first-headline-recenter)
 )

-- 
Max-Planck-Institute for Dynamics and Self-Organization
Laboratory for Fluid Dynamics, Pattern Formation and Biocomplexity
Biomedical Physics Group

Am Fassberg 17
D-37077 Goettingen

(+49) 551 5176 373

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: Bug: Revert orgtbl-create-or-convert-from-region [6.33x]
@ 2013-08-06  5:28 Rustom Mody
  2013-08-06  5:31 ` Rustom Mody
  0 siblings, 1 reply; 9+ messages in thread
From: Rustom Mody @ 2013-08-06  5:28 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1597 bytes --]

I was writing up what I could make out of having program-files with inline
tables.
The example is done for python.  It is exactly what the OP wants but close
enough so giving it here.
This file shows two approaches for making python data structures from
orgtbl with both sender and receiver in same file.

The first table is made with single line comments
The second table is made using python's triple-quote feature
The third is the recipient for both/either of the above

To try out orgtbl minor mode needs to be active after python mode is active.
Also it does not quite work for org 6.33
---------------------------
For the first use M-x orgtbl-toggle-comment followed by C-c C-c (inside the
table) to send to recipient, followed by another M-x orgtbl-toggle-comment

For the second only C-c C-c in the sender table is sufficient


------------------------------------cut here
------------------------------------
# #+ORGTBL: SEND marks orgtbl-to-generic :sep ","
#   | abe   | 1 | 2 | 3 | 4 | 10 |
#   | beth  | 3 | 1 | 5 | 7 | 16 |
#   | cathy | 5 | 6 | 7 | 5 | 23 |
# #+TBLFM: $6=$2+$3+$4+$5


orig_table = """

#+ORGTBL: SEND marks orgtbl-to-generic :lfmt "  \"%s\": [%s,%s,%s,%s,%s],"
:llfmt "  \"%s\": [%s,%s,%s,%s,%s]"
  | abe   | 1 | 2 | 3 | 4 | 10 |
  | beth  | 9 | 1 | 5 | 9 | 24 |
  | cathy | 5 | 6 | 7 | 5 | 23 |
#+TBLFM: $6=$2+$3+$4+$5
"""

stud_db = {
# BEGIN RECEIVE ORGTBL marks
abe,1,2,3,4,10
beth,3,1,5,7,16
cathy,5,6,7,5,23
# END RECEIVE ORGTBL marks
}

----------------------- cut here -----------------------------



-- 
http://www.the-magus.in
http://blog.languager.org

[-- Attachment #2: Type: text/html, Size: 1985 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-08-07  8:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-05  7:49 Bug: Revert orgtbl-create-or-convert-from-region [6.33x] Daniel Hornung
2013-08-05  9:16 ` Thorsten Jolitz
2013-08-05  9:49   ` Daniel Hornung
2013-08-05 13:26     ` Thorsten Jolitz
2013-08-05 14:07       ` Thorsten Jolitz
2013-08-05 14:19       ` Nick Dokos
2013-08-07  8:49         ` Daniel Hornung
  -- strict thread matches above, loose matches on Subject: below --
2013-08-06  5:28 Rustom Mody
2013-08-06  5:31 ` Rustom Mody

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).