emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Export the org spreadsheet into a tab seperated text file
@ 2008-07-11 18:42 Csányi Pál
  2008-07-11 19:39 ` Bernt Hansen
  0 siblings, 1 reply; 9+ messages in thread
From: Csányi Pál @ 2008-07-11 18:42 UTC (permalink / raw)
  To: emacs-orgmode

Hello!

Is there available from Org-mode to export a table to a Tab separated 
text file? 

-- 
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm

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

* Re: Export the org spreadsheet into a tab seperated text file
  2008-07-11 18:42 Export the org spreadsheet into a tab seperated text file Csányi Pál
@ 2008-07-11 19:39 ` Bernt Hansen
  2008-07-11 21:08   ` Re: Export the org spreadsheet into a tab seperated textfile Parker, Matthew
  2008-07-12  8:41   ` Export the org spreadsheet into a tab seperated text file Csányi Pál
  0 siblings, 2 replies; 9+ messages in thread
From: Bernt Hansen @ 2008-07-11 19:39 UTC (permalink / raw)
  To: Csányi Pál; +Cc: emacs-orgmode

csanyipal@gmail.com (Csányi Pál) writes:

> Hello!
>
> Is there available from Org-mode to export a table to a Tab separated 
> text file? 

Hi!

Yes it's easy.  Put the pointer on the table and M-x org-table-export
Export table to: /tmp/some-table.txt
Format: orgtbl-to-tsv

HTH,
Bernt

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

* RE: Re: Export the org spreadsheet into a tab seperated textfile
  2008-07-11 19:39 ` Bernt Hansen
@ 2008-07-11 21:08   ` Parker, Matthew
  2008-07-11 21:12     ` Bernt Hansen
  2008-07-12  8:41   ` Export the org spreadsheet into a tab seperated text file Csányi Pál
  1 sibling, 1 reply; 9+ messages in thread
From: Parker, Matthew @ 2008-07-11 21:08 UTC (permalink / raw)
  To: Bernt Hansen, Csányi Pál; +Cc: emacs-orgmode

Sorry, 

But, can you describe exactly what you mean by "Put the pointer on the table"

I tried putting point in various places (indicated w/ "[p]" below) and ran M-x org-table-export. But got messages: "No Table at point" or "before first heading"

Thanks!

[p]
| *one* | *two*| *three*|
| asdf | asdf | asdf |
|    1 |    1 |    1 |


[p] | *one* | *two*| *three*|
| asdf | asdf | asdf |
|    1 |    1 |    1 |

|[p] *one* | *two*| *three*|
| asdf | asdf | asdf |
|    1 |    1 |    1 |



| asdf | asdf | asdf |
|    1 |    1 |    1 |
[p]

-----Original Message-----
From: emacs-orgmode-bounces+mparker=seic.com@gnu.org [mailto:emacs-orgmode-bounces+mparker=seic.com@gnu.org] On Behalf Of Bernt Hansen
Sent: Friday, July 11, 2008 3:39 PM
To: Csányi Pál
Cc: emacs-orgmode@gnu.org
Subject: [Orgmode] Re: Export the org spreadsheet into a tab seperated textfile

csanyipal@gmail.com (Csányi Pál) writes:

> Hello!
>
> Is there available from Org-mode to export a table to a Tab separated 
> text file? 

Hi!

Yes it's easy.  Put the pointer on the table and M-x org-table-export
Export table to: /tmp/some-table.txt
Format: orgtbl-to-tsv

HTH,
Bernt


_______________________________________________
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

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

* Re: Re: Export the org spreadsheet into a tab seperated textfile
  2008-07-11 21:08   ` Re: Export the org spreadsheet into a tab seperated textfile Parker, Matthew
@ 2008-07-11 21:12     ` Bernt Hansen
  2008-07-11 21:25       ` Parker, Matthew
  2008-07-14 21:56       ` Carsten Dominik
  0 siblings, 2 replies; 9+ messages in thread
