[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: Using tragesym with Emacs org-mode tables almost successful
Werner Hoch <werner.ho@xxxxxx> writes:
Hi,
> Hi there,
>
> On Dienstag, 15. Juli 2008, Csányi Pál wrote:
>> I tried to use tragesym with my favorite text editor Emacs.
>> I'm using org-mode in Emacs in which one can to create tables.
>> and I get an 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
>
> You had lines in the attribute section that had only 1 element.
> The elements are splitted either with the equal sign "=" or TAB.
> If you look at one of your lines:
> ----
> | version | 20080127 1 |
> | name | MCT6 |
> ----
> There's no tragesym seperator in it.
OK It's clear for me now.
> Your files contains lines that are not part of the file format
> description. The org tables start with | and have no field delimiter.
OK
> If you like to use the org tables you've to mark them as comments (for
> tragesym) and prefix them with "#".
Yes, but then I can't to use it in org-mode as org-table! :(
However I find the solution! :)
I edit the tragesym.py file at line 130 and 131:
elif section=="" or line[0]=="#" or line[0]=="|" \
or len(string.strip(line)) == 0: # comment, empty line, org-table or no section
so now the tragesym do its job well! :)
I wish that that this small 'patch' shall to be in the official
tragesym.py too, if it is possible! :)
What do you think about it?
--
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user