GNU bug report logs -
#13887
24.3; doc-view will render blurry images when image-magick is available
Previous Next
Reported by: E Sabof <esabof <at> gmail.com>
Date: Wed, 6 Mar 2013 03:42:02 UTC
Severity: normal
Tags: moreinfo
Found in version 24.3
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Tassilo Horn <tsdh <at> gnu.org>
>> Cc: esabof <at> gmail.com, monnier <at> iro.umontreal.ca, 13887 <at> debbugs.gnu.org
>> Date: Mon, 11 Mar 2013 19:20:47 +0100
>>
>> > doc-view-new-window-function seems to be run from a
>> > window-configuration-change-hook, right?
>>
>> No, from `image-mode-new-window-functions'. The functions in there
>> are run by `image-mode-winprops' if (and only if) there are no
>> winprops set for the image and the current window.
>
> Maybe I'm missing something, but in image-mode.el:
>
> . image-mode-winprops is called by image-mode-reapply-winprops
>
> . image-mode-reapply-winprops is added by image-mode-setup-winprops
> to window-configuration-change-hook
>
> Doesn't that mean what I said?
Nearly, except that `image-mode-new-window-functions' are only run when
they don't have an entry in `image-mode-winprops-alist'.
>> Basically, this should only ever happen when there's a new window
>> showing the buffer with the image.
>
> How's that ensured? Can you walk us through the relevant code?
That's line 72 in image-mode.el:
(let ((winprops (assq window image-mode-winprops-alist)))
;; For new windows, set defaults from the latest.
(unless winprops
(setq winprops (cons window
(copy-alist (cdar image-mode-winprops-alist))))
(run-hook-with-args 'image-mode-new-window-functions winprops))
However, whenever the doc-view window is split (e.g., when a completion
buffer pops up), the doc-view buffer is indeed shown in a new window.
That's why `doc-view-new-window-function' is run more often than I
expected originally.
That also explains why there are often multiple overlays in the doc-view
buffer. There's one overlay per window that has shown the buffer at
least once. This allows that you can have 2 windows displaying the same
doc-view buffer: one showing page X, and in the other you can switch to
other pages without changing the other window.
So the multiple overlays thingy is actually intended. But somewhere the
logic goes wonky and we're acting on the wrong overlay.
Bye,
Tassilo
This bug report was last modified 5 years and 224 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.