From: "H.-J. Heitländer" <Heiner.Heitlaender@posteo.de>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: gnu emacs <help-gnu-emacs@gnu.org>
Subject: Re: emacs 30.5.0 editing epub
Date: Thu, 16 Mar 2023 06:57:26 +0000 [thread overview]
Message-ID: <4a7a0baf-677b-118c-fa6c-e50d054800e7@posteo.de> (raw)
In-Reply-To: <877cvhqo9p.fsf@web.de>
Hi Michael,
thanks for getting involved.
Nevertheless I would be quite content with a temporary solution by being
able to get emacs to redisplay in the correct form.
Thank you
Heiner
Appended backtrace:
load-file: arc-mode.el, doc-view.el, files.el
here we go:
<snip>
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
write-region(nil nil nil)
(if (equal buffer-file-name doc-view--buffer-file-name) nil
(doc-view-make-safe-dir doc-view-cache-directory) (write-region nil nil
doc-view--buffer-file-name))
(let ((revert-buffer-preserve-modes t)) (apply orig-fun args) (if (equal
buffer-file-name doc-view--buffer-file-name) nil (doc-view-make-safe-dir
doc-view-cache-directory) (write-region nil nil
doc-view--buffer-file-name)))
(closure ((args t t) (orig-fun . #f(compiled-function (&rest args)
#<bytecode -0x1d33bbea90aba2b6>)) revert-buffer-preserve-modes) nil (let
((revert-buffer-preserve-modes t)) (apply orig-fun args) (if (equal
buffer-file-name doc-view--buffer-file-name) nil (doc-view-make-safe-dir
doc-view-cache-directory) (write-region nil nil
doc-view--buffer-file-name))))()
funcall((closure ((args t t) (orig-fun . #f(compiled-function (&rest
args) #<bytecode -0x1d33bbea90aba2b6>)) revert-buffer-preserve-modes)
nil (let ((revert-buffer-preserve-modes t)) (apply orig-fun args) (if
(equal buffer-file-name doc-view--buffer-file-name) nil
(doc-view-make-safe-dir doc-view-cache-directory) (write-region nil nil
doc-view--buffer-file-name)))))
(if (and (eq 'pdf doc-view-doc-type) (executable-find "pdfinfo")) (if (=
0 (call-process "pdfinfo" nil nil nil doc-view--buffer-file-name))
(funcall --cl-revert--) (if (called-interactively-p 'interactive) (progn
(message "Can't revert right now because the file is corrupt..."))))
(funcall --cl-revert--))
(let* ((--cl-revert-- #'(lambda nil (let ((revert-buffer-preserve-modes
t)) (apply orig-fun args) (if (equal buffer-file-name
doc-view--buffer-file-name) nil (doc-view-make-safe-dir
doc-view-cache-directory) (write-region nil nil
doc-view--buffer-file-name)))))) (if (and (eq 'pdf doc-view-doc-type)
(executable-find "pdfinfo")) (if (= 0 (call-process "pdfinfo" nil nil
nil doc-view--buffer-file-name)) (funcall --cl-revert--) (if
(called-interactively-p 'interactive) (progn (message "Can't revert
right now because the file is corrupt...")))) (funcall --cl-revert--)))
doc-view--revert-buffer(#f(compiled-function (&rest args) #<bytecode
-0x1d33bbea90aba2b6>) t t)
apply(doc-view--revert-buffer #f(compiled-function (&rest args)
#<bytecode -0x1d33bbea90aba2b6>) (t t))
#f(advice doc-view--revert-buffer :around #f(compiled-function (&rest
args) #<bytecode -0x1d33bbea90aba2b6>))(t t)
apply(#f(advice doc-view--revert-buffer :around #f(compiled-function
(&rest args) #<bytecode -0x1d33bbea90aba2b6>)) t t nil)
(let ((coding-system-for-read 'no-conversion)) (apply orig-fun t t (cdr
(cdr args))))
(let ((no (archive-get-lineno))) (setq archive-files nil) (let
((coding-system-for-read 'no-conversion)) (apply orig-fun t t (cdr (cdr
args)))) (archive-mode) (goto-char archive-file-list-start)
(archive-next-line no))
archive--mode-revert(#f(advice doc-view--revert-buffer :around
#f(compiled-function (&rest args) #<bytecode -0x1d33bbea90aba2b6>)) nil nil)
apply(archive--mode-revert #f(advice doc-view--revert-buffer :around
#f(compiled-function (&rest args) #<bytecode -0x1d33bbea90aba2b6>)) (nil
nil))
#f(advice archive--mode-revert :around #f(advice doc-view--revert-buffer
:around #f(compiled-function (&rest args) #<bytecode
-0x1d33bbea90aba2b6>)))(nil nil)
funcall(#f(advice archive--mode-revert :around #f(advice
doc-view--revert-buffer :around #f(compiled-function (&rest args)
#<bytecode -0x1d33bbea90aba2b6>))) nil nil)
(let ((revert-buffer-in-progress-p t) (revert-buffer-preserve-modes
preserve-modes) (state (and (boundp 'read-only-mode--state) (list
read-only-mode--state)))) (funcall (or revert-buffer-function
#'revert-buffer--default) ignore-auto noconfirm) (if state (progn (setq
buffer-read-only (car state)) (set (make-local-variable
'read-only-mode--state) (car state)))))
revert-buffer()
(if (not archive-remote) (revert-buffer) (archive-maybe-update nil))
(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)
(or (run-hook-with-args-until-success 'local-write-file-hooks)
(run-hook-with-args-until-success 'write-file-functions) (let ((dir
(file-name-directory (expand-file-name buffer-file-name)))) (if
(file-exists-p dir) nil (if (y-or-n-p (format-message "Directory `%s'
does not exist; create? " dir)) (make-directory dir t) (error
"Canceled"))) (setq setmodes (basic-save-buffer-1))))
(if (run-hook-with-args-until-success 'write-contents-functions) nil (or
buffer-file-name (let ((filename (expand-file-name (read-file-name "File
to save in: " nil (expand-file-name ...))))) (if (file-exists-p
filename) (if (file-directory-p filename) (error "%s is a directory"
filename) (if (y-or-n-p (format-message "File `%s' exists; overwrite? "
filename)) nil (error "Canceled")))) (set-visited-file-name filename)))
(vc-before-save) (or (run-hook-with-args-until-success
'local-write-file-hooks) (run-hook-with-args-until-success
'write-file-functions) (let ((dir (file-name-directory (expand-file-name
buffer-file-name)))) (if (file-exists-p dir) nil (if (y-or-n-p
(format-message "Directory `%s' does not exist; create? " dir))
(make-directory dir t) (error "Canceled"))) (setq setmodes
(basic-save-buffer-1)))))
(save-restriction (widen) (save-excursion (and (> (point-max)
(point-min)) (not find-file-literally) (null buffer-read-only) (/=
(char-after (1- (point-max))) 10) (not (and (eq selective-display t) (=
(char-after (1- ...)) 13))) (or (eq require-final-newline t) (eq
require-final-newline 'visit-save) (and require-final-newline (y-or-n-p
(format "Buffer %s does not end in newline. Add one? " (buffer-name)))))
(save-excursion (goto-char (point-max)) (insert 10)))) (condition-case
err (run-hooks 'before-save-hook) ((debug error) (message "Before-save
hook error: %S" err) nil)) (if (run-hook-with-args-until-success
'write-contents-functions) nil (or buffer-file-name (let ((filename
(expand-file-name (read-file-name "File to save in: " nil ...)))) (if
(file-exists-p filename) (if (file-directory-p filename) (error "%s is a
directory" filename) (if (y-or-n-p ...) nil (error "Canceled"))))
(set-visited-file-name filename))) (vc-before-save) (or
(run-hook-with-args-until-success 'local-write-file-hooks)
(run-hook-with-args-until-success 'write-file-functions) (let ((dir
(file-name-directory (expand-file-name buffer-file-name)))) (if
(file-exists-p dir) nil (if (y-or-n-p (format-message "Directory `%s'
does not exist; create? " dir)) (make-directory dir t) (error
"Canceled"))) (setq setmodes (basic-save-buffer-1))))) (if
buffer-file-name (progn (if save-buffer-coding-system (setq
save-buffer-coding-system last-coding-system-used) (setq
buffer-file-coding-system last-coding-system-used)) (setq
buffer-file-number (file-attribute-file-identifier (file-attributes
buffer-file-name))) (if setmodes (condition-case nil (progn (if
(condition-case err ... ...) nil (set-file-extended-attributes
buffer-file-name ...))) (error nil))) (vc-after-save)))
(delete-auto-save-file-if-necessary recent-save))
(let ((recent-save (recent-auto-save-p)) setmodes) (or (null
buffer-file-name) (verify-visited-file-modtime (current-buffer)) (not
(file-exists-p buffer-file-name)) (yes-or-no-p (format "%s has changed
since visited or saved. Save anywa..." (file-name-nondirectory
buffer-file-name))) (user-error "Save not confirmed")) (save-restriction
(widen) (save-excursion (and (> (point-max) (point-min)) (not
find-file-literally) (null buffer-read-only) (/= (char-after (1-
(point-max))) 10) (not (and (eq selective-display t) (= (char-after ...)
13))) (or (eq require-final-newline t) (eq require-final-newline
'visit-save) (and require-final-newline (y-or-n-p (format "Buffer %s
does not end in newline. Add one? " ...)))) (save-excursion (goto-char
(point-max)) (insert 10)))) (condition-case err (run-hooks
'before-save-hook) ((debug error) (message "Before-save hook error: %S"
err) nil)) (if (run-hook-with-args-until-success
'write-contents-functions) nil (or buffer-file-name (let ((filename
(expand-file-name ...))) (if (file-exists-p filename) (if
(file-directory-p filename) (error "%s is a directory" filename) (if ...
nil ...))) (set-visited-file-name filename))) (vc-before-save) (or
(run-hook-with-args-until-success 'local-write-file-hooks)
(run-hook-with-args-until-success 'write-file-functions) (let ((dir
(file-name-directory ...))) (if (file-exists-p dir) nil (if (y-or-n-p
...) (make-directory dir t) (error "Canceled"))) (setq setmodes
(basic-save-buffer-1))))) (if buffer-file-name (progn (if
save-buffer-coding-system (setq save-buffer-coding-system
last-coding-system-used) (setq buffer-file-coding-system
last-coding-system-used)) (setq buffer-file-number
(file-attribute-file-identifier (file-attributes buffer-file-name))) (if
setmodes (condition-case nil (progn (if ... nil ...)) (error nil)))
(vc-after-save))) (delete-auto-save-file-if-necessary recent-save))
(run-hooks 'after-save-hook))
(if (or (buffer-modified-p) (and buffer-file-name (not (file-exists-p
buffer-file-name)))) (let ((recent-save (recent-auto-save-p)) setmodes)
(or (null buffer-file-name) (verify-visited-file-modtime
(current-buffer)) (not (file-exists-p buffer-file-name)) (yes-or-no-p
(format "%s has changed since visited or saved. Save anywa..."
(file-name-nondirectory buffer-file-name))) (user-error "Save not
confirmed")) (save-restriction (widen) (save-excursion (and (>
(point-max) (point-min)) (not find-file-literally) (null
buffer-read-only) (/= (char-after (1- ...)) 10) (not (and (eq
selective-display t) (= ... 13))) (or (eq require-final-newline t) (eq
require-final-newline 'visit-save) (and require-final-newline (y-or-n-p
...))) (save-excursion (goto-char (point-max)) (insert 10))))
(condition-case err (run-hooks 'before-save-hook) ((debug error)
(message "Before-save hook error: %S" err) nil)) (if
(run-hook-with-args-until-success 'write-contents-functions) nil (or
buffer-file-name (let ((filename ...)) (if (file-exists-p filename) (if
... ... ...)) (set-visited-file-name filename))) (vc-before-save) (or
(run-hook-with-args-until-success 'local-write-file-hooks)
(run-hook-with-args-until-success 'write-file-functions) (let ((dir
...)) (if (file-exists-p dir) nil (if ... ... ...)) (setq setmodes
(basic-save-buffer-1))))) (if buffer-file-name (progn (if
save-buffer-coding-system (setq save-buffer-coding-system
last-coding-system-used) (setq buffer-file-coding-system
last-coding-system-used)) (setq buffer-file-number
(file-attribute-file-identifier (file-attributes buffer-file-name))) (if
setmodes (condition-case nil (progn ...) (error nil))) (vc-after-save)))
(delete-auto-save-file-if-necessary recent-save)) (run-hooks
'after-save-hook)) (or noninteractive (not called-interactively)
(files--message "(No changes need to be saved)")))
(save-current-buffer (if (buffer-base-buffer) (set-buffer
(buffer-base-buffer))) (if (or (buffer-modified-p) (and buffer-file-name
(not (file-exists-p buffer-file-name)))) (let ((recent-save
(recent-auto-save-p)) setmodes) (or (null buffer-file-name)
(verify-visited-file-modtime (current-buffer)) (not (file-exists-p
buffer-file-name)) (yes-or-no-p (format "%s has changed since visited or
saved. Save anywa..." (file-name-nondirectory buffer-file-name)))
(user-error "Save not confirmed")) (save-restriction (widen)
(save-excursion (and (> (point-max) (point-min)) (not
find-file-literally) (null buffer-read-only) (/= (char-after ...) 10)
(not (and ... ...)) (or (eq require-final-newline t) (eq
require-final-newline ...) (and require-final-newline ...))
(save-excursion (goto-char ...) (insert 10)))) (condition-case err
(run-hooks 'before-save-hook) ((debug error) (message "Before-save hook
error: %S" err) nil)) (if (run-hook-with-args-until-success
'write-contents-functions) nil (or buffer-file-name (let (...) (if ...
...) (set-visited-file-name filename))) (vc-before-save) (or
(run-hook-with-args-until-success 'local-write-file-hooks)
(run-hook-with-args-until-success 'write-file-functions) (let (...) (if
... nil ...) (setq setmodes ...)))) (if buffer-file-name (progn (if
save-buffer-coding-system (setq save-buffer-coding-system
last-coding-system-used) (setq buffer-file-coding-system
last-coding-system-used)) (setq buffer-file-number
(file-attribute-file-identifier ...)) (if setmodes (condition-case nil
... ...)) (vc-after-save))) (delete-auto-save-file-if-necessary
recent-save)) (run-hooks 'after-save-hook)) (or noninteractive (not
called-interactively) (files--message "(No changes need to be saved)"))))
basic-save-buffer(t)
(let ((modp (buffer-modified-p)) (make-backup-files (or (and
make-backup-files (not (eq arg 0))) (memq arg '(16 64))))) (and modp
(memq arg '(16 64)) (setq buffer-backed-up nil)) (if (and modp
(buffer-file-name) (not noninteractive) (not save-silently)) (message
"Saving file %s..." (buffer-file-name))) (basic-save-buffer
(called-interactively-p 'any)) (and modp (memq arg '(4 64)) (setq
buffer-backed-up nil)))
save-buffer(1)
funcall-interactively(save-buffer 1)
command-execute(save-buffer)
</snip>
Am 16.03.23 um 06:05 schrieb Michael Heerdegen:
> H.-J. Heitländer<Heiner.Heitlaender@posteo.de> writes:
>
>> The problem:
>>
>> I am editing epub archives and any saves that I am doing result in
>>
>> <snip>
>>
>> ***backtrace***
>>
>> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>>
>> doc-view--revert-buffer(#f(compiled-function (&rest args) #<bytecode
>> -0x1d096aa50772e2b6>) t t)
> No idea why this is happening... but your backtrace is not very
> informative because it was created using compiled Elisp code.
>
> Could you please try to recreate a backtrace using interpreted Elisp?
> The only thing you need to do is to load the .el files of the according
> libraries ("doc-view.el" and "files.el" should suffice) and then do the
> same as before.
>
> TIA,
>
> Michael.
>
>
next prev parent reply other threads:[~2023-03-16 6:57 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-15 18:35 emacs 30.5.0 editing epub H.-J. Heitländer
2023-03-16 5:05 ` Michael Heerdegen
2023-03-16 6:57 ` H.-J. Heitländer [this message]
2023-03-17 0:44 ` Michael Heerdegen
2023-03-17 1:13 ` Michael Heerdegen
2023-03-19 21:23 ` editing a PDF [Re: emacs 30.5.0 editing epub] gebser
2023-03-19 23:59 ` Michael Heerdegen
2023-03-20 7:15 ` gebser
2023-03-21 0:31 ` Michael Heerdegen
2023-03-21 6:28 ` Yuri Khan
2023-03-21 6:38 ` Emanuel Berg
2023-03-22 16:32 ` Yuri Khan
2023-03-22 18:48 ` Bob Newell
2023-03-23 9:36 ` Jean Louis
2023-03-23 23:00 ` Bob Newell
2023-03-23 9:13 ` Jean Louis
2023-03-23 10:37 ` Michael Heerdegen
2023-03-23 20:13 ` Emanuel Berg
2023-03-23 20:07 ` Emanuel Berg
2023-03-21 11:51 ` Ulrich Deiters
2023-03-21 21:57 ` gebser
2023-03-21 22:55 ` Ulrich Deiters
2023-03-22 1:56 ` Michael Heerdegen
2023-03-22 8:26 ` FOSS replacement for PDF [Re: editing a PDF] gebser
2023-03-22 9:18 ` Yuri Khan
2023-03-23 9:21 ` Jean Louis
2023-03-23 9:49 ` Yuri Khan
2023-03-23 10:53 ` Gregory Heytings
2023-03-28 11:28 ` editing a PDF [Re: emacs 30.5.0 editing epub] Michael Heerdegen
2023-03-22 7:03 ` Jean Louis
2023-03-22 15:20 ` gebser
2023-03-16 9:22 ` emacs 30.5.0 editing epub Stephen Berman
2023-03-16 13:16 ` H.-J. Heitländer
2023-03-16 15:23 ` Yuri Khan
2023-03-16 16:54 ` H.-J. Heitländer
2023-03-16 18:58 ` Stefan Monnier via Users list for the GNU Emacs text editor
2023-03-20 21:50 ` emacs 30.5.0 editing epub - finishing remark 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4a7a0baf-677b-118c-fa6c-e50d054800e7@posteo.de \
--to=heiner.heitlaender@posteo.de \
--cc=help-gnu-emacs@gnu.org \
--cc=michael_heerdegen@web.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.