unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Editing .odt in emacs
@ 2006-02-23 16:35 Alexander Klimov
  2006-03-04 14:18 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Klimov @ 2006-02-23 16:35 UTC (permalink / raw)


Hi.

I edit open document file saved in OpenOffice in emacs (cvs version).
BTW, .odt is zipped XML, actually.

The first problem is that after I have executed

 (add-to-list 'auto-mode-alist '("\\.odt$" .  archive-mode))

I got the following:

 Parsing archive file...
 File mode specification error: (args-out-of-range 1866753 1866757)

OTOH if I rename test.odt -> test.zip I can open it and start to edit
content.xml in SGML (indicated as XML) mode.

The next problem happens once I switch tags off using
sgml-tags-invisible:

   <text:p text:style-name="Standard">Some text.</text:p>

changes to

   Some text.

but if I move point over (invisible) tag emacs hangs temporarily and
*Messages* is filled with messages like

  Invisible tag: <text:p text:style-name="Standard"> [10 times]
  forward-list: Scan error: "Containing expression ends prematurely", 5948, 5948
  forward-list: Scan error: "Containing expression ends prematurely", 5982, 5983 [585 times]
  Invisible tag: <text:p text:style-name="Standard"> [4 times]
  forward-list: Scan error: "Containing expression ends prematurely", 5948, 5948
  forward-list: Scan error: "Containing expression ends prematurely", 5982, 5983 [166 times]
  Invisible tag: <text:p text:style-name="Standard"> [4 times]

OTOH once I switch visibility on I have no problem to go thru the
whole file using C-M-n and C-M-p unless I try to jump from inside a
tag (in which case I get `..ends prematurely' error).

BTW, anyone knows is there any effort to make odf-mode for emacs (or
at least odt-mode)?  Provided how slow is OOo when working with
several documents without gigs of RAM it would be of real use for many
users.

-- 
Regards,
ASK

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

* Re: Editing .odt in emacs
  2006-02-23 16:35 Editing .odt in emacs Alexander Klimov
@ 2006-03-04 14:18 ` Eli Zaretskii
  2006-03-06 17:04   ` Was: " Alexander Klimov
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2006-03-04 14:18 UTC (permalink / raw)
  Cc: emacs-devel

> Date: Thu, 23 Feb 2006 18:35:39 +0200 (IST)
> From: Alexander Klimov <alserkli@inbox.ru>
> 
> I edit open document file saved in OpenOffice in emacs (cvs version).
> BTW, .odt is zipped XML, actually.
> 
> The first problem is that after I have executed
> 
>  (add-to-list 'auto-mode-alist '("\\.odt$" .  archive-mode))
> 
> I got the following:
> 
>  Parsing archive file...
>  File mode specification error: (args-out-of-range 1866753 1866757)
> 
> OTOH if I rename test.odt -> test.zip I can open it and start to edit
> content.xml in SGML (indicated as XML) mode.

Can you set debug-on-error non-nil and post the full backtrace when
the above error happens?

If you can, given the backtrace, figure out what part of arc-mode.el
needs to be changed, please tell what you found.  Failing that, please
post here a small .odt file that can be used to reproduce and debug
this problem.

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

* Was: Editing .odt in emacs
  2006-03-04 14:18 ` Eli Zaretskii
@ 2006-03-06 17:04   ` Alexander Klimov
  2006-03-06 19:33     ` Eli Zaretskii
  2006-03-11 11:45     ` Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: Alexander Klimov @ 2006-03-06 17:04 UTC (permalink / raw)
  Cc: emacs-devel

On Sat, 4 Mar 2006, Eli Zaretskii wrote:
> > The first problem is that after I have executed
> >
> >  (add-to-list 'auto-mode-alist '("\\.odt$" .  archive-mode))
> >
> > I got the following: [...]
>
> Can you set debug-on-error non-nil [...]

I have found the solution: I add odt to auto-coding-alist the same way
as zip and it seems that everything works now, but, it was VERY
nontrivial to find that in order to make something to be
processed as zip one needs to change auto-mode-alist AND
auto-coding-alist -- I guess we should put it into documentation..

-- 
Regards,
ASK

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

* Re: Was: Editing .odt in emacs
  2006-03-06 17:04   ` Was: " Alexander Klimov
@ 2006-03-06 19:33     ` Eli Zaretskii
  2006-03-11 11:45     ` Eli Zaretskii
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2006-03-06 19:33 UTC (permalink / raw)
  Cc: emacs-devel

> Date: Mon, 6 Mar 2006 19:04:35 +0200 (IST)
> From: Alexander Klimov <alserkli@inbox.ru>
> cc: emacs-devel@gnu.org
> 
> I have found the solution: I add odt to auto-coding-alist the same way
> as zip and it seems that everything works now, but, it was VERY
> nontrivial to find that in order to make something to be
> processed as zip one needs to change auto-mode-alist AND
> auto-coding-alist -- I guess we should put it into documentation..

Thanks, I will take care of this.

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

* Re: Was: Editing .odt in emacs
  2006-03-06 17:04   ` Was: " Alexander Klimov
  2006-03-06 19:33     ` Eli Zaretskii
@ 2006-03-11 11:45     ` Eli Zaretskii
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2006-03-11 11:45 UTC (permalink / raw)
  Cc: emacs-devel

> Date: Mon, 6 Mar 2006 19:04:35 +0200 (IST)
> From: Alexander Klimov <alserkli@inbox.ru>
> cc: emacs-devel@gnu.org
> 
> On Sat, 4 Mar 2006, Eli Zaretskii wrote:
> > > The first problem is that after I have executed
> > >
> > >  (add-to-list 'auto-mode-alist '("\\.odt$" .  archive-mode))
> > >
> > > I got the following: [...]
> >
> > Can you set debug-on-error non-nil [...]
> 
> I have found the solution: I add odt to auto-coding-alist the same way
> as zip and it seems that everything works now, but, it was VERY
> nontrivial to find that in order to make something to be
> processed as zip one needs to change auto-mode-alist AND
> auto-coding-alist

This is stated in a comment in file.el.

> -- I guess we should put it into documentation..

I added this to the doc string of auto-mode-alist.

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

end of thread, other threads:[~2006-03-11 11:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-23 16:35 Editing .odt in emacs Alexander Klimov
2006-03-04 14:18 ` Eli Zaretskii
2006-03-06 17:04   ` Was: " Alexander Klimov
2006-03-06 19:33     ` Eli Zaretskii
2006-03-11 11:45     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).