help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs 30.5.0 editing epub


From: H . -J . Heitländer
Subject: Re: emacs 30.5.0 editing epub
Date: Thu, 16 Mar 2023 16:54:03 +0000

Hi Yuri,

yes I keep mentioning "editing EPUB" because

a) that's my primary use case at the moment (in combination with "calibre") and

b) it worked some time ago. (emacs 29.5 and earlier as far as I remember)

Even in this buggy scenario it is much more comfortable for me to handle EPUBs this way  than doing it by extracting the zip file and rezipping it. Especially as I lack an "idiot-safe" workflow for unzipping / rezipping.

So I shall live with this situation because I can't correct it.

| I see ‘archive--extract-file’ initially sets the coding system to
| ‘no-conversion’, possibly because it needs that for decompression. It
| is supposed to re-decide on a coding system later in
| ‘archive-set-buffer-as-visiting-file’, but for some reason it keeps
| ‘no-conversion’ in your case.

There seems to exist a bug in the migration path somewhere from version 29 to 30. Where do I address the bug report; as I am definetely too dumb for debugging it myself?

Cheers and thanks for your patience

Heiner



Am 16.03.23 um 16:23 schrieb Yuri Khan:
On Thu, 16 Mar 2023 at 20:17, H.-J. Heitländer
<Heiner.Heitlaender@posteo.de> wrote:

kill buffer up to the top epub

reopen epub

open epub subfile (...html)

C-x RET r ... utf-8

in minibufer: Revert buffer from file xxx.html? (y or n)

Answer: y

Minibuffer: Cannot revert noexistent file xxx.html
You keep mentioning “editing epub”. Are you even sure it’s supposed to work?

An EPUB file is a zip archive, typically containing XHTML pages and
some metadata. Emacs covers some basic scenarios where you can browse
the archive, visit files inside, even edit and save them (and they get
re-compressed and updated in the archive).

Reverting, on the other hand, does not work, probably because of the
way archive-mode is implemented. So when it picks the wrong encoding,
you cannot fix it by reverting.

You could probably achieve better results if you first extract the
contents of the EPUB archive into a real directory on your file
system, then edit files there. If necessary, re-pack the modified
files.

I see ‘archive--extract-file’ initially sets the coding system to
‘no-conversion’, possibly because it needs that for decompression. It
is supposed to re-decide on a coding system later in
‘archive-set-buffer-as-visiting-file’, but for some reason it keeps
‘no-conversion’ in your case.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]