Subject: bug#66308: 30.0.50; DocView: Bump default value of doc-view-resolution

From: Björn Bidar <[email-masked]>
Date: Tue, 03 Oct 2023 13:19:04 +0300

Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <[email-masked]> writes:

> Stefan Kangas <[email-masked]> writes:
>
>> How about increasing the default value of `doc-view-resolution' from 100
>> to something like 300?  In my use, I find that the default value gives
>> poor results, especially after `doc-view-enlarge', whereas a value of
>> 300 gives a nice, crisp display.  Monitors these days are certainly much
>> larger, and have much higher resolutions, than they used to.
>>
>> People in highly restricted environments might have to turn it back down
>> again, of course.  I think this is okay though, if the benefit is that
>> doc-view will look better in more typical cases.
>>
>> I also note that `doc-view-resolution' has had the same value since
>> 2007, when DocView mode was first added to Emacs.  After 15-20 years, it
>> might be time for a bump.
>
> How about making the resolution commensurate with that of the display
> itself?  Monitor density has not increased for lay folk, only those
> willing to spend prodigally on display hardware.

Would it make sense to set the resolution based on the resolution and
the dpi? Or how is scaling involved here?

> Compounding that, larger images will consume greater quantities of disk
> space and X server memory.  Bear in mind that /tmp is customarily small;
> only 4 GiB on my system, with 1.8GiB in use, whereof /tmp/docview1000
> consumes 971 MiB.

Should we store this data on Unixes in `$XDG_CACHE_HOME` Instead
of temp?
Doing so would also allow to reuse it if the particular file is viewed
again.