From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: emacs 30.5.0 editing epub Date: Thu, 16 Mar 2023 22:23:42 +0700 Message-ID: References: <87pm99830a.fsf@gmx.net> <74d91d8b-ac3c-9463-4334-9c1db8df7c13@posteo.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20783"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stephen Berman , gnu emacs To: =?UTF-8?B?SC4tSi4gSGVpdGzDpG5kZXI=?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 16 16:24:25 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcpSr-0005ES-04 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 16 Mar 2023 16:24:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pcpSP-0001tj-UY; Thu, 16 Mar 2023 11:23:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcpSO-0001ss-Ni for help-gnu-emacs@gnu.org; Thu, 16 Mar 2023 11:23:56 -0400 Original-Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pcpSM-00069V-Tq for help-gnu-emacs@gnu.org; Thu, 16 Mar 2023 11:23:56 -0400 Original-Received: by mail-wr1-x42b.google.com with SMTP id o2so489343wro.12 for ; Thu, 16 Mar 2023 08:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678980233; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=umfbZJsASE6FNnqDjwJkg3xvsNvilm47N3ranKXHqIY=; b=muY9nSSpY5fEyx8Iwco07EkGt+rW3GpApxGaYr8QSoUgUbn39dqXw6srBrmS8kB22F DSQZPr2mGl5huXSs2GhU3xuLWBeEBBEQiGReyOWMisX//QDG7Q8rS4kAql6f6BsNrU2X J7Ty8pLzT0TDClCYIELlQ1PtBB+WCUUOlbWangGBtecLEvRQzeq1kan9Aphm6+fMLXNN Ux1LzSEM4FrCrNRJPGUVColzwGWIBW1qmqb7+1a1bGb4UiadjyN6SKS8yMtamR6IPALO NHb3YojU55GITs1bkCnG2/tWFcCpHwuVAWdqxIYGL7VU1GWsjSNMoTGps1rMNMF4B5VU raSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678980233; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=umfbZJsASE6FNnqDjwJkg3xvsNvilm47N3ranKXHqIY=; b=T9gZnHuITfWmT4cI/Ipn8wEXN0yCthvIxgQ9UxJZV44wI2excd55lRjNdbU0npYXfc 53IVFhUv7+CEgLyAM9wsyx97Uaar8bOHaZtghn0QVxVyupNqHmvktBTXEZQ0eIjrZKM6 uJPmG4ArgoGdmLlDp+iOTbRIHlFOr59+XMAaCOea4V/nRIvZjdr8hmxFnhn12QmTwGNZ pF+npsCe6ZfTuauwmULWBjFmLwTok4S+gh5G6AGrWMISSpD6Kcx1GtWKJy2erMUVpvLQ 5/XKSqdda3qBISBX1cUoMKHeXBSCSIbeSbUlBh0Q1ENjHti2znSjHemUzSypWpkJD1xG eq7Q== X-Gm-Message-State: AO0yUKXOOg3bpVOQ19w5ft8xoCO8x90Ovil9TgfdLiXvPmZ5HpAqs0p/ VvxVm1VMILOM27I5bgVRikv4rgqv/Mh+xZ79k1E= X-Google-Smtp-Source: AK7set8tABDSm09z0DL64FLks6wBwy9oPW0tv9mc7ld+Cn0gBhiOmhssAJP9JKk18AJA9GjjSEAfyG1v9b1V1EX0KnI= X-Received: by 2002:adf:f08e:0:b0:2d2:1ed5:f68c with SMTP id n14-20020adff08e000000b002d21ed5f68cmr419070wro.11.1678980233235; Thu, 16 Mar 2023 08:23:53 -0700 (PDT) In-Reply-To: <74d91d8b-ac3c-9463-4334-9c1db8df7c13@posteo.de> Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=yurivkhan@gmail.com; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143043 Archived-At: On Thu, 16 Mar 2023 at 20:17, H.-J. Heitl=C3=A4nder 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 =E2=80=9Cediting epub=E2=80=9D. Are you even sure it=E2= =80=99s 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 =E2=80=98archive--extract-file=E2=80=99 initially sets the coding sys= tem to =E2=80=98no-conversion=E2=80=99, possibly because it needs that for decompr= ession. It is supposed to re-decide on a coding system later in =E2=80=98archive-set-buffer-as-visiting-file=E2=80=99, but for some reason = it keeps =E2=80=98no-conversion=E2=80=99 in your case.