From: Bernt Hansen @ 2008-07-11 21:12 UTC (permalink / raw)
  To: Parker, Matthew; +Cc: Csányi Pál, emacs-orgmode

"Parker, Matthew" <MParker@seic.com> writes:

> But, can you describe exactly what you mean by "Put the pointer on the table"
>
> I tried putting point in various places (indicated w/ "[p]" below) and ran M-x org-table-export. But got messages: "No Table at point" or "before first heading"
>
> Thanks!
>
> [p]
> | *one* | *two*| *three*|
> | asdf | asdf | asdf |
> |    1 |    1 |    1 |
>
>
> [p] | *one* | *two*| *three*|
> | asdf | asdf | asdf |
> |    1 |    1 |    1 |
>
> |[p] *one* | *two*| *three*|
> | asdf | asdf | asdf |
> |    1 |    1 |    1 |
>
>
>
> | asdf | asdf | asdf |
> |    1 |    1 |    1 |
> [p]

The middle two above should work fine as long as you have a heading
before it.  Just insert a line

* Test

in front of the table.

Put the point on the table is just put the cursor anywhere inside the
table.

-Bernt

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

* RE: Re: Export the org spreadsheet into a tab seperated textfile
  2008-07-11 21:12     ` Bernt Hansen
@ 2008-07-11 21:25       ` Parker, Matthew
  2008-07-14 21:56       ` Carsten Dominik
  1 sibling, 0 replies; 9+ messages in thread
From: Parker, Matthew @ 2008-07-11 21:25 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Csányi Pál, emacs-orgmode

Worked. Thanks.

-----Original Message-----
From: Bernt Hansen [mailto:bernt@norang.ca] 
Sent: Friday, July 11, 2008 5:12 PM
To: Parker, Matthew
Cc: Csányi Pál; emacs-orgmode@gnu.org
Subject: Re: [Orgmode] Re: Export the org spreadsheet into a tab seperated textfile

"Parker, Matthew" <MParker@seic.com> writes:

> But, can you describe exactly what you mean by "Put the pointer on the table"
>
> I tried putting point in various places (indicated w/ "[p]" below) and ran M-x org-table-export. But got messages: "No Table at point" or "before first heading"
>
> Thanks!
>
> [p]
> | *one* | *two*| *three*|
> | asdf | asdf | asdf |
> |    1 |    1 |    1 |
>
>
> [p] | *one* | *two*| *three*|
> | asdf | asdf | asdf |
> |    1 |    1 |    1 |
>
> |[p] *one* | *two*| *three*|
> | asdf | asdf | asdf |
> |    1 |    1 |    1 |
>
>
>
> | asdf | asdf | asdf |
> |    1 |    1 |    1 |
> [p]

The middle two above should work fine as long as you have a heading
before it.  Just insert a line

* Test

in front of the table.

Put the point on the table is just put the cursor anywhere inside the
table.

-Bernt

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

* Re: Export the org spreadsheet into a tab seperated text file
  2008-07-11 19:39 ` Bernt Hansen
  2008-07-11 21:08   ` Re: Export the org spreadsheet into a tab seperated textfile Parker, Matthew
@ 2008-07-12  8:41   ` Csányi Pál
  2008-07-14 18:38     ` Carsten Dominik
  1 sibling, 1 reply; 9+ messages in thread
From: Csányi Pál @ 2008-07-12  8:41 UTC (permalink / raw)
  To: emacs-orgmode

Bernt Hansen <bernt@norang.ca> writes:

> csanyipal@gmail.com (Csányi Pál) writes:

>> Is there available from Org-mode to export a table to a Tab separated 
>> text file? 

> Yes it's easy.  Put the pointer on the table and M-x org-table-export
> Export table to: /tmp/some-table.txt
> Format: orgtbl-to-tsv

OK it works but only for one org table at a time.

But what to do if I have an org file with more than one table with
different columns x rows and between these tables moreover I have some
text, like the follows:

[options]

Here is an org tabe.

[pins]

Here is an org tabe.

etc.

Can I export in org mode the whole file with these tables end texts
mixed this way in to one Tab separated text file? (Tab separated only
where was an org table so in this example abowe in tab separated text
file there should to get two places with tab separated rows that
contain datas taken from the tables.)?

-- 
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm

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

* Re: Re: Export the org spreadsheet into a tab seperated text file
  2008-07-12  8:41   ` Export the org spreadsheet into a tab seperated text file Csányi Pál
