emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add user stylesheet support for doc-view EPUB support


From: Lars Ingebrigtsen
Subject: Re: [PATCH] Add user stylesheet support for doc-view EPUB support
Date: Sun, 06 Mar 2022 23:07:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Kjartan Oli Agustsson <kjartanoli@outlook.com> writes:

> @@ -1079,6 +1085,9 @@ doc-view-start-process

Adding support for CSS makes sense to me.  But is this the best place to
add it?  It's the general function that's called for all the different
conversions?

>    (let* ((default-directory (or (unhandled-file-name-directory
>                                   default-directory)
>                               (expand-file-name "~/")))
> +        (args (if (and (eq doc-view-doc-type 'epub)
> +                        doc-view-mutool-user-stylesheet)
> +                  (cons (car args) (cons (format "-U%s" (expand-file-name 
> doc-view-mutool-user-stylesheet)) (cdr args)))))

And I don't think this can be right -- for instance, it's called here:

    (doc-view-start-process "dvi->pdf" doc-view-dvipdfm-program
                            (list "-o" pdf dvi)
                            callback)))

And you're splicing in the stylesheet after "-o" (potentially -- I'm not
that familiar with the doc-view code), which will break things.  (And if
doc-view-mutool-user-stylesheet is nil, then args will also be bound to
nil, which will make all the calls fail.)

I've added Daniel to the CCs; perhaps he has further comments.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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