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

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

bug#55825: [PATCH] Reconvert EPUB buffers when user CSS is changed


From: Eli Zaretskii
Subject: bug#55825: [PATCH] Reconvert EPUB buffers when user CSS is changed
Date: Tue, 07 Jun 2022 14:06:10 +0300

> From: Kjartan Oli Agustsson <kjartanoli@outlook.com>
> Date: Mon, 06 Jun 2022 19:20:04 +0000
> 
> +(defun doc-view-custom-set-epub-user-stylesheet (option-name new-value)
> +  "Setter for `doc-view-epub-user-stylesheet'.
> +
> +Reconverts existing epub buffers when the file used as a user
> +stylesheet is switched."
> +  (set-default option-name new-value)
> +  (file-notify-rm-watch doc-view--epub-stylesheet-watcher)
> +  (doc-view--epub-reconvert)
> +  (setq doc-view--epub-stylesheet-watcher
> +         (when doc-view-epub-user-stylesheet
> +           (file-notify-add-watch doc-view-epub-user-stylesheet '(change) 
> #'doc-view--epub-reconvert))))

Are you sure 'change is TRT here?  What kinds of changes did you want
to watch in this case (it isn't clear from the doc string or the log
message)?  'change is a synthetic event, and it means slightly
different things with each file-notification back-end, so I wonder
whether 'change is portable enough here?





reply via email to

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