@ 2008-07-14 18:38     ` Carsten Dominik
  2008-07-14 22:25       ` Csányi Pál
  0 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2008-07-14 18:38 UTC (permalink / raw)
  To: Csányi Pál; +Cc: emacs-orgmode


On Jul 12, 2008, at 1:41 AM, Csányi Pál wrote:

> Bernt Hansen <bernt@norang.ca> writes:
>
>> csanyipal@gmail.com (Csányi Pál) writes:
>
>>> Is there available from Org-mode to export a table to a Tab  
>>> separated
>>> text file?
>
>> Yes it's easy.  Put the pointer on the table and M-x org-table-export
>> Export table to: /tmp/some-table.txt
>> Format: orgtbl-to-tsv
>
> OK it works but only for one org table at a time.
>
> But what to do if I have an org file with more than one table with
> different columns x rows and between these tables moreover I have some
> text, like the follows:
>
> [options]
>
> Here is an org tabe.
>
> [pins]
>
> Here is an org tabe.
>
> etc.
>
> Can I export in org mode the whole file with these tables end texts
> mixed this way in to one Tab separated text file? (Tab separated only
> where was an org table so in this example abowe in tab separated text
> file there should to get two places with tab separated rows that
> contain datas taken from the tables.)?


No, you cannot.  What would be the application for this?

- Carsten

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

* Re: Re: Export the org spreadsheet into a tab seperated textfile
  2008-07-11 21:12     ` Bernt Hansen
  2008-07-11 21:25       ` Parker, Matthew
@ 2008-07-14 21:56       ` Carsten Dominik
  1 sibling, 0 replies; 9+ messages in thread
From: Carsten Dominik @ 2008-07-14 21:56 UTC (permalink / raw)
  To: Bernt Hansen
  Cc: Csányi Pál, emacs-orgmode, Parker, Matthew


On Jul 11, 2008, at 2:12 PM, Bernt Hansen wrote:

> "Parker, Matthew" <MParker@seic.com> writes:
>
>> But, can you describe exactly what you mean by "Put the pointer on  
>> the table"
>>
>> I tried putting point in various places (indicated w/ "[p]" below)  
>> and ran M-x org-table-export. But got messages: "No Table at point"  
>> or "before first heading"
>>
>> Thanks!
>>
>> [p]
>> | *one* | *two*| *three*|
>> | asdf | asdf | asdf |
>> |    1 |    1 |    1 |
>>
>>
>> [p] | *one* | *two*| *three*|
>> | asdf | asdf | asdf |
>> |    1 |    1 |    1 |
>>
>> |[p] *one* | *two*| *three*|
>> | asdf | asdf | asdf |
>> |    1 |    1 |    1 |
>>
>>
>>
>> | asdf | asdf | asdf |
>> |    1 |    1 |    1 |
>> [p]
>
> The middle two above should work fine as long as you have a heading
> before it.  Just insert a line
>
> * Test
>
> in front of the table.

Oops, this should not be required.  Fixed now.  Also, your post
reminded me that there should be completion for the translator
functions, this works now as well.

Thanks.

- Carsten

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

* Re: Export the org spreadsheet into a tab seperated text file
  2008-07-14 18:38     ` Carsten Dominik
@ 2008-07-14 22:25       ` Csányi Pál
  0 siblings, 0 replies; 9+ messages in thread
From: Csányi Pál @ 2008-07-14 22:25 UTC (permalink / raw)
  To: emacs-orgmode

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

Carsten Dominik <dominik@uva.nl> writes:

> On Jul 12, 2008, at 1:41 AM, Csányi Pál wrote:
>
>> Bernt Hansen <bernt@norang.ca> writes:
>>
>>> csanyipal@gmail.com (Csányi Pál) writes:
>>
>>>> Is there available from Org-mode to export a table to a Tab
>>>> separated
>>>> text file?
>>
>>> Yes it's easy.  Put the pointer on the table and M-x org-table-export
>>> Export table to: /tmp/some-table.txt
>>> Format: orgtbl-to-tsv
>>
>> OK it works but only for one org table at a time.
>>
>> But what to do if I have an org file with more than one table with
>> different columns x rows and between these tables moreover I have some
>> text, like the follows:
>>
>> [options]
>>
>> Here is an org tabe.
>>
>> [pins]
>>
>> Here is an org tabe.
>>
>> etc.
>>
>> Can I export in org mode the whole file with these tables end texts
>> mixed this way in to one Tab separated text file? (Tab separated only
>> where was an org table so in this example abowe in tab separated text
>> file there should to get two places with tab separated rows that
>> contain datas taken from the tables.)?
>
>
> No, you cannot.  What would be the application for this?

If I would get the tab separated text file from org tables, then I
would be to run on it the tragesym python script. Tragesym can to make
from this tab separated text file an electric symbol for gEDA suite.

http://geda.seul.org/wiki/geda:tragesym_readme

However, I can now to send an org table within org file to tab
separated lines. I run orgtbl-send-table on every org-table in the org
file. 

After that I can to run on this org file tragesym, but get an error
message in some circumstances. If I edit one table in this org file so
that I put '#' character at start of every line then I get the
electric symbol file when run tragesym on the org file. If I leave the
file unedited then I get error message: 

Traceback (most recent call last):
  File "/usr/local/geda-0.0.2/bin/.scripts/tragesym.py", line 586, in <module>
    opts,attr,pins=readsrc(file_in)
  File "/usr/local/geda-0.0.2/bin/.scripts/tragesym.py", line 143, in readsrc
    geda_attr[(string.strip(element[0]),nr)]=string.strip(element[1])
IndexError: list index out of range

But this is maybe the issue for the geda news group: 

gmane.comp.cad.geda.user

The file with edited lines that don't cause this error because of '#'
characters at beginning of the lines is attached here..


[-- Attachment #2: The edited org file with '#' characters at one torg table --]
[-- Type: application/octet-stream, Size: 3852 bytes --]

# This is the template file for creating symbols with tragesym
# every line starting with '#' is a comment line.

[options]
# wordswap swaps labels if the pin is on the right side an looks like
# this: 
#   "PB1 (CLK)". That's useful for micro controller port labels

# rotate_labels rotates the pintext of top and bottom pins
#   this is useful for large symbols like FPGAs with more than 100 pins

# sort_labels will sort the pins by it's labels
#   useful for address ports, busses, ...

#+ORGTBL: SEND options orgtbl-to-generic :tstart "" :tend "" :lstart "" :lend "" :sep "\t"
| wordswap           | yes  |
| rotate_labels      | no   |
| sort_labels        | yes  |
| generate_pinseq    | yes  |
| sym_width          | 1400 |
| pinwidthvertical   | 400  |
| pinwidthhorizontal | 400  |

# BEGIN RECEIVE ORGTBL options #

wordswap	yes
rotate_labels	no
sort_labels	yes
generate_pinseq	yes
sym_width	1400
pinwidthvertical	400
pinwidthhorizontal	400

# END RECEIVE ORGTBL options #

[geda_attr]
# name will be printed in the top of the symbol

# if you have a device with slots, you'll have to use slot= and
# slotdef= 

# use comment= if there are special information you want to add

#+ORGTBL: SEND geda_attr orgtbl-to-generic :tstart "" :tend "" :lstart "" :lend "" :sep "\t"
#| version       | 20080127 1                                  |
#| name          | MCT6                                        |
#| device        | DUAL_PHTR_OPTCPLR                           |
#| refdes        | U?                                          |
#| footprint     | none                                        |
#| description   | dual phototransistor optocoupler            |
#| documentation | http://www.fairchildsemi.com/ds/MC/MCT6.pdf |
#| author        | Paul Csanyi                                 |
#| numslots      | 0                                           |
#| dist-license  | GPL                                         |
#| use-license   | unlimited                                   |

# BEGIN RECEIVE ORGTBL geda_attr #

version	20080127 1
name	MCT6
device	DUAL_PHTR_OPTCPLR
refdes	U?
footprint	none
description	dual phototransistor optocoupler
documentation	http://www.fairchildsemi.com/ds/MC/MCT6.pdf
author	Paul Csanyi
numslots	0
dist-license	GPL
use-license	unlimited

# END RECEIVE ORGTBL geda_attr #

[pins]
# tabseparated list of pin descriptions
# ----------------------------------------

# pinnr is the physical number of the pin

# seq is the pinseq= attribute, leave it blank if it doesn't matter 

# type can be (in, out, io, oc, oe, pas, tp, tri, clk, pwr) 

# style can be (line,dot,clk,dotclk,none). none if only want to add a 
# net 

# posit. can be (l,r,t,b) or empty for nets

# net specifies the name of the net. Vcc or GND for example.

# label represents the pinlabel.
#	negation lines can be added with "\_" example: \_enable\_  
#	if you want to write a "\" use "\\" as escape sequence 

#-----------------------------------------------------

#+ORGTBL: SEND pins orgtbl-to-generic :skip 1 :tstart "" :tend "" :lstart "" :lend "" :sep "\t"
| pinnr | seq | type | style | posit. | net | label     |
|     1 |   1 | pas  | line  | l      |     | ANODE     |
|     2 |   2 | pas  | line  | l      |     | CATHODE   |
|     3 |   3 | pas  | line  | l      |     | CATHODE   |
|     4 |   4 | pas  | line  | l      |     | ANODE     |
|     5 |   5 | pas  | line  | r      |     | EMITTER   |
|     6 |   6 | pas  | line  | r      |     | COLLECTOR |
|     7 |   7 | pas  | line  | r      |     | COLLECTOR |
|     8 |   8 | pas  | line  | r      |     | EMITTER   |

# BEGIN RECEIVE ORGTBL pins #

1	1	pas	line	l		ANODE
2	2	pas	line	l		CATHODE
3	3	pas	line	l		CATHODE
4	4	pas	line	l		ANODE
5	5	pas	line	r		EMITTER
6	6	pas	line	r		COLLECTOR
7	7	pas	line	r		COLLECTOR
8	8	pas	line	r		EMITTER

# END RECEIVE ORGTBL pins #

[-- Attachment #3: Type: text/plain, Size: 259 bytes --]


Without these '#' characters at the '[geda_attr]' org table I get the
error message: IndexError: list index out of range

This is maybe a tragesym bug..

Any advices will be appreciated!

-- 
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

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

end of thread, other threads:[~2008-07-14 22:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-11 18:42 Export the org spreadsheet into a tab seperated text file Csányi Pál
2008-07-11 19:39 ` Bernt Hansen
2008-07-11 21:08   ` Re: Export the org spreadsheet into a tab seperated textfile Parker, Matthew
2008-07-11 21:12     ` Bernt Hansen
2008-07-11 21:25       ` Parker, Matthew
2008-07-14 21:56       ` Carsten Dominik
2008-07-12  8:41   ` Export the org spreadsheet into a tab seperated text file Csányi Pál
2008-07-14 18:38     ` Carsten Dominik
2008-07-14 22:25       ` Csányi Pál

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