unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: "H.-J. Heitländer" <Heiner.Heitlaender@posteo.de>
Cc: 62239@debbugs.gnu.org
Subject: bug#62239: 30.0.50; emacs 30.5.0 editing epub encoding system
Date: Sat, 18 Mar 2023 01:06:47 +0100	[thread overview]
Message-ID: <87lejudiso.fsf@web.de> (raw)
In-Reply-To: <6445c1ab-07e5-1473-c4a0-9e4f21f4eb6d@posteo.de> ("H.-J. Heitländer"'s message of "Fri, 17 Mar 2023 09:02:16 +0000")

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

H.-J. Heitländer <Heiner.Heitlaender@posteo.de> writes:

> 1) enter epub <C-x D> .../test.epub <ENTER>
>
> 2) switch to edit In DocView(?) <C-c C-c>
>
> 3) open file ...4.html <Enter>
>
> 4) change a line (for instance " " => " ")
>
> 5) save file <C-x C-f>
>
> 6) Symptom: minibuffer display "Wrong Type Argument: stringp, nil"

When this error happens, is the epub opened in archive-mode or
doc-view-mode?

When in doc-view-mode I get a different error:

| Debugger entered--Lisp error: (void-variable archive-nil-write-file-member)
|   (symbol-value archive-nil-write-file-member)
|   (archive-*-write-file-member archive archive-subfile-mode (symbol-value writer))
|   (if (fboundp writer) (funcall writer archive archive-subfile-mode) (archive-*-write-file-member archive archive-subfile-mode (symbol-value writer)))
|   (let ((writer (save-current-buffer (set-buffer archive-superior-buffer) (archive-name "write-file-member"))) (archive (save-current-buffer (set-buffer archive-superior-buffer) (archive-maybe-copy (buffer-file-name))))) (if (fboundp writer) (funcall writer archive archive-subfile-mode) (archive-*-write-file-member archive archive-subfile-mode (symbol-value writer))) (set-buffer-modified-p nil) (message "Updating archive...done"))
|   (save-restriction (message "Updating archive...") (widen) (let ((writer (save-current-buffer (set-buffer archive-superior-buffer) (archive-name "write-file-member"))) (archive (save-current-buffer (set-buffer archive-superior-buffer) (archive-maybe-copy (buffer-file-name))))) (if (fboundp writer) (funcall writer archive archive-subfile-mode) (archive-*-write-file-member archive archive-subfile-mode (symbol-value writer))) (set-buffer-modified-p nil) (message "Updating archive...done")) (set-buffer archive-superior-buffer) (if (not archive-remote) (revert-buffer) (archive-maybe-update nil)))
|   (save-excursion (save-restriction (message "Updating archive...") (widen) (let ((writer (save-current-buffer (set-buffer archive-superior-buffer) (archive-name "write-file-member"))) (archive (save-current-buffer (set-buffer archive-superior-buffer) (archive-maybe-copy (buffer-file-name))))) (if (fboundp writer) (funcall writer archive archive-subfile-mode) (archive-*-write-file-member archive archive-subfile-mode (symbol-value writer))) (set-buffer-modified-p nil) (message "Updating archive...done")) (set-buffer archive-superior-buffer) (if (not archive-remote) (revert-buffer) (archive-maybe-update nil))))
|   (archive-write-file-member)
|   (run-hook-with-args-until-success archive-write-file-member)
|   (basic-save-buffer nil)
|   (save-buffer)

When I hit C-c C-c to leave doc-view-mode and return to the archive view,
I get an error like you posted.

doc-view-mode doesn't remove its installed advice on
`buffer-revert-function' when hitting C-c C-c, and this simple fix seems
to help to avoid the error above (could you maybe try that please?):


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 62239.patch --]
[-- Type: text/x-diff, Size: 649 bytes --]

diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index b14655fb274..00240ebf08d 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -2204,7 +2204,9 @@ doc-view-mode
     (add-hook 'change-major-mode-hook
 	      (lambda ()
 		(doc-view-kill-proc)
-		(remove-overlays (point-min) (point-max) 'doc-view t))
+		(remove-overlays (point-min) (point-max) 'doc-view t)
+                (remove-function (local 'revert-buffer-function)
+                                 #'doc-view--revert-buffer))
 	      nil t)
     (add-hook 'clone-indirect-buffer-hook #'doc-view-clone-buffer-hook nil t)
     (add-hook 'kill-buffer-hook #'doc-view-kill-proc nil t)

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


> 10 Directory buffer display in basic mode(?) (mode-line starts with "U:%%-
> emac...)

Is this the dired buffer or the buffer showing the archive contents?
Does the patch above help with this problem (assuming it is caused by
the error you got)?


TIA,

Michael.

  reply	other threads:[~2023-03-18  0:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17  9:02 bug#62239: 30.0.50; emacs 30.5.0 editing epub encoding system H.-J. Heitländer
2023-03-18  0:06 ` Michael Heerdegen [this message]
2023-03-27  8:27 ` bug#62239: patch feedback H.-J. Heitländer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lejudiso.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=62239@debbugs.gnu.org \
    --cc=Heiner.Heitlaender@posteo